/* =========================================================
   Vector Fabric - Unified Design Tokens (Dark + Light Mode)
   ========================================================= */
:root {
    --bg-canvas: #0B0D10;
    --bg-surface: #13171F;
    --bg-surface-subtle: #0E1117;
    --bg-surface-hover: #181E29;
    --border-edge: #222731;
    --border-edge-subtle: #181C24;
    --status-blue: #4C8DFF;
    --status-green: #34D399;
    --status-amber: #F59E0B;
    --status-red: #F87171;
}

html.light {
    --bg-canvas: #FFFFFF;
    --bg-surface: #F8FAFC;
    --bg-surface-subtle: #F1F5F9;
    --bg-surface-hover: #E2E8F0;
    --border-edge: #E2E8F0;
    --border-edge-subtle: #CBD5E1;
    --status-blue: #2563EB;
    --status-green: #059669;
    --status-amber: #D97706;
    --status-red: #DC2626;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-canvas);
    color: #E5E7EB;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

html.light body {
    color: #0F172A;
}

.mono {
    font-family: 'Geist Mono', monospace;
}

.sys-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-edge);
    transition: border-color 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.sys-card:hover {
    border-color: #2D3545;
}

html.light .sys-card:hover {
    border-color: #CBD5E1;
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.12);
}

/* =========================================================
   Light Mode Typography & Surface Overrides
   ========================================================= */
html.light .text-white { color: #0F172A !important; }
html.light .text-gray-100,
html.light .text-gray-200 { color: #1E293B !important; }
html.light .text-gray-300 { color: #334155 !important; }
html.light .text-gray-400 { color: #475569 !important; }
html.light .text-gray-500 { color: #64748B !important; }
html.light .hover\:text-white:hover { color: #0F172A !important; }
html.light .hover\:text-blue-300:hover { color: #1D4ED8 !important; }

/* Keep primary blue CTA button text white in both themes */
html.light a.bg-status-blue,
html.light button.bg-status-blue {
    color: #FFFFFF !important;
}

/* Highlighted Navy Accent Cards (#101A2E / #2F4B8A) */
html.light .bg-\[\#101A2E\] { background-color: #EFF6FF !important; }
html.light .bg-\[\#101A2E\]\/60,
html.light .bg-\[\#101A2E\]\/70 { background-color: rgba(239, 246, 255, 0.75) !important; }
html.light .bg-\[\#15233F\] { background-color: #DBEAFE !important; }
html.light .border-\[\#2F4B8A\] { border-color: #93C5FD !important; }
html.light .border-\[\#22345A\] { border-color: #BFDBFE !important; }
html.light .text-blue-200,
html.light .text-blue-200\/80,
html.light .text-blue-300 { color: #1E40AF !important; }

/* Status Badges */
html.light .bg-emerald-950 { background-color: #ECFDF5 !important; }
html.light .border-emerald-800\/60 { border-color: #A7F3D0 !important; }
html.light .text-emerald-300 { color: #065F46 !important; }

html.light .bg-amber-950,
html.light .bg-amber-950\/60 { background-color: #FFFBEB !important; }
html.light .border-amber-700\/50,
html.light .border-amber-800\/60 { border-color: #FDE68A !important; }
html.light .text-amber-300 { color: #92400E !important; }

/* Failure / Alert Cards (#1C1214) */
html.light .bg-\[\#1C1214\] { background-color: #FEF2F2 !important; }
html.light .border-\[\#5C2A2A\] { border-color: #FECACA !important; }

/* Logo adaptation for white header (until a dedicated dark-text PNG is swapped in) */
html.light .vf-brand-logo {
    filter: invert(1) hue-rotate(180deg);
}
