/* ==================== MODERN WIZARD V2 — PREMIUM EDITION ==================== */

/* === Root Layout === */

/* CSS Grid wizard: 3 explicit rows — header (auto) + content (1fr) + footer (auto).
   Viewport-based height bypasses flex parent resolution issues entirely.
   Grid's "auto" rows ALWAYS take their content height — more reliable than flex-shrink:0. */
.v2-wizard {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background: #eef1f5;
    position: relative;
    overflow: hidden;
}

/* Hide footer, remove padding, and lock all scroll when any claim wizard is active */
body.wizard-active {
    overflow: hidden !important;
}

body.wizard-active .main-footer {
    display: none !important;
}

body.wizard-active .main-content {
    padding-bottom: 0 !important;
    overflow: hidden !important;
}

/* === Progress Header — clean white bar (grid row 1: auto) === */
.v2-progress-header {
    padding: 0 32px;
    min-height: 70px;
    background: #fff;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Subtle green accent along bottom edge */
.v2-progress-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 133, 66, 0.25), transparent);
}

.v2-progress-bar-track {
    height: 3px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.v2-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #18A74B, #18A74B);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(47, 133, 66, 0.3);
}

.v2-steps-indicator {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    position: relative;
    max-width: 650px;
    margin: 0 auto;
}

/* Connecting line behind all dots */
.v2-steps-indicator::before {
    content: '';
    position: absolute;
    top: 34px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.v2-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    flex: 1;
}

.v2-dot-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #d1d5db;
    background: #f3f4f6;
    color: #9ca3af;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.v2-step-dot.active .v2-dot-circle {
    border-color: #18A74B;
    background: #18A74B;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(47, 133, 66, 0.2), 0 0 20px rgba(47, 133, 66, 0.3);
    transform: scale(1.1);
}

.v2-step-dot.completed .v2-dot-circle {
    border-color: #86efac;
    background: #F4F0E9;
    color: #2F8542;
}

.v2-step-dot.completed .v2-dot-circle span {
    display: none;
}

.v2-step-dot.completed .v2-dot-circle::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 13px;
}

.v2-dot-label {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.v2-step-dot.active .v2-dot-label {
    color: #2F8542;
    font-weight: 600;
}

.v2-step-dot.completed .v2-dot-label {
    color: #6b7280;
}

/* Step counter text */
.v2-step-counter {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    padding-bottom: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.v2-step-counter strong {
    color: #2F8542;
}

/* === Panels Viewport (slide animation — grid row 2: 1fr) === */
.v2-panels-viewport {
    overflow: hidden;
    position: relative;
    z-index: 1;
    min-height: 0; /* Prevents grid row from growing beyond 1fr */
}

.v2-panels-track {
    display: flex;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.v2-panel {
    min-width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.v2-panel-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 36px 28px 36px;
}

/* === Panel Header === */
.v2-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 32px;
}

.v2-panel-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2F8542, #18A74B);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(30, 99, 50, 0.25);
}

.v2-panel-icon-review {
    background: linear-gradient(135deg, #1E6332, #2F8542);
    box-shadow: 0 4px 14px rgba(30, 99, 50, 0.25);
}

.v2-panel-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.v2-panel-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* === Cards — glass-morphism with layered shadows === */
.v2-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.v2-card:hover {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(47, 133, 66, 0.15);
}

.v2-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2F8542;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.v2-section-label i {
    font-size: 12px;
    opacity: 0.7;
}

/* === Form Elements — refined inputs === */
.v2-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.v2-required {
    color: #ef4444;
}

.v2-input, .v2-select, .v2-textarea {
    width: 100%;
    padding: 11px 16px;
    font-size: 0.9375rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #1e293b;
    transition: all 0.25s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) inset;
}

.v2-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.v2-input:focus, .v2-select:focus, .v2-textarea:focus {
    border-color: #18A74B;
    box-shadow: 0 0 0 3px rgba(47, 133, 66, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04) inset;
}

.v2-input::placeholder, .v2-textarea::placeholder {
    color: #b0b8c4;
}

.v2-textarea {
    resize: vertical;
    min-height: 60px;
}

.v2-field {
    margin-bottom: 16px;
}

.v2-field:last-child {
    margin-bottom: 0;
}

.v2-row {
    display: flex;
    gap: 16px;
}

.v2-row > .v2-field {
    flex: 1;
}

.v2-row-3 {
    display: flex;
    gap: 12px;
}

.v2-hint {
    font-size: 0.775rem;
    color: #94a3b8;
    margin-top: 5px;
    line-height: 1.4;
}

.v2-hint i {
    margin-right: 4px;
    color: #18A74B;
}

/* Input group (prefix / addon) */
.v2-input-group {
    display: flex;
    align-items: stretch;
    position: relative;
}

.v2-input-group .v2-input {
    flex: 1;
    min-width: 0;
}

.v2-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border: 1.5px solid #e2e8f0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #475569;
    font-size: 0.9375rem;
    font-weight: 600;
}

