/* BRC FEMA Insurance Verification Platform — Professional Enterprise Light Theme */
:root {
    --bg-root: #FFFFFF;
    --bg-surface-1: #F3F3F3;
    --bg-surface-2: #EAEAEA;
    --bg-surface-3: #FFFFFF;
    --bg-surface-4: #F7F7F7;
    --bg-sidebar: #032D60;
    --bg-sidebar-hover: rgba(255,255,255,0.1);
    --bg-sidebar-active: rgba(255,255,255,0.15);

    --color-primary: #0176D3;
    --color-primary-hover: #014486;
    --color-accent: #2E844A;
    --color-gradient: linear-gradient(135deg, #0176D3, #2E844A);

    --color-success: #2E844A;
    --color-warning: #DD7A01;
    --color-danger: #C23934;
    --color-partial: #7B61FF;
    --color-info: #0176D3;

    --text-main: #181818;
    --text-secondary: #444444;
    --text-muted: #706E6B;
    --text-sidebar: #FFFFFF;
    --text-sidebar-muted: rgba(255,255,255,0.6);

    --border: #C9C9C9;
    --border-light: #DDDBDA;
    --border-strong: #A0A0A0;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-glow-primary: 0 0 0 3px rgba(1,118,211,0.15);
    --shadow-glow-success: 0 0 0 3px rgba(46,132,74,0.15);
    --shadow-glow-danger: 0 0 0 3px rgba(194,57,52,0.15);

    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --header-height: 56px;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-xs: 4px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    background: var(--bg-root);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

/* Subtle static radial background — no animation */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(1,118,211,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(46,132,74,0.03) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: var(--font-mono);
    background: var(--bg-surface-1);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    color: var(--color-primary);
}

/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ══════════════════════════════════════════════
   SIDEBAR — 240px, collapsible to 64px
   ══════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-height);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand img {
    height: 32px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.sidebar-brand-text {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-brand-text { opacity: 0; pointer-events: none; }

.sidebar-brand-text h2 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-sidebar);
}

.sidebar-brand-text span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-sidebar-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section { padding: 0 18px; margin-bottom: 6px; }
.nav-section-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-sidebar-muted);
    margin-bottom: 8px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--text-sidebar-muted);
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    border-radius: 0;
    margin: 1px 8px;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar);
    text-decoration: none;
}

.nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar);
}

.nav-link i {
    width: 20px;
    height: 20px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.6;
}

.nav-link:hover i { opacity: 0.9; }
.nav-link.active i {
    opacity: 1;
    filter: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 10px;
    margin: 1px 6px;
}
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-link-text { display: none; }

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 11px;
    color: var(--text-sidebar-muted);
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed .sidebar-footer { opacity: 0; pointer-events: none; }

.sidebar-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.sidebar-badge {
    background: var(--bg-sidebar-hover);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-sidebar-muted);
    border: 1px solid rgba(255,255,255,0.16);
}

/* ══════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.top-header {
    height: var(--header-height);
    background: var(--bg-surface-3);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-left h1 { font-size: 16px; font-weight: 600; letter-spacing: -0.3px; color: var(--text-main); }

.header-right { display: flex; align-items: center; gap: 12px; }

.sidebar-collapse-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: var(--bg-surface-1);
    color: var(--text-main);
    border-color: var(--border-strong);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.user-menu:hover { background: var(--bg-surface-1); }

.user-avatar {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.page-content { padding: 24px; flex: 1; }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.main-footer {
    background: var(--bg-surface-1);
    color: var(--text-muted);
    padding: 14px 24px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    border-top: 1px solid var(--border);
}

.main-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.main-footer-title {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
}

.main-footer-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    width: 100%;
}

.main-footer-disclaimer {
    color: var(--text-secondary);
    grid-column: 2;
    text-align: center;
}

.footer-badges { display: flex; gap: 8px; }

.footer-badge {
    background: var(--bg-surface-3);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   STAT CARDS — with sparkline area
   ══════════════════════════════════════════════ */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }

.stat-card {
    background: var(--bg-surface-3);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--border);
    transition: border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
    box-shadow: var(--shadow-sm);
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }

.stat-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.stat-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -1px;
    color: var(--text-main);
}

.stat-card.verified .stat-card-value {
    color: var(--color-success);
    text-shadow: none;
}
.stat-card.verified {
    border-left-color: var(--color-success);
}
.stat-card.pending .stat-card-value {
    color: var(--color-warning);
    text-shadow: none;
}
.stat-card.pending {
    border-left-color: var(--color-warning);
}
.stat-card.flagged .stat-card-value {
    color: var(--color-danger);
    text-shadow: none;
}
.stat-card.flagged {
    border-left-color: var(--color-danger);
}

