/* =========================================================================
   FDIC Customer Portal — Design System
   Production-grade styling for government/banking interface
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Core palette — matched to reference design */
    --navy-900: #08172e;
    --navy-800: #0d2440;
    --navy-700: #112e51;
    --navy-600: #1a3c63;
    --navy-500: #005ea2;
    --navy-400: #4a77a8;
    --navy-300: #8fb3d1;

    /* Accent — gold from reference */
    --gold-600: #9e7e3a;
    --gold-500: #cbb77a;
    --gold-400: #d4af5a;

    /* Semantic */
    --green-700: #1d6e35;
    --green-600: #2a8a45;
    --green-100: #e6f3ea;
    --red-700: #b5242a;
    --red-600: #d63236;
    --red-100: #fbeaec;
    --amber-600: #c87a14;
    --amber-100: #fdf3e3;

    /* Neutrals */
    --gray-50: #f7f8fa;
    --gray-100: #eef0f3;
    --gray-200: #e0e3e8;
    --gray-300: #cfd4dc;
    --gray-400: #9ba4b0;
    --gray-500: #6c7682;
    --gray-600: #4d5762;
    --gray-700: #364049;
    --gray-800: #252d35;
    --gray-900: #181d23;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(8,23,46,0.05);
    --shadow-sm: 0 1px 3px rgba(8,23,46,0.08), 0 1px 2px rgba(8,23,46,0.04);
    --shadow-md: 0 4px 12px rgba(8,23,46,0.08), 0 2px 4px rgba(8,23,46,0.04);
    --shadow-lg: 0 12px 32px rgba(8,23,46,0.12), 0 4px 8px rgba(8,23,46,0.06);
    --shadow-xl: 0 24px 48px rgba(8,23,46,0.16), 0 8px 16px rgba(8,23,46,0.08);

    /* Spacing scale (8px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);

    /* Accent blue for verification progress */
    --verify-accent: #117aca;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.5;
}

/* SVG icon sizing */
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-12 { width: 12px; height: 12px; }
.icon-14 { width: 14px; height: 14px; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }
.icon-24 { width: 24px; height: 24px; }
.icon-32 { width: 32px; height: 32px; }

/* ===== US Government Banner ===== */
.gov-banner {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-1) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-600);
}

.gov-banner-left { display: flex; align-items: center; gap: var(--space-2); }
.gov-banner-left svg { color: var(--navy-500); }

.gov-banner-right { display: flex; align-items: center; gap: var(--space-4); }

.gov-banner-right a {
    color: var(--navy-500);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--ease-fast) 0.15s;
}
.gov-banner-right a:hover { color: var(--navy-700); text-decoration: underline; }

.search-fdic {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: white;
    transition: border-color var(--ease-fast) 0.15s;
}
.search-fdic:focus-within { border-color: var(--navy-500); }
.search-fdic input {
    border: none;
    padding: 5px var(--space-2);
    font-size: 12px;
    width: 140px;
    outline: none;
    font-family: var(--font-sans);
    background: transparent;
}
.search-fdic button {
    background: var(--navy-800);
    border: none;
    color: white;
    padding: 5px var(--space-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Header Navigation ===== */
.header-nav {
    background-color: var(--navy-800);
    border-top: 8px solid var(--gold-500);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.logo-area img {
    max-height: 45px;
    width: auto;
}

.logo-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.header-nav .nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.header-nav .nav-links li { display: flex; align-items: center; }

.header-nav .nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    padding-bottom: 2px;
    transition: none;
}
.header-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-500);
    transition: width 0.3s ease;
}
.header-nav .nav-links a:hover::after { width: 100%; }
.header-nav .nav-links a.active-link::after { width: 100%; }

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-6);
    position: relative;
}

/* ===== Auth Card ===== */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-10);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-1);
    color: var(--navy-900);
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: var(--space-6);
}

.main-content-admin {
    background:
        linear-gradient(180deg, rgba(8,23,46,0.06) 0%, transparent 280px),
        var(--gray-50);
}

.card-admin {
    max-width: 420px;
    border: 1px solid var(--navy-400);
    box-shadow: var(--shadow-xl);
}

.admin-login-badge {
    display: block;
    width: fit-content;
    margin: 0 auto var(--space-4);
    background: var(--navy-800);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 5px 12px;
    border-radius: 20px;
}

.card-admin .card-title {
    color: var(--navy-800);
}

.card-admin .btn-primary {
    background: var(--navy-900);
}

.card-admin .btn-primary:hover {
    background: var(--navy-700);
}

/* ===== Tab Switcher ===== */
.tab-switcher {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-6);
    background: var(--gray-100);
    padding: 3px;
    border-radius: var(--radius-lg);
}

.tab-btn {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: var(--radius-md);
    transition: all var(--ease-fast) 0.2s;
    font-family: var(--font-sans);
}

.tab-btn.active {
    background: white;
    color: var(--navy-800);
    box-shadow: var(--shadow-sm);
}

/* ===== Form Fields ===== */
.field-group { margin-bottom: var(--space-4); }

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: var(--space-2);
}

.field-input {
    width: 100%;
    padding: 11px var(--space-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--gray-900);
    background: white;
    outline: none;
    transition: border-color var(--ease-fast) 0.15s, box-shadow var(--ease-fast) 0.15s;
}
.field-input:focus {
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(32,84,147,0.12);
}
.field-input::placeholder { color: var(--gray-400); }

/* ===== Buttons ===== */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--navy-800);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all var(--ease-fast) 0.15s;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background: var(--navy-700);
    box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== Support Online Badge ===== */