.v2-input-prefix + .v2-input {
    border-radius: 0 12px 12px 0;
}

.v2-input-addon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 14px;
    transition: color 0.2s;
}

.v2-input-addon:hover {
    color: #18A74B;
}

/* === Chip Selectors — refined pills === */
.v2-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-chip {
    cursor: pointer;
    margin: 0;
}

.v2-chip input {
    display: none;
}

.v2-chip span {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.8375rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.v2-chip:hover span {
    border-color: #86efac;
    background: #F4F0E9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(47, 133, 66, 0.1);
}

.v2-chip input:checked + span {
    background: linear-gradient(135deg, #2F8542, #18A74B);
    border-color: #2F8542;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 99, 50, 0.3);
    transform: translateY(-1px);
}

/* Toggle group (Yes/No) — pill toggle */
.v2-toggle-group {
    display: inline-flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) inset;
}

.v2-toggle-btn {
    cursor: pointer;
    margin: 0;
}

.v2-toggle-btn input {
    display: none;
}

.v2-toggle-btn span {
    display: inline-block;
    padding: 9px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    transition: all 0.25s ease;
    border-right: 1px solid #e2e8f0;
}

.v2-toggle-btn:last-child span {
    border-right: none;
}

.v2-toggle-btn input:checked + span {
    background: linear-gradient(135deg, #2F8542, #18A74B);
    color: #fff;
    box-shadow: 0 2px 6px rgba(30, 99, 50, 0.25);
}


/* === Callout — amber tip box === */
.v2-callout {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    margin-bottom: 16px;
}

.v2-callout-icon {
    color: #f59e0b;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.v2-callout-body {
    font-size: 0.8375rem;
    color: #92400e;
    line-height: 1.5;
}

/* === Items List (policies / beneficiaries) — accent border cards === */
.v2-items-list {
    margin-bottom: 16px;
}

.v2-item-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1E6332;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.v2-item-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #a7f3d0;
}

.v2-item-card.beneficiary-item {
    border-left-color: #ec4899;
}

.v2-item-card.beneficiary-item:hover {
    border-color: #fbcfe8;
}

.v2-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.v2-item-icon.policy {
    background: linear-gradient(135deg, #1E6332, #2F8542);
    color: #fff;
    box-shadow: 0 3px 8px rgba(30, 99, 50, 0.25);
}

.v2-item-icon.beneficiary {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #fff;
    box-shadow: 0 3px 8px rgba(236, 72, 153, 0.25);
}

.v2-item-details {
    flex: 1;
    min-width: 0;
}

.v2-item-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-item-meta {
    font-size: 0.775rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 3px;
}

.v2-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #F4F0E9, #E8DFD0);
    color: #1E6332;
}
.v2-item-badge .ic-badge {
    gap: 4px;
    font-size: inherit;
    font-weight: inherit;
}
.v2-item-badge .ic-logo {
    height: 18px;
    max-width: 32px;
}
.v2-item-badge .ic-logo-fallback {
    font-size: 12px;
    width: 16px;
}

/* IC badges inside V2 policy cards */
.v2-item-title .ic-badge {
    gap: 8px;
}
.v2-item-title .ic-logo {
    height: 28px;
    max-width: 48px;
}
.v2-item-title .ic-logo-fallback {
    font-size: 16px;
    width: 20px;
}

/* IC badges in V2 policy checkboxes */
.v2-policy-check-label .ic-badge {
    gap: 6px;
}
.v2-policy-check-label .ic-logo {
    height: 22px;
    max-width: 40px;
}
.v2-policy-check-label .ic-logo-fallback {
    font-size: 14px;
    width: 18px;
}

/* IC badges in V2 review tables */
.v2-review-card table .ic-badge {
    gap: 6px;
}
.v2-review-card table .ic-logo {
    height: 24px;
    max-width: 44px;
}
.v2-review-card table .ic-logo-fallback {
    font-size: 14px;
    width: 18px;
}

/* IC badge in V2 IC info panel header */
.v2-ic-info-header .ic-badge {
    gap: 8px;
}
.v2-ic-info-header .ic-logo {
    height: 32px;
    max-width: 56px;
}
.v2-ic-info-header .ic-logo-fallback {
    font-size: 18px;
    width: 24px;
}

.v2-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.v2-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    transition: all 0.2s;
}