.stat-card-change {
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}
.stat-card-change.up { color: var(--color-success); }
.stat-card-change.down { color: var(--color-danger); }

.stat-card-sparkline {
    position: absolute;
    bottom: 0; right: 0;
    width: 100px; height: 40px;
    opacity: 0.4;
}

.stat-card-trend {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════ */
.card {
    background: var(--bg-surface-3);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-main);
}

.card-body { padding: 20px; }
.card-body.no-padding { padding: 0; }

/* ══════════════════════════════════════════════
   GRID LAYOUTS
   ══════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ══════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table { background: var(--bg-surface-3); }
.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-surface-1);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.data-table th:hover { color: var(--text-secondary); }

.data-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-main);
}

.data-table tr { transition: background 0.15s ease; }
.data-table tr:hover td { background: var(--bg-surface-4); }

/* ══════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge-verified { background: #EBF7E6; color: var(--color-success); border-color: #CFE9C4; }
.badge-pending { background: #FFF4E1; color: var(--color-warning); border-color: #F2D3A0; }
.badge-flagged { background: #FEE4E2; color: var(--color-danger); border-color: #F6C4C1; }
.badge-not_verified { background: #F3F3F3; color: var(--text-muted); border-color: var(--border-light); }
.badge-partial { background: #F0EDFF; color: var(--color-partial); border-color: #D9D1FF; }
.badge-active { background: #EBF7E6; color: var(--color-success); border-color: #CFE9C4; }
.badge-inactive { background: #F3F3F3; color: var(--text-muted); border-color: var(--border-light); }
.badge-open { background: #EAF5FE; color: var(--color-info); border-color: #C8DEF4; }
.badge-in_review { background: #FFF4E1; color: var(--color-warning); border-color: #F2D3A0; }
.badge-closed { background: #EBF7E6; color: var(--color-success); border-color: #CFE9C4; }
.badge-national { background: #EAF5FE; color: var(--color-info); border-color: #C8DEF4; }
.badge-nfip_wyo { background: #EBF7E6; color: var(--color-success); border-color: #CFE9C4; }
.badge-regional { background: #FFF4E1; color: var(--color-warning); border-color: #F2D3A0; }
.badge-specialty { background: #F0EDFF; color: var(--color-partial); border-color: #D9D1FF; }

.table td, .table th { white-space: nowrap; }

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
    filter: none;
}

.btn-success {
    background: var(--color-success);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-success:hover {
    background: #256B3C;
    box-shadow: var(--shadow-md);
    filter: none;
}

.btn-warning { background: var(--color-warning); color: white; }
.btn-danger { background: var(--color-danger); color: white; }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background: var(--bg-surface-1);
    border-color: var(--border-strong);
    color: var(--text-main);
}

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ══════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
    background: var(--bg-surface-3);
    color: var(--text-main);
}

.form-input::placeholder { color: var(--text-muted); }
.form-select { appearance: auto; }
.form-select option { background: var(--bg-surface-3); color: var(--text-main); }

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-primary);
    background: var(--bg-surface-4);
}

/* ══════════════════════════════════════════════
   LIVE FEED
   ══════════════════════════════════════════════ */
.live-feed { max-height: 400px; overflow-y: auto; }

.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    animation: feedSlideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transition: background 0.15s;
    background: var(--bg-surface-3);
    border-left: 4px solid transparent;
}

.feed-item:hover { background: var(--bg-surface-4); box-shadow: var(--shadow-sm); }

