/*
 * One3 Command Centre: brand surface on top of Filament v5 (tokens from DESIGN.md section 2).
 * Dark is the working mode; light mode keeps Filament's defaults with the cyan primary.
 * Only colour, borders and type rhythm change here: no layout overrides, so Filament updates stay safe.
 */
.dark {
    --o3-bg: #050505;
    --o3-rail: #07131c;
    --o3-panel: #0a1f2e;
    --o3-panel-2: #0d2638;
    --o3-line: rgba(0, 194, 214, 0.16);
    --o3-line-strong: rgba(0, 194, 214, 0.32);
    --o3-cyan: #00c2d6;
    --o3-green: #00e676;
    --o3-text: #eaeaea;
    --o3-muted: #8a9aa8;
}

/* Ground and chrome */
.dark body,
.dark .fi-body,
.dark .fi-layout { background-color: var(--o3-bg); }

.dark .fi-sidebar { background-color: var(--o3-rail); border-right: 1px solid var(--o3-line); }
.dark .fi-sidebar-header { background-color: var(--o3-rail); border-bottom: 1px solid var(--o3-line); }
.dark .fi-topbar,
.dark .fi-topbar > nav { background-color: rgba(5, 5, 5, 0.9); border-bottom: 1px solid var(--o3-line); }

/* Navigation: quiet group labels, the active page marked with the brand cyan rule */
.fi-sidebar-group-label { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; font-weight: 600; }
.dark .fi-sidebar-group-label { color: var(--o3-muted); }
.dark .fi-sidebar-item.fi-active > a,
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background-color: rgba(0, 194, 214, 0.1); box-shadow: inset 2px 0 0 var(--o3-cyan); }
.dark .fi-sidebar-item.fi-active .fi-sidebar-item-label { color: var(--o3-cyan); }

/* Page heading */
.fi-header-heading { letter-spacing: -0.01em; }

/* Stat cards: brand panel, hairline border, figures that line up */
.dark .fi-wi-stats-overview-stat { background-color: var(--o3-panel); border: 1px solid var(--o3-line); box-shadow: none; }
.dark a.fi-wi-stats-overview-stat:hover,
.dark .fi-wi-stats-overview-stat:has(a:hover) { border-color: var(--o3-line-strong); }
.fi-wi-stats-overview-stat-value { font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }
.fi-wi-stats-overview-stat-label { letter-spacing: 0.02em; }

/* Sections, tables, modals: the same panel family */
.dark .fi-section:not(.fi-section-not-contained),
.dark .fi-ta-ctn,
.dark .fi-modal-window { background-color: #08161f; border-color: var(--o3-line); }
.dark .fi-ta-header-cell { background-color: rgba(13, 38, 56, 0.55); }
.fi-ta-text-item-label,
.fi-ta-cell { font-variant-numeric: tabular-nums; }

/* Login and 2FA card */
.dark .fi-simple-layout { background-color: var(--o3-bg); }
.dark .fi-simple-main { background-color: var(--o3-panel); border: 1px solid var(--o3-line); box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
    .fi-sidebar, .fi-topbar { transition: none !important; }
}