.v2-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: scale(1.05);
}

.v2-icon-btn.danger:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* === Add Button — dashed with hover fill === */
.v2-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: transparent;
    color: #2F8542;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.v2-add-btn:hover {
    border-color: #18A74B;
    background: linear-gradient(135deg, rgba(30, 99, 50, 0.04), rgba(47, 133, 66, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 99, 50, 0.1);
}

/* === Inline Form — accented entry panel === */
.v2-inline-form {
    background: #fff;
    border: 2px solid #18A74B;
    border-radius: 16px;
    padding: 28px;
    margin-top: 16px;
    box-shadow: 0 8px 32px rgba(30, 99, 50, 0.12);
    animation: v2SlideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* Green accent bar at top */
.v2-inline-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 3px;
    background: linear-gradient(90deg, #18A74B, #18A74B);
    border-radius: 0 0 3px 3px;
}

@keyframes v2SlideDown {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.v2-inline-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: #2F8542;
}

.v2-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.v2-close-btn:hover {
    background: #fef2f2;
    color: #dc2626;
    transform: rotate(90deg);
}

.v2-inline-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.v2-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 22px 0;
}

/* === IC Info Panel — knowledge card === */
.v2-ic-info {
    background: linear-gradient(135deg, #F4F0E9, #ecfdf5);
    border: 1px solid #E8DFD0;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 16px;
    animation: v2SlideDown 0.3s ease;
}

.v2-ic-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #1E6332;
    font-size: 0.875rem;
    font-weight: 700;
}

.v2-ic-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

.v2-ic-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.v2-ic-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.v2-ic-val {
    font-size: 0.8125rem;
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}

/* === Policy checkboxes — card-style === */
.v2-policy-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-policy-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
}

.v2-policy-check:hover {
    border-color: #86efac;
    background: #F4F0E9;
}

.v2-policy-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #18A74B;
    cursor: pointer;
}

.v2-policy-check-label {
    font-size: 0.875rem;
    color: #1e293b;
    flex: 1;
    font-weight: 500;
}

.v2-policy-check input:checked ~ .v2-policy-check-label {
    color: #1E6332;
    font-weight: 700;
}