.support-online {
    margin-top: var(--space-6);
    background: var(--green-100);
    border: 1px solid rgba(45,138,69,0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.support-online .headset-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-600);
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}

.support-online .support-text .title {
    font-weight: 600;
    font-size: 13px;
    color: var(--green-700);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.support-online .support-text .title::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--green-600);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(42,138,69,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(42,138,69,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(42,138,69,0.05); }
}

.support-online .support-text .desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.card-notice {
    margin-top: var(--space-6);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.card-notice .notice-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-600);
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}
.card-notice .notice-text .title {
    font-weight: 600;
    font-size: 13px;
    color: var(--navy-800);
}
.card-notice .notice-text .desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ===== Access Denied Banner ===== */
.access-denied {
    background: var(--red-100);
    border: 1px solid rgba(214,50,54,0.2);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.access-denied svg { color: var(--red-600); flex-shrink: 0; }
.access-denied .msg {
    color: var(--red-700);
    font-size: 13px;
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--space-3) var(--space-6);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
}
.footer a {
    color: var(--gray-300);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--ease-fast) 0.15s;
}
.footer a:hover { color: white; }
.footer .separator { color: var(--gray-700); }

/* ===== Bank Verification Loading ===== */
.verify-loading-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-10);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.verify-loading-logo {
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-loading-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin: var(--space-5) 0;
}
.progress-bar .fill {
    height: 100%;
    background: var(--verify-accent);
    border-radius: 2px;
    animation: progressGrow 2.5s var(--ease) forwards;
}
@keyframes progressGrow { 0% { width: 0%; } 100% { width: 100%; } }

.verify-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--navy-900);
}
.verify-subtitle {
    font-size: 13px;
    color: var(--gray-500);
}

.verify-analyzing-card .verify-analyzing-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-5);
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--navy-700);
}

.verify-submit-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    padding: 24px;
}

.verify-submit-overlay[hidden] {
    display: none !important;
}

.live-chat-typing.live-chat-error {
    color: #b42318;
}

/* ===== Record Found ===== */
.record-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 28px 32px 32px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    text-align: left;
}

.record-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-900);
    margin: 0 0 16px;
    line-height: 1.2;
}

.record-divider {
    border-top: 1px solid var(--gray-200);
    margin-bottom: 22px;
}

.record-data {
    margin-bottom: 28px;
}

.record-data .row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    font-size: 14px;
}

.record-data .row .label {
    color: var(--gray-500);
    font-weight: 500;
    flex-shrink: 0;
}

.record-data .row .value {
    font-weight: 700;
    color: var(--navy-900);
    text-align: right;
}

.record-data .row .value.record-case-id {
    color: var(--navy-500);
    font-family: var(--font-mono);
    letter-spacing: 0.2px;
}

.btn-record-financials {
    display: block;
    width: 100%;
    background: var(--navy-800);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s var(--ease);
}

.btn-record-financials:hover {
    background: var(--navy-900);
    color: #fff;
}

.finances-card .record-data .row .value {
    font-variant-numeric: tabular-nums;
}

.finances-insured {
    color: var(--green-600) !important;
}

.record-label {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.spinner-container { margin: var(--space-5) 0; }
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--navy-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text {
    margin-top: var(--space-2);
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== Live Case Tracking ===== */
.tracking-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-10) var(--space-8);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.tracking-icon {
    text-align: center;
    margin-bottom: var(--space-3);
    color: var(--navy-700);
}

.tracking-result { margin-top: var(--space-6); }

.tracking-result .status-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
}

.tracking-result .status-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tracking-result .status-row .status-label {
    font-size: 13px;
    color: var(--gray-500);
}

.tracking-result .status-row .status-value {
    font-weight: 700;
    color: var(--green-600);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tracking-result .bank-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-800);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.6px;
    min-width: 72px;
}

.tracking-empty-timeline,
.tracking-not-found {
    margin-top: var(--space-4);
    padding: 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
}

/* ===== Timeline ===== */
.timeline { list-style: none; padding: 0; margin: var(--space-5) 0 0; position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--gray-200);
}
.timeline-item { position: relative; padding-left: 34px; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--navy-800);
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--navy-800);
    z-index: 1;
}

.timeline-dot.past {
    background: var(--navy-800);
    box-shadow: 0 0 0 1px var(--navy-800);
}

.timeline-dot.today {
    background: var(--green-600);
    box-shadow: 0 0 0 1px var(--green-600), 0 0 0 4px rgba(42, 138, 69, 0.18);
}

.timeline-dot.future {
    background: var(--navy-800);
    box-shadow: 0 0 0 1px var(--navy-800);
}

.timeline-date {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.timeline-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--navy-900);
}

.timeline-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ===== Case Details Box ===== */
.case-details-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-top: var(--space-4);
}
.case-details-box .bank-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-weight: 700;
    font-size: 14px;
    color: var(--navy-900);
}
.case-details-box .bank-header .fdic-mark {
    width: 26px;
    height: 26px;
    background: var(--navy-800);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.case-details-box .bank-header .fdic-mark::after {
    content: 'F';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.case-details-box p { font-size: 13px; line-height: 1.65; color: var(--gray-600); }

/* ===== Secure Connection ===== */
.secure-connection {
    background: var(--navy-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.secure-connection .fdic-logo {
    color: white;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: var(--space-6);
}
.secure-connection .sc-progress {
    width: 200px; height: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 1px;
    overflow: hidden;
    margin-bottom: var(--space-3);
}
.secure-connection .sc-progress .fill {
    height: 100%;
    background: var(--gold-400);
    animation: progressGrow 2s var(--ease) forwards;
}
.secure-connection .sc-text {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}
