/* app.bundle.css — AUTO-GENERATED by scripts/build_console_bundle.sh */
/* Source order: theme.css main.css components.css animations.css layout.css soc.css report-components.css compliance.css blocked-requests.css allowlists.css blocklists.css ip-lists.css notifications.css icons.css command-palette.css print.css */


/* === theme.css === */
/* theme.css — Premium cybersecurity dashboard theme
 *
 * Design language: Deep navy foundation, electric blue accent, layered depth.
 * Inspired by Datadog, Grafana, Cloudflare Dashboard.
 * Two modes: Light (clean workspace) and Dark (SOC-ready).
 */

:root {
    color-scheme: light dark;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing scale */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Timing */
    --transition: 180ms ease;
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME — Clean professional workspace
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"], :root {
    /* Surfaces — layered depth */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-sunken: #f1f5f9;
    --bg-overlay: rgba(15, 23, 42, 0.4);
    --bg-glass: rgba(255, 255, 255, 0.8);

    /* Text — clear hierarchy */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #f8fafc;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-strong: #cbd5e1;
    --border-focus: #3b82f6;

    /* Accent — Electric blue */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: rgba(37, 99, 235, 0.08);
    --accent-medium: rgba(37, 99, 235, 0.15);
    --accent-glow: rgba(37, 99, 235, 0.25);
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #6366f1 100%);

    /* Semantic colors */
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.08);
    --success-border: rgba(5, 150, 105, 0.2);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.08);
    --warning-border: rgba(217, 119, 6, 0.2);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.08);
    --danger-border: rgba(220, 38, 38, 0.2);
    --info: #0284c7;
    --info-bg: rgba(2, 132, 199, 0.08);
    --info-border: rgba(2, 132, 199, 0.2);

    /* Sidebar — Dark contrasting panel */
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --sidebar-text: #cbd5e1;
    --sidebar-active: rgba(59, 130, 246, 0.9);
    --sidebar-active-text: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --sidebar-brand: linear-gradient(135deg, #3b82f6, #8b5cf6);

    /* Charts */
    --chart-primary: #2563eb;
    --chart-secondary: #7c3aed;
    --chart-tertiary: #0891b2;
    --chart-quaternary: #059669;
    --chart-quinary: #d97706;
    --chart-grid: #e2e8f0;
    --chart-text: #64748b;

    /* Shadows — layered elevation system */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.08);

    /* Focus ring */
    --focus-ring: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
    --focus-ring-danger: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--danger);

    /* Login */
    --login-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
    --login-pattern: radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                     radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════
   DARK THEME — Immersive command center
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
    /* Surfaces — deep navy layering */
    --bg-primary: #0b1120;
    --bg-secondary: #111827;
    --bg-tertiary: #1e293b;
    --bg-card: #141c2e;
    --bg-elevated: #1a2332;
    --bg-sunken: #080d19;
    --bg-overlay: rgba(0, 0, 0, 0.6);
    --bg-glass: rgba(20, 28, 46, 0.85);

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #6b7280;
    --text-inverse: #0f172a;

    /* Borders — subtle glow edges */
    --border: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.06);
    --border-strong: rgba(148, 163, 184, 0.18);
    --border-focus: #3b82f6;

    /* Accent — Bright electric blue */
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-light: rgba(59, 130, 246, 0.1);
    --accent-medium: rgba(59, 130, 246, 0.2);
    --accent-glow: rgba(59, 130, 246, 0.3);
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #818cf8 100%);

    /* Semantic — Higher saturation for dark backgrounds */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.25);
    --warning: #eab308;
    --warning-bg: rgba(234, 179, 8, 0.1);
    --warning-border: rgba(234, 179, 8, 0.25);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.25);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.1);
    --info-border: rgba(6, 182, 212, 0.25);

    /* Sidebar — Darker panel with subtle gradient */
    --sidebar-bg: linear-gradient(180deg, #060a14 0%, #0b1120 100%);
    --sidebar-text: #8896ab;
    --sidebar-active: rgba(59, 130, 246, 0.9);
    --sidebar-active-text: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.04);
    --sidebar-border: rgba(255, 255, 255, 0.04);
    --sidebar-brand: linear-gradient(135deg, #3b82f6, #8b5cf6);

    /* Charts — Bright on dark */
    --chart-primary: #60a5fa;
    --chart-secondary: #a78bfa;
    --chart-tertiary: #22d3ee;
    --chart-quaternary: #34d399;
    --chart-quinary: #fbbf24;
    --chart-grid: rgba(148, 163, 184, 0.08);
    --chart-text: #64748b;

    /* Shadows — Subtle depth on dark */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.05);
    --shadow-card: 0 0 0 1px rgba(148, 163, 184, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 0 0 1px rgba(59, 130, 246, 0.15), 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.06);

    /* Focus ring */
    --focus-ring: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
    --focus-ring-danger: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--danger);

    /* Login */
    --login-bg: linear-gradient(135deg, #020617 0%, #0b1120 40%, #020617 100%);
    --login-pattern: radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                     radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                     radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
}

/* ═══════════════════════════════════════════════════════════════
   SYSTEM PREFERENCE — Follow OS setting
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --bg-primary: #0b1120;
        --bg-secondary: #111827;
        --bg-tertiary: #1e293b;
        --bg-card: #141c2e;
        --bg-elevated: #1a2332;
        --bg-sunken: #080d19;
        --bg-overlay: rgba(0, 0, 0, 0.6);
        --bg-glass: rgba(20, 28, 46, 0.85);

        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --text-muted: #6b7280;
        --text-inverse: #0f172a;

        --border: rgba(148, 163, 184, 0.1);
        --border-light: rgba(148, 163, 184, 0.06);
        --border-strong: rgba(148, 163, 184, 0.18);
        --border-focus: #3b82f6;

        --accent: #3b82f6;
        --accent-hover: #60a5fa;
        --accent-light: rgba(59, 130, 246, 0.1);
        --accent-medium: rgba(59, 130, 246, 0.2);
        --accent-glow: rgba(59, 130, 246, 0.3);
        --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #818cf8 100%);

        --success: #22c55e;
        --success-bg: rgba(34, 197, 94, 0.1);
        --success-border: rgba(34, 197, 94, 0.25);
        --warning: #eab308;
        --warning-bg: rgba(234, 179, 8, 0.1);
        --warning-border: rgba(234, 179, 8, 0.25);
        --danger: #ef4444;
        --danger-bg: rgba(239, 68, 68, 0.1);
        --danger-border: rgba(239, 68, 68, 0.25);
        --info: #06b6d4;
        --info-bg: rgba(6, 182, 212, 0.1);
        --info-border: rgba(6, 182, 212, 0.25);

        --sidebar-bg: linear-gradient(180deg, #060a14 0%, #0b1120 100%);
        --sidebar-text: #8896ab;
        --sidebar-active: rgba(59, 130, 246, 0.9);
        --sidebar-active-text: #ffffff;
        --sidebar-hover: rgba(255, 255, 255, 0.04);
        --sidebar-border: rgba(255, 255, 255, 0.04);
        --sidebar-brand: linear-gradient(135deg, #3b82f6, #8b5cf6);

        --chart-primary: #60a5fa;
        --chart-secondary: #a78bfa;
        --chart-tertiary: #22d3ee;
        --chart-quaternary: #34d399;
        --chart-quinary: #fbbf24;
        --chart-grid: rgba(148, 163, 184, 0.08);
        --chart-text: #64748b;

        --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
        --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.05);
        --shadow-card: 0 0 0 1px rgba(148, 163, 184, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-card-hover: 0 0 0 1px rgba(59, 130, 246, 0.15), 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.06);

        --focus-ring: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
        --focus-ring-danger: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--danger);

        --login-bg: linear-gradient(135deg, #020617 0%, #0b1120 40%, #020617 100%);
        --login-pattern: radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                         radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                         radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
    }
}

/* === main.css === */
/* main.css — Base styles, typography, utilities, global polish */

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    height: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* ─── Selection ────────────────────────────────────────────── */
::selection {
    background: var(--accent-medium);
    color: var(--text-primary);
}

/* ─── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

/* ─── Links ────────────────────────────────────────────────── */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--accent-hover); }

/* ─── Code ─────────────────────────────────────────────────── */
code, pre {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

code {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.8em;
}

pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    line-height: 1.7;
}

pre code {
    padding: 0;
    background: none;
    font-size: inherit;
}

