/* =====================================================================================================
   LT DESIGN TOKENS  -  the ONLY place in the application that holds colour, size, spacing, radius, font,
   shadow and motion values.  Change a value here and every screen follows.

   RULES
     - This file contains CSS variables only: no selectors other than :root and html[data-theme="dark"].
     - Hex colours and px values are allowed HERE and nowhere else (components.css uses var(--...) only).
     - Components use the SEMANTIC tokens (section 2+).  The palette (section 1) is for this file only.
     - Dark mode = override the semantic colour tokens in the html[data-theme="dark"] block at the bottom.
       Site.Master sets data-theme on <html> before the page paints.
     - NO other file defines tokens: ui-kit.css, be-theme.css, be-dashboards.css, dashboard-modern.css, style.css,
       components.css and the pages read these tokens directly (var(--...)).  Variables set on an element to pick a
       variant (--lt-c, --lt-cols, --c, --tile, --ad-stat, --ad-glow ...) are switches, not tokens: their values are tokens.

   LOAD ORDER  tokens.css  ->  (legacy css: ui-kit.css, be-theme.css, be-dashboards.css)  ->  components.css

   MAP
     1  palette (raw hues)            5  spacing                 9   motion
     2  colours - brand + status      6  sizes                   10  layers (z-index)
     3  colours - neutrals + surfaces 7  radius + borders        11  app shell (component tokens)
     4  colours - app shell + tables  8  typography + shadows    12  icons
                                                                 13  dark mode
     14 colours for old-CSS rules     15 dashboards (palette, page colours, glows)
   ===================================================================================================== */