/* === Review Cards — premium summary === */
.v2-review-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.v2-review-card:hover {
    border-color: rgba(47, 133, 66, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.v2-review-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #fafffe, #F4F0E9);
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.v2-review-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2F8542, #18A74B);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(30, 99, 50, 0.2);
}

.v2-review-arrow {
    margin-left: auto;
    color: #94a3b8;
    font-size: 12px;
    transition: all 0.3s ease;
}

.v2-review-card:hover .v2-review-arrow {
    transform: translateX(4px);
    color: #18A74B;
}

.v2-review-count {
    background: linear-gradient(135deg, #2F8542, #18A74B);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(30, 99, 50, 0.3);
}

.v2-review-card-body {
    padding: 18px 22px;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
}

.v2-review-card-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.v2-review-card-body table th {
    text-align: left;
    padding: 8px 10px;
    font-weight: 700;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.v2-review-card-body table td {
    padding: 10px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.v2-review-card-body table tr:last-child td {
    border-bottom: none;
}

.v2-review-item {
    margin-bottom: 4px;
}

.v2-review-label {
    color: #94a3b8;
    font-size: 0.775rem;
    font-weight: 500;
}

/* === Review Step Number Badge === */
.v2-review-step-num {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Amount Requested / Family Pay (V2) === */
.v2-amount-requested {
    border: 1px solid #e2e8f0;
}

/* ===== FAMILY PAY — DoorDash-style chip selector (shared by both wizards) ===== */
.fp-promo-section {
    padding: 20px 0 16px;
    border-bottom: 1px solid #e2e8f0;
}

.fp-promo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.fp-promo-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.fp-promo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.fp-promo-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

/* Surplus context banner */
.fp-promo-context {
    background: linear-gradient(135deg, #F4F0E9, #ecfdf5);
    border: 1px solid #E8DFD0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chip row */
.fp-promo-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

/* Individual chip */
.fp-chip {
    flex: 1;
    min-width: 80px;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.fp-chip:hover {
    border-color: #86efac;
    background: #F4F0E9;
    transform: translateY(-2px);
}

.fp-chip:active {
    transform: scale(0.97);
}

.fp-chip.selected {
    border-color: #18A74B;
    background: linear-gradient(135deg, #2F8542, #18A74B);
    color: #fff;
    box-shadow: 0 4px 14px rgba(47, 133, 66, 0.35);
}

.fp-chip-icon {
    font-size: 18px;
    color: #2F8542;
}

.fp-chip.selected .fp-chip-icon {
    color: #fff;
}

.fp-chip-amount {
    font-size: 1rem;
    font-weight: 700;
}

.fp-chip-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fp-chip.selected .fp-chip-label {
    color: rgba(255, 255, 255, 0.85);
}

/* Custom chip — dashed border */
.fp-chip-custom {
    border-style: dashed;
}

.fp-chip-custom.selected {
    border-style: solid;
}

/* Custom input */
.fp-custom-input {
    margin-bottom: 12px;
    max-width: 250px;
}

/* Skip link */
.fp-promo-skip {
    text-align: center;
    margin-bottom: 12px;
}

.fp-skip-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 8px;
    transition: all 0.15s;
    font-family: inherit;
}

.fp-skip-btn:hover {
    color: #64748b;
    background: #f1f5f9;
}

.fp-skip-btn.active {
    color: #475569;
    font-weight: 600;
    text-decoration: underline;
}

/* Family Pay status wrapper */
.fp-status-wrap {
    text-align: center;
    margin-bottom: 12px;
    min-height: 40px;
}

/* Positive "Family Pay Included" status */
.fp-status-included {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F4F0E9;
    border: 1px solid #E8DFD0;
    color: #166534;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: fpIncludedFadeIn 0.3s ease;
}

.fp-status-included i {
    font-size: 16px;
    color: #18A74B;
}

.fp-status-included strong {
    color: #1E6332;
}

/* Remove FP link */
.fp-status-remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 4px 10px;
    margin-left: 8px;
    border-radius: 6px;
    transition: all 0.15s;
    font-family: inherit;
    vertical-align: middle;
}

.fp-status-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

@keyframes fpIncludedFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Learn more toggle */
.fp-promo-info-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 4px;
}

.fp-promo-info-toggle:hover {
    color: #2F8542;
}

.fp-info-chevron {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.fp-info-chevron.open {
    transform: rotate(180deg);
}

/* Info panel */
.fp-promo-info-panel {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.5;
}

.fp-promo-info-panel p {
    margin: 0 0 6px;
}

.fp-promo-info-panel p:last-child {
    margin-bottom: 0;
}

/* ===== POLICY BREAKDOWN (Face Value + Service Amount per policy) ===== */
.fp-policy-breakdown {
    margin-bottom: 16px;
}

.fp-bd-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.fp-bd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fp-bd-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-bd-title i {
    color: #2F8542;
    font-size: 0.8rem;
}

.fp-bd-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.fp-bd-items {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.fp-bd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 4px 22px;
    font-size: 0.82rem;
}

.fp-bd-label {
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.fp-bd-amt {
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== FINANCIAL SUMMARY (redesigned) ===== */
.fp-financial-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}

.fp-fs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.fp-fs-header i {
    color: #2F8542;
}

.fp-fs-body {
    padding: 14px 16px;
}

.fp-fs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.88rem;
    color: #334155;
}

.fp-fs-add {
    color: #64748b;
    font-size: 0.84rem;
}

.fp-fs-green {
    color: #2F8542;
    font-weight: 600;
}

.fp-fs-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 6px 0;
}

.fp-fs-divider-heavy {
    height: 2px;
    background: #cbd5e1;
}

.fp-fs-subtotal {
    font-weight: 600;
}

.fp-fs-total {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    padding: 8px 0 4px;
}

.fp-fs-net {
    background: linear-gradient(135deg, #F4F0E9, #ecfdf5);
    margin: 8px -16px -14px;
    padding: 12px 16px;
    border-top: 1px solid #E8DFD0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #166534;
}

.fp-fs-net i {
    margin-right: 4px;
    font-size: 0.8rem;
}

/* Face value usage bar */
.fp-fs-usage {
    padding: 10px 16px 12px;
    border-top: 1px solid #e2e8f0;
}

.fp-fs-usage-bar {
    height: 22px;
    background: #e2e8f0;
    border-radius: 11px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
}

.fp-fs-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #18A74B, #2F8542);
    border-radius: 11px;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 36px;
}

.fp-fs-usage-pct {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    padding-right: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.fp-fs-usage-fill.fp-bar-warn {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.fp-fs-usage-fill.fp-bar-over {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    width: 100% !important;
}

.fp-fs-usage-text {
    font-size: 0.78rem;
    color: #64748b;
}

.fp-fs-usage-text.fp-fs-over {
    color: #dc2626;
    font-weight: 600;
}

/* Warning banner */
.fp-fs-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 10px 16px;
    background: #fef2f2;
    border-top: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.82rem;
    line-height: 1.4;
}

.fp-fs-warning i {
    color: #dc2626;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ===== IC POLICY CHIP (white bg for beneficiary linked policies) ===== */
.ic-policy-chip {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #334155;
    vertical-align: middle;
}

.ic-policy-chip .ic-logo {
    height: 18px;
    max-width: 32px;
}

.ic-policy-chip .ic-logo-fallback {
    font-size: 12px;
    width: 16px;
}

.v2-action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.v2-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.v2-action-btn:hover {
    border-color: #1E6332;
    color: #1E6332;
    background: #F4F0E9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 99, 50, 0.12);
}

.v2-action-btn i {
    font-size: 1rem;
}

/* (Old review 2-column sidebar removed — warnings now inline per-policy) */

/* === Submit Button — dramatic CTA === */
.v2-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #2F8542 0%, #1E6332 50%, #166534 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 24px;
    box-shadow:
        0 4px 14px rgba(30, 99, 50, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect */
.v2-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.v2-submit-btn:hover::before {
    left: 100%;
}

.v2-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 28px rgba(30, 99, 50, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.v2-submit-btn:active {
    transform: translateY(-1px);
}

/* === Bottom Navigation — frosted glass === */
.v2-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    flex-shrink: 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    z-index: 2;
}

/* === Buttons — polished === */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.v2-btn-primary {
    background: linear-gradient(135deg, #2F8542, #18A74B);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 99, 50, 0.3);
}

.v2-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 99, 50, 0.4);
}

.v2-btn-outline {
    background: #fff;
    color: #475569;
    border: 1.5px solid #d1d5db;
}

.v2-btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

.v2-btn-ghost {
    background: transparent;
    color: #2F8542;
    border: 1.5px solid transparent;
}

.v2-btn-ghost:hover {
    background: rgba(30, 99, 50, 0.06);
    border-color: rgba(30, 99, 50, 0.15);
}

.v2-btn-danger-outline {
    background: transparent;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
    font-size: 13px;
}

.v2-btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #b91c1c;
}

.v2-bottom-nav-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* === Wizard Selector Modal — premium picker === */
.v2-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1060;
    animation: v2FadeIn 0.2s ease;
    backdrop-filter: blur(8px);
}

@keyframes v2FadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.v2-selector-modal {
    background: #fff;
    border-radius: 24px;
    width: 600px;
    max-width: 95vw;
    overflow: hidden;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: v2ScaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes v2ScaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.v2-selector-header {
    padding: 28px 32px 18px;
    text-align: center;
}

.v2-selector-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.v2-selector-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.v2-selector-options {
    display: flex;
    gap: 16px;
    padding: 8px 32px 32px;
}

.v2-selector-option {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    position: relative;
}

.v2-selector-option:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.v2-selector-option.classic:hover {
    border-color: #94a3b8;
}

.v2-selector-option.modern:hover {
    border-color: #18A74B;
    box-shadow: 0 12px 32px rgba(30, 99, 50, 0.15);
}

.v2-selector-option-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.v2-selector-option.classic .v2-selector-option-icon {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
}

.v2-selector-option.modern .v2-selector-option-icon {
    background: linear-gradient(135deg, #059669, #18A74B, #18A74B);
    color: #fff;
    box-shadow: 0 4px 16px rgba(30, 99, 50, 0.35);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.v2-selector-option.modern .v2-selector-option-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.2), transparent, rgba(255,255,255,0.1), transparent);
    animation: v2IconShimmer 3s linear infinite;
}

@keyframes v2IconShimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.v2-selector-option.modern .v2-selector-option-icon i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.v2-selector-option-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.v2-selector-option-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

.v2-selector-new-badge {
    position: absolute;
    top: -10px;
    right: -6px;
    background: linear-gradient(135deg, #2F8542, #18A74B);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 3px 8px rgba(30, 99, 50, 0.4);
}

.v2-selector-close {
    display: block;
    text-align: center;
    padding: 16px;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid #f1f5f9;
    transition: color 0.2s;
}

.v2-selector-close:hover {
    color: #475569;
}

/* === Empty state === */
.v2-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.v2-empty-state i {
    font-size: 36px;
    margin-bottom: 14px;
    color: #cbd5e1;
}

.v2-empty-state p {
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

/* === Responsive: Tablets === */
@media (max-width: 1024px) {
    .v2-panel-inner {
        padding: 28px 20px 28px;
    }
    .v2-progress-header {
        padding: 0 24px;
    }
    .v2-bottom-nav {
        padding: 14px 24px;
    }
}

/* V2 address map container — always visible with placeholder */
.v2-address-map-container {
    display: block;
    margin-top: 12px;
    border-radius: 14px;
}

.v2-address-map-container .address-mini-map {
    border-radius: 14px;
}

/* V2 PlaceAutocompleteElement — match .v2-input styling */
.v2-card gmp-place-autocomplete::part(input) {
    padding: 11px 16px;
    font-size: 0.9375rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) inset;
}

.v2-card gmp-place-autocomplete::part(input):focus {
    border-color: #18A74B;
    box-shadow: 0 0 0 3px rgba(47, 133, 66, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04) inset;
}