/* ─── Typography ───────────────────────────────────────────── */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ─── Focus visible ────────────────────────────────────────── */
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ─── Utility: visibility ──────────────────────────────────── */
.hidden { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ─── Page header ──────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header h1 {
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Cards — frosted glass, subtle shadow ────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-slow), transform var(--transition-slow);
    margin-bottom: 16px;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card + .card { margin-top: 0; }

.card-highlight {
    border-color: var(--accent);
    box-shadow: var(--shadow-card), 0 0 0 1px var(--accent-glow), 0 0 16px var(--accent-light);
}

.card-interactive:hover {
    transform: translateY(-1px);
}

/* ─── Grid ─────────────────────────────────────────────────── */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Responsive grid: 1200 → 1024 → 768 → 480 */
.grid-responsive {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 1200px) {
    .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ─── Text utilities ───────────────────────────────────────── */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-mono { font-family: var(--font-mono); font-size: 0.85em; }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.text-lg { font-size: 1.1rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* ─── Spacing utilities ────────────────────────────────────── */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ─── Flex utilities ───────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.flex-1 { flex: 1; }

/* ─── Audit page utilities ───────────────────────────────── */
.audit-chart-sm  { width: 100%; height: 200px; }
.audit-chart-md  { width: 100%; height: 240px; }
.audit-empty     { text-align: center; padding: 60px 0; }
.audit-verify-loading { padding: 16px 0; }
.audit-result-header  { font-size: 18px; font-weight: 600; }

/* ─── Positioning utilities ───────────────────────────────── */
.pos-relative { position: relative; }
.pos-absolute { position: absolute; }

/* ─── Cursor utilities ────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }

/* ─── Member row (user-group member items) ────────────────── */
.member-row {
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    background: var(--bg-secondary);
}

/* ─── Divider ──────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ─── Loading ──────────────────────────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

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

.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Page transitions ─────────────────────────────────────── */
.page-enter {
    animation: pageIn 0.25s ease-out;
}

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

/* ─── Extended Typography Utilities (supplement to base set above) ── */
.text-base { font-size: 0.875rem; }
.text-xl { font-size: 1.2rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }

.font-normal { font-weight: 400; }
.font-mono { font-family: var(--font-mono); }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.whitespace-pre { white-space: pre; }
.whitespace-nowrap { white-space: nowrap; }

/* ─── Skip Navigation ─────────────────────────────────────── */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10100; /* Highest — accessibility must always be on top */
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-nav:focus {
    top: 16px;
}

/* === components.css === */
/* components.css — Buttons, forms, tables, badges, cards, modals, toasts
 *
 * iOS/macOS design language: clean, minimal, rounded, frosted glass,
 * consistent spacing (8px base), standardized component heights.
 *
 * Height scale: XS=24px, SM=28px, MD=34px, LG=40px, XL=48px
 * Font scale: 11px(xs), 12px(sm), 13px(body), 14px(md), 16px(lg), 20px(xl)
 * Radius: XS=4px, SM=6px, MD=8px, LG=12px, XL=16px, Full=9999px
 * Spacing: 4, 8, 12, 16, 20, 24, 32, 40, 48
 */

/* ═══════════════════════════════════════════════════════════════
   BUTTONS — iOS style
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    height: 34px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    letter-spacing: -0.003em;
    box-sizing: border-box;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    box-shadow: var(--focus-ring);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 1px 3px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px var(--accent-glow);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 1px 2px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 1px 3px var(--danger-border);
}

.btn-danger:hover {
    box-shadow: 0 4px 12px var(--danger-border);
    filter: brightness(1.05);
}

.btn-danger:focus-visible {
    box-shadow: var(--focus-ring-danger);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 1px 3px var(--success-border);
}

.btn-success:hover {
    box-shadow: 0 4px 12px var(--success-border);
    filter: brightness(1.05);
}

/* Size variants */
.btn-xs {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    border-radius: 6px;
}

.btn-sm {
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-lg {
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
}

.btn-xl {
    height: 48px;
    padding: 0 24px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
}

.btn:disabled, .btn[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Full-width button (used by login/setup forms) */
.btn-full-width {
    width: 100%;
}

/* Button group */
.btn-group {
    display: inline-flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child { border-radius: 8px 0 0 8px; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }

/* Spaced inline buttons — used in table action cells where each
   button is an independent action (Edit / Revoke / Evict). Distinct
   from .btn-group which collapses borders for a segmented look. */
.btn-row {
    display: inline-flex;
    gap: 0.375rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS — macOS style
   ═══════════════════════════════════════════════════════════════ */
.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.003em;
}

.form-field .required { color: var(--danger); }

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0 12px;
    height: 34px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-field textarea {
    height: auto;
    min-height: 80px;
    padding: 8px 12px;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: var(--border-strong);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-field input[aria-invalid="true"],
.form-field.has-error input {
    border-color: var(--danger);
}

.form-field input[aria-invalid="true"]:focus,
.form-field.has-error input:focus {
    box-shadow: 0 0 0 3px var(--danger-bg);
}

/* Checkbox / toggle — must NOT inherit full-width + 34px height */
.form-field input[type="checkbox"],
.form-field input[type="radio"] {
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    box-shadow: none;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Inline checkbox layout: label + checkbox on the same line */
.form-field-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.form-field-inline label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.003em;
    margin-bottom: 0;
    cursor: pointer;
}

.form-field-inline input[type="checkbox"],
.form-field-inline input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

/* Form grid — responsive two-column form layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0 20px;
    }
    /* Fields that should span full width */
    .form-grid .form-field-full,
    .form-grid .form-field-inline,
    .form-grid .nat-dynamic-fields,
    .form-grid .flex {
        grid-column: 1 / -1;
    }
}

/* Full-width variants for inputs/selects (used by modals) */
.input-full-width { width: 100%; }
.select-full-width { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   FILTER BAR — unified compact style (single source of truth)
   ═══════════════════════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light, var(--border));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.filter-bar .form-field {
    margin-bottom: 0;
}

.filter-bar .form-field label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.filter-bar .form-field input,
.filter-bar .form-field select {
    height: 30px;
    font-size: 12px;
    padding: 0 10px;
}

.filter-bar .btn {
    height: 30px;
    font-size: 12px;
}

.filter-bar .btn-sm {
    height: 30px;
    padding: 0 12px;
}

.filter-bar .btn-xs {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
}

/* Filter bar sub-components (used by report-components and compliance) */
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.filter-item.filter-search {
    flex: 1;
    min-width: 180px;
}

.filter-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select,
.filter-input {
    padding: 0 10px;
    height: 32px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    box-sizing: border-box;
}

.filter-select:hover,
.filter-input:hover {
    border-color: var(--border-strong);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-card);
}

.filter-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Status count pills — clickable quick-filter */
.status-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.status-pills .btn {
    height: 26px;
    padding: 0 12px;
    font-size: 11px;
    border-radius: 13px;
    font-weight: 500;
}

.field-error {
    font-size: 12px;
    color: var(--danger);
    min-height: 1.3em;
    margin-top: 4px;
}

.field-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    min-height: 1.2em;
}

.field-hint--info    { color: var(--accent, #60a5fa); }
.field-hint--warn    { color: var(--warning, #d97706); }
.field-hint--danger  { color: var(--danger, #dc2626); }
.field-hint--success { color: var(--success, #16a34a); }

/* ═══════════════════════════════════════════════════════════════
   TABLES — clean, spacious
   ═══════════════════════════════════════════════════════════════ */
/* ─── Table wrapper — horizontal scroll for wide tables ─── */
.data-table-wrapper {
    /* Wide tables (e.g. Blocked Requests has 10 columns including
       Action) used to clip the right-most column off-screen. The
       wrapper now scrolls horizontally so every column is reachable
       without resizing the viewport. */
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    /* Custom scrollbar styling so the bar isn't visually noisy. */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.data-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.data-table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.data-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ─── Base Data Table — premium dashboard style ────────── */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    /* Prevent the table from compressing below its natural width
       when columns can't fit — instead let the wrapper scroll. */
    min-width: max-content;
}

.data-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}

.data-table td {
    padding: 11px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light, var(--border));
    transition: background var(--transition), box-shadow var(--transition);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover td {
    background: var(--accent-light);
}

.data-table tbody tr:active td {
    background: var(--accent-medium);
}

/* Alternating row subtle tint (every even row) */
.data-table tbody tr:nth-child(even) td {
    background: var(--bg-sunken, var(--bg-tertiary));
}

.data-table tbody tr:nth-child(even):hover td {
    background: var(--accent-light);
}

/* First and last cell radius for rounded container look */
.data-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius);
}

.data-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius);
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 14px !important;
}

.empty-row::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--bg-tertiary);
}

/* Sortable column headers */
.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    padding-right: 24px;
}

.data-table th.sortable:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.data-table th.sortable:active {
    background: var(--accent-medium);
}

/* Mono cell (IPs, hashes, codes) */
.data-table td.text-mono,
.data-table .cell-mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   ALERT / CALLOUT — used by createAlert() in lib/components.js
   ═══════════════════════════════════════════════════════════════ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin: 0 0 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}
.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.alert-body {
    flex: 1 1 auto;
    min-width: 0;
}
.alert-title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.alert-message {
    color: var(--text-secondary);
}
.alert-close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}
.alert-close:hover { color: var(--text-primary); }

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
}
.alert-success .alert-title { color: var(--success); }

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}
.alert-warning .alert-title { color: var(--warning); }

.alert-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
}
.alert-danger .alert-title { color: var(--danger); }

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
}
.alert-info .alert-title { color: var(--info); }

.alert-neutral {
    background: var(--bg-tertiary);
    border-color: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   BADGES — rounded pills
   ═══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 11px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.badge-neutral {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge-accent {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent-glow);
}

/* Pulsing badge for live status */
.badge-live::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ═══════════════════════════════════════════════════════════════
   METRIC CARDS — frosted glass, subtle shadow
   ═══════════════════════════════════════════════════════════════ */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

/* Subtle top accent line */
.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition);
}

.metric-card:hover::before { opacity: 1; }

