/*
 * Design tokens ("Signal Room", docs/design/portal-redesign/DESIGN-SPEC.md §2 and §9.2).
 * The single source of colour, type, radius and size values for the shell (console.css)
 * and the screens (ui.css). Add tokens freely; never rename or remove one.
 * --accent / --on-accent are set inline by the layout from Settings > Branding (brand()).
 */
:root {
    --accent: #1F5EDB;
    --on-accent: #FFFFFF;
    --accent-hover: color-mix(in srgb, var(--accent) 82%, #000000);
    --accent-soft: color-mix(in srgb, var(--accent) 10%, #FFFFFF);
    --accent-line: color-mix(in srgb, var(--accent) 35%, #FFFFFF);
    --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);

    /* Dark chrome (sidebar) */
    --ink: #0D1B2A;
    --ink-2: #12243A;
    --ink-active: #1B2E46;
    --ink-line: #2A3D55;
    --on-ink: #FFFFFF;
    --on-ink-muted: #C5D0DD;
    --on-ink-label: #8FA0B5;

    /* Light surfaces */
    --ground: #F5F7FA;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --line: #E2E8F0;
    --row-line: #EEF2F6;
    --input-line: #CBD5E1;

    /* Text (muted #4B5563 is the lightest grey allowed for text) */
    --text: #1F2937;
    --text-strong: #0D1B2A;
    --text-2: #374151;
    --text-muted: #4B5563;

    /* Status pairs: text on background */
    --ok: #0F766E;      --ok-bg: #E6F4F1;
    --bad: #B42318;     --bad-bg: #FDECEA;  --bad-line: #F3C4BF;
    --warn: #9A5B00;    --warn-bg: #FFF4E0;
    --info: #1E4FB8;    --info-bg: #E8F0FE;
    --neutral: #374151; --neutral-bg: #EEF2F6;
    --meter-high: #C2410C; /* meter / usage fill above 80% */

    /* Charts: series 1 = accent */
    --chart-2: #94A3B8;
    --chart-3: #C2410C;

    /* Type */
    --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --fs-base: 13px;
    --fs-small: 12px;
    --fs-label: 11px;  /* table headers, eyebrows: mono caps */
    --fs-h1: 20px;
    --fs-title: 14px;  /* card / section titles */
    --fs-kpi: 20px;

    /* Size and shape (compact desktop density) */
    --ctl-h: 32px;     /* buttons, inputs, selects */
    --ctl-h-sm: 28px;  /* icon buttons, small controls */
    --row-h: 32px;
    --radius-card: 8px;
    --radius-ctl: 6px;
    --radius-pill: 999px;
    --shadow-card: 0 1px 2px rgba(13, 27, 42, .06);
    --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
    --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;

    --sidebar-w: 232px;
    --topbar-h: 48px;

    /* ---- Added for the shell (console.css). Never rename or remove. ---- */
    --ink-hover: #12243A;          /* sidebar item hover (= ink-2) */
    --focus-ring-ink: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, #FFFFFF);
    --warn-line: #F2D7A8;
    --ok-line: #B7DED6;
    --info-line: #BFD3F8;
    --neutral-line: #D5DCE5;
    --unread-bg: color-mix(in srgb, var(--accent) 6%, #FFFFFF);
    --scrim: rgba(13, 27, 42, .5);
    --scrim-dialog: rgba(13, 27, 42, .45);
    --shadow-pop: 0 8px 24px rgba(13, 27, 42, .12);   /* dropdowns, popovers */
    --shadow-dialog: 0 16px 48px rgba(13, 27, 42, .22); /* modals, spotlight */
    --fs-body-lg: 14px;            /* dialog inputs */
    --fs-tiny: 10.5px;             /* sidebar section labels, portal chip, kbd */
    --fs-nav: 13px;                /* sidebar items */
    --fs-brand: 15px;              /* product name in the sidebar */
    --ctl-h-xs: 24px;              /* .btn-xs, tiny chips */
    --ctl-h-lg: 40px;
    --nav-item-h: 30px;            /* sidebar item */
    --avatar-sm: 26px;
    --icon-sm: 14px;
    --icon-md: 16px;
    --meter-w: 120px;              /* top bar meter track */
    --meter-h: 8px;
    --banner-h: 0px;               /* impersonation banner height (set to 36px while impersonating) */
    --banner-h-on: 36px;
    --content-max: 1680px;
    --drawer-w: 264px;             /* sidebar as a mobile drawer */
    --z-topbar: 1020;
    --z-sidebar: 1030;
    --z-scrim: 1040;
    --z-drawer: 1045;
    --z-banner: 1035;
    --z-modal-backdrop: 1050;      /* Bootstrap's values (the old theme lowered them to 104/105) */
    --z-modal: 1055;
    --z-spotlight: 1090;
    --radius-xs: 4px;              /* kbd hints */
    --fs-table: 12.5px;            /* table cells */
    --fs-icon-btn-sm: 13px;        /* icon glyphs in .btn-sm */
    --fs-sort: 9px;                /* DataTables sort arrows */

    /* Customer self-service (agent 09) */
    --fs-figure: 28px;             /* one big figure in a card (current balance) */

    /* Traffic (agent 03): extra chart series (multi-line report graphs) and chart sizes */
    --chart-4: #0F766E;
    --chart-5: #6D28D9;
    --chart-6: #9A5B00;
    --chart-7: #0D1B2A;
    --chart-8: #BE185D;
    --chart-h: 360px;              /* line chart box (report graphs) */
    --stack-h: 160px;              /* stacked bar chart */
}