@keyframes feedSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.feed-item:has(.feed-icon.verified) { border-left-color: var(--color-success); }
.feed-item:has(.feed-icon.pending) { border-left-color: var(--color-warning); }
.feed-item:has(.feed-icon.flagged) { border-left-color: var(--color-danger); }
.feed-item:has(.feed-icon.not_verified) { border-left-color: var(--border-strong); }
.feed-item:has(.feed-icon.partial) { border-left-color: var(--color-partial); }
.feed-icon.verified { background: #EBF7E6; color: var(--color-success); }
.feed-icon.pending { background: #FFF4E1; color: var(--color-warning); }
.feed-icon.flagged { background: #FEE4E2; color: var(--color-danger); }
.feed-icon.not_verified { background: #F3F3F3; color: var(--text-muted); }
.feed-icon.partial { background: #F0EDFF; color: var(--color-partial); }

.feed-content { flex: 1; min-width: 0; }
.feed-title { font-weight: 500; font-size: 13px; color: var(--text-main); }
.feed-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════
   US MAP
   ══════════════════════════════════════════════ */
.us-map-container {
    position: relative;
    width: 100%;
    padding-bottom: 62%;
    background: var(--bg-surface-1);
    border: 1px solid var(--border-light);
}

.us-map-container svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}

.us-map-container svg path {
    fill: #D4E5F7;
    stroke: #AFC8E6;
    stroke-width: 1.5;
    cursor: pointer;
    transition: all 0.25s ease;
}

.us-map-container svg path:hover {
    opacity: 0.85;
    stroke: var(--color-primary);
    stroke-width: 2;
    filter: none;
}

.map-tooltip {
    position: absolute;
    background: var(--bg-surface-3);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    pointer-events: none;
    z-index: 10;
    display: none;
    white-space: nowrap;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.map-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.map-legend-item { display: flex; align-items: center; gap: 8px; }
.map-legend-color {
    width: 14px; height: 14px;
    border-radius: 4px;
}

/* ══════════════════════════════════════════════
   WIZARD — dot progress track
   ══════════════════════════════════════════════ */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    position: relative;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    position: relative;
    z-index: 1;
}

.wizard-step-number {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-surface-3);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-mono);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border);
}

.wizard-step.active .wizard-step-number {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: none;
}

.wizard-step.completed .wizard-step-number {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
    box-shadow: none;
}

.wizard-step-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.wizard-step.active .wizard-step-label { color: var(--text-main); font-weight: 600; }
.wizard-step.completed .wizard-step-label { color: var(--color-success); }

.wizard-connector {
    width: 48px;
    height: 2px;
    background: var(--border);
    align-self: center;
    border-radius: 1px;
    transition: background 0.4s ease;
}

.wizard-connector.completed {
    background: var(--color-success);
    box-shadow: none;
}

.wizard-panel { display: none; }
.wizard-panel.active {
    display: block;
    animation: fadeUp 0.4s ease both;
}

/* ══════════════════════════════════════════════
   CONSENT
   ══════════════════════════════════════════════ */
.consent-item {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: all 0.2s ease;
    background: var(--bg-surface-3);
}

.consent-item:has(input:checked) {
    border-color: rgba(46,132,74,0.3);
    background: #F4FBF2;
}

.consent-item input[type="checkbox"] {
    width: 20px; height: 20px;
    margin-top: 2px;
    accent-color: var(--color-success);
    border-radius: 4px;
}

/* ══════════════════════════════════════════════
   CARRIER LOOKUP
   ══════════════════════════════════════════════ */
.lookup-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.lookup-carrier {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-surface-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.lookup-carrier-status {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lookup-carrier-status.loading {
    border: 3px solid var(--border);
    border-top-color: var(--color-primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.lookup-carrier-status.done {
    background: #EBF7E6;
    color: var(--color-success);
    border: 2px solid var(--color-success);
}
.lookup-carrier-status.error {
    background: #FEE4E2;
    color: var(--color-danger);
    border: 2px solid var(--color-danger);
}

.lookup-carrier-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.lookup-carrier-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ══════════════════════════════════════════════
   COVERAGE MATRIX
   ══════════════════════════════════════════════ */
.coverage-matrix { overflow-x: auto; font-size: 11px; }
.coverage-matrix table { border-collapse: collapse; }
.coverage-matrix th, .coverage-matrix td {
    padding: 5px 7px;
    text-align: center;
    border: 1px solid var(--border);
    min-width: 30px;
}
.coverage-matrix th { background: var(--bg-surface-3); font-size: 10px; font-weight: 600; color: var(--text-muted); }
.coverage-matrix td.covered { background: #EBF7E6; color: var(--color-success); }
.coverage-matrix td.not-covered { background: #FEE4E2; }

/* ══════════════════════════════════════════════
   CHARTS
   ══════════════════════════════════════════════ */
.chart-container { position: relative; height: 300px; }
.chart-container-sm { position: relative; height: 250px; }

/* ══════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-surface-3);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    max-width: 720px;
    width: 90%;
    max-height: 82vh;
    overflow-y: auto;
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { font-size: 16px; color: var(--text-main); }
.modal-close {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-surface-1); color: var(--text-main); border-color: var(--border-strong); }
.modal-body { padding: 24px; }

/* ══════════════════════════════════════════════
   SEARCH / FILTER
   ══════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.search-input {
    flex: 1;
    max-width: 320px;
    padding: 8px 14px 8px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23706E6B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 12px center no-repeat;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-primary);
}

/* ══════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════ */
.login-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-root);
}

.login-hero {
    flex: 1;
    background: linear-gradient(135deg, #032D60 0%, #014486 50%, #032D60 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 70px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.login-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 80%; height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.login-hero::after {
    content: '';
    position: absolute;
    bottom: -20%; left: -10%;
    width: 60%; height: 60%;
    background: radial-gradient(ellipse, rgba(1,118,211,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.login-hero h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    position: relative;
    background: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: white;
    background-clip: text;
    color: white;
}

.login-hero p {
    font-size: 16px;
    color: rgba(255,255,255,0.82);
    line-height: 1.8;
    max-width: 500px;
    position: relative;
}

.login-features {
    margin-top: 44px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.82);
}

.login-feature i { color: white; font-size: 18px; }

.login-form-section {
    width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    z-index: 1;
    border-left: 1px solid var(--border);
}

.login-form-card {
    background: var(--bg-surface-3);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 36px 32px;
}

.login-form-header { margin-bottom: 28px; }
.login-form-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    color: var(--text-main);
}
.login-form-header p { color: var(--text-secondary); font-size: 14px; }

.login-sso { margin-bottom: 20px; }

.sso-btn {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface-3);
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: not-allowed;
    opacity: 0.4;
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-demo-creds {
    background: #EAF5FE;
    border: 1px solid #C8DEF4;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-demo-creds strong { color: var(--color-primary); }
.login-demo-creds code {
    background: var(--bg-surface-3);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--text-main);
}

.login-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   LIVE INDICATOR
   ══════════════════════════════════════════════ */
.live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    display: inline-block;
    position: relative;
}

.live-dot::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(46,132,74,0.25);
    animation: livePulse 2s ease infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* ══════════════════════════════════════════════
   PIV/CAC BADGE
   ══════════════════════════════════════════════ */
.piv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--color-danger);
    color: white;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--color-danger);
}

/* ══════════════════════════════════════════════
   COMPLIANCE BAR
   ══════════════════════════════════════════════ */
.compliance-bar {
    display: flex;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-surface-3);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-muted);
    align-items: center;
    border: 1px solid var(--border-light);
}