.metric-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.metric-value {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 6px 0 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.metric-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.metric-trend {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-stable { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 420px;
}

.toast {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.35s var(--transition-spring);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}

.toast-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.toast-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.toast-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.toast-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.toast-close:hover { opacity: 1; }

@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-exit {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL — iOS sheet style
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-width: 560px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-wide { max-width: 640px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.modal-header h2,
.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 16px 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════ */
/* ─── Pagination — pill buttons with glass ──────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light, var(--border));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.pagination-info {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 2px;
}

.pagination-buttons .btn {
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

.pagination-buttons .btn-primary {
    box-shadow: var(--shadow-xs);
}

.pagination-buttons .btn-secondary {
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.pagination-buttons .btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.pagination-buttons .btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 8px;
}

.pagination-buttons .btn.active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   DROPDOWN
   ═══════════════════════════════════════════════════════════════ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 4px;
    z-index: 100;
    animation: dropdownIn 0.15s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.dropdown-item-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

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

/* ═══════════════════════════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════════════════════════ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 50;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════════════════ */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: var(--accent-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
}

.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   SWITCH / TOGGLE — iOS toggle
   ═══════════════════════════════════════════════════════════════ */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.switch-track {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 11px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.switch-track::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
    background: var(--accent);
    border-color: var(--accent);
}

.switch input:checked + .switch-track::before {
    transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
    box-shadow: var(--focus-ring);
}

/* ═══════════════════════════════════════════════════════════════
   STANDALONE INPUT/SELECT (outside .form-field context)
   ═══════════════════════════════════════════════════════════════ */
.input-standalone,
.select-standalone {
    padding: 0 12px;
    height: 34px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.input-standalone:focus,
.select-standalone:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.input-standalone::placeholder {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   GENERIC INPUT CLASSES — for inputs used outside .form-field
   Applies the same visual style as .form-field inputs so all
   controls look consistent regardless of context.
   ═══════════════════════════════════════════════════════════════ */
.input,
.form-input {
    padding: 0 12px;
    height: 34px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

textarea.input,
textarea.form-input {
    height: auto;
    min-height: 60px;
    padding: 8px 12px;
    resize: vertical;
}

select.input,
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.input:hover,
.form-input:hover {
    border-color: var(--border-strong);
}

.input:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.input::placeholder,
.form-input::placeholder {
    color: var(--text-muted);
}

.input:disabled,
.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

/* Compact variant — used in filter bars, inline forms */
.input-sm {
    padding: 0 10px;
    height: 30px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

select.input-sm {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px;
}

.input-sm:hover { border-color: var(--border-strong); }
.input-sm:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.input-sm::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES — commonly used with form controls
   ═══════════════════════════════════════════════════════════════ */
.w-full      { width: 100% !important; }
.max-w-prose { max-width: 720px; }
.mb-05   { margin-bottom: 4px !important; }
.mb-1    { margin-bottom: 8px !important; }
.mb-2    { margin-bottom: 16px !important; }
.mb-3    { margin-bottom: 24px !important; }

/* ═══════════════════════════════════════════════════════════════
   QR CODE IMAGE
   ═══════════════════════════════════════════════════════════════ */
.qr-image {
    display: block;
    margin: 0 auto 16px;
    max-width: 250px;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   CONFIG MANAGEMENT
   ═══════════════════════════════════════════════════════════════ */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.config-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.config-category-title {
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.config-editor {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
}

.config-editor:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.config-status-bar {
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 0 0 6px 6px;
    border: 1px solid var(--border);
    border-top: none;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

/* Body font size class */
.text-body { font-size: 13px; }

/* Sparkline canvas (used by SOC metric cards) */
.sparkline-canvas {
    width: 100%;
    height: 30px;
    display: block;
    margin-top: 4px;
}

/* Event feed header (used by SOC threat pages) */
.event-feed-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST — frosted glass, slide-in from right (enhancements)
   ═══════════════════════════════════════════════════════════════ */
.toast-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
    margin-top: 1px;
}

.toast-message {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   SPINNER — smooth rotation
   ═══════════════════════════════════════════════════════════════ */
.spinner {
    display: inline-block;
    border-radius: 50%;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    animation: spinnerRotate 0.8s linear infinite;
    box-sizing: border-box;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-md {
    width: 24px;
    height: 24px;
    border-width: 2.5px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Screen-reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes spinnerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ═══════���════════════════════════════���══════════════════════════
   FORM BUILDER — schema-driven form layout
   ═══════════════════════════════════════════════════════════��═══ */
.form-builder {
    width: 100%;
}

.form-layout-vertical .form-field {
    margin-bottom: 16px;
}

.form-layout-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.form-layout-inline .form-field {
    margin-bottom: 0;
    flex: 1;
    min-width: 160px;
}

/* Action row: always a full-width line below the last field row so the
 * submit button is right-aligned on its own line instead of tiling with
 * the final inline field (which looked like "just another field"). */
.form-layout-inline .form-actions {
    flex: 1 0 100%;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
}

/* Inline code block — short preformatted text (rule syntax, JSON snippet).
 * Used by DPI packet-detail expanders and anywhere else a monospace chunk
 * needs a subtle border + matching font stack. Kept separate from .hex-dump-box
 * so a non-scrolling code block doesn't pick up the max-height cap. */
.code-block {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Scrolling container for byte-level dumps (DPI packet payload, hex view).
 * Caps visible height so a multi-KB payload doesn't blow out the card. */
.hex-dump-box {
    max-height: 300px;
    overflow: auto;
}

/* Toggle container alignment */
.toggle-container {
    display: flex;
    align-items: center;
    min-height: 34px;
}

/* ─── Tag Input ─────────────────────────────────────────────── */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: text;
}

.tag-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.tag-input-container .tag-list {
    display: contents;
}

.tag-input-field {
    flex: 1;
    min-width: 80px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    padding: 2px 0;
}

.tag-input-field::placeholder {
    color: var(--text-muted);
}

/* ═════════��══════════════════════════��══════════════════════════
   SEVERITY BARS — horizontal distribution
   ════��═══════════════════════════════════════════════════════��══ */
.severity-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.severity-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.severity-bar-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

.severity-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.severity-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.bar-critical { background: var(--danger); }
.bar-high { background: var(--warning); }
.bar-medium { background: var(--warning); }
.bar-low { background: var(--info); }

.severity-bar-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 32px;
    font-variant-numeric: tabular-nums;
}

/* ═���════════════���════════════════════════════════════════════════
   EVENT FEED — live scrolling list
   ══════════════════��════════════════════════════════════════════ */
.event-feed {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
}

.event-feed-list {
    display: flex;
    flex-direction: column;
}

.event-feed-list > * {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light, var(--border));
    font-size: 13px;
    transition: background 0.15s ease;
}

.event-feed-list > *:hover {
    background: var(--bg-hover, var(--accent-light));
}

.event-feed-list > *:last-child {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════
   SKELETON — shimmer loading placeholders
   ═══════════════════════════════════════════════════════════════ */
.skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-row {
    display: flex;
    gap: 12px;
}

.skeleton-line {
    height: 14px;
    width: 100%;
    border-radius: 6px;
    background: var(--bg-tertiary);
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-line-short {
    width: 65%;
}

.skeleton-cell {
    flex: 1;
    height: 14px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-block {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

/* Stagger shimmer on rows */
.skeleton-row:nth-child(2) .skeleton-line,
.skeleton-row:nth-child(2) .skeleton-cell,
.skeleton-row:nth-child(2) .skeleton-block {
    animation-delay: 0.15s;
}

.skeleton-row:nth-child(3) .skeleton-line,
.skeleton-row:nth-child(3) .skeleton-cell,
.skeleton-row:nth-child(3) .skeleton-block {
    animation-delay: 0.3s;
}

.skeleton-row:nth-child(4) .skeleton-line,
.skeleton-row:nth-child(4) .skeleton-cell,
.skeleton-row:nth-child(4) .skeleton-block {
    animation-delay: 0.45s;
}

@keyframes skeletonShimmer {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Table skeleton variant */
.skeleton-table .skeleton-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light, var(--border));
}

/* ═══════════════════════════════════════════════════════════════
   STATUS INDICATOR — threat/health level dot with label
   ═══════════════════════════════════════════════════════════════ */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color var(--transition);
}

.status-normal {
    background-color: var(--success);
    box-shadow: 0 0 0 2px var(--success-bg);
}

.status-elevated {
    background-color: var(--warning);
    box-shadow: 0 0 0 2px var(--warning-bg);
}

.status-high {
    background-color: var(--danger);
    box-shadow: 0 0 0 2px var(--danger-bg);
}

.status-critical {
    background-color: var(--danger);
    box-shadow: 0 0 4px var(--danger), 0 0 0 2px var(--danger-bg);
}

.status-label {
    color: var(--text-primary);
    letter-spacing: -0.003em;
}

/* Pulse animation for active/live indicators */
.status-dot-pulse {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
}

/* ═══════════════════════════════════════════════════════════════
   BREADCRUMB — navigation trail
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
}

.breadcrumb-link:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
    list-style: none;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    padding: 2px 4px;
}

/* Modal size variant for small dialogs (confirm) */
.modal-sm {
    max-width: 400px;
}

/* ═══════════════════════════════════════════════════════════════
   DATA TABLE — advanced reusable table component
   ═══════════════════════════════════════════════════════════════ */

/* ─── Data Table Container — glass card with depth ─────── */
.data-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-slow);
}

.data-table-container:hover {
    box-shadow: var(--shadow-md);
}

/* Scrollable table wrapper inside container */
.data-table-container .data-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.data-table-container .data-table-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.data-table-container .data-table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.data-table-container .data-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

.data-table-container .data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Sort indicators in headers */
.data-table th[data-sortable] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

.data-table th[data-sortable]:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.3;
    transition: opacity var(--transition), color var(--transition);
}

.sort-indicator.active {
    opacity: 1;
    color: var(--accent);
}

/* Expand row — smooth reveal */
.expand-row td {
    padding: 16px 20px;
    background: var(--bg-sunken, var(--bg-tertiary));
    border-bottom: 1px solid var(--border);
    animation: expandIn 0.25s ease;
}

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

/* Group header */
.group-header td {
    font-weight: 600;
    font-size: 11px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 16px;
    border-bottom: 2px solid var(--border);
}

/* Truncated cell — single line, ellipsis when overflow.
   Used when operator can see full content via row-click detail modal. */
.cell-truncated {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Wrap cell — multi-line, break long unbreakable strings.
   Used when full content must be readable in-place (customer name,
   long error messages, …). Pair with `col.maxWidth` to constrain
   column width while content wraps to additional lines. */
.cell-wrap {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Muted row (dismissed/expired) */
.row-muted td {
    opacity: 0.45;
}

.row-muted:hover td {
    opacity: 0.7;
}

/* Loading overlay — animated shimmer */
.data-table-loading {
    position: relative;
    min-height: 120px;
    pointer-events: none;
}

.data-table-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 25%,
        var(--accent-light) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    opacity: 0.5;
    border-radius: var(--radius-lg);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Auto-refresh toggle — compact inline style for pagination bar */
.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    user-select: none;
}

/* Page size selector */
.page-size-select {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}

.page-size-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ═══════════════════════════════════════════════════════════════
   DATA LIST — card grid with filter + pagination
   ═══════════════════════════════════════════════════════════════ */
.data-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.data-list-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .data-list-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .data-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════
   METRIC CARD (enhanced) — data-card.js
   ═══════════════════════════════════════════════════════════════ */
.metric-card-enhanced {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-card-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.metric-card-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.metric-card-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    /* Realtime binder sets data-changed="true" for one frame on each value
       change — fade the background briefly so the user sees what updated
       without full DOM re-render. */
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 4px;
    transition: background-color 0.5s ease-out, color 0.25s ease-out;
}

.metric-card-value[data-changed="true"] {
    background-color: rgba(96, 165, 250, 0.18);
}

/* Status-driven colour for bindClass mapping.
   e.g. bindClass(el, d => d.waf_status, { healthy: 'ok', unreachable: 'error' })
   -> sets `.status-ok` | `.status-error`. */
.metric-card-value.status-ok       { color: var(--success); }
.metric-card-value.status-warn     { color: var(--warning); }
.metric-card-value.status-error,
.metric-card-value.status-danger   { color: var(--danger); }
.metric-card-value.status-critical {
    color: var(--danger);
    animation: rt-pulse 1.2s ease-in-out infinite;
}

@keyframes rt-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* Respect OS-level reduced-motion preference (WCAG 2.1 AA). The content
   updates are driven by `textContent`, not animations, so nothing breaks. */
@media (prefers-reduced-motion: reduce) {
    .metric-card-value {
        transition: none;
    }
    .metric-card-value[data-changed="true"] {
        background-color: transparent;
    }
    .metric-card-value.status-critical {
        animation: none;
    }
}

.metric-card-change {
    font-size: 12px;
    font-weight: 500;
}

.change-success { color: var(--success); }
.change-danger { color: var(--danger); }
.change-warning { color: var(--warning); }
.change-neutral { color: var(--text-muted); }

.metric-card-clickable {
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   STATUS CARD — data-card.js
   ═══════════════════════════════════════════════════════════════ */
.status-card {
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-card-header {
    display: flex;
    align-items: center;
}

.status-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.003em;
}

.status-card-details {
    font-size: 12px;
    color: var(--text-secondary);
}

.status-card-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   STAT CARD — data-card.js
   ═══════════════════════════════════════════════════════════════ */
.stat-card {
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.stat-card-substats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.stat-card-substat {
    text-align: center;
}

.stat-card-substat-value {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.stat-card-substat-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED SELECT — select.js
   ═══════════════════════════════════════════════════════════════ */
.select-container {
    position: relative;
    display: inline-block;
}

.select-native {
    width: 100%;
    padding: 0 28px 0 12px;
    height: 34px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.select-native:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.select-trigger {
    width: 100%;
    padding: 0 28px 0 12px;
    height: 34px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.select-trigger:hover {
    border-color: var(--border-strong);
}

.select-trigger:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    animation: dropdownIn 0.15s ease;
}

.select-search {
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.select-search-input {
    width: 100%;
    padding: 0 10px;
    height: 28px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    box-sizing: border-box;
    outline: none;
}

.select-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.select-search-input::placeholder {
    color: var(--text-muted);
}

.select-options {
    max-height: 160px;
    overflow-y: auto;
    padding: 4px;
}

.select-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px;
    transition: background 0.15s ease;
    color: var(--text-primary);
}

.select-option:hover,
.select-option.focused {
    background: var(--bg-hover, var(--accent-light));
}

.select-option.selected {
    color: var(--accent);
    font-weight: 500;
}

.select-no-results {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}

.select-no-results:hover {
    background: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   DATE RANGE PICKER — date-picker.js
   ═══════════════════════════════════════════════════════════════ */
.date-picker-input {
    cursor: pointer;
}

.date-range-picker {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.date-range-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-range-separator {
    font-size: 14px;
    color: var(--text-muted);
    padding-bottom: 6px;
    user-select: none;
}

.date-range-presets {
    display: flex;
    gap: 4px;
    padding-bottom: 2px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   WIZARD — multi-step form wizard
   ═══════════════════════════════════════════════════════════════ */
.wizard-container {
    display: flex;
    flex-direction: column;
}

.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.wizard-step.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.wizard-step.completed {
    background: var(--success-bg);
    color: var(--success);
}

.wizard-step.pending {
    color: var(--text-muted);
}

.wizard-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.wizard-step.active .wizard-step-number {
    background: var(--accent);
    color: #fff;
}

.wizard-step.completed .wizard-step-number {
    background: var(--success);
    color: #fff;
}

.wizard-step.pending .wizard-step-number {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.wizard-step-title {
    font-size: 12px;
}

.wizard-step-line {
    flex: 1;
    height: 2px;
    min-width: 16px;
    background: var(--border);
    border-radius: 1px;
    transition: background 0.2s ease;
}

.wizard-step-line.completed {
    background: var(--success);
}

.wizard-body {
    min-height: 200px;
    margin-bottom: 16px;
}

/* Setup wizard host — wraps the wizard inside the login-form-panel
 * column. Constrained width prevents the step indicator from
 * stretching across very wide displays and keeps the body in the
 * same visual column as the login form on the wizard-complete
 * panel. */
.setup-wizard-host {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* Narrow-viewport accommodation for the step indicator. Hide the
 * inline titles below 640 px so the dot + connector remain visible
 * without horizontal scroll; the active step's title still renders
 * inside the wizard body via the `aria-live` region. */
@media (max-width: 640px) {
    .setup-wizard-host {
        max-width: 100%;
    }
    .wizard-step-title {
        display: none;
    }
    .wizard-step {
        padding: 6px 8px;
    }
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

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

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

/* ═══════════════════════════════════════════════════════════════
   CODE EDITOR — monospace textarea with line numbers
   ═══════════════════════════════════════════════════════════════ */
.code-editor {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-family: var(--font-mono, 'SF Mono', Menlo, 'Fira Code', monospace);
}

.code-editor > .code-editor-gutter,
.code-editor > .code-editor-textarea {
    /* Side-by-side layout handled by inner wrapper */
}

/* Inner row: gutter + textarea */
.code-editor {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr auto;
}

.code-editor-gutter {
    grid-row: 1;
    grid-column: 1;
    padding: 8px 12px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
    user-select: none;
    min-width: 40px;
    overflow: hidden;
    white-space: pre;
    box-sizing: border-box;
}

.code-editor-textarea {
    grid-row: 1;
    grid-column: 2;
    padding: 8px 12px;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
    outline: none;
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
    box-sizing: border-box;
    font-family: inherit;
}

.code-editor-textarea::placeholder {
    color: var(--text-muted);
}

.code-editor-readonly .code-editor-textarea {
    background: var(--bg-secondary);
    cursor: default;
}

.code-editor-status {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   FILE UPLOAD — drag-and-drop zone
   ═══════════════════════════════════════════════════════════════ */
.file-upload-container {
    width: 100%;
}

.file-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
}

.file-upload-zone .upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--text-muted);
    line-height: 1;
}

.file-upload-zone .upload-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.file-upload-zone .upload-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.file-upload-info {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.file-upload-name {
    font-weight: 500;
}

.file-upload-size {
    color: var(--text-muted);
}

.file-upload-error {
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   BLOCKED REQUESTS — page-specific styles
   ═══════════════════════════════════════════════════════════════ */

.br-spinner-center { margin: 0 auto 12px; }
.br-detail-pad { padding: 8px 0; }
.br-score-muted { color: var(--text-muted); }
.br-score-warning { color: var(--warning); }
.br-score-danger { color: var(--danger); }
.br-status-dismissed { opacity: 0.5; }
.br-fp-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
}
.br-fp-green { background: var(--success); }
.br-fp-yellow { background: var(--warning); }
.br-fp-red { background: var(--danger); }
.br-form-label { display: block; margin-bottom: 4px; }
.br-input-full { width: 100%; }
.br-textarea-reason { width: 100%; min-height: 80px; resize: vertical; }
.br-factor-list { margin: 8px 0; padding-left: 20px; }
.br-factor-item { margin-bottom: 4px; font-size: 13px; }
.input-standalone {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
}

/* ─── Keyboard Shortcuts Help ─────────────────────────────── */
.shortcuts-help { padding: 4px 0; }

.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.shortcuts-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-light);
}

.shortcut-key { width: 120px; text-align: right; padding-right: 16px; }
.shortcut-desc { color: var(--text-secondary); font-size: 0.85rem; }

kbd {
    display: inline-block;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 0 var(--border);
    white-space: nowrap;
}

/* ─── Page Layout ─────────────────────────────────────────── */
.page-layout { min-height: 0; }

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-title { flex: 1; min-width: 0; }

.page-header-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.page-subtitle {
    margin-top: 2px;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-overlay);
    border-radius: var(--radius);
    z-index: 10;
}

/* Form layout */
.page-form-area {
    max-width: 640px;
}

.page-form-footer {
    max-width: 640px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ─── Split Panel ─────────────────────────────────────────── */
.split-panel {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.split-horizontal { flex-direction: row; }
.split-vertical { flex-direction: column; }

.split-pane {
    overflow: auto;
    min-width: 0;
    min-height: 0;
}

.split-divider {
    flex-shrink: 0;
    background: var(--border);
    transition: background 180ms ease;
    position: relative;
}

.split-divider:hover,
.split-divider:focus-visible {
    background: var(--accent);
}

.split-divider:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.split-horizontal > .split-divider {
    width: 4px;
    cursor: col-resize;
}

.split-vertical > .split-divider {
    height: 4px;
    cursor: row-resize;
}

/* Divider handle dot */
.split-divider::after {
    content: '';
    position: absolute;
    background: var(--text-muted);
    border-radius: 2px;
}

.split-horizontal > .split-divider::after {
    top: 50%;
    left: 50%;
    width: 2px;
    height: 20px;
    transform: translate(-50%, -50%);
}

.split-vertical > .split-divider::after {
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    transform: translate(-50%, -50%);
}

/* ═══════════════════════════════════════════════════════════════
   CONNTRACK TABLE — scrollable container, sticky header
   ═══════════════════════════════════════════════════════════════ */
/* ─── Conntrack Table Scroll — premium container ───────── */
.ct-table-scroll {
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
    transition: box-shadow var(--transition-slow);
}

.ct-table-scroll:hover {
    box-shadow: var(--shadow-md);
}

.ct-table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.ct-table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ct-table-scroll::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

.ct-table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.ct-table-scroll .data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-secondary);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.ct-table-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.ct-page-size {
    width: auto;
    min-width: 80px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.ct-page-size:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ─── DataSource Status Indicators (ARC-FE-01) ─────────── */

.ds-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition);
}

.ds-status-hidden {
    display: none;
}

.ds-status-loading {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.ds-status-refreshing {
    background: var(--accent-light);
    color: var(--accent);
}

.ds-status-stale {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.ds-status-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.ds-status-icon {
    flex-shrink: 0;
}

.ds-status-msg {
    flex: 1;
}

.ds-retry-btn {
    flex-shrink: 0;
    margin-left: auto;
}

.ds-error-msg {
    font-size: 0.75rem;
    opacity: 0.8;
}

.ds-spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ds-spin 0.7s linear infinite;
}

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

/* Chart parent needs relative positioning for overlay */
.ds-chart-has-overlay {
    position: relative;
}

/* Chart overlay — glass pill centered */
.ds-chart-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    z-index: 5;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: var(--shadow-sm);
}

.ds-chart-overlay.ds-status-loading {
    background: var(--bg-glass, rgba(255,255,255,0.8));
    color: var(--text-muted);
}

.ds-chart-overlay.ds-status-stale {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.ds-chart-overlay.ds-status-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* Card group loading state — gentle fade */
.ds-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.ds-stale {
    opacity: 0.85;
    transition: opacity var(--transition-slow);
}

.ds-error {
    opacity: 0.6;
    transition: opacity var(--transition-slow);
}

/* ═══════════════════════════════════════════════════════════════
   DATATABLE V2 — Additional styles for standardized tables
   ═══════════════════════════════════════════════════════════════ */

/* ─── Compact table variant ──────────────────────────────── */
.data-table.compact th {
    padding: 6px 10px;
    font-size: 10px;
}

.data-table.compact td {
    padding: 5px 10px;
    font-size: 12px;
}

/* ─── Simple table container ─────────────────────────────── */
.simple-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
}

/* Inside scroll parent: disable overflow so sticky headers work */
.ct-table-scroll .simple-table-container {
    overflow-x: visible;
    overflow-y: visible;
}

/* ─── Row selection ──────────────────────────────────────── */
.data-table tbody tr.selected td {
    background: var(--accent-medium, rgba(59, 130, 246, 0.1));
}

.data-table .select-column {
    width: 40px;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.data-table .select-column input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--accent, #3b82f6);
}

/* ─── Keyboard focus indicator ───────────────────────────── */
.data-table tbody tr.keyboard-focus td {
    box-shadow: inset 0 0 0 2px var(--accent, #3b82f6);
}

/* ─── Column resize handle ───────────────────────────────── */
.column-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: col-resize;
    background: transparent;
    transition: background var(--transition);
    z-index: 3;
}

.column-resize-handle:hover,
.column-resize-handle.active {
    background: var(--accent, #3b82f6);
}

/* ─── Virtual scroll ─────────────────────────────────────── */
.virtual-scroll-container {
    width: 100%;
    border-radius: var(--radius);
}

.virtual-spacer {
    width: 100%;
    pointer-events: none;
}

/* ─── Multi-select dropdown ──────────────────────────────── */
.multi-select-container {
    position: relative;
}

.multi-select-display {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 120px;
    user-select: none;
}

.multi-select-display::after {
    content: '\25BC';
    font-size: 9px;
    margin-left: 8px;
    opacity: 0.5;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.multi-select-dropdown.hidden {
    display: none;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background var(--transition);
}

.multi-select-option:hover {
    background: var(--accent-light);
}

.multi-select-option input[type="checkbox"] {
    accent-color: var(--accent, #3b82f6);
}

/* ─── Interface Selector (Network Zones) ──────────────────── */
.interface-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    max-height: 200px;
    overflow-y: auto;
}

.interface-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm, 4px);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.interface-option:hover {
    background: var(--bg-hover);
}

.interface-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.interface-option.interface-down {
    opacity: 0.5;
}

/* ── Chart container (behavior detection, dashboards) ── */
.chart-container {
    position: relative;
    height: 220px;
}
.chart-canvas {
    width: 100%;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   IPS TIMELINE CHART — ips-logging.js (TCVN 4.3.2.9c)
   ═══════════════════════════════════════════════════════════════ */
.timeline-chart {
    padding: 8px 4px;
    border-radius: var(--radius);
    background: var(--card-bg);
}
.timeline-bar-fill {
    background: var(--accent);
    min-height: 2px;
    transition: height 0.2s ease;
}
.timeline-bar:hover .timeline-bar-fill {
    background: var(--accent-hover, var(--accent));
    opacity: 0.85;
}

/* Severity row highlights for live feed */
.severity-row-critical td { border-left: 3px solid var(--danger); }
.severity-row-high td:first-child { border-left: 3px solid var(--danger); }
.severity-row-medium td:first-child { border-left: 3px solid var(--warning); }

/* ─── Detail list (key/value grid) ─────────────────────────────────
 * Matches createDetailList() component markup:
 *   <dl class="detail-list">
 *     <dt class="detail-label">…</dt>
 *     <dd class="detail-value [detail-value-mono]">…</dd>
 *     …
 *   </dl>
 * Duplicated lightly with report-components.css so that consumers
 * (portal admin/customer UIs) which only symlink components.css
 * still pick up the styles without depending on report-components.css.
 */
.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 0.875rem;
    margin: 0;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary, var(--color-muted));
    white-space: nowrap;
    margin: 0;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-word;
    margin: 0;
}

.detail-value-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    word-break: break-all;
    white-space: pre-wrap;
}

/* === animations.css === */
/* animations.css — Micro-interactions and animation system
 *
 * Staggered entrances, counter animations, skeleton transitions,
 * and other visual polish. Respects prefers-reduced-motion.
 */

/* ─── Staggered Card Entrance ─────────────────────────────── */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-cards > .card,
.animate-cards > [class*="metric"],
.animate-cards > [class*="stat"] {
    animation: cardEntrance 300ms ease-out both;
}

.animate-cards > :nth-child(1) { animation-delay: 0ms; }
.animate-cards > :nth-child(2) { animation-delay: 60ms; }
.animate-cards > :nth-child(3) { animation-delay: 80ms; }
.animate-cards > :nth-child(4) { animation-delay: 100ms; }
.animate-cards > :nth-child(5) { animation-delay: 120ms; }
.animate-cards > :nth-child(6) { animation-delay: 140ms; }
.animate-cards > :nth-child(7) { animation-delay: 160ms; }
.animate-cards > :nth-child(8) { animation-delay: 180ms; }

/* ─── Fade In (keyframe defined in components.css) ────────── */
.animate-fade-in {
    animation: fadeIn 250ms ease-out;
}

/* ─── Slide In From Bottom ────────────────────────────────── */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 300ms ease-out;
}

/* ─── Slide In From Right ─────────────────────────────────── */
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-right {
    animation: slideRight 250ms ease-out;
}

/* ─── Scale In (modals, dropdowns) ────────────────────────── */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 180ms ease-out;
}

/* ─── Skeleton to Content Crossfade ───────────────────────── */
@keyframes skeletonFade {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.skeleton-to-content {
    animation: skeletonFade 200ms ease-out;
}

/* ─── Toast (keyframes defined in components.css) ─────────── */
/* .toast-enter/.toast-exit use toastIn/toastOut from components.css */

/* ─── Badge Bounce ────────────────────────────────────────── */
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.badge-animate {
    animation: badgeBounce 300ms ease-out;
}

/* ─── Pulse Ring (status indicators) ──────────────────────── */
@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 currentColor;
        opacity: 0.6;
    }
    100% {
        box-shadow: 0 0 0 8px currentColor;
        opacity: 0;
    }
}

.animate-pulse-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: pulseRing 1.5s ease-out infinite;
}

/* ─── Number Counter Transition ───────────────────────────── */
.animate-number {
    transition: opacity 150ms ease;
}

.animate-number-flash {
    animation: numberFlash 400ms ease-out;
}

@keyframes numberFlash {
    0% { color: var(--accent); }
    100% { color: inherit; }
}

/* ─── Table Row Add/Remove ────────────────────────────────── */
@keyframes rowSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateX(0);
        max-height: 100px;
    }
}

.animate-row-in {
    animation: rowSlideIn 250ms ease-out;
}

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

/* === layout.css === */
/* layout.css — App shell: sidebar + content + login */

/* ─── App Shell ────────────────────────────────────────────── */
#app {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    width: 240px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--sidebar-border);
    position: sticky;
    top: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Webkit thin scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Subtle top glow accent */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--sidebar-brand);
    opacity: 0.6;
}

/* ─── Sidebar Header ──────────────────────────────────────── */
.sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--sidebar-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.sidebar-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

.sidebar-header .sidebar-version {
    font-size: 0.6rem;
    color: var(--sidebar-text);
    opacity: 0.5;
    font-weight: 400;
    margin-left: auto;
    font-family: var(--font-mono);
}

/* ─── Sidebar Navigation ──────────────────────────────────── */
.sidebar-nav {
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-section {
    padding: 16px 16px 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    margin: 1px 8px;
    color: var(--sidebar-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    width: calc(100% - 16px);
    text-align: left;
    font-family: inherit;
    border-radius: var(--radius);
    position: relative;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-active-text);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

/* Nav icon placeholder */
.nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-item.active .nav-icon { opacity: 1; }

/* Nav item badge (notification count) */
.nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    min-width: 18px;
    text-align: center;
}

/* ─── Sidebar Footer ──────────────────────────────────────── */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-user {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.sidebar-user strong {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--sidebar-border);
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    border-radius: var(--radius);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.theme-toggle:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

/* ─── Main Content ─────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
    background: var(--bg-primary);
    min-width: 0;
}

/* ─── Login Layout ─────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════
   LOGIN — Premium split layout (brand + form)
   ═══════════════════════════════════════════════════════════════ */

/* Legacy wrapper (backward compat for pages still using it) */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--login-bg);
    position: relative;
}

/* Split layout: brand left, form right */
.login-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ─── Brand Panel — dark with animated orbs ────────────── */
.login-brand-panel {
    position: relative;
    width: 42%;
    min-height: 100vh;
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Grid overlay on brand panel */
.login-brand-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    animation: gridPulse 8s ease-in-out infinite;
    mask-image: radial-gradient(ellipse 60% 60% at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at center, black 30%, transparent 70%);
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Floating gradient orbs */
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.4;
}

.login-orb-1 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -80px; right: -60px;
    animation: orbFloat1 12s ease-in-out infinite;
}

.login-orb-2 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    bottom: -60px; left: -40px;
    animation: orbFloat2 15s ease-in-out infinite;
}

.login-orb-3 {
    width: 180px; height: 180px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 40%; left: 50%;
    animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 40px) scale(1.1); }
    66% { transform: translate(20px, -20px) scale(0.9); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.15); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.5; }
}

/* Brand content centered in panel */
.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

/* Shield logo */
.login-shield {
    width: 80px;
    height: 96px;
    margin: 0 auto 28px;
    filter: drop-shadow(0 4px 20px rgba(59, 130, 246, 0.4));
    animation: shieldGlow 4s ease-in-out infinite;
}

.login-shield-svg {
    width: 100%;
    height: 100%;
}

/* Text fallback for setup page (no SVG logo) */
.login-shield-text {
    width: 64px;
    height: 64px;
    margin: 0 auto 28px;
    border-radius: 16px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
    animation: shieldGlow 4s ease-in-out infinite;
}

@keyframes shieldGlow {
    0%, 100% { filter: drop-shadow(0 4px 20px rgba(59, 130, 246, 0.3)); }
    50% { filter: drop-shadow(0 4px 30px rgba(59, 130, 246, 0.6)); }
}

.login-brand-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f1f5f9;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #e2e8f0 0%, #93c5fd 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-brand-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 32px;
}

/* Feature badges */
.login-brand-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.login-feature-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 13px;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* ─── Form Panel — light/glass side ────────────────────── */
.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-y: auto;
}

.login-form-header {
    margin-bottom: 32px;
}

.login-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-form-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-form {
    max-width: 380px;
}

.login-form .form-field {
    margin-bottom: 20px;
}

.login-form .form-field input {
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: var(--radius);
}

.login-form .btn-lg {
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    margin-top: 8px;
}

/* MFA section */
.login-mfa {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light, var(--border));
    margin-bottom: 16px;
}