:root {
    color-scheme: light;
    /* ---- 1. PALETTE  (raw hues from the B&E mock - use only inside this file) ------------------ */
    --palette-white: #ffffff;
    --palette-primary: #2b8dc8; /* THE brand colour: every primary shade below (hover, tint, ring, dark mode) is calculated from it */
    --palette-blue-module: #2f5bd6;
    --palette-green: #2f8f5b;
    --palette-green-night: #4cb57e;
    --palette-amber: #c98a2b;
    --palette-amber-night: #dba24a;
    --palette-red: #c9484a;
    --palette-red-night: #e2686a;
    --palette-teal: #1f9a9a;
    --palette-teal-night: #3cb8b8;
    --palette-purple: #6a52c8;
    --palette-pink: #d1477f;
    --palette-slate: #8a91ad;
    --palette-navy: #0f203a; /* overlays and modal shadows */
    /* ---- 2. COLOURS - brand + status ------------------------------------------------------------ */
    --color-primary: var(--palette-primary);
    --color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, var(--palette-navy)); /* 15% darker */
    --color-primary-soft: color-mix(in srgb, var(--color-primary) 10%, var(--palette-white)); /* tinted backgrounds: hover, selected rows, icon boxes */
    --color-primary-ring: color-mix(in srgb, var(--color-primary) 22%, transparent); /* focus ring */
    --color-on-primary: var(--palette-white); /* text/icons on any filled colour */

    --color-success: var(--palette-green);
    --color-warning: var(--palette-amber);
    --color-danger: var(--palette-red);
    --color-danger-ring: rgba(201, 72, 74, .20);
    --color-info: var(--palette-teal);
    --color-accent: var(--palette-purple);
    --color-teal: var(--palette-teal);
    --color-pink: var(--palette-pink);
    --color-neutral: var(--palette-slate);
    /* soft tints for badges / alerts / icon boxes - computed, so they follow dark mode automatically */
    --tint-soft: 14%;
    --tint-border: 30%;
    --tint-ring: 25%;
    --tint-hover: 85%; /* filled buttons on hover: 85% own colour + 15% text colour */
    /* ---- 3. COLOURS - neutrals + surfaces ------------------------------------------------------- */
    --color-text: #1c2340; /* body text and text inside controls */
    --color-label: #3a4163; /* field labels */
    --color-muted: #7a8099; /* help text, icons, add-ons */
    --color-placeholder: #a3a8bd;
    --color-border: #e2dccf; /* control borders */
    --color-border-hover: #cdc5b3;
    --color-surface: #ffffff; /* controls, cards */
    --color-surface-soft: #fcfaf5; /* card headers / footers */
    --color-surface-disabled: #f5f2ea;
    --color-page: #f7f7f8; /* canvas inside the main panel */
    --color-card-border: #ebe5d8;
    --color-print: var(--palette-white); /* paper - same in dark mode */
    --color-print-text: #1c2340; /* text on paper - same in dark mode */
    --color-overlay: rgba(15, 32, 58, .38);
    --color-backdrop: var(--palette-navy);
    --color-scrollbar: #c3cedc;
    --color-scrollbar-hover: #a3b2c6;
    /* ---- 4. COLOURS - app shell + tables -------------------------------------------------------- */
    --color-shell-frame: color-mix(in srgb, var(--color-primary) 12%, var(--palette-white)); /* behind the sidebar and around the main panel */
    --color-shell-flyout: var(--color-surface);
    --color-text-strong: var(--color-primary);
    --color-shell-icon: var(--color-primary);
    --color-shell-hover: color-mix(in srgb, var(--color-primary) 7%, transparent);
    --color-shell-active: color-mix(in srgb, var(--color-primary) 16%, transparent);
    --color-shell-accent: var(--color-primary);
    --color-topbar: color-mix(in srgb, var(--color-primary) 5%, var(--palette-white));
    --color-table-head: color-mix(in srgb, var(--color-primary) 5%, var(--palette-white));
    --color-table-head-text: var(--color-muted);
    --color-table-border: var(--color-card-border);
    --color-table-row-border: #efeadf;
    --color-table-stripe: #fdfbf7;
    --color-table-row-hover: color-mix(in srgb, var(--color-primary) 5%, var(--palette-white));
    /* module colours (sidebar icons, dashboard tiles, charts) */
    --color-module-blue: var(--palette-blue-module);
    --color-module-purple: var(--palette-purple);
    --color-module-green: var(--palette-green);
    --color-module-pink: var(--palette-pink);
    --color-module-amber: var(--palette-amber);
    --color-module-teal: var(--palette-teal);
    --color-module-red: var(--palette-red);
    /* ---- 5. SPACING ----------------------------------------------------------------------------- */
    --space-0: 0;
    --space-2xs: 2px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    --space-4xl: 48px;
    --space-control-y: 6px; /* inside text boxes / drop-downs */
    --space-control-y-sm: 3px; /* inside compact fields (form table, hidden-label group) */
    --space-control-x: 12px;
    --space-btn-y: 7px; /* inside buttons */
    --space-btn-x: 16px;
    --space-btn-y-sm: 4px;
    --space-btn-x-sm: 12px;
    --space-btn-y-lg: 10px;
    --space-btn-x-lg: 22px;
    --space-card: 20px; /* card / modal body padding */
    --space-cell-y: 11px; /* table cells */
    --space-cell-x: 12px;
    /* ---- 6. SIZES ------------------------------------------------------------------------------- */
    --size-control: 38px; /* text boxes, drop-downs, buttons */
    --size-control-sm: 30px;
    --size-control-lg: 46px;
    --size-control-xs: 24px;
    --size-modal-report: 900px; /* a dialog that shows a report (ReportViewer) - wide enough for an A4 page */
    --size-textarea-min: 84px;
    --size-textarea-min-table: 56px; /* text area inside a dialog's form table (compact, as today) */
    --space-textarea-y: 9px; /* text area top/bottom padding (standalone, or in a group with a hidden label) */
    --size-icon-box: 32px; /* coloured square behind a menu / tile icon */
    --size-icon-box-lg: 44px;
    --size-avatar: 40px;
    --size-pagination: 34px;
    --size-filter-field: 190px; /* min width of one filter in a list-screen toolbar */
    --size-sidebar: 262px;
    --size-sidebar-collapsed: 84px;
    --size-modal-sm: 420px;
    --size-modal-md: 640px;
    --size-modal-lg: 960px;
    --size-auth-card: 860px; /* sign-in card (Login, Select Location) */
    /* ---- 7. RADIUS + BORDERS -------------------------------------------------------------------- */
    --radius-0: 0;
    --radius-xs: 4px; /* every text box, drop-down, text area */
    --radius-sm: 9px; /* buttons, small panels */
    --radius-md: 12px; /* menus, alerts, grids */
    --radius-lg: 18px; /* cards, modals */
    --radius-xl: 26px; /* main panel */
    --radius-2xs: 6px; /* keyboard hint */
    --radius-icon: 10px; /* icon squares, menu rows */
    --radius-nav: 14px; /* side-menu items, flyouts, top-bar menus */
    --radius-popover: 16px; /* search results, notifications */
    --radius-main-sm: 20px; /* main panel on phones */
    --radius-pill: 999px;
    --radius-round: 50%;
    --border-width: 1px;
    --border-width-strong: 2px;
    --border-width-accent: 3px; /* active side-menu bar, focus ring */
    /* ---- 8. TYPOGRAPHY + SHADOWS ---------------------------------------------------------------- */
    --font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    --font-size-4xs: 10px;
    --font-size-3xs: 10.5px;
    --font-size-2xs: 11px;
    --font-size-xs: 11.5px;
    --font-size-xs-plus: 12px;
    --font-size-sm: 12.5px;
    --font-size-sm-plus: 13px;
    --font-size-md: 13.5px; /* default body / control size */
    --font-size-md-plus: 14px;
    --font-size-lg: 15px;
    --font-size-lg-plus: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px; /* KPI numbers */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height: 1.5;
    --line-height-tight: 1.2;
    --line-height-snug: 1.3;
    --line-height-control: 1.45; /* buttons */
    --line-height-compact: 1.1;
    --letter-spacing-caps: .6px;
    --letter-spacing-control: .1px; /* buttons */
    --letter-spacing-heading: .3px; /* flyout headings */
    --letter-spacing-wide: .12em;
    --shadow-1: 0 1px 2px rgba(25, 48, 78, .06);
    --shadow-btn: 0 1px 2px rgba(25, 48, 78, .12), 0 4px 10px -5px rgba(25, 48, 78, .35);
    --shadow-btn-active: inset 0 2px 4px rgba(0, 0, 0, .15);
    --shadow-menu: 0 10px 30px -8px rgba(25, 48, 78, .30), 0 2px 6px rgba(25, 48, 78, .08);
    --shadow-card: 0 1px 2px rgba(28, 35, 64, .03), 0 6px 18px rgba(28, 35, 64, .04);
    --shadow-modal: 0 24px 60px -12px rgba(15, 32, 58, .45);
    --shadow-chip: 0 2px 8px rgba(0, 0, 0, .05);
    --shadow-sidebar-overlay: 8px 0 30px rgba(28, 35, 64, .18);
    /* ---- 9. MOTION ------------------------------------------------------------------------------ */
    --motion-fast: .15s ease;
    --motion-base: .2s ease;
    --transition-control: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, filter .15s ease;
    --opacity-disabled: .55;
    --opacity-backdrop: .5;
    /* ---- 10. LAYERS ----------------------------------------------------------------------------- */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-modal: 1050;
    --z-toast: 1080;
    --z-loader: 9999;
    --z-sidebar: 1040;
    --z-flyout: 1050;
    --z-flyout-search: 1051;
    --z-search-results: 1060;
    /* ---- 11. APP SHELL  (component tokens: sidebar, top bar, mode buttons, content card) ---------- */
    --color-avatar: #4a49d6; /* initials circle in the top bar */
    --tint-icon: 16%; /* module colour behind a side-menu icon */
    --tint-icon-text: 100%; /* module colour of the icon glyph itself */

    --shell-gap: 10px; /* frame around the main panel; small gaps inside the shell */
    --shell-main-padding: 12px 14px 18px;
    --shell-main-padding-sm: 10px 10px 16px;
    --shell-sidebar-padding: 14px 12px 20px;
    --shell-brand-padding: 4px 6px 12px;
    --shell-brand-padding-collapsed: 4px 0 12px;
    --shell-nav-item-padding: 7px 8px;
    --shell-nav-item-gap: 11px;
    --shell-nav-collapsed-padding: 4px;
    --shell-nav-child-margin: 0 0 6px 22px;
    --shell-nav-child-nested-margin: 0 0 4px 10px;
    --shell-nav-child-padding: 6px 10px;
    --shell-flyout-padding: 6px;
    --shell-flyout-item-padding: 8px 14px;
    --shell-flyout-indent-2: 28px;
    --shell-flyout-indent-3: 42px;
    --shell-flyout-heading-padding: 8px 14px;
    --shell-hairline-gap: 3px;
    --shell-search-input-padding: 8px 10px 8px 36px;
    --shell-search-padding: 0 6px;
    --shell-topbar-padding: 7px;
    --shell-chip-padding: 0 14px;
    --shell-chip-gap: 6px;
    --shell-menu-padding: 6px; /* inside drop-down / results panels, and their offset from the trigger */
    --shell-menu-item-padding: 8px 10px;
    --shell-menu-head-padding: 8px 10px 6px;
    --shell-result-head-padding: 10px 10px 4px;
    --shell-dropdown-item-padding: 8px 12px;
    --shell-date-padding: 5px 0;
    --shell-kbd-padding: 1px 7px;
    --shell-count-padding: 0 5px;
    --shell-count-offset: -4px;
    --shell-user-padding: 0 10px 0 0;
    --shell-modes-margin: 12px 0 14px 2px;
    --shell-mode-btn-padding: 8px 18px;
    --shell-content-padding: 18px 20px;
    --size-sidebar-toggle: 32px;
    --size-sidebar-search-toggle: 40px;
    --size-nav-collapsed-item: 48px;
    --size-nav-collapsed-item-h: 42px; /* min height of an icon-only menu item */
    --size-nav-child: 34px; /* min height of a sub-menu link */
    --size-chevron: 12px;
    --size-flyout: 230px;
    --size-flyout-search: 320px;
    --size-menu-results-h: 320px;
    --size-chip: 36px;
    --size-chip-max: 320px;
    --size-chip-max-sm: 150px;
    --size-search-input: 34px;
    --size-search-min: 180px;
    --size-search-results: 560px;
    --size-search-results-h: 520px;
    --size-notif-menu: 320px;
    --size-user-menu: 200px;
    --size-name-max: 180px;
    --size-count: 18px;
    --size-dot: 8px;
    /* sign-in pages (Login, Select Location) - component tokens */
    --auth-hero-bg: radial-gradient(circle at 85% 90%, rgba(255, 255, 255, .18) 0 90px, transparent 91px), radial-gradient(circle at 10% 100%, rgba(255, 255, 255, .1) 0 70px, transparent 71px), var(--color-primary); /* sign-in hero follows the primary colour */
    --auth-hero-padding: 44px 36px;
    --auth-hero-padding-sm: 28px;
    --auth-form-padding: 40px 36px;
    --auth-form-padding-sm: 28px 24px;
    --auth-gap: 10px;
    --auth-space: 14px; /* heading / row / footer spacing */
    --auth-label-margin: 12px 0 6px;
    --auth-input-padding: 12px 14px;
    --auth-toggle-offset: 6px;
    --auth-actions-margin: 22px;
    --auth-error-padding: 8px 12px;
    --auth-error-margin: 6px;
    --size-auth-input: 44px;
    --size-auth-toggle: 34px;
    --radius-auth: 28px;
    --font-size-auth-icon: 54px;
    --font-size-auth-heading: 21px;
    --line-height-heading: 1.15;
    --opacity-on-color-muted: .85;
    --opacity-busy: .65;
    --tint-error: 10%;
    --shadow-auth: 0 30px 70px color-mix(in srgb, var(--color-primary) 18%, transparent);
    --shadow-auth-btn: 0 10px 22px color-mix(in srgb, var(--color-primary) 30%, transparent);
    /* long sign-in card (lt-auth-card-wide: Account/TenantSignUp) */
    --size-auth-card-wide: 1008px;
    --auth-hero-col-wide: 31%; /* hero column width */
    --size-auth-mark: 52px; /* glass square behind the hero glyph */
    /* stand-alone super admin workspace (SuperAdmin/Dashboard) */
    --size-admin-page: 1500px;
    --size-admin-header-min: 104px;
    --size-admin-body-min: 430px;
    --size-admin-orb: 210px; /* decorative circle in the header */
    --admin-orb-offset-x: 115px;
    --admin-orb-offset-y: -132px;
    --size-admin-table-min: 760px; /* below this the tables scroll sideways (phones) */
    /* alerts / notes  (light values; dark values are in the dark block) */
    --alert-success-bg: #ebf8f1;
    --alert-success-border: #c4e9d4;
    --alert-success-text: #1e6f47;
    --alert-success-icon: var(--palette-green);
    --alert-info-bg: #eaf5fd;
    --alert-info-border: #c3e2f7;
    --alert-info-text: #135f8c;
    --alert-info-icon: #1f8ac9;
    --alert-warning-bg: #fff7e8;
    --alert-warning-border: #f5ddaf;
    --alert-warning-text: #855810;
    --alert-warning-icon: var(--palette-amber);
    --alert-danger-bg: #fdefef;
    --alert-danger-border: #f4cccd;
    --alert-danger-text: #a2353b;
    --alert-danger-icon: var(--palette-red);
    --alert-padding: 12px 16px;
    --alert-icon-gap: 6px;
    --opacity-icon: .9;
    --opacity-faded: .5; /* disabled pager item */
    /* buttons + fields (shared look of the whole app) */
    --color-field-bg: var(--color-surface);
    --color-addon-bg: var(--color-primary-soft);
    --color-addon-text: var(--color-primary);
    --color-btn-outline-bg: var(--color-surface);
    --color-btn-outline-footer-bg: var(--color-surface); /* footer Cancel keeps the plain surface in dark mode too */
    --color-table-bg: transparent;
    --space-btn-gap: 5px; /* right / bottom gap every button keeps (Gentelella default) */
    --radius-btn: var(--radius-xs); /* every button and the list toolbar (Add New, Print, Excel, status filter) */
    /* primary buttons (system-wide, user 2026-11-23): outline at rest, filled on hover */
    --btn-primary-bg: transparent;
    --btn-primary-border: var(--color-primary);
    --btn-primary-text: var(--color-primary);
    --btn-primary-hover-bg: var(--color-primary);
    --btn-primary-hover-text: var(--color-on-primary);
    --space-btn-between: 4px; /* between buttons everywhere (toolbars, footers, groups, pager): never touching or merged */
    --radius-btn-sm: var(--radius-btn);
    --filter-hover: brightness(.92); /* coloured buttons on hover */
    --filter-hover-light: brightness(1.1);
    --space-group-gap: 10px; /* below an input group */
    --space-filter-bar-gap-x: 14px; /* filter bar (search | options + buttons): between its columns */
    --size-filter-bar-search: 260px; /* filter bar: starting width of the search column (it takes the free space) */
    --space-check-chip-after: 6px; /* after a check box shown as a chip (filter bar option) */
    --size-addon-min: 40px;
    --color-field-error-border: var(--color-danger); /* field that failed validation (has-error) */
    --color-field-error-addon-bg: #f2dede;
    --color-field-error-addon-text: #a94442;
    --color-field-error-addon-border: #a94442;
    --modal-header-padding: 14px 20px;
    --modal-footer-padding: 12px 20px;
    --modal-actions-gap: var(--space-btn-between);
    --size-btn-wide: 110px; /* minimum width of dialog footer buttons */
    /* dialogs laid out in field rows (label column + field column) */
    --form-row-gutter: 10px; /* space between the columns (each column has half on each side) */
    --form-row-gap: 10px; /* below each row */
    --form-row-label-width: 25%;
    --form-row-field-width: 58.33333%;
    --size-label-line: 20px; /* one label line, so fields in a row line up */
    /* data tables */
    --line-height-table: 1.42857;
    --letter-spacing-table-head: .06em;
    --space-table-bottom: 20px;
    --color-row-selected: #d9edf7; /* row being edited (setCurrentRowColor) */
    --color-row-delete: #e0476a; /* delete icon in a grid row */
    /* grid row actions are plain icons (no box): edit = link colour, delete = red trash, activate = green */
    --row-action-edit: var(--color-primary);
    --row-action-edit-hover: var(--color-primary-hover);
    --row-action-delete: var(--color-danger);
    --row-action-active: var(--color-success);
    --row-action-hover-filter: var(--filter-hover);
    --icon-row-delete: "\f1f8"; /* Font Awesome fa-trash, replaces the close (x) glyph; the fa-close class stays for the scripts */
    /* icon buttons (user 2026-11-23): Add/Edit/Search/Print/Upload = icon only + tooltip; Save/Cancel = icon + text.
       Glyphs are Font Awesome 4.7. <input> buttons carry the same glyph in their value (&#x....;). */
    --font-icon: "FontAwesome";
    --icon-add: "\f067";      /* fa-plus */
    --icon-edit: "\f044";     /* fa-pencil-square-o (same as the row edit icon) */
    --icon-search: "\f002";   /* fa-search */
    --icon-print: "\f02f";    /* fa-print */
    --icon-upload: "\f093";   /* fa-upload */
    --icon-save: "\f0c7";     /* fa-floppy-o */
    --icon-cancel: "\f0e2";   /* fa-undo */
    --font-size-btn-icon: var(--font-size-md-plus);
    --space-btn-icon-text: 6px;   /* between the icon and the text (Save / Cancel) */
    --size-row-action: 32px;
    --size-row-action-h: 30px;
    /* list screens (toolbar, search, pager) */
    --font-size-heading-page: 19px; /* page titles (also the sign-in headings) */
    --space-btn-y-toolbar: 8px;
    --list-gap: var(--space-btn-between);
    --list-space: 12px;
    --list-filter-gap: 8px;
    --size-list-filter-min: 240px;
    --size-list-filter-max: 360px;
    --size-list-status: 100px;
    --list-status-padding: 0 30px 0 12px;
    --list-filter-padding: 0 34px 0 12px; /* extra toolbar filters (e.g. category): width follows the text */
    --size-rows-select-min: 74px;
    --list-footer-margin: 14px;
    --tint-list-footer: 5%;
    --size-page-item: 32px;
    --page-item-padding: 0 9px;
    --rows-count-padding: 4px 12px;
    --radius-tag: 99px;
    --line-height-pill: 1.4;
    --tint-rows-count: 14%;
    /* ---- 12. ICONS ------------------------------------------------------------------------------ */
    --icon-select-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236b7c93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1.5l5 5 5-5'/></svg>");
    /* ---- 14. COLOURS FOR OLD-CSS RULES (ui-kit / be-theme / custom.style / be-dashboards) -----------------
       Every background / border colour in the old CSS now comes from a variable. Same values as before, same in
       both themes (these are not overridden in dark mode). When a screen moves to lt- classes, its rule and its
       token here can go. */
    --label-default-bg: #e8edf4;          /* .label-default, .badge */
    --color-datepicker-accent: var(--color-legacy-grid-head);   /* jQuery UI date picker (style.css): header, selected day */
    --color-datepicker-hover: #d9efff;    /* jQuery UI date picker: hovered day */
    --textarea-resize: none;              /* text areas (ui-kit.css) */
    --label-success-bg: #e1f6ec;
    --label-warning-bg: #fff1d9;
    --label-danger-bg: #fde6ea;
    --label-info-bg: #e1f1fa;
    --color-progress-track: var(--label-default-bg);      /* .progress */
    --color-util-navy: #0e2049;           /* u-bg-0e2049 and the other colour utility classes */
    --color-util-blue: #2376cb;
    --color-util-green: #297a18;
    --color-util-rose: #cd345b;
    --color-util-gold: #d4ae21;
    --color-util-slate: #2a3f54;
    --color-util-teal: #1abb9c;
    --color-util-border: #cccccc;         /* u-bd-1px-solid-ccc */
    --color-util-border-light: #dddddd;   /* u-bd-1px-solid-ddd */
    --color-glass-12: rgba(255, 255, 255, .12);   /* white glass on coloured hero cards */
    --color-glass-16: rgba(255, 255, 255, .16);
    --color-glass-20: rgba(255, 255, 255, .2);
    --color-glass-22: rgba(255, 255, 255, .22);
    --color-glass-88: rgba(255, 255, 255, .88);
    --color-glass-95: rgba(255, 255, 255, .95);
    --color-ink-on-glass: #1c2340;       /* text on --color-glass-95 fields (Revenue hero drop-down): dark in BOTH themes */
    --color-gradient-shade: #000000;      /* colour the coloured cards' gradients darken towards */
    --color-row-danger-dark: rgba(226, 104, 106, .14);    /* used only by dark-mode rules */
    --color-row-warning-dark: rgba(219, 162, 74, .14);
    --color-calendar-today-dark: rgba(219, 162, 74, .16);
    --color-id-card-status-success: rgba(124, 240, 191, .28);  /* student ID card status pill */
    --color-id-card-status-danger: rgba(255, 140, 150, .32);
    --color-dash-live: #7cf0bf;           /* "live" dot on dashboard heroes */
    --color-legacy-sidebar: #132d67;      /* custom.style.css: old sidebar, shared list grids */
    --color-legacy-grid-border: #d9e0e7;
    --color-legacy-grid-head: #1e76b4;
    --color-legacy-grid-footer: #f7f8fa;
    /* ---- charts (Chart.js, read by Content/js/dashboard-theme.js through lt-tokens.js): canvas colours, so plain colour values
       (hex / rgb / rgba or var() of one - never color-mix, a canvas cannot read it) ---- */
    --chart-ink: var(--color-text);
    --chart-muted: var(--color-muted);             /* axis ticks, legend */
    --chart-grid: var(--color-table-row-border);   /* grid lines */
    --chart-arc-border: var(--color-surface);      /* gap between doughnut slices */
    --chart-tooltip: rgba(28, 35, 64, .95);
    --chart-blue: var(--palette-blue-module);      /* the dashboards' chart palette (DashTheme.colors) */
    --chart-green: var(--palette-green);
    --chart-red: var(--palette-red);
    --chart-orange: var(--palette-amber);
    --chart-purple: var(--palette-purple);
    --chart-teal: var(--palette-teal);
    --chart-pink: var(--palette-pink);
    --chart-slate: var(--palette-slate);
    /* chart sizes: Chart.js takes plain numbers, read with LT.px('--chart-...') (same in light and dark mode) */
    --chart-font-size: var(--font-size-xs-plus);   /* axis ticks, legend, tooltip text */
    --chart-tick-gap: var(--space-sm);             /* axis line -> tick label */
    --chart-legend-box: 8px;                       /* legend dot */
    --chart-legend-gap: 18px;                      /* between legend items */
    --chart-tooltip-radius: 10px;
    --chart-tooltip-padding: var(--space-md);
    --chart-tooltip-box-gap: 5px;                  /* colour dot -> text */
    --chart-tooltip-title-gap: 6px;                /* title -> body */
    --chart-line-width: 2.5px;
    --chart-point-size: 3px;                       /* line-chart point radius */
    --chart-point-size-lg: 4px;                    /* the dashboards' trend lines */
    --chart-point-hover-size: 6px;
    --chart-point-hit-size: 14px;                  /* pointer distance that still hits a point */
    --chart-point-border: 2px;
    --chart-point-border-thin: 1px;
    --chart-point-hover-border: 3px;
    --chart-bar-radius: 8px;
    --chart-bar-max: 38px;                         /* widest bar */
    --chart-arc-border-width: 3px;                 /* gap between doughnut slices */
    --chart-arc-radius: 6px;
    --chart-arc-hover-offset: 6px;
    --chart-centre-value-size: 26px;               /* the number in a doughnut's centre */
    --chart-centre-label-size: var(--chart-font-size);
    --chart-centre-value-shift: 8px;               /* value moves up / label down from the centre */
    --chart-centre-label-shift: 16px;
    /* ---- dashboards (Views/Admin/*Dashboard.aspx, be-dashboards.css, dashboard-modern.css): every colour they use.
       Same in light and dark mode (as today: the dashboards set their own dark colours in be-dashboards.css). ---- */
    --dash-amber-557:          #f4cb28;
    --dash-amber-937:          #fff6df;
    --dash-blue-149:           #0f1f3d;
    --dash-blue-186:           #15294a;
    --dash-blue-202:           #19304e;
    --dash-blue-265:           #0f3d78;
    --dash-blue-294:           #254c71;
    --dash-blue-357:           #185c9e;
    --dash-blue-408:           #3c5594;
    --dash-blue-443:           #1477ce;
    --dash-blue-533:           #2563eb;
    --dash-blue-580:           #5389d5;
    --dash-blue-616:           #4aa3f0;
    --dash-blue-698:           #97bbcd;
    --dash-blue-853:           #ccd8e7;
    --dash-blue-910:           #e0e7f0;
    --dash-blue-924:           #e5ebf2;
    --dash-blue-931:           #e8edf3;
    --dash-blue-935:           #e8eef5;
    --dash-blue-947:           #edf1f6;
    --dash-blue-953:           #e8f0fe;
    --dash-blue-953-gray:         #eef2f8;
    --dash-blue-957:           #eaf3fe;
    --dash-blue-957-gray:         #f0f3f8;
    --dash-blue-959:           #eaf4ff;
    --dash-blue-961:           #eef4fc;
    --dash-blue-961-gray:         #f1f5f9;
    --dash-blue-963:           #f1f5fa;
    --dash-blue-967:           #f2f6fb;
    --dash-blue-969:           #f1f6fd;
    --dash-blue-969-gray:         #f2f6fc;
    --dash-blue-971:           #f3f7fc;
    --dash-blue-975:           #f5f8fc;
    --dash-blue-978:           #f7f9fc;
    --dash-blue-980:           #f8fafc;
    --dash-blue-990:           #fafcff;
    --dash-cyan-325:           #18848e;
    --dash-cyan-359:           #08afa7;
    --dash-cyan-376:           #19a7a0;
    --dash-cyan-427:           #1b91bf;
    --dash-cyan-927:           #e0f4f9;
    --dash-cyan-937:           #e7f6f7;
    --dash-gray-863:           #dcdcdc;
    --dash-indigo-280:         #32325d;
    --dash-orange-331:         #8a641f;
    --dash-orange-388:         #c65200;
    --dash-orange-433:         #c76916;
    --dash-orange-484:         #f76c00;
    --dash-orange-657:         #f5a45a;
    --dash-orange-939:         #fdf0e2;
    --dash-orange-953:         #fff2e7;
    --dash-pink-947:           #fce7f3;
    --dash-purple-551:         #7850c9;
    --dash-purple-953:         #efe9fd;
    --dash-purple-961:         #f1ebff;
    --dash-red-363:            #b90000;
    --dash-red-406:            #a42b42;
    --dash-red-598:            #e0517c;
    --dash-red-678:            #f06a8b;
    --dash-red-871:            #f0ccd3;
    --dash-red-951:            #fde8ee;
    --dash-red-965:            #ffedf0;
    --dash-red-971:            #fff0f2;
    --dash-slate-416:          #536781;
    --dash-slate-433:          #5b6b82;
    --dash-slate-498:          #6b7c93;
    --dash-slate-610:          #8a99ad;
    --dash-teal-318:           #039f6a;
    --dash-teal-378:           #1aa780;
    --dash-teal-506:           #2fd3a0;
    --dash-teal-653:           #5df0b4;
    --dash-teal-929:           #e3f7ef;
    --dash-teal-943:           #e7faf2;
    /* tenant pages (Content/tenant-pages.css: SuperAdmin dashboard / login, tenant sign-up) */
    --dash-amber-902:          #fff3cd;
    --dash-blue-963-gray:         #f2f5f9;
    --dash-blue-976:           #f7f9fb;
    --dash-cyan-882:           #d1ecf1;
    --dash-green-237:          #1b5e20;
    --dash-green-335:          #2e7d32;
    --dash-green-880:          #d4edda;
    --dash-green-935:          #e8f5e9;
    --dash-green-959:          #f1f8f2;
    --dash-red-382:            #a12622;
    --dash-red-461:            #c0392b;
    --dash-red-908:            #f8d7da;
    --dash-red-955:            #fdecea;
    --dash-slate-461:          #607d8b;
    --dash-slate-484:          #6b7a8c;
    --dash-slate-827:          #c9d2dd;
    --dash-slate-914:          #e3e8ef;

    /* ---- dashboards: sizes (step B1 - every px value of the dashboards, the same in light and dark mode).
       Scale steps (--space-*, --radius-*, --font-size-*, --border-width*) are used where the value matched exactly; these are the rest. ---- */
    --dash-space-1:              1px;
    --dash-space-3:              3px;
    --dash-space-5:              5px;
    --dash-space-6:              6px;
    --dash-space-7:              7px;
    --dash-space-9:              9px;
    --dash-space-10:             10px;
    --dash-space-13:             13px;
    --dash-space-14:             14px;
    --dash-space-15:             15px;
    --dash-space-17:             17px;
    --dash-space-18:             18px;
    --dash-space-22:             22px;
    --dash-space-26:             26px;
    --dash-space-28:             28px;
    --dash-space-30:             30px;
    --dash-space-34:             34px;
    --dash-space-40:             40px;
    --dash-space-60:             60px;
    --dash-space-100:            100px;
    --dash-space-120:            120px;
    --dash-space-180:            180px;
    --dash-size-4:               4px;
    --dash-size-7:               7px;
    --dash-size-8:               8px;
    --dash-size-9:               9px;
    --dash-size-12:              12px;
    --dash-size-14:              14px;
    --dash-size-16:              16px;
    --dash-size-17:              17px;
    --dash-size-18:              18px;
    --dash-size-20:              20px;
    --dash-size-22:              22px;
    --dash-size-23:              23px;
    --dash-size-26:              26px;
    --dash-size-28:              28px;
    --dash-size-32:              32px;
    --dash-size-38:              38px;
    --dash-size-40:              40px;
    --dash-size-42:              42px;
    --dash-size-44:              44px;
    --dash-size-46:              46px;
    --dash-size-52:              52px;
    --dash-size-54:              54px;
    --dash-size-56:              56px;
    --dash-size-58:              58px;
    --dash-size-60:              60px;
    --dash-size-96:              96px;
    --dash-size-100:             100px;
    --dash-size-101:             101px;
    --dash-size-110:             110px;
    --dash-size-124:             124px;
    --dash-size-128:             128px;
    --dash-size-132:             132px;
    --dash-size-150:             150px;
    --dash-size-160:             160px;
    --dash-size-170:             170px;
    --dash-size-180:             180px;
    --dash-size-200:             200px;
    --dash-size-210:             210px;
    --dash-size-215:             215px;
    --dash-size-220:             220px;
    --dash-size-230:             230px;
    --dash-size-238:             238px;
    --dash-size-240:             240px;
    --dash-size-250:             250px;
    --dash-size-260:             260px;
    --dash-size-300:             300px;
    --dash-size-323:             323px;
    --dash-size-340:             340px;
    --dash-size-860:             860px;
    --dash-size-1200:            1200px;
    --dash-calendar-height:      500px;           /* events calendar (fullCalendar height option, read with LT.px) */
    --dash-radius-3:             3px;
    --dash-radius-5:             5px;
    --dash-radius-7:             7px;
    --dash-radius-8:             8px;
    --dash-radius-10:            10px;
    --dash-radius-14:            14px;
    --dash-radius-15:            15px;
    --dash-radius-16:            16px;
    --dash-radius-20:            20px;
    --dash-radius-24:            24px;
    --dash-radius-99:            99px;
    --dash-border-15:            15px;
    --dash-font-size-9:          9px;
    --dash-font-size-17:         17px;
    --dash-font-size-19:         19px;
    --dash-font-size-20:         20px;
    --dash-font-size-21:         21px;
    --dash-font-size-22:         22px;
    --dash-font-size-23:         23px;
    --dash-font-size-26:         26px;
    --dash-font-size-28:         28px;
    --dash-font-size-32:         32px;
    --dash-font-size-34:         34px;
    --dash-font-size-40:         40px;
    --dash-letter-spacing-0-2:   0.2px;
    --dash-letter-spacing-0-3:   0.3px;
    --dash-letter-spacing-0-4:   0.4px;
    --dash-letter-spacing-0-5:   0.5px;
    --dash-letter-spacing-0-6:   0.6px;
    --dash-blur-6:               6px;
    --dash-shadow-hairline:           0 1px 2px color-mix(in srgb, var(--dash-blue-149) 4%, transparent);
    --dash-shadow-xs:           0 1px 3px color-mix(in srgb, var(--dash-blue-149) 12%, transparent);
    --dash-shadow-lg:          0 2px 10px color-mix(in srgb, var(--color-gradient-shade) 8%, transparent);
    --dash-shadow-sm:           0 2px 5px color-mix(in srgb, var(--dash-blue-202) 2.5%, transparent);
    --dash-shadow-md:           0 2px 8px color-mix(in srgb, var(--color-gradient-shade) 8%, transparent);
    --dash-focus-ring-blue:        0 0 0 3px color-mix(in srgb, var(--dash-blue-533) 12%, transparent);
    --dash-shadow-xs-2:         0 1px 3px color-mix(in srgb, var(--dash-blue-202) 14%, transparent);
    --dash-focus-ring-live:      0 0 0 3px color-mix(in srgb, var(--color-dash-live) 25%, transparent);
    --dash-shadow-card:          0 1px 2px color-mix(in srgb, var(--dash-blue-202) 4%, transparent), 0 6px 18px color-mix(in srgb, var(--dash-blue-202) 4%, transparent);
    --dash-pulse-ring-end:        0 0 0 8px color-mix(in srgb, var(--dash-teal-653) 0%, transparent);
    --dash-shadow-popover:          color-mix(in srgb, var(--dash-indigo-280) 25%, transparent) 0px 13px 27px -5px, color-mix(in srgb, var(--color-gradient-shade) 30%, transparent) 0px 8px 16px -8px;
    --dash-shadow-card-hover:         0 2px 4px color-mix(in srgb, var(--dash-blue-202) 5%, transparent), 0 12px 28px color-mix(in srgb, var(--dash-blue-202) 9%, transparent);
    --dash-shadow-hero-glow:         0 14px 34px color-mix(in srgb, var(--color-util-blue) 28%, transparent);
    --dash-shadow-glow-blue:        0 8px 16px -4px color-mix(in srgb, var(--dash-blue-443) 45%, transparent);
    --dash-shadow-glow-green:        0 8px 16px -4px color-mix(in srgb, var(--dash-teal-318) 40%, transparent);
    --dash-shadow-glow-red:        0 8px 16px -4px color-mix(in srgb, var(--color-util-rose) 40%, transparent);
    --dash-shadow-glow-orange:        0 8px 16px -4px color-mix(in srgb, var(--dash-orange-433) 40%, transparent);
    /* ---- 15. DASHBOARDS ---------------------------------------------------------------------------------
       --accent-*  accent palette of the B&E dashboards (be-dashboards.css; ExamDashboard builds the names in script)
       --campus-dash-*   Campus dashboard (CampDashboard.aspx)     --dash-modern-*  older dashboards (.dash-modern, dashboard-modern.css; light + dark)
       --dash-glow-*  coloured glow under the Attendance dashboard icons (NewDashboard.aspx) */
    --accent-blue: var(--palette-blue-module);
    --accent-green: var(--palette-green);
    --accent-red: var(--palette-red);
    --accent-purple: var(--palette-purple);
    --accent-amber: var(--palette-amber);
    --accent-teal: var(--palette-teal);
    --accent-pink: var(--palette-pink);
    --campus-dash-bg: transparent;
    --campus-dash-blue-soft: color-mix(in srgb, var(--accent-blue) 14%, var(--color-surface));
    --campus-dash-green-soft: color-mix(in srgb, var(--accent-green) 14%, var(--color-surface));
    --campus-dash-red-soft: color-mix(in srgb, var(--accent-red) 14%, var(--color-surface));
    --campus-dash-pink-soft: color-mix(in srgb, var(--accent-pink) 14%, var(--color-surface));
    --campus-dash-orange-soft: color-mix(in srgb, var(--accent-amber) 14%, var(--color-surface));
    --campus-dash-purple-soft: color-mix(in srgb, var(--accent-purple) 14%, var(--color-surface));
    --campus-dash-teal-soft: color-mix(in srgb, var(--accent-teal) 14%, var(--color-surface));
    --dash-modern-ink: var(--dash-blue-186);
    --dash-modern-muted: var(--dash-slate-498);
    --dash-modern-border: var(--dash-blue-910);
    --dash-glow-default: color-mix(in srgb, var(--color-util-blue) 45%, transparent);
    --dash-glow-blue: color-mix(in srgb, var(--dash-blue-443) 45%, transparent);
    --dash-glow-green: color-mix(in srgb, var(--dash-teal-318) 40%, transparent);
    --dash-glow-red: color-mix(in srgb, var(--color-util-rose) 40%, transparent);
    --dash-glow-orange: color-mix(in srgb, var(--dash-orange-433) 40%, transparent);
}