.compliance-bar i { color: var(--color-success); }

/* ══════════════════════════════════════════════
   TAB NAVIGATION
   ══════════════════════════════════════════════ */
.tab-nav {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    background: var(--bg-surface-1);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border);
    width: fit-content;
}

.tab-btn {
    padding: 8px 20px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.tab-btn:hover { color: var(--text-secondary); background: var(--bg-surface-3); }
.tab-btn.active {
    color: var(--color-primary);
    background: #EAF5FE;
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-surface-3);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-md);
    z-index: 300;
    animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
    font-size: 13px;
}

@keyframes toastIn {
    from { transform: translateY(16px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════
   EXPORT
   ══════════════════════════════════════════════ */
.export-btn-group { display: flex; gap: 8px; }

/* ══════════════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════════════ */
.skeleton {
    background: var(--bg-surface-3);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(1,118,211,0.08) 50%, transparent 100%);
    animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text-lg { height: 32px; margin-bottom: 8px; width: 60%; }
.skeleton-text-sm { height: 10px; width: 40%; }

/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeUp 0.5s ease both;
}

/* Staggered cascade for cards */
.grid-2 > .card:nth-child(1) { animation: fadeUp 0.5s ease both; animation-delay: 0.05s; }
.grid-2 > .card:nth-child(2) { animation: fadeUp 0.5s ease both; animation-delay: 0.1s; }
.grid-2 > .card:nth-child(3) { animation: fadeUp 0.5s ease both; animation-delay: 0.15s; }
.grid-2 > .card:nth-child(4) { animation: fadeUp 0.5s ease both; animation-delay: 0.2s; }

/* ══════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); width: var(--sidebar-width); }
    .main-content { margin-left: 0 !important; }
    .stat-cards { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-form-section { width: 100%; border-left: none; }
    .sidebar-collapse-btn { display: none; }
    .main-footer-row { flex-direction: column; align-items: flex-start; }
    .main-footer-meta { display: flex; }
    .main-footer-disclaimer { align-self: center; }
}

/* ══════════════════════════════════════════════
   SCROLLBAR — Light
   ══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F3F3F3; }
::-webkit-scrollbar-thumb { background: #A0A0A0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #706E6B; }