.login-mfa-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-mfa .form-field {
    margin-bottom: 0;
}

.login-mfa .form-field label {
    display: none;
}

/* Checkbox label */
.login-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

/* Form footer */
.login-form-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light, var(--border));
}

.login-form-footer p {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .content { padding: 24px; }
}

@media (max-width: 768px) {
    .sidebar {
        width: 64px;
    }

    .sidebar-header h2,
    .sidebar-header .sidebar-version { display: none; }
    .nav-item span:not(.nav-icon) { display: none; }
    .nav-section { display: none; }
    .sidebar-user { display: none; }
    .nav-badge { display: none; }

    .nav-item {
        justify-content: center;
        margin: 1px 4px;
        padding: 10px;
        width: calc(100% - 8px);
    }

    .nav-icon { opacity: 1; font-size: 1.1rem; }

    .content { padding: 16px; }

    /* Login split → stacked on tablet */
    .login-split { flex-direction: column; }
    .login-brand-panel { width: 100%; min-height: auto; padding: 40px 24px; }
    .login-brand-content { padding: 20px; }
    .login-shield { width: 56px; height: 67px; margin-bottom: 16px; }
    .login-shield-text { width: 48px; height: 48px; font-size: 22px; margin-bottom: 16px; }
    .login-brand-title { font-size: 1.3rem; }
    .login-brand-subtitle { font-size: 0.8rem; margin-bottom: 20px; }
    .login-form-panel { padding: 32px 24px; min-height: auto; }
    .login-form { max-width: 100%; }

    /* Legacy login-card compat */
    .login-card { margin: 16px; padding: 28px; }
}