/* =====================================================================================================
   13. DARK MODE  -  only colour, tint, shadow and icon tokens change.  Never add dark rules anywhere else.
   ===================================================================================================== */
html[data-theme="dark"] {
    color-scheme: dark;
    --color-primary: color-mix(in srgb, var(--palette-primary) 75%, var(--palette-white)); /* lighter, readable on dark backgrounds */
    --color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, var(--palette-white));
    --color-primary-soft: color-mix(in srgb, var(--color-primary) 16%, transparent);
    --color-primary-ring: color-mix(in srgb, var(--color-primary) 32%, transparent);
    --color-success: var(--palette-green-night);
    --color-warning: var(--palette-amber-night);
    --color-danger: var(--palette-red-night);
    --color-info: var(--palette-teal-night);
    --color-accent: color-mix(in srgb, var(--palette-purple) 70%, var(--palette-white));
    --color-teal: var(--palette-teal-night);
    --color-pink: color-mix(in srgb, var(--palette-pink) 70%, var(--palette-white));
    --color-text: #eceefc;
    --color-label: #c9cde3;
    --color-muted: #9aa0bd;
    --color-placeholder: #6f7593;
    --color-border: #31374f;
    --color-border-hover: #454c68;
    --color-surface: #1b1f31;
    --color-surface-soft: #171a2a;
    --color-surface-disabled: #171a29;
    --color-page: #12141f;
    --color-card-border: #2b3046;
    --color-scrollbar: #3a405a;
    --color-scrollbar-hover: #454c68;
    --color-shell-frame: #0d1020;
    --color-text-strong: var(--color-shell-primary-text); /* lighter primary for text on the dark sidebar */
    --color-shell-icon: var(--color-shell-primary-text);
    --color-shell-hover: color-mix(in srgb, var(--color-primary) 10%, transparent);
    --color-shell-active: color-mix(in srgb, var(--color-primary) 22%, transparent);
    --color-shell-accent: var(--color-shell-primary-text);
    --color-shell-primary-text: color-mix(in srgb, var(--palette-primary) 60%, var(--palette-white));
    --color-topbar: #1a1e30;
    --tint-icon: 22%;
    --tint-icon-text: 70%; /* module icon glyphs are lightened in dark mode */

    --color-field-bg: var(--color-surface-soft);
    --color-addon-bg: var(--color-surface-soft);
    --color-addon-text: var(--color-text);
    --color-btn-outline-bg: var(--color-surface-soft);
    --color-table-bg: var(--color-surface);
    --color-row-selected: rgba(60, 184, 184, .14);
    /* dark mode keeps today's look: a failed field shows only the red glow, not a red border / icon box */
    --color-field-error-border: var(--color-border);
    --color-field-error-addon-bg: var(--color-surface-soft);
    --color-field-error-addon-text: var(--color-text);
    --color-field-error-addon-border: var(--color-border);
    --alert-success-bg: rgba(76, 181, 126, .12);
    --alert-success-border: rgba(76, 181, 126, .3);
    --alert-success-text: #9be0bb;
    --alert-success-icon: currentColor;
    --alert-info-bg: rgba(56, 160, 220, .12);
    --alert-info-border: rgba(56, 160, 220, .3);
    --alert-info-text: #9fd3f2;
    --alert-info-icon: currentColor;
    --alert-warning-bg: rgba(219, 162, 74, .12);
    --alert-warning-border: rgba(219, 162, 74, .3);
    --alert-warning-text: #f0cc8e;
    --alert-warning-icon: currentColor;
    --alert-danger-bg: rgba(226, 104, 106, .12);
    --alert-danger-border: rgba(226, 104, 106, .3);
    --alert-danger-text: #f3aeb0;
    --alert-danger-icon: currentColor;
    --color-table-head: #20253a;
    --color-table-row-border: #262b40;
    --color-table-stripe: transparent; /* rows are not striped in dark mode */
    --color-table-row-hover: #232842;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-btn: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 10px -5px rgba(0, 0, 0, .5);
    --shadow-menu: 0 12px 32px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .2);
    --icon-select-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239aa0bd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1.5l5 5 5-5'/></svg>");
    --chart-grid: var(--color-card-border);
    --chart-tooltip: rgba(8, 10, 20, .95);
    /* older dashboards (.dash-modern) follow the theme in dark mode */
    --dash-modern-ink: var(--color-text);
    --dash-modern-muted: var(--color-muted);
    --dash-modern-border: var(--color-card-border);
}