/* ─── Extra small screens ─────────────────────────────────── */
@media (max-width: 480px) {
    .content { padding: 12px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header h1 { font-size: 1.2rem; }
    .login-brand-panel { padding: 24px 16px; }
    .login-brand-features { gap: 6px; }
    .login-feature-badge { font-size: 10px; height: 22px; padding: 0 8px; }
    .login-form-panel { padding: 24px 16px; }
    .login-form .form-field input { height: 38px; }
    .login-card { margin: 8px; padding: 20px; }
}

/* ─── Large screens ───────────────────────────────────────── */
@media (min-width: 1400px) {
    .content { max-width: 1320px; padding: 32px 40px; }
}

/* ─── Sidebar Mode Selector ──────────────────────────────── */
.sidebar-mode-selector {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.sidebar-mode-selector label {
    display: block;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mode-select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 180ms;
    -webkit-appearance: none;
}
.mode-select:hover { border-color: rgba(255,255,255,0.4); }
.mode-select:focus { border-color: #3b82f6; }
.mode-select option { background: #1e293b; color: #e2e8f0; }

/* ─── TCVN Tooltip ───────────────────────────────────────── */
.tcvn-tooltip {
    position: fixed;
    z-index: 10010;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    padding: 10px 14px;
    max-width: 460px;
    min-width: 280px;
    font-size: 0.75rem;
    color: #e2e8f0;
    pointer-events: none;
    line-height: 1.5;
    white-space: pre-line;
}
.tcvn-tooltip-content {
    font-family: var(--font-mono, 'SF Mono', 'Cascadia Code', monospace);
    font-size: 0.7rem;
}
[data-theme="light"] .tcvn-tooltip {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* NTP Alert styles */
.ntp-alert {
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid;
}
.ntp-alert-danger {
    background: var(--danger-bg);
    border-left-color: var(--danger);
}
.ntp-alert-success {
    background: var(--success-bg);
    border-left-color: var(--success);
}

/* Tooltip toggle active state */
.theme-toggle.active {
    background: rgba(59,130,246,0.3);
    color: #60a5fa;
}

/* === soc.css === */
/* soc.css — SOC large-screen dashboard styles
 *
 * Designed for wall-mounted displays:
 * - High contrast, readable from 3-5 meters
 * - Large fonts, no small text
 * - Dark theme only (reduces glare in SOC rooms)
 * - Full-screen layout, no scrolling
 * - Animated threat indicators
 * - Auto-rotating panels
 *
 * All colors use CSS variables from theme.css.
 * SOC-specific variables defined below for easy theming.
 */

/* ── SOC-specific variables ── */
:root {
    /* SOC background (deep dark for wall displays) */
    --soc-bg: #0a0e1a;
    --soc-text: var(--text-primary);
    --soc-text-muted: var(--text-muted);
    --soc-border: var(--border);
    --soc-card-bg: var(--bg-secondary);
    --soc-card-border: var(--border);

    /* Severity palette (shared with badges) */
    --soc-sev-critical: var(--danger);
    --soc-sev-high: var(--warning);
    --soc-sev-medium: #eab308;
    --soc-sev-low: var(--success);

    /* Threat level palette */
    --soc-threat-normal: #4ade80;
    --soc-threat-elevated: #facc15;
    --soc-threat-high: #fb923c;
    --soc-threat-critical: #f87171;

    /* Value colors for metric display */
    --soc-val-green: #4ade80;
    --soc-val-yellow: #facc15;
    --soc-val-orange: #fb923c;
    --soc-val-red: #f87171;
    --soc-val-blue: #60a5fa;
    --soc-val-cyan: #22d3ee;
    --soc-val-white: #f0f0f0;

    /* SOC accent */
    --soc-accent: var(--accent);
    --soc-accent-bg: var(--accent-light);
}

/* SOC pages force dark theme for optimal screen readability */
.soc-page {
    background: var(--soc-bg);
    color: var(--soc-text);
    min-height: calc(100vh - 60px);
    font-family: var(--font-sans);
    padding: 12px 16px;
}

/* Fullscreen mode — hide sidebar */
.soc-fullscreen .sidebar { display: none !important; }
.soc-fullscreen .content { padding: 0; }
.soc-fullscreen .soc-page { padding: 20px; }

/* ── Header Bar ── */
.soc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--soc-border);
    margin-bottom: 16px;
}

.soc-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}

.soc-clock {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--soc-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ── Threat Level Indicator ── */
.threat-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.threat-normal {
    background: rgba(34, 197, 94, 0.15);
    color: var(--soc-threat-normal);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.threat-elevated {
    background: rgba(234, 179, 8, 0.15);
    color: var(--soc-threat-elevated);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.threat-high {
    background: rgba(249, 115, 22, 0.15);
    color: var(--soc-threat-high);
    border: 1px solid rgba(249, 115, 22, 0.3);
    animation: pulse-border 2s ease-in-out infinite;
}

.threat-critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--soc-threat-critical);
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(239, 68, 68, 0.5); }
    50% { border-color: rgba(239, 68, 68, 1); box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
}

/* ── Threat Pulse Dot ── */
.threat-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: soc-pulse-dot 2s ease-in-out infinite;
}

.threat-dot-normal { background: var(--soc-threat-normal); }
.threat-dot-elevated { background: var(--soc-threat-elevated); }
.threat-dot-high { background: var(--soc-threat-high); animation-duration: 1.5s; }
.threat-dot-critical { background: var(--soc-threat-critical); animation-duration: 0.8s; }

@keyframes soc-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ── SOC Metric Cards ── */
.soc-grid {
    display: grid;
    gap: 12px;
}

.soc-grid-5 { grid-template-columns: repeat(5, 1fr); }
.soc-grid-4 { grid-template-columns: repeat(4, 1fr); }
.soc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.soc-grid-2 { grid-template-columns: repeat(2, 1fr); }

.soc-metric {
    background: var(--soc-card-bg);
    border: 1px solid var(--soc-card-border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.soc-metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--soc-text-muted);
    margin-bottom: 4px;
}

.soc-metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.soc-metric-sub {
    font-size: 12px;
    color: var(--soc-text-muted);
    margin-top: 2px;
}

/* Value colors */
.val-green { color: var(--soc-val-green); }
.val-yellow { color: var(--soc-val-yellow); }
.val-orange { color: var(--soc-val-orange); }
.val-red { color: var(--soc-val-red); }
.val-blue { color: var(--soc-val-blue); }
.val-cyan { color: var(--soc-val-cyan); }
.val-white { color: var(--soc-val-white); }

/* ── SOC Panels ── */
.soc-panel {
    background: var(--soc-card-bg);
    border: 1px solid var(--soc-card-border);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.soc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.soc-panel-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--soc-text-muted);
    font-weight: 600;
}

.soc-panel-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--soc-accent-bg);
    color: var(--soc-val-blue);
}

/* ── Severity Bar Chart ── */
.severity-bars {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 100px;
    padding-top: 8px;
}

.severity-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.severity-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
}

.severity-bar-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--soc-text-muted);
}

.severity-bar-count {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sev-critical { background: var(--soc-sev-critical); }
.sev-high { background: var(--soc-sev-high); }
.sev-medium { background: var(--soc-sev-medium); }
.sev-low { background: var(--soc-sev-low); }

/* ── Engine Status Table ── */
.soc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.soc-table th {
    text-align: left;
    padding: 8px 12px;
    color: var(--soc-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--soc-card-border);
}

.soc-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--soc-card-bg);
    color: var(--soc-text);
}

.soc-table tr:hover td {
    background: var(--soc-accent-bg);
}

/* ── Live Event Feed ── */
.event-feed {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) var(--soc-card-bg);
}

.event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--soc-border);
    font-size: 13px;
    animation: soc-fadeIn 0.3s ease;
}

@keyframes soc-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.event-time {
    color: var(--soc-text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 65px;
}

.event-type {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 55px;
    text-align: center;
}

.event-block {
    background: rgba(239, 68, 68, 0.2);
    color: var(--soc-threat-critical);
}

.event-allow {
    background: rgba(34, 197, 94, 0.15);
    color: var(--soc-threat-normal);
}

.event-detail {
    color: var(--text-secondary);
    flex: 1;
}

/* ── Fullscreen toggle ── */
.soc-fullscreen-btn {
    background: var(--soc-accent-bg);
    color: var(--soc-val-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.soc-fullscreen-btn:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* ── Chart container ── */
.soc-chart {
    width: 100%;
    height: 200px;
}

.soc-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ── Engine Performance rows ── */
.engine-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, 0.06));
    font-size: 13px;
}

.engine-row:last-child { border-bottom: none; }

.engine-name {
    flex: 1;
    color: var(--soc-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.engine-stat {
    min-width: 70px;
    text-align: right;
    color: var(--soc-val-blue);
    font-family: var(--font-mono);
    font-size: 12px;
    margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   SOC Dashboard v2 — Enterprise redesign
   Professional, dark-theme optimized, Apple-like aesthetics
   ═══════════════════════════════════════════════════════════════ */

/* v2 page wrapper — tighter spacing, subtle refinements */
.soc-v2 {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── KPI Grid: 5 equal columns ── */
.soc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* ── Chart Grid: 3 equal columns ── */
.soc-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ── Panel Grid: 3 equal columns ── */
.soc-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ── Stat Row: 4 equal columns (network stats, protocol stats) ── */
.soc-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* ── Individual stat item within stat row ── */
.soc-stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
}

.soc-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    margin-top: 4px;
}

/* ── Taller chart container (for donut on threat page) ── */
.soc-chart-tall {
    height: 280px;
}

/* ── Threat Level Banner (full-width, soc-threats page) ── */
.soc-threat-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-radius: 10px;
    margin-top: 12px;
    transition: all 0.4s ease;
}

.soc-threat-banner.threat-normal {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.soc-threat-banner.threat-elevated {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.soc-threat-banner.threat-high {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.35);
    animation: banner-pulse 2s ease-in-out infinite;
}

.soc-threat-banner.threat-critical {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: banner-pulse 1s ease-in-out infinite;
}

@keyframes banner-pulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 24px rgba(239, 68, 68, 0.15); }
}

.soc-threat-banner-label {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.soc-threat-banner.threat-normal .soc-threat-banner-label { color: var(--soc-threat-normal); }
.soc-threat-banner.threat-elevated .soc-threat-banner-label { color: var(--soc-threat-elevated); }
.soc-threat-banner.threat-high .soc-threat-banner-label { color: var(--soc-threat-high); }
.soc-threat-banner.threat-critical .soc-threat-banner-label { color: var(--soc-threat-critical); }

.soc-threat-banner-sub {
    font-size: 13px;
    color: var(--soc-text-muted);
    margin-left: auto;
}

/* ── Inline threat level text (soc main page, inside severity panel) ── */
.soc-threat-level-inline {
    margin-top: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--soc-text-muted);
}

/* ── Responsive ── */
@media (max-width: 1440px) {
    .soc-kpi-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
    .soc-chart-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .soc-panel-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

@media (max-width: 1280px) {
    .soc-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .soc-chart-grid { grid-template-columns: repeat(2, 1fr); }
    .soc-panel-grid { grid-template-columns: repeat(2, 1fr); }
    .soc-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .soc-metric-value { font-size: 1.6rem; }
    .soc-stat-value { font-size: 1.3rem; }
}

@media (max-width: 1024px) {
    .soc-stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Severity Horizontal Bars ── */
.sev-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sev-bar-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--soc-text-muted);
    width: 70px;
    flex-shrink: 0;
    text-align: right;
}
.sev-bar-track {
    flex: 1;
    height: 18px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}
.sev-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}
.sev-bar-count {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .soc-kpi-grid,
    .soc-chart-grid,
    .soc-panel-grid { grid-template-columns: 1fr; }
    .soc-grid-5, .soc-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .soc-stat-row { grid-template-columns: repeat(2, 1fr); }
    .soc-threat-banner { flex-direction: column; text-align: center; }
    .soc-threat-banner-sub { margin-left: 0; }
}

/* === report-components.css === */
/* report-components.css — Report/governance UI component styles */

/* Filter bar + filter-item/filter-label/filter-select/filter-input:
 * defined in components.css (single source of truth) */

/* ─── Timeline ─────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    flex-shrink: 0;
    z-index: 1;
}

.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }
.dot-info { background: var(--info); }
.dot-neutral { background: var(--text-muted); }

.timeline-content { flex: 1; }

.timeline-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.timeline-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.timeline-author::before {
    content: '\2014\00a0';
}

.timeline-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ─── Progress Bar ─────────────────────────────────────────── */
.progress-wrapper {
    margin-bottom: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.progress-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.progress-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-success { background: var(--success); }
.progress-warning { background: var(--warning); }
.progress-danger { background: var(--danger); }
.progress-info { background: var(--info); }
.progress-neutral { background: var(--text-muted); }

/* ─── Score Card ───────────────────────────────────────────── */
.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.score-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.score-success .score-value { color: var(--success); }
.score-warning .score-value { color: var(--warning); }
.score-danger .score-value { color: var(--danger); }
.score-info .score-value { color: var(--info); }
.score-neutral .score-value { color: var(--text-primary); }

.score-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.score-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Accordion ────────────────────────────────────────────── */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.accordion-item + .accordion-item {
    border-top: 1px solid var(--border);
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    text-align: left;
    transition: background var(--transition);
}

.accordion-header:hover { background: var(--bg-tertiary); }

.accordion-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    width: 14px;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.accordion-title { flex: 1; }

.accordion-panel {
    padding: 12px 16px;
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-panel.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs-container {
    margin-bottom: 16px;
}

.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.tab-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.tab-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    min-height: 100px;
}

/* ─── Status Stepper ───────────────────────────────────────── */
.status-stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 8px 0;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-completed .stepper-circle {
    background: var(--success);
    color: #fff;
}

.step-active .stepper-circle {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.step-pending .stepper-circle {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 2px solid var(--border);
}

.stepper-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 6px;
}

.step-active .stepper-label { color: var(--accent); font-weight: 600; }
.step-completed .stepper-label { color: var(--success); }

.stepper-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stepper-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-top: 15px;
    min-width: 24px;
}

.stepper-line.line-done { background: var(--success); }

/* ─── Tag List ─────────────────────────────────────────────── */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
}

.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-neutral { background: var(--bg-tertiary); color: var(--text-secondary); }

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 2px;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.tag-remove:hover { opacity: 1; }

/* ─── Detail List ──────────────────────────────────────────── */
.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 0.875rem;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-word;
}

/* text-success/warning/danger/info defined in main.css */
.text-neutral { color: var(--text-secondary); }

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 360px;
}

/* ─── Section Header ───────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 8px;
}

/* ─── Structured Card (with header/body sections) ──────────── */
/* Extends base .card from main.css — adds header/body structure */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    margin: -20px -20px 16px;
    border-radius: 12px 12px 0 0;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 6px;
}

/* Utilities defined in main.css — not duplicated here */

/* === compliance.css === */
/* compliance.css — Compliance Center page styles */

/* ─── Standard Card Grid ─── */
.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-3, 1rem);
}
.compliance-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 240px;
}
.compliance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 4px 12px rgba(0,0,0,0.15));
}

/* ─── Category Section ─── */
.compliance-category {
    margin-bottom: var(--space-4, 1.5rem);
}
.compliance-category-title {
    font-size: var(--font-lg, 1.125rem);
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    border-bottom: 2px solid var(--border);
    padding-bottom: var(--space-1, 0.25rem);
    margin-bottom: var(--space-3, 1rem);
}

/* Filter bar: defined in components.css (single source of truth) */

/* ─── Section Accordion ─── */
.section-accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius, 6px);
    margin-bottom: var(--space-2, 0.5rem);
}
.section-accordion > .section-header {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem) var(--space-3, 1rem);
    cursor: pointer;
    font-weight: 600;
    background: var(--bg-tertiary);
    user-select: none;
}
.section-accordion > .section-header:hover { background: var(--bg-elevated); }
.section-accordion > .section-header .chevron { transition: transform 0.2s ease; display: inline-block; }
.section-accordion > .section-header.open .chevron { transform: rotate(90deg); }
.section-body { display: none; }
.section-body.open { display: block; }

/* ─── Criteria List ─── */
.criteria-list, .criteria-sections { list-style: none; padding: 0; margin: 0; }
.criteria-item {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem) var(--space-3, 1rem);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s ease;
}
.criteria-item:hover { background: var(--bg-elevated); }
.criteria-id {
    font-family: var(--font-mono, monospace);
    font-size: var(--font-sm, 0.875rem);
    color: var(--text-muted, #64748b);
    min-width: 90px;
    flex-shrink: 0;
}
.criteria-title { flex: 1; font-size: var(--font-sm, 0.875rem); }
.criteria-status { flex-shrink: 0; white-space: nowrap; }
.criteria-item-evidence { display: flex; gap: 4px; flex-shrink: 0; }
.evidence-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-muted, #e2e8f0);
    color: var(--text-muted, #64748b);
    white-space: nowrap;
}

/* ─── Status Indicators ─── */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.status-dot.compliant { background: var(--color-success, #22c55e); }
.status-dot.non_compliant { background: var(--color-danger, #ef4444); }
.status-dot.not_assessed { background: var(--color-warning, #f59e0b); }
.status-dot.not_applicable { background: var(--text-muted, #94a3b8); opacity: 0.5; }

/* ─── Auto Evidence Table ─── */
.evidence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm, 0.875rem);
    margin-top: var(--space-2, 0.5rem);
}
.evidence-table th {
    text-align: left;
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    background: var(--bg-tertiary);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}
.evidence-table td {
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    border-bottom: 1px solid var(--border);
}
.evidence-pass { color: var(--color-success, #22c55e); font-weight: 600; }
.evidence-fail { color: var(--color-danger, #ef4444); font-weight: 600; }

/* ─── Evidence Item Card ─── */
.evidence-item {
    display: flex;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius, 6px);
    margin-bottom: var(--space-2, 0.5rem);
    align-items: flex-start;
}
.evidence-icon { font-size: 1.25rem; min-width: 28px; text-align: center; }
.evidence-body { flex: 1; }
.evidence-meta { font-size: var(--font-xs, 0.75rem); color: var(--text-muted, #64748b); }

/* ─── Gap Analysis ─── */
.gap-item {
    border-left: 4px solid var(--color-danger, #ef4444);
    padding: var(--space-2, 0.5rem) var(--space-3, 1rem);
    margin-bottom: var(--space-2, 0.5rem);
    background: var(--bg-surface, #fff);
    border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0;
}
.gap-item.not-assessed { border-left-color: var(--color-warning, #f59e0b); }

/* ─── Evidence Upload Zone ─── */
.evidence-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius, 6px);
    padding: var(--space-4, 1.5rem);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.evidence-upload-zone:hover,
.evidence-upload-zone.dragover {
    border-color: var(--color-primary, #3b82f6);
    background: var(--color-primary-bg, #eff6ff);
}

/* ─── Responsive Design ─── */
@media (max-width: 767px) {
    .compliance-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .criteria-item { flex-wrap: wrap; }
    .criteria-item-evidence { width: 100%; margin-top: var(--space-1, 0.25rem); }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .compliance-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* === blocked-requests.css === */
/* blocked-requests.css — Page-specific styles for Blocked Requests viewer
 *
 * Replaces inline styles to comply with CSP (no inline style attributes).
 * Uses CSS custom properties from theme.css for consistency.
 */

/* ─── Score input (filter bar) ────────────────────────────── */
.br-score-input { width: 70px; }

/* ─── Filter bar layout ──────────────────────────────────── */
.br-filter-actions { padding-bottom: 2px; }

/* ─── Table row ──────────────────────────────────────────── */
.br-clickable-row { cursor: pointer; }

/* ─── Score coloring ─────────────────────────────────────── */
.br-score-muted { color: var(--text-muted); }
.br-score-warning { color: var(--warning); }
.br-score-danger { color: var(--danger); }

/* ─── Status: dismissed ──────────────────────────────────── */
.br-status-dismissed {
    text-decoration: line-through;
    opacity: 0.7;
}

/* ─── Detail panel ───────────────────────────────────────── */
.br-detail-pad { padding: 8px 0; }

.br-detail-cell {
    background: var(--bg-tertiary);
    padding: 12px 14px;
}

/* ─── Detail field label ─────────────────────────────────── */
.br-detail-label {
    min-width: 120px;
    color: var(--text-muted);
}

.br-detail-value { word-break: break-all; }

/* ─── FP indicator dot ───────────────────────────────────── */
.br-fp-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: help;
}

.br-fp-green { background: var(--success); }
.br-fp-yellow { background: var(--warning); }
.br-fp-red { background: var(--danger); }

/* ─── Resolve modal ──────────────────────────────────────── */
.br-modal-resolve {
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.br-modal-body-scroll {
    overflow-y: auto;
    flex: 1;
}

/* ─── FP factor list ─────────────────────────────────────── */
.br-factor-list {
    margin: 0 0 16px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.br-factor-item { margin-bottom: 4px; }

/* ─── Modal form fields ──────────────────────────────────── */
.br-form-label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.br-textarea-reason {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.85rem;
}

/* ─── Select and input sizing (filter bar) ───────────────── */
.br-select-sm { font-size: 0.82rem; }

.br-input-filter {
    font-size: 0.82rem;
    width: 130px;
}

.br-input-full {
    width: 100%;
    font-size: 0.85rem;
}

/* ─── Match detail section ──────────────────────────────── */
.br-match-section { margin-top: 12px; }

.br-match-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-primary);
}

.br-match-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
}

.br-match-header {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.br-match-rule-id {
    font-family: var(--font-mono, monospace);
    color: var(--primary);
}

.br-match-severity-critical { color: var(--danger); }
.br-match-severity-error    { color: var(--danger); }
.br-match-severity-warning  { color: var(--warning); }
.br-match-severity-notice   { color: var(--text-muted); }

.br-match-msg {
    color: var(--text-secondary);
    margin-top: 4px;
    font-size: 12px;
}

.br-match-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 12px;
    margin-top: 6px;
    font-size: 12px;
}

.br-match-meta dt {
    color: var(--text-muted);
    white-space: nowrap;
}

.br-match-meta dd {
    margin: 0;
    word-break: break-all;
}

.br-match-data {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    max-height: 80px;
    overflow-y: auto;
}

.br-match-view-rule {
    margin-top: 8px;
    align-self: flex-start;
}

.br-match-rule-box {
    margin-top: 8px;
}

.br-match-rule-box.hidden { display: none; }

.br-match-rule-def {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-color, #4a90e2);
    padding: 8px 12px;
    border-radius: 3px;
}

/* `.br-match-rule-raw` removed — raw rule body now renders via the
   shared `createCodeEditor` component (line numbers + theme-driven
   palette) so this page no longer ships its own pre-formatter. */

/* Nested per-header key/value list inside the row detail panel.
   Each header gets its own grid row (label + value) instead of
   the previous single-line wall-of-text. */
.br-headers-list {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-color, #4a90e2);
    padding: 8px 12px;
    border-radius: 3px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    max-height: 320px;
    overflow-y: auto;
}

.br-headers-list .detail-list {
    grid-template-columns: max-content 1fr;
    gap: 4px 12px;
    font-size: inherit;
}

.br-headers-list .detail-label {
    color: var(--accent-color, #4a90e2);
    font-weight: 500;
    text-transform: lowercase;
}

.br-headers-list .detail-value {
    color: var(--text-primary);
    word-break: break-all;
}

/* ─── Loading overlay card ───────────────────────────────── */
.br-loading-card { padding: 32px 48px; }

.br-loading-spinner {
    margin: 0 auto 16px;
}

/* === allowlists.css === */
/* allowlists.css — Page-specific styles for IP Allowlists management
 *
 * Replaces inline styles to comply with CSP (no inline style attributes).
 * Uses CSS custom properties from theme.css for consistency.
 */

/* ─── Form input sizing ──────────────────────────────────── */
.al-input-cidr { width: 200px; }
.al-input-label { width: 200px; }
.al-input-expires { width: 200px; }

/* === blocklists.css === */
/* blocklists.css — IP Blocklist page styles */

/* Category badge colors are handled by the standard badge component.
   Page-specific overrides only where needed. */

/* === ip-lists.css === */
/* ip-lists.css — Policy IP Lists page styles */

/* CIDR input row in manage modal */
.cidr-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.cidr-input-row .form-input {
    flex: 1;
}

/* Action column width in CIDR table */
.cidr-action-col {
    width: 80px;
}

/* === notifications.css === */
/* notifications.css — Notification center + context menu styles */

/* ─── Notification Panel ──────────────────────────────────── */
.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-panel.open { right: 0; }

.notif-backdrop {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.notif-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

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

.notif-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Panel body */
.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* Notification item */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 180ms ease;
    position: relative;
}

.notif-item:hover { background: var(--bg-tertiary); }

.notif-unread { background: var(--accent-light); }

.notif-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-content { flex: 1; min-width: 0; }

.notif-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notif-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

.notif-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 180ms;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.notif-item:hover .notif-dismiss { opacity: 1; }
.notif-dismiss:hover { color: var(--text-primary); background: var(--bg-tertiary); }

/* Severity colors */
.notif-critical .notif-icon { color: var(--danger); }
.notif-high .notif-icon { color: var(--danger); }
.notif-warning .notif-icon { color: var(--warning); }
.notif-info .notif-icon { color: var(--info); }
.notif-success .notif-icon { color: var(--success); }

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
}

/* ─── Context Menu ────────────────────────────────────────── */
.context-menu {
    position: fixed;
    z-index: 10050;
    min-width: 180px;
    max-width: 280px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 4px 0;
    animation: contextMenuIn 120ms ease-out;
}

@keyframes contextMenuIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 0.83rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 100ms ease;
}

.context-menu-item:hover { background: var(--accent-light); }

.context-menu-item.danger { color: var(--danger); }
.context-menu-item.danger:hover { background: var(--danger-bg); }

.context-menu-item.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}
.context-menu-item.disabled:hover { background: none; }

.context-menu-icon { flex-shrink: 0; }
.context-menu-label { flex: 1; }

.context-menu-shortcut {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
    font-family: var(--font-mono);
}

.context-menu-separator {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .notification-panel {
        width: 100%;
        right: -100%;
    }
}

/* === icons.css === */
/* icons.css — Inline SVG icon system styles
 *
 * Companion to js/lib/icons.js. Provides sizing, colors,
 * animations, and layout integration for SVG icons.
 */

/* ─── Icon Base ───────────────────────────────────────────── */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    color: inherit;
    transition: color 180ms ease, transform 180ms ease;
}

/* ─── Size Variants ───────────────────────────────────────── */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 28px; height: 28px; }
.icon-2xl { width: 36px; height: 36px; }

/* ─── Color Variants ──────────────────────────────────────── */
.icon-primary { color: var(--accent); }
.icon-success { color: var(--success); }
.icon-warning { color: var(--warning); }
.icon-danger { color: var(--danger); }
.icon-info { color: var(--info); }
.icon-muted { color: var(--text-muted); }

/* ─── Animations ──────────────────────────────────────────── */
.icon-spin {
    animation: iconSpin 1s linear infinite;
}
@keyframes iconSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.icon-pulse {
    animation: iconPulse 2s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Layout Integration ──────────────────────────────────── */

/* Sidebar nav icon — opacity managed by .nav-icon in layout.css, not here */
.nav-icon .icon {
    width: 18px;
    height: 18px;
}

/* Button icon alignment */
.btn .icon { margin-right: 4px; }
.btn .icon:last-child { margin-right: 0; margin-left: 4px; }
.btn .icon:only-child { margin: 0; }

/* Badge icon */
.badge .icon {
    width: 12px;
    height: 12px;
    margin-right: 3px;
}

/* Missing icon fallback */
.icon-missing {
    background: var(--danger-bg);
    border: 1px dashed var(--danger-border);
    border-radius: 2px;
}

/* === command-palette.css === */
/* command-palette.css — Ctrl+K command palette styles */

/* ─── Overlay ─────────────────────────────────────────────── */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: var(--bg-overlay);
    display: flex;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.cmd-palette-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ─── Dialog ──────────────────────────────────────────────── */
.cmd-palette-dialog {
    width: 100%;
    max-width: 560px;
    max-height: 440px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cmdPaletteIn 180ms ease-out;
}

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

/* ─── Input ───────────────────────────────────────────────── */
.cmd-palette-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.cmd-palette-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.cmd-palette-input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.cmd-palette-input::placeholder {
    color: var(--text-muted);
}

.cmd-palette-hint {
    font-size: 0.65rem;
    padding: 2px 5px;
}

/* ─── Results ─────────────────────────────────────────────── */
.cmd-palette-results {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.cmd-palette-category {
    padding: 8px 16px 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.cmd-palette-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 100ms ease;
}

.cmd-palette-item:hover,
.cmd-palette-item.selected {
    background: var(--accent-light);
}

.cmd-palette-item.selected {
    background: var(--accent-medium);
}

.cmd-palette-item-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.cmd-palette-item-label {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.cmd-palette-item-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
}

.cmd-palette-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ─── Footer ──────────────────────────────────────────────── */
.cmd-palette-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 16px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .cmd-palette-overlay { padding-top: 5vh; }
    .cmd-palette-dialog {
        max-width: calc(100% - 24px);
        max-height: 60vh;
        margin: 0 12px;
    }
}

/* === print.css === */
/* print.css — Print-optimized styles for reports and audit logs */

@media print {
    /* Hide non-essential UI */
    .sidebar,
    .skip-nav,
    .theme-toggle,
    .nav-badge,
    .sidebar-footer,
    .sidebar-mode-selector,
    .btn:not(.btn-print),
    .filter-bar,
    .tab-bar,
    .toast-container,
    .modal-overlay,
    .pagination { display: none !important; }

    /* Full width content */
    #app { display: block; }
    .content {
        padding: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    /* Reset backgrounds for print */
    body,
    .content,
    .card,
    .data-table {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    /* Table styling */
    .data-table table {
        border-collapse: collapse;
        width: 100%;
    }
    .data-table th,
    .data-table td {
        border: 1px solid #ccc !important;
        padding: 6px 8px !important;
        font-size: 10pt;
    }
    .data-table th {
        background: #f0f0f0 !important;
        font-weight: 600;
    }

    /* Cards */
    .card {
        border: 1px solid #ddd !important;
        break-inside: avoid;
        margin-bottom: 12px;
    }

    /* Badge readability */
    .badge {
        border: 1px solid #999 !important;
        background: transparent !important;
        color: #000 !important;
        font-weight: 600;
    }

    /* Grid single column */
    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* Page break control */
    h1, h2, h3 { break-after: avoid; }
    .card, .data-table, .timeline { break-inside: avoid; }

    /* Links show URL */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    /* Print header */
    .page-header h1 {
        font-size: 16pt !important;
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: #000 !important;
    }
}
