/*
 * Databad color theme.
 * All active text, background, header, border-color, shadow-color and status color declarations live here.
 * Copy this file and adjust variables/declarations to build another color scheme, for example dark mode.
 * Prefer changing tokens in :root first; selector rules below should normally keep using var(...).
 */

/* SHARED THEME DEFAULTS
 * Used by all pages through resources/views/layouts/base.blade.php.
 * These top-level tokens are the starting point for future theme variants such as dark mode.
 */

:root {
    color-scheme: light;
    /* Base surfaces */
    --theme-page-bg: #f8fafc;
    --theme-surface-bg: #ffffff;
    --theme-surface-muted-bg: #f1f5f9;

    /* Text and foregrounds */
    --theme-text: #1e293b;
    --theme-text-muted: #64748b;
    --theme-text-subtle: #94a3b8;
    /* Kept separate from surface: dark themes may use dark surfaces with light text/icons on accents. */
    --theme-on-accent: #ffffff;
    --theme-on-accent-muted-bg: rgba(255, 255, 255, 0.18);
    --theme-on-accent-muted-text: rgba(255, 255, 255, 0.78);

    /* Borders */
    --theme-border: #e2e8f0;
    --theme-border-soft: #edf2f7;
    --theme-border-primary: #bfdbfe;
    --theme-border-primary-strong: #93c5fd;

    /* Brand and action colors */
    --theme-primary: #2563eb;
    --theme-primary-hover: #1d4ed8;
    --theme-primary-dark: #1e40af;
    --theme-primary-soft: #eff6ff;
    --theme-primary-muted: var(--theme-primary-soft);
    --theme-primary-row-soft: rgba(29, 78, 216, 0.035);
    --theme-primary-row-hover: rgba(29, 78, 216, 0.075);
    --theme-secondary: #475569;
    --theme-secondary-dark: #334155;

    /* Headers and section labels */
    --theme-header-bg: #ecf1fd;
    --theme-header-text: #3730a3;
    --theme-header-border: var(--theme-border-primary);
    --theme-header-border-strong: #c6dcf5;
    --theme-header-focus: rgba(55, 48, 163, 0.2);

    /* Status and alert colors */
    --theme-success: #065f46;
    --theme-success-dark: #044e39;
    --theme-success-soft: #ecfdf5;
    --theme-success-disabled: #6b9f8c;
    --theme-success-focus: rgba(6, 95, 70, 0.2);
    --theme-warning: #f59e0b;
    --theme-warning-dark: #d97706;
    --theme-warning-soft: #fffbeb;
    --theme-warning-text: #b45309;
    --theme-danger: #dc2626;
    --theme-danger-dark: #b91c1c;
    --theme-danger-bright: #ef4444;
    --theme-danger-soft: #fef2f2;
    --theme-danger-panel: #fee2e2;
    --theme-danger-border: #fecaca;
    --theme-error: #f00;
    --theme-status-normal: #000000;
    --theme-status-alarm: #cc3300;
    --theme-status-tolerance: #9933bb;
    --theme-status-alarm-tolerance: #2266dd;

    /* Dashboard chart colors. resources/views/layouts/index.blade.php reads these for Highcharts. */
    --theme-chart-series-1: var(--theme-primary);
    --theme-chart-series-2: #059669;
    --theme-chart-series-3: var(--theme-warning);
    --theme-chart-series-4: #7c3aed;
    --theme-chart-series-5: var(--theme-danger);
    --theme-chart-series-6: #0891b2;
    --theme-chart-series-7: #4f46e5;
    --theme-chart-series-8: #9333ea;
    --theme-chart-series-9: var(--theme-text-muted);
    --theme-chart-series-10: #16a34a;
    --theme-chart-axis: #cbd5e1;
    --theme-chart-grid: var(--theme-border);
    --theme-chart-plotband-bg: rgba(0, 255, 0, 0.2);
    --theme-chart-plotband-text: var(--theme-status-normal);

    /* Component accents */
    --theme-toggle-active: #6ab6f9;
    --theme-toggle-checked: limeGreen;
    --theme-toggle-off: var(--theme-chart-axis);
    --theme-info: #04c1c4;
    --theme-info-border: #00acd6;
    --theme-google: #dd4b39;
    --theme-google-border: #d73925;
    --theme-warning-border: #fcd34d;
    --theme-danger-border-strong: #fca5a5;
    --theme-danger-rose-soft: var(--theme-danger-soft);
    --theme-danger-rose-border: var(--theme-danger-border);
    --theme-danger-rose-text: #9f1239;
    --theme-legacy-blue: #0077d3;
    --theme-legacy-grey: #868e96;
    --theme-legacy-dark: #343a40;
    --theme-form-border: #dbe3ef;
    --theme-nav-button-border: #dbeafe;
    --theme-dashboard-blue-dark: #1e3a8a;
    --theme-input-muted-bg: var(--theme-border-soft);
    --theme-panel-alt-bg: #f5f8ff;
    --theme-purple-dark: #312e81;
    --theme-purple-soft: #f5f3ff;
    --theme-purple-text: #4c1d95;
    --theme-purple-border: #c4b5fd;
    --theme-success-border: #6ee7b7;
    --theme-autofill-bg: var(--theme-primary-muted);

    /* Public/front page and assistant surfaces */
    --theme-front-outline: rgba(28, 45, 74, 0.14);
    --theme-front-muted-alt: #6b7280;
    --theme-front-pill-bg: var(--theme-primary-muted);
    --theme-front-pill-text: #283a7a;
    --theme-assistant-handle-bg: #6c757d;
    --theme-assistant-handle-hover-bg: #5a6268;
    --theme-assistant-panel-bg: var(--theme-surface-muted-bg);
    --theme-assistant-accent: #538ed5;
    --theme-assistant-pulse: rgba(83, 142, 213, 0.7);
    --theme-assistant-pulse-clear: rgba(83, 142, 213, 0);
    --theme-assistant-critical: #dc3545;
    --theme-assistant-warning: #ffc107;
    --theme-assistant-text: #333333;
    --theme-legacy-muted: #ccc;
    --theme-legacy-subtle: #999;
    --theme-legacy-muted-strong: #aaa;
    --theme-legacy-neutral-bg: #eee;
    --theme-legacy-row-bg: var(--theme-legacy-neutral-bg);
    --theme-purple: #ba99f7;

    /* Shadows and focus rings */
    --theme-shadow-xs: rgba(0, 0, 0, 0.05);
    --theme-shadow-xs-soft: rgba(0, 0, 0, 0.04);
    --theme-shadow-xs-strong: rgba(0, 0, 0, 0.06);
    --theme-shadow-black-sm: rgba(0, 0, 0, 0.1);
    --theme-shadow-black-md: rgba(0, 0, 0, 0.15);
    --theme-shadow-black-lg: rgba(0, 0, 0, 0.2);
    --theme-shadow-sm: rgba(15, 23, 42, 0.04);
    --theme-shadow-md: rgba(15, 23, 42, 0.06);
    --theme-shadow-lg: rgba(15, 23, 42, 0.08);
    --theme-shadow-lg-strong: rgba(15, 23, 42, 0.10);
    --theme-shadow-xl: rgba(15, 23, 42, 0.20);
    --theme-shadow-xl-soft: rgba(15, 23, 42, 0.12);
    --theme-shadow-xl-muted: rgba(15, 23, 42, 0.18);
    --theme-shadow-xxl: rgba(15, 23, 42, 0.22);
    --theme-focus-primary: rgba(29, 78, 216, 0.1);
    --theme-focus-primary-soft: rgba(29, 78, 216, 0.08);
    --theme-focus-primary-strong: rgba(29, 78, 216, 0.18);
    --theme-focus-primary-stronger: rgba(29, 78, 216, 0.24);

    /* Compatibility aliases used by migrated legacy/admin styles. */
    --primary: var(--theme-primary);
    --primary-dark: var(--theme-primary-dark);
    --primary-light: var(--theme-primary-soft);
    --secondary: var(--theme-text-muted);
    --secondary-light: var(--theme-surface-muted-bg);
    --success: var(--theme-success);
    --danger: var(--theme-danger-bright);
    --warning: var(--theme-warning);
    --bg-main: var(--theme-page-bg);
    --card-bg: var(--theme-surface-bg);
    --text-main: var(--theme-text);
    --text-muted: var(--theme-text-muted);
    --border-color: var(--theme-border);
    --admin-heading: var(--theme-text);
}

/* DARK THEME NOTE
 * A later dark-mode file should override the same semantic tokens above
 * under a theme selector, for example html[data-theme="dark"] { ... }.
 */

html,
body {
    background-color: var(--theme-page-bg);
    color: var(--theme-text);
}

body {
    background-color: var(--theme-page-bg) !important;
}

.wrapper,
.content-wrapper {
    background-color: var(--theme-page-bg);
    color: var(--theme-text);
}


/* SHARED
 * Global layout and legacy shared helpers. Used by resources/views/layouts/base.blade.php and resources/views/layouts/print.blade.php.
 */

.navbar-toggler {
    border: none;
    color: var(--text-main) !important;
}
.navbar-toggler i,
.navbar-toggler-icon {
    color: var(--text-main) !important;
}
.navbar-toggler:focus {
    box-shadow: none;
}
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li.nav-item.dropdown {
    color: var(--theme-legacy-muted-strong);
}
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li a {
    color: var(--theme-legacy-muted);
}
nav ul.navbar-nav li.nav-item a.nav-link:hover {
    color: var(--theme-on-accent) !important;
}
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li a:hover {
    color: var(--theme-on-accent);
    background-color: transparent !important;
}
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li a.dropdown-toggle:hover {
    color: var(--theme-on-accent) !important;
    background-color: transparent !important;
}
.navbar-nav .nav-link.active,
.navbar-nav .show>.nav-link {
    color: var(--theme-on-accent) !important;
}
.navbar-nav .nav-link,
.navbar-nav .show>.nav-link {
    color: var(--theme-legacy-muted) !important;
}
.breadcrumb-item.active a {
    color: var(--theme-legacy-muted);
}
.breadcrumb-item.active {
    color: var(--theme-on-accent);
}
.breadcrumb-item a {
    color: var(--theme-legacy-muted);
}
.breadcrumb-item a:hover {
    color: var(--theme-on-accent);
}
.breadcrumb-item:after {
    color: var(--theme-legacy-muted);
}
.linked {
    color: var(--theme-legacy-subtle);
}
.divider {
    color: var(--theme-legacy-subtle);
}
.linked:hover {
    color: var(--theme-status-normal);
}
.bg-gray {
    background-color: var(--theme-legacy-neutral-bg);
}
#newmessages .modal-body div.row:nth-child(odd) {
    background-color: var(--theme-legacy-row-bg);
}
#newmessages .modal-body div.row:nth-child(even) {
    background-color: var(--theme-on-accent);
}
.historydata {
    color: var(--theme-status-normal);
}
.historydata span {
    background-color: var(--theme-on-accent);
    border-top: 1px solid var(--theme-legacy-muted);
    border-bottom: 1px solid var(--theme-legacy-muted);
}
.historydata span span {
    border: none;
    background-color: transparent;
}
.historydataleft {
    color: var(--theme-status-normal);
}
.historydataright {
    color: var(--theme-status-normal);
}
.historydataleftdisabled {
    color: var(--theme-legacy-muted);
}
.historydatarightdisabled {
    color: var(--theme-legacy-muted);
}
.circle_full {
    background-color: var(--theme-toggle-active);
    border: 2px solid var(--theme-toggle-active);
}
.circle_fullred {
    background-color: var(--theme-error);
    border: 2px solid var(--theme-error);
}
.circle_redborder {
    background-color: var(--theme-toggle-active);
    border: 2px solid var(--theme-error);
}
.customer-cid {
    color: var(--theme-text-muted);
}
.alarm {
    background-color: var(--theme-status-alarm);
}
.tolerance {
    background-color: var(--theme-status-tolerance);
}
.alarmtolerance {
    background-color: var(--theme-status-alarm-tolerance);
}
.alert-success,
.alert-danger,
.alert-error,
.alert-warning,
.alert-info {
    color: var(--theme-on-accent) !important
}
.alert-danger,
.alert-error {
    background-color: var(--theme-google) !important;
    border-color: var(--theme-google-border);
}
.alert-warning {
    background-color: var(--theme-warning) !important;
    border-color: var(--theme-warning-dark);
}
.alert-info {
    background-color: var(--theme-info) !important;
    border-color: var(--theme-info-border);
}
.alert-success {
    background-color: var(--theme-success) !important;
    border-color: var(--theme-success-dark);
}
.alert-primary {
    background: var(--theme-legacy-blue);
    color: var(--theme-on-accent);
}
.alert-secondary {
    background: var(--theme-legacy-grey);
    color: var(--theme-on-accent);
}
.alert-dark {
    background: var(--theme-legacy-dark);
    color: var(--theme-on-accent);
}
.alert a {
    color: var(--theme-on-accent);
}
/* Basic Rules */
/* Style Wired */
.slider {
    box-shadow: 0 0 0 2px var(--theme-on-accent), 0 0 4px var(--theme-on-accent);
    border: 4px solid transparent;
}
.slider:before {
    background: var(--theme-surface-bg);
}
input:checked+.slider:before {
    background: var(--theme-toggle-checked);
}
input:checked+.slider {
    box-shadow: 0 0 0 2px var(--theme-toggle-checked), 0 0 2px var(--theme-toggle-checked);
}
.databad-toggle input[type="checkbox"]:focus-visible + .slider {
    box-shadow: 0 0 0 3px var(--theme-focus-primary-stronger) !important;
}
/* Style Flat */
.switch.flat .slider {
    box-shadow: none;
}
.switch.flat .slider:before {
    background: var(--theme-surface-bg);
}
.switch.flat input:checked+.slider:before {
    background: var(--theme-surface-bg);
}
.switch.flat input:checked+.slider {
    background: var(--theme-toggle-checked);
}
@media (max-width: 768px) {
    nav ul li.nav-item.dropdown ul {
        border: none;
        background: none;
}
    nav ul li.nav-item.dropdown ul li.nav-item.dropdown ul {
        border: none;
        background: none;
}
    nav ul li.nav-item.dropdown ul li a {
        background: transparent;
        color: var(--theme-legacy-muted);
}
    nav ul li.nav-item.dropdown ul li a:hover {
        color: var(--theme-on-accent);
}
    nav ul li.nav-item.dropdown ul li.nav-item.dropdown ul li a {
        background: transparent;
        color: var(--theme-legacy-muted);
}
    nav ul li.nav-item.dropdown ul li.nav-item.dropdown ul li a:hover {
        color: var(--theme-on-accent);
}
    nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li.nav-item.dropdown a.nav-link.dropdown-toggle {
        color: var(--theme-legacy-muted);
}
}
input,
select {
    outline: none !important;
    box-shadow: none !important;
}
.bg-purple {
    background-color: var(--theme-purple);
}
.text-purple {
    color: var(--theme-purple);
}
.cookie-consent {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-form-border);
    box-shadow: 0 12px 30px var(--theme-shadow-xl-muted);
    color: var(--theme-text);
}
.cookie-consent-link {
    color: var(--theme-primary-hover);
}
.cookie-link {
    color: var(--security-text);
}

/* SHARED NAVIGATION
 * Navigation and breadcrumbs. Used by resources/views/layouts/base.blade.php and resources/views/layouts/top_menu.blade.php.
 */

/* --- Navbar Shell --- */
.navbar {
    background-color: var(--theme-on-accent) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 3px 0 var(--theme-shadow-xs) !important;
}
/* Top-level nav links (not inside dropdowns) */
nav.navbar>.container-fluid .nav-link,
nav.navbar .navbar-nav>.nav-item>.nav-link {
    color: var(--text-muted) !important;
}
/* Top-level hover & active */
nav.navbar .navbar-nav .nav-item .nav-link:hover,
nav.navbar .navbar-nav .nav-item .nav-link.active,
nav.navbar .navbar-nav .nav-item .show>.nav-link {
    color: var(--primary-dark) !important;
    background-color: var(--secondary-light) !important;
    box-shadow: none !important;
}
nav.navbar .navbar-nav .nav-item .nav-link:hover i,
nav.navbar .navbar-nav .nav-item .nav-link.active i {
    color: var(--primary-dark) !important;
}
/* Top-level nav color reset */
.navbar-nav .nav-link,
.navbar-nav .show>.nav-link {
    color: var(--text-muted) !important;
}
/* Active top-level nav color */
.navbar-nav .nav-link.active,
.navbar-nav .show>.nav-link.active {
    color: var(--primary-dark) !important;
}
/* Fix legacy padding-left: 5px on nested dropdown li */
/* Base text color for ALL links inside any dropdown */
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li a {
    color: var(--text-main) !important;
}
/* Hover on regular dropdown links */
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li a:hover {
    color: var(--primary-dark) !important;
    background-color: var(--secondary-light) !important;
}
/* Hover on sub-sub menu toggles */
nav ul.navbar-nav li.nav-item.dropdown ul.dropdown-menu li a.dropdown-toggle:hover {
    color: var(--primary-dark) !important;
    background-color: var(--secondary-light) !important;
}
/* Dropdown container */
nav.navbar .dropdown-menu {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 15px -3px var(--theme-shadow-black-sm) !important;
    background-color: var(--theme-on-accent) !important;
}
/* Uniform item styling across all levels */
/* Uniform icon sizing */
nav.navbar .dropdown-menu .dropdown-item i,
nav.navbar .dropdown-menu .nav-link i {
    color: var(--text-muted) !important;
}
nav.navbar .dropdown-menu .dropdown-item:hover i,
nav.navbar .dropdown-menu .nav-link:hover i {
    color: var(--primary-dark) !important;
}
/* Caret in nested dropdown toggles */
nav.navbar .dropdown-menu .dropdown-toggle::after {
    color: var(--text-muted);
}
nav.navbar .dropdown-menu .dropdown-toggle:hover::after {
    color: var(--primary-dark);
}
/* Language flag selector */
/* ============================================================
   FIXED ELEMENT REPOSITIONING
   Old navbar: 36px → top: 8px
   New navbar: ~54px → top: 17px to vertically center elements
   ============================================================ */
#langselect {
    background: var(--theme-surface-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 18px var(--theme-shadow-lg);
}
/* Breadcrumbs */
/* Breadcrumb link colors for the new light navbar */
.breadcrumb-item.active,
.breadcrumb-item a {
    color: var(--text-muted) !important;
}
.breadcrumb-item:after {
    color: var(--text-muted) !important;
}
.breadcrumb-item a:hover {
    color: var(--primary-dark) !important;
}
/* Logout link — vertically centered in the navbar */
/* NProgress spinner — reserve the far-right slot in the navbar */
/* ============================================================
   HISTORY DATE NAVIGATOR FIX
   .historydataleft / .historydataright are compact 22px arrow
   buttons that must not inherit the general nav-link padding.
   ============================================================ */
nav .historydata .input-group {
    background: var(--primary-light);
    border: 1px solid var(--theme-border-primary);
}
nav .historydataleft,
nav .historydataright,
nav .historydataleftdisabled,
nav .historydatarightdisabled {
    /* compact — do NOT use 0.5rem 1rem */
    background: var(--theme-surface-bg) !important;
    border: 1px solid var(--theme-nav-button-border) !important;
    color: var(--primary-dark) !important;
}
nav .historydata span {
    background-color: transparent !important;
    border: none !important;
    color: var(--primary-dark) !important;
}

/* DASHBOARD / BIO / REPORT MODALS
 * Dashboard, bio dashboard and report modal/table refinements. Used by resources/views/layouts/index.blade.php, resources/views/layouts/biopools.blade.php and resources/views/system/reports.blade.php.
 */

body {
    background-color: var(--bg-main) !important;
}
/* --- UI Components --- */
.btn-success {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
    color: var(--theme-on-accent) !important;
    border: none !important;
}
.btn-success:hover {
    background-color: var(--theme-success-dark) !important;
    border-color: var(--theme-success-dark) !important;
    box-shadow: 0 4px 12px var(--theme-success-focus) !important;
}
.value {
    color: var(--text-main);
}

/* --- Dashboard Layout --- */
.poolbassin {
    background: var(--card-bg);
    box-shadow: 0 4px 6px -1px var(--theme-shadow-xs);
    border: 1px solid var(--border-color);
}
.poolbassin:hover {
    box-shadow: 0 20px 25px -5px var(--theme-shadow-black-sm), 0 10px 10px -5px var(--theme-shadow-xs-soft) !important;
}
/* Fix double-border clipping on top corners */
.poolbassin .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
/* Shared row rhythm for dashboard + /bio cards */
.pooldata .infodatarowsmall label,
.pooldata .infodatarowsmall .nowrap {
    color: var(--text-main);
}
/* Header Design */
.card-header {
    background: var(--secondary-light) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-color) !important;
}
.card-driftdata-header {
    background: var(--secondary-light) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-color) !important;
}
/* Driftdata headers use the success theme tokens. */
.card-driftdata-header,
#pools>.col-md-3.poolbassin .card-header {
    background: var(--theme-success-soft) !important;
    color: var(--theme-success) !important;
}
/* Pool headers use the shared section-header tokens. */
#pools>.col-md-2.poolbassin .card-header,
#pools.bio-pools-grid>.bio-pool-card .card-header,
#pools>.col-xl-3.poolbassin .card-header,
#pools>.col-xl-4.poolbassin .card-header {
    background: var(--theme-header-bg) !important;
    color: var(--theme-primary-dark) !important;
    border-bottom: 1px solid var(--theme-border-primary) !important;
}

/* Full-width, non-rounded headers */
.poolbassin .colpoolheader {
    border: none !important;
}
/* Dashboard subsection headers. */
.poolreadings .colpoolheader,
.poolcontrole .colpoolheader {
    background-color: var(--theme-header-bg) !important;
    color: var(--theme-header-text) !important;
    border-top: 1px solid var(--theme-header-border-strong) !important;
    border-bottom: 1px solid var(--theme-border-primary) !important;
}
.poolflush .colpoolheader {
    background-color: var(--theme-header-bg) !important;
    color: var(--theme-header-text) !important;
    border-top: 1px solid var(--theme-header-border-strong) !important;
    border-bottom: 1px solid var(--theme-border-primary) !important;
}
.pool_comment .colpoolheader {
    background-color: var(--theme-header-bg) !important;
    color: var(--theme-dashboard-blue-dark) !important;
    border-top: 1px solid var(--theme-header-border-strong) !important;
    border-bottom: 1px solid var(--theme-border-primary) !important;
}
/* Weekend Toggle - Side-by-side Fixed */
/* Modern Toggles */
input[type="checkbox"],
.slider {
    background: var(--theme-toggle-off) !important;
    border: none !important;
}
.slider:before,
input[type="checkbox"]::after {
    background: var(--theme-surface-bg) !important;
}
input[type="checkbox"]:checked {
    background: var(--primary) !important;
}
.databad-toggle input[type="checkbox"]:checked + .slider::before {
    background: var(--theme-toggle-checked) !important;
}
.admin-page .databad-toggle input[type="checkbox"]:checked + .slider,
.settings-page .databad-toggle input[type="checkbox"]:checked + .slider {
    background: var(--theme-header-text) !important;
    box-shadow: 0 0 0 2px var(--theme-header-text) !important;
}
.admin-page .databad-toggle input[type="checkbox"]:checked + .slider::before,
.settings-page .databad-toggle input[type="checkbox"]:checked + .slider::before {
    background: var(--theme-surface-bg) !important;
}
/* Segmented Controls - No wrapping */
.segmented-control {
    background: var(--theme-shadow-xs);
    border: 1px solid var(--border-color);
    /* Allow shrinking on small screens */
}
/* Hide the raw radio inputs — only labels are visible */
.segmented-control label {
    color: var(--text-muted);
}
.segmented-control input[type="radio"]:checked+label {
    background: var(--theme-surface-bg);
    color: var(--primary);
    box-shadow: 0 2px 4px var(--theme-shadow-xs);
}
/* Icons */
.operationdata a,
.card-header-pooldata a {
    color: var(--text-muted) !important;
}
.operationdata a:hover,
.card-header-pooldata a:hover {
    color: var(--primary) !important;
}
/* Alignment utilities for measurement rows - Ensures strict vertical grid */
/* Inputs */
.poolinput,
.form-control-sm {
    border: 1px solid var(--border-color) !important;
    background-color: var(--theme-input-muted-bg) !important;
    color: var(--theme-secondary-dark) !important;
}
.poolinput:focus,
.form-control-sm:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--theme-focus-primary) !important;
    background-color: var(--theme-on-accent) !important;
}
/* Dashboard data modals */
#pool_data .dashboard-data-modal,
#drift_data .dashboard-data-modal {
    background: var(--theme-page-bg) !important;
    box-shadow: 0 24px 60px var(--theme-shadow-xxl) !important;
}
#pool_data .modal-header,
#drift_data .modal-header {
    background: var(--theme-header-bg) !important;
    color: var(--theme-primary-dark) !important;
    border-bottom: 1px solid var(--theme-border-primary) !important;
}
#pool_data .modal-title,
#drift_data .modal-title {
    color: var(--theme-primary-dark) !important;
}
#pool_data .nav-pills {
    background: var(--theme-page-bg);
    border-bottom: 1px solid var(--theme-border);
}
#pool_data .nav-pills .nav-link {
    color: var(--theme-secondary-dark) !important;
    background: var(--theme-surface-bg) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: 0 4px 12px var(--theme-shadow-sm);
}
#pool_data .nav-pills .nav-link i {
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
}
#pool_data .nav-pills .nav-link span {
    color: inherit;
}
#pool_data .nav-pills .nav-link small {
    color: var(--theme-text-muted);
}
#pool_data .nav-pills .nav-link:hover {
    border-color: var(--theme-border-primary) !important;
    box-shadow: 0 10px 18px var(--theme-focus-primary-soft);
}
#pool_data .nav-pills .nav-link.active {
    background: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
    color: var(--theme-on-accent) !important;
    box-shadow: 0 14px 26px var(--theme-focus-primary-stronger);
}
#pool_data .nav-pills .nav-link.active i {
    background: var(--theme-on-accent-muted-bg);
    color: var(--theme-on-accent);
}
#pool_data .nav-pills .nav-link.active small {
    color: var(--theme-on-accent-muted-text);
}
.dashboard-data-section {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-border);
    box-shadow: 0 4px 12px var(--theme-shadow-sm);
}
.dashboard-section-title {
    color: var(--theme-text) !important;
}
.dashboard-section-kicker {
    color: var(--theme-text-muted) !important;
}
.dashboard-chart-surface {
    border: 1px solid var(--theme-border);
    background: linear-gradient(180deg, var(--theme-surface-bg) 0%, var(--theme-page-bg) 100%);
}
.dashboard-table-wrap {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-bg);
}
.dashboard-data-table td,
.dashboard-data-table th {
    border-right: 1px solid var(--theme-border) !important;
    border-bottom: 1px solid var(--theme-border) !important;
    color: var(--theme-secondary-dark) !important;
    background: var(--theme-surface-bg) !important;
}
.dashboard-data-table thead th,
.dashboard-data-table td.text-bold {
    background: var(--theme-focus-primary) !important;
    color: var(--theme-primary-dark) !important;
}
.dashboard-data-table tbody tr:nth-child(even) td,
.dashboard-data-table tr:nth-child(even) td {
    background: var(--theme-primary-row-soft) !important;
}
.dashboard-data-table tbody tr:hover td,
.dashboard-data-table tr:hover td {
    background: var(--theme-primary-row-hover) !important;
}
#pool_data .info_bullet_list {
    color: var(--theme-secondary);
}
#pool_data .dataTables_wrapper {
    color: var(--theme-secondary-dark);
}
#pool_data .dataTables_wrapper > .row:first-child {
    border-bottom: 1px solid var(--theme-border);
}
#pool_data .dataTables_wrapper > .row:last-child {
    border-top: 1px solid var(--theme-border);
}
#pool_data .dataTables_wrapper .dataTables_length label,
#pool_data .dataTables_wrapper .dataTables_filter label,
#pool_data .dataTables_wrapper .dataTables_info,
#pool_data .dataTables_wrapper .dataTables_paginate {
    color: var(--theme-text-muted);
}
#pool_data .dataTables_wrapper .dataTables_length select,
#pool_data .dataTables_wrapper .dataTables_filter input {
    background-color: var(--theme-on-accent) !important;
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-secondary-dark) !important;
}
#pool_data .dataTables_wrapper .dataTables_paginate .page-item .page-link,
#pool_data .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: var(--theme-surface-bg) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: none !important;
    color: var(--theme-secondary-dark) !important;
}
#pool_data .dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
#pool_data .dataTables_wrapper .dataTables_paginate .paginate_button.current,
#pool_data .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
    color: var(--theme-on-accent) !important;
}
#pool_data .dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover,
#pool_data .dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):not(.disabled):hover {
    background: var(--theme-primary-soft) !important;
    border-color: var(--theme-border-primary) !important;
    color: var(--theme-primary-hover) !important;
}
#pool_data .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
#pool_data .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: var(--theme-page-bg) !important;
    color: var(--theme-text-subtle) !important;
}
.dashboard-validation-error {
    color: var(--theme-error) !important;
}
.dashboard-status-value {
    color: var(--theme-status-normal);
}
.dashboard-status-normal {
    color: var(--theme-status-normal);
}
.dashboard-status-alarm {
    color: var(--theme-status-alarm);
}
.dashboard-status-tolerance {
    color: var(--theme-status-tolerance);
}
.dashboard-status-alarm-tolerance {
    color: var(--theme-status-alarm-tolerance);
}
#smart-assistant-handle {
    background: var(--theme-assistant-handle-bg);
    box-shadow: -2px 2px 10px var(--theme-shadow-black-lg);
    color: var(--theme-on-accent);
}
#smart-assistant-handle:hover {
    background-color: var(--theme-assistant-handle-hover-bg);
}
@keyframes sa-pulse {
    0% {
        box-shadow: 0 0 0 0 var(--theme-assistant-pulse);
}
    70% {
        box-shadow: 0 0 0 15px var(--theme-assistant-pulse-clear);
}
    100% {
        box-shadow: 0 0 0 0 var(--theme-assistant-pulse-clear);
}
}
#smart-assistant-panel {
    background: var(--theme-assistant-panel-bg);
    box-shadow: -5px 0 25px var(--theme-shadow-black-md);
}
.sa-card {
    background: var(--theme-surface-bg);
    border-left: 5px solid var(--theme-assistant-accent);
    box-shadow: 0 3px 6px var(--theme-shadow-xs-strong);
}
.sa-card.critical {
    border-left-color: var(--theme-assistant-critical);
}
.sa-card.warning {
    border-left-color: var(--theme-assistant-warning);
}
.sa-card.info {
    border-left-color: var(--theme-assistant-accent);
}
.sa-card h6 {
    color: var(--theme-assistant-text);
}
#pool_data .modal-footer,
#drift_data .modal-footer {
    background: var(--theme-surface-bg) !important;
    border-top: 1px solid var(--theme-border) !important;
}
#pool_data .dashboard-modal-close,
#drift_data .dashboard-modal-close {
    background: var(--theme-secondary-dark) !important;
    color: var(--theme-on-accent) !important;
}

/* ADMIN / CONTENT / REPORTS
 * Admin, content pages, reports and shared form/modal surfaces. Used by resources/views/system/* and resources/views/user/* through resources/views/layouts/base.blade.php.
 */

.about-page {
    --about-bg: var(--theme-page-bg);
    --about-card: var(--theme-surface-bg);
    --about-border: var(--theme-border);
    --about-text: var(--theme-text);
    --about-primary: var(--theme-primary-dark);
    --about-primary-soft: var(--theme-primary-soft);
    background: var(--about-bg);
    color: var(--about-text);
}
body:has(.report-card) {
    background-color: var(--theme-page-bg);
}
/* SHARED ACTION BUTTONS */
.btn-action-save {
    background-color: var(--theme-success) !important;
    border-color: var(--theme-success) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-save:hover,
.btn-action-save:focus {
    background-color: var(--theme-success-dark) !important;
    border-color: var(--theme-success-dark) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-save:disabled,
.btn-action-save.disabled {
    background-color: var(--theme-success-disabled) !important;
    border-color: var(--theme-success-disabled) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-reset {
    background-color: var(--theme-warning) !important;
    border-color: var(--theme-warning) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-reset:hover,
.btn-action-reset:focus {
    background-color: var(--theme-warning-dark) !important;
    border-color: var(--theme-warning-dark) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-back {
    background-color: var(--theme-secondary) !important;
    border-color: var(--theme-secondary) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-back:hover,
.btn-action-back:focus {
    background-color: var(--theme-secondary-dark) !important;
    border-color: var(--theme-secondary-dark) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-calculate {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-calculate:hover,
.btn-action-calculate:focus {
    background-color: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-danger {
    background-color: var(--theme-danger) !important;
    border-color: var(--theme-danger) !important;
    color: var(--theme-on-accent) !important;
}
.btn-action-danger:hover,
.btn-action-danger:focus {
    background-color: var(--theme-danger-dark) !important;
    border-color: var(--theme-danger-dark) !important;
    color: var(--theme-on-accent) !important;
}
.confirm-modal .modal-content {
    border: 1px solid var(--theme-border);
    box-shadow: 0 24px 60px var(--theme-shadow-xl);
}
.confirm-modal .modal-header {
    background: var(--theme-surface-bg);
    border-bottom: 1px solid var(--theme-border);
}
.confirm-modal .modal-title {
    color: var(--theme-text);
}
.confirm-modal .modal-body {
    background: var(--theme-page-bg);
    color: var(--theme-text);
}
.confirm-modal-icon {
    background: var(--theme-danger-panel);
    border: 1px solid var(--theme-danger-border);
    color: var(--theme-danger-dark);
}
.confirm-modal .modal-footer {
    background: var(--theme-surface-bg);
    border-top: 1px solid var(--theme-border);
}
/* ADMIN */
.admin-page {
    --admin-bg: var(--theme-page-bg);
    --admin-card: var(--theme-surface-bg);
    --admin-border: var(--theme-border);
    --admin-text: var(--theme-text);
    --admin-muted: var(--theme-text-muted);
    --admin-primary: var(--theme-primary-hover);
    background: var(--admin-bg);
    color: var(--admin-text);
}
.admin-brand {
    color: var(--admin-text);
}
.admin-brand:hover {
    color: var(--admin-text);
}
.admin-panel {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.admin-section-title {
    background-color: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
    border-top: 1px solid var(--theme-header-border-strong);
    color: var(--theme-header-text);
}
.admin-field label {
    color: var(--admin-text);
}
.admin-required {
    color: var(--theme-danger);
}
.admin-static-value {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-muted);
}
.admin-table thead th {
    background: var(--theme-page-bg);
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-muted);
}
.admin-table tbody td {
    border-bottom: 1px solid var(--theme-border-soft);
    color: var(--admin-text);
}
.admin-table tbody tr:hover > td,
.admin-table tbody tr:hover > .sorting_1 {
    background: var(--theme-primary-muted);
}
.admin-table-panel .dataTables_wrapper > .row:first-child {
    border-bottom: 1px solid var(--admin-border);
}
.admin-table-panel .dataTables_wrapper > .row:last-child {
    border-top: 1px solid var(--admin-border);
}
.admin-table-panel .dataTables_wrapper .dataTables_length label,
.admin-table-panel .dataTables_wrapper .dataTables_filter label,
.admin-table-panel .dataTables_wrapper .dataTables_info {
    color: var(--admin-muted);
}
.admin-table-panel .dataTables_wrapper .dataTables_length select,
.admin-table-panel .dataTables_wrapper .dataTables_filter input {
    background-color: var(--theme-on-accent) !important;
    border: 1px solid var(--admin-border) !important;
    color: var(--admin-text);
}
.admin-table-panel .dataTables_wrapper .dataTables_paginate {
    color: var(--admin-muted);
}
.admin-table-panel .dataTables_wrapper .dataTables_paginate .page-item .page-link,
.admin-table-panel .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: var(--theme-surface-bg) !important;
    border: 1px solid var(--admin-border) !important;
    color: var(--admin-text) !important;
}
.admin-table-panel .dataTables_wrapper .dataTables_paginate .page-link {
    box-shadow: none !important;
}
.admin-table-panel .dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.admin-table-panel .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.admin-table-panel .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--theme-header-text) !important;
    border-color: var(--theme-header-text) !important;
    color: var(--theme-on-accent) !important;
}
.admin-table-panel .dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover,
.admin-table-panel .dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):not(.disabled):hover {
    background: var(--theme-header-bg) !important;
    border-color: var(--theme-border-primary) !important;
    color: var(--theme-header-text) !important;
}
.admin-table-panel .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.admin-table-panel .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: var(--theme-page-bg) !important;
    color: var(--theme-text-subtle) !important;
}
.admin-message-meta-value {
    color: var(--admin-text);
}
.admin-message-meta-label {
    color: var(--admin-muted);
}
.admin-modal-field label,
.admin-field-label {
    color: var(--admin-text);
}
.admin-role-toggle {
    --admin-role-border: var(--admin-border, var(--theme-border));
    --admin-role-muted: var(--admin-muted, var(--theme-text-muted));
    --admin-role-primary: var(--admin-primary, var(--theme-primary-hover));
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-role-border);
}
.admin-role-toggle label {
    color: var(--admin-role-muted);
}
.admin-role-toggle input:checked + label {
    background: var(--admin-role-primary);
    box-shadow: 0 8px 18px var(--theme-focus-primary-strong);
    color: var(--theme-on-accent);
}
.admin-role-toggle input:focus-visible + label {
    outline: 3px solid var(--theme-focus-primary-strong);
}
/* EDIT DATA */
.editdata-window-note,
.editdata-empty {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border, var(--theme-border));
    color: var(--admin-text, var(--theme-text));
}
.editdata-modal-section {
    border: 1px solid var(--admin-border, var(--theme-border));
}
.editdata-modal-section h3 {
    background: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
    color: var(--theme-header-text);
}
.editdata-control-headings h3:first-child {
    border-right: 1px solid var(--theme-border-primary);
}
/* OPERATION DATA */
.operation-sort-list {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border, var(--theme-border));
}
.operation-sort-item {
    background: var(--theme-surface-bg);
    border: 1px solid var(--admin-border, var(--theme-border));
}
.operation-sort-item.operation-sort-label {
    background: var(--theme-header-bg);
    border-color: var(--theme-border-primary);
    color: var(--theme-header-text);
}
.operation-drag,
.pool-drag,
.pool-bio-drag {
    color: var(--admin-muted, var(--theme-text-muted));
}
.operation-drag:hover,
.operation-drag:focus,
.pool-drag:hover,
.pool-drag:focus,
.pool-bio-drag:hover,
.pool-bio-drag:focus {
    background: var(--theme-input-muted-bg);
    color: var(--admin-primary, var(--theme-primary-hover));
    outline: none;
}
.operation-sort-placeholder {
    background: var(--theme-primary-muted);
    border: 1px dashed var(--theme-border-primary-strong);
}
/* POOLS */
.pool-list-head {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-muted);
}
.pool-sort-list {
    border: 1px solid var(--admin-border);
}
.pool-sort-item {
    background: var(--theme-surface-bg);
    border-bottom: 1px solid var(--theme-border-soft);
}
.pool-sort-item:hover {
    background: var(--theme-primary-muted);
}
.pool-switch {
    color: var(--admin-text);
}
.pool-switch-slider {
    background: var(--theme-toggle-off);
}
.pool-switch-slider::after {
    background: var(--theme-surface-bg);
    box-shadow: 0 1px 3px var(--theme-shadow-xl);
}
.pool-switch input:checked + .pool-switch-slider {
    background: var(--theme-primary-hover);
}
.pool-switch input:focus-visible + .pool-switch-slider {
    box-shadow: 0 0 0 3px var(--theme-border-primary);
}
.pool-filter-row {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
}
.pool-filter-empty {
    background: var(--theme-page-bg);
    border: 1px dashed var(--admin-border);
    color: var(--admin-muted);
}
.pool-filter-unit-modal .modal-body {
    background: var(--theme-page-bg);
}
.filtermaterial-estimate-notice {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-muted);
}
.filtermaterial-latest-change-card {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
}
.filtermaterial-latest-change-card h3 {
    color: var(--admin-text);
}
.filtermaterial-latest-change-card p {
    color: var(--admin-muted);
}
.filtermaterial-latest-change-card dt {
    color: var(--admin-muted);
}
.filtermaterial-latest-change-card dd {
    color: var(--admin-text);
}
.pool-filter-unit-card {
    background: var(--theme-surface-bg);
    border: 1px solid var(--admin-border);
}
.pool-filter-unit-card-head {
    background: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
}
.pool-filter-unit-card-head h3 {
    color: var(--theme-header-text);
}
.pool-filter-unit-card-head span {
    color: var(--admin-muted);
}
.pool-filter-unit-card-head h3 .pool-filter-unit-title-number {
    color: inherit;
}
.pool-filter-index {
    background: var(--theme-header-bg);
    color: var(--theme-header-text);
}
.pool-section-copy {
    color: var(--admin-text);
}
.pool-bio-head {
    background: var(--theme-page-bg);
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-muted);
}
.pool-bio-list {
    border: 1px solid var(--admin-border);
}
.pool-bio-row {
    border-bottom: 1px solid var(--theme-border-soft);
}
.pool-bio-row.is-dragging {
    background: var(--theme-primary-muted);
    box-shadow: 0 8px 20px var(--theme-shadow-xl-soft);
}
.pool-bio-row > input[type="checkbox"] {
    accent-color: var(--theme-primary-hover);
}
.pool-bio-fixed-value {
    color: var(--admin-text);
}
.pool-sort-placeholder {
    background: var(--theme-primary-muted);
    border: 1px dashed var(--theme-border-primary-strong);
}
/* CHOCKING */
.chocking-values {
    border-top: 1px solid var(--admin-border, var(--theme-border));
}
.chocking-values .form-control[readonly] {
    background: var(--theme-page-bg);
    color: var(--admin-text, var(--theme-text));
}
.chocking-form-errors {
    background: var(--theme-danger-rose-soft);
    border: 1px solid var(--theme-danger-rose-border);
    color: var(--theme-danger-rose-text);
}
.chocking-process-status {
    background: var(--theme-primary-soft);
    border: 1px solid var(--theme-border-primary);
}
.chocking-process-heading {
    color: var(--theme-primary-hover);
}
.chocking-process-status dt,
.chocking-product dt {
    color: var(--admin-muted, var(--theme-text-muted));
}
.chocking-process-status dd {
    color: var(--admin-text, var(--theme-text));
}
.chocking-guidance {
    background: var(--theme-primary-soft);
    border: 1px solid var(--theme-border-primary);
    color: var(--admin-text, var(--theme-text));
}
.chocking-guidance i {
    color: var(--theme-primary);
}
.chocking-workflow,
.chocking-completion {
    border-top: 1px solid var(--admin-border, var(--theme-border));
}
.chocking-workflow h3 {
    color: var(--admin-text, var(--theme-text));
}
.chocking-checks label {
    color: var(--admin-text, var(--theme-text));
}
.chocking-audit-note {
    color: var(--admin-muted, var(--theme-text-muted));
}
.chocking-completion p {
    color: var(--admin-muted, var(--theme-text-muted));
}
.chocking-completion small {
    color: var(--admin-muted, var(--theme-text-muted));
}
.chocking-safety {
    background: var(--theme-primary-soft);
    border: 1px solid var(--theme-border-primary);
    color: var(--admin-text, var(--theme-text));
}
.chocking-safety i {
    color: var(--theme-primary);
}
.chocking-safety p {
    color: var(--admin-muted, var(--theme-text-muted));
}
.chocking-safety-warning {
    background: var(--theme-warning-soft);
    border-color: var(--theme-warning-border);
}
.chocking-safety-warning i {
    color: var(--theme-warning-text);
}
.chocking-safety-danger {
    background: var(--theme-danger-soft);
    border-color: var(--theme-danger-border-strong);
}
.chocking-safety-danger i {
    color: var(--theme-danger);
}
.chocking-safety-danger p {
    color: var(--theme-danger-dark);
}
.chocking-result {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border, var(--theme-border));
}
.chocking-dose {
    color: var(--admin-text, var(--theme-text));
}
.chocking-product {
    border-top: 1px solid var(--admin-border, var(--theme-border));
    color: var(--admin-text, var(--theme-text));
}
/* WATERFLOW */
.waterflow-note {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border, var(--theme-border));
    color: var(--admin-text, var(--theme-text));
}
.waterflow-table {
    border: 1px solid var(--admin-border, var(--theme-border));
}
.waterflow-row {
    border-bottom: 1px solid var(--admin-border, var(--theme-border));
}
.waterflow-head {
    background: var(--theme-surface-muted-bg);
    color: var(--admin-muted, var(--theme-text-muted));
}
.waterflow-value {
    color: var(--admin-text, var(--theme-text));
}
.waterflow-warning {
    color: var(--theme-warning-text);
}
.waterflow-row-missing {
    background: var(--theme-warning-soft);
}
/* SETTINGS */
.settings-login-toggle {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
}
.settings-login-toggle strong,
.settings-login-toggle small {
    color: var(--admin-text);
}
.settings-login-toggle small {
    color: var(--admin-muted);
}
.settings-toggle-label {
    color: var(--admin-text);
}
.measurement-field-bank-item,
.measurement-field-bank-empty,
.measurement-route-item,
.measurement-round-route-card,
.measurement-round-empty,
.measurement-run-date,
.measurement-run-field {
    background: var(--theme-surface-bg);
    border-color: var(--admin-border);
    color: var(--admin-text);
}
.measurement-field-bank-item:hover,
.measurement-field-bank-item:focus-visible,
.measurement-round-route-card:hover,
.measurement-round-route-card:focus-visible {
    background: var(--theme-header-bg);
    border-color: var(--theme-border-primary);
    color: var(--theme-header-text);
}
.measurement-field-bank-group h3,
.measurement-round-header h1,
.measurement-round-page-hero h1,
.measurement-round-route-card strong,
.measurement-run-date label,
.measurement-run-field-label,
.measurement-run-section h2 {
    color: var(--admin-heading);
}
.measurement-field-bank-item small,
.measurement-field-bank-empty,
.measurement-route-drag,
.measurement-round-kicker,
.measurement-round-route-card small,
.measurement-run-help,
.measurement-run-unit {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--admin-muted);
}
.measurement-round-progress {
    background: var(--theme-header-bg);
    color: var(--theme-header-text);
}
.measurement-route-unit {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--admin-muted);
}
.measurement-run-segmented {
    background: var(--theme-shadow-xs);
    border: 1px solid var(--border-color);
}
.measurement-run-segmented label {
    color: var(--text-muted);
}
.measurement-run-segmented input[type="radio"]:checked + label {
    background: var(--theme-surface-bg);
    box-shadow: 0 2px 4px var(--theme-shadow-xs);
    color: var(--primary);
}
.measurement-route-placeholder {
    background: var(--theme-primary-muted);
    border-color: var(--theme-header-text);
}
.measurement-round-run-header,
.measurement-run-actions {
    background: var(--theme-page-bg);
}
.measurement-run-warning,
.measurement-run-field-unavailable .measurement-run-field-label {
    color: var(--theme-danger);
}
.settings-approval-help {
    color: var(--admin-muted);
}
.settings-approval-option {
    border: 1px solid var(--admin-border);
}
.settings-approval-option:has(input:checked) {
    background: var(--theme-panel-alt-bg);
    border-color: var(--theme-border-primary);
}
.settings-approval-option label {
    color: var(--admin-text);
}
.settings-approval-option input {
    accent-color: var(--theme-header-text);
}
.settings-approval-icon-button {
    background: var(--theme-surface-muted-bg);
    color: var(--admin-muted);
}
.settings-approval-icon-button:hover,
.settings-approval-icon-button:focus-visible {
    background: var(--theme-primary-soft);
    color: var(--theme-header-text);
}
.regulation-info-modal .modal-title {
    color: var(--admin-heading);
}
.regulation-info-summary {
    background: var(--theme-panel-alt-bg);
    border: 1px solid var(--theme-border-primary);
}
.regulation-info-tab {
    background: var(--theme-surface-muted-bg);
    color: var(--admin-muted);
}
.regulation-info-tab.active,
.regulation-info-tab:hover,
.regulation-info-tab:focus-visible {
    background: var(--theme-header-bg);
    color: var(--theme-header-text);
}
.regulation-info-lead,
.regulation-info-group-header,
.regulation-info-category-title strong,
.regulation-info-value-limit,
.regulation-info-smart-row strong,
.regulation-info-simple-grid h5,
.regulation-decision-profile h4,
.regulation-decision-guidance h4,
.regulation-decision-main strong,
.regulation-decision-option strong {
    color: var(--admin-text);
}
.regulation-info-note,
.regulation-info-empty,
.regulation-apply-note,
.regulation-info-value-variant,
.regulation-info-category-title span,
.regulation-info-smart-row span,
.regulation-info-smart-row small,
.regulation-info-simple-list,
.regulation-decision-main span,
.regulation-decision-main small,
.regulation-decision-option em,
.regulation-limit-split small,
.regulation-limit-inputs small,
.regulation-limit-split i,
.regulation-limit-inputs i {
    color: var(--admin-muted);
}
.regulation-info-metric {
    background: var(--theme-primary-soft);
    color: var(--theme-header-text);
}
.regulation-info-section {
    border-top: 1px solid var(--admin-border);
}
.regulation-info-section h4::before {
    background: var(--theme-header-bg);
    color: var(--theme-header-text);
}
.regulation-info-profile {
    border-left: 3px solid var(--theme-border-primary);
}
.regulation-info-category,
.regulation-decision-category {
    border-left-color: var(--theme-border);
}
.regulation-info-category--chemistry {
    border-left-color: var(--theme-info);
}
.regulation-info-category--biology {
    border-left-color: var(--theme-success);
}
.regulation-info-category--other {
    border-left-color: var(--theme-text-subtle);
}
.regulation-info-value-row {
    border-bottom-color: var(--theme-border-soft);
}
.regulation-info-smart-row {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-border-soft);
}
.regulation-info-smart-row--matches {
    border-left-color: var(--theme-success);
}
.regulation-info-smart-row--stricter {
    border-left-color: var(--theme-primary);
}
.regulation-info-smart-row--needs_update {
    border-left-color: var(--theme-warning);
}
.regulation-decision-row {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-border-soft);
}
.regulation-decision-row--matches {
    border-left-color: var(--theme-success);
}
.regulation-decision-row--stricter {
    border-left-color: var(--theme-primary);
}
.regulation-decision-row--needs_update {
    border-left-color: var(--theme-warning);
}
.regulation-decision-row--no_current {
    border-left-color: var(--theme-text-subtle);
}
.regulation-decision-option {
    background: var(--theme-page-bg);
    border: 1px solid var(--theme-border-soft);
}
.regulation-decision-option:has(input:checked) {
    background: var(--theme-primary-soft);
    border-color: var(--theme-border-primary);
}
.regulation-decision-option:has(input:disabled) {
    opacity: 0.72;
}
.regulation-decision-option input[type="radio"] {
    accent-color: var(--theme-header-text);
}
.regulation-limit-split span,
.regulation-limit-inputs label {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-border-soft);
}
.settings-load-material {
    border-top: 1px solid var(--admin-border);
}
.settings-load-material-title {
    color: var(--admin-heading);
}
.settings-backup-label {
    color: var(--admin-muted);
}
.settings-backup-row strong {
    color: var(--admin-text);
}
.settings-actions {
    border-top: 1px solid var(--admin-border);
}
/* NEW MESSAGES */
.nav-message-badge {
    background: var(--theme-danger);
    color: var(--theme-on-accent);
}
.newmessages-list {
    background: var(--theme-page-bg);
}
.newmessage-card {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-border);
    box-shadow: 0 4px 12px var(--theme-shadow-sm);
}
.newmessage-header h4 {
    color: var(--theme-text);
}
.newmessage-header span,
.newmessage-user {
    color: var(--theme-text-muted);
}
.newmessage-body {
    color: var(--theme-text);
}
.admin-modal-note {
    background: var(--theme-page-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
}
.report-card {
    background: var(--card-bg);
    box-shadow: 0 4px 6px -1px var(--theme-shadow-xs), 0 2px 4px -2px var(--theme-shadow-xs-soft);
    border: 1px solid var(--border-color);
}
.report-card-header {
    background: var(--theme-header-bg);
    color: var(--theme-primary-dark);
    border-bottom: 1px solid var(--theme-border-primary);
}
.report-card-header i {
    color: var(--theme-header-text);
}
.report-type-toggle span {
    background: var(--theme-surface-muted-bg);
    border: 1px solid var(--theme-border);
    color: var(--theme-primary-dark);
}
.report-type-toggle-day input:checked + span {
    background: var(--theme-primary-soft);
    border-color: var(--theme-border-primary);
    color: var(--theme-primary-dark);
}
.report-type-toggle-week input:checked + span {
    background: var(--theme-purple-soft);
    border-color: var(--theme-purple-border);
    color: var(--theme-purple-text);
}
.report-type-toggle-month input:checked + span {
    background: var(--theme-success-soft);
    border-color: var(--theme-success-border);
    color: var(--theme-success);
}
.report-type-toggle input:focus-visible + span {
    box-shadow: 0 0 0 0.2rem var(--theme-primary-row-hover);
}
.report-table-search .dataTables_filter input {
    background-color: var(--theme-on-accent) !important;
    border: 1px solid var(--admin-border) !important;
    color: var(--theme-text) !important;
    box-shadow: inset 0 0 0 1px var(--theme-surface-muted-bg);
}
#reports_wrapper .dataTables_filter input[type="search"] {
    background-color: var(--theme-on-accent) !important;
    border: 1px solid var(--admin-border, #d8dee8) !important;
    box-shadow: inset 0 1px 2px var(--theme-shadow-xs);
    color: var(--theme-text) !important;
}
#reports thead th {
    background: var(--theme-page-bg) !important;
    color: var(--theme-text-muted) !important;
    border-bottom: 1px solid var(--theme-border) !important;
}
#reports tbody td {
    border-bottom: 1px solid var(--theme-surface-muted-bg) !important;
    color: var(--theme-text);
}
#reports tbody tr:last-child td {
    border-bottom: none !important;
}
#reports tbody tr:hover td {
    background: var(--theme-page-bg);
}
.badge-day {
    background: var(--theme-primary-soft);
    color: var(--theme-primary-dark);
    border: 1px solid var(--theme-border-primary);
}
.badge-week {
    background: var(--theme-purple-soft);
    color: var(--theme-purple-text);
    border: 1px solid var(--theme-purple-border);
}
.badge-month {
    background: var(--theme-success-soft);
    color: var(--theme-success);
    border: 1px solid var(--theme-success-border);
}
.status-ok {
    color: var(--theme-success);
}
.status-empty {
    color: var(--theme-text-subtle);
}
.btn-report-view {
    background-color: var(--theme-header-text) !important;
    color: var(--theme-on-accent) !important;
    border: none !important;
}
.btn-report-view:hover {
    background-color: var(--theme-purple-dark) !important;
    box-shadow: 0 4px 12px var(--theme-header-focus) !important;
}
.btn-report-dl {
    background-color: var(--theme-success) !important;
    color: var(--theme-on-accent) !important;
    border: none !important;
}
.btn-report-dl:hover {
    background-color: var(--theme-success-dark) !important;
    box-shadow: 0 4px 12px var(--theme-success-focus) !important;
}
.btn-report-view:disabled {
    background-color: color-mix(in srgb, var(--theme-header-text) 58%, var(--theme-surface-muted-bg)) !important;
    border: 1px solid color-mix(in srgb, var(--theme-header-text) 28%, var(--theme-border)) !important;
    color: color-mix(in srgb, var(--theme-on-accent) 78%, var(--theme-text-muted)) !important;
}
.btn-report-dl:disabled {
    background-color: color-mix(in srgb, var(--theme-success) 58%, var(--theme-surface-muted-bg)) !important;
    border: 1px solid color-mix(in srgb, var(--theme-success) 28%, var(--theme-border)) !important;
    color: color-mix(in srgb, var(--theme-on-accent) 78%, var(--theme-text-muted)) !important;
}
.btn-report-view:disabled:hover,
.btn-report-dl:disabled:hover {
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: var(--text-muted);
}
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color) !important;
    background-color: var(--theme-page-bg) !important;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-muted);
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: var(--theme-on-accent) !important;
    border: none !important;
}
#dataloading {
    color: var(--text-muted);
}
#dataloading i {
    color: var(--theme-header-text);
}
.about-brand {
    color: var(--about-text);
}
.about-panel,
.about-contact {
    background: var(--about-card);
    border: 1px solid var(--about-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.about-section-divider,
.contact-section-divider,
.create-section-divider,
.profile-section-divider,
.security-section-title,
.privacy-section-title,
.cookies-section-title {
    background-color: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
    border-top: 1px solid var(--theme-header-border-strong);
    color: var(--theme-header-text) !important;
}
.about-copy p {
    color: var(--about-text);
}
.about-contact-header {
    background-color: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
    border-top: 1px solid var(--theme-header-border-strong);
    color: var(--theme-header-text);
}
.about-contact-image {
    background: var(--theme-page-bg);
    border: 1px solid var(--about-border);
}
.about-actions .btn-outline-primary {
    background: var(--theme-surface-bg);
}
.contact-page {
    --contact-bg: var(--theme-page-bg);
    --contact-card: var(--theme-surface-bg);
    --contact-border: var(--theme-border);
    --contact-text: var(--theme-text);
    --contact-muted: var(--theme-text-muted);
    --contact-primary: var(--theme-primary-dark);
    --contact-primary-soft: var(--theme-primary-soft);
    background: var(--contact-bg);
    color: var(--contact-text);
}
.contact-brand {
    color: var(--contact-text);
}
.contact-card {
    background: var(--contact-card);
    border: 1px solid var(--contact-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.contact-label {
    color: var(--contact-text);
}
.contact-label .required {
    color: var(--theme-danger);
}
.contact-verification {
    background: var(--contact-primary-soft);
    border: 1px solid var(--theme-border-primary);
}
.contact-verification-header {
    color: var(--contact-primary);
}
.contact-help {
    color: var(--contact-muted);
}
.create-page {
    --create-bg: var(--theme-page-bg);
    --create-card: var(--theme-surface-bg);
    --create-border: var(--theme-border);
    --create-text: var(--theme-text);
    --create-muted: var(--theme-text-muted);
    --create-primary-soft: var(--theme-primary-soft);
    background: var(--create-bg);
    color: var(--create-text);
}
.create-brand {
    color: var(--create-text);
}
.create-panel {
    background: var(--create-card);
    border: 1px solid var(--create-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.create-section {
    border-top: 1px solid var(--create-border);
}
.create-section h2,
.create-verification h2 {
    color: var(--create-text);
}
.create-section p,
.create-verification p {
    color: var(--create-text);
}
.create-field label {
    color: var(--create-text);
}
.create-extra-pool {
    border: 1px solid var(--create-border);
}
.create-verification {
    background: var(--create-primary-soft);
    border: 1px solid var(--theme-border-primary);
}
.profile-page {
    --profile-bg: var(--theme-page-bg);
    --profile-card: var(--theme-surface-bg);
    --profile-border: var(--theme-border);
    --profile-text: var(--theme-text);
    --profile-muted: var(--theme-text-muted);
    --profile-primary-soft: var(--theme-primary-soft);
    background: var(--profile-bg);
    color: var(--profile-text);
}
.profile-brand {
    color: var(--profile-text);
}
.profile-panel {
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.profile-panel-intro,
.profile-empty,
.profile-integration-note p,
.profile-password-box p {
    color: var(--profile-text);
}
.profile-field label {
    color: var(--profile-text);
}
.profile-field small {
    color: var(--profile-muted);
}
.profile-password-box,
.profile-integration-note {
    background: var(--profile-primary-soft);
    border: 1px solid var(--theme-border-primary);
}
.profile-password-box h3,
.profile-integration-note strong {
    color: var(--profile-text);
}
.profile-center-item {
    border: 1px solid var(--profile-border);
}
.profile-center-form {
    border-top: 1px solid var(--profile-border);
}
.front-page {
    --front-bg: var(--theme-page-bg);
    --front-card: var(--theme-surface-bg);
    --front-border: var(--theme-border);
    --front-text: var(--theme-text);
    --front-muted: var(--theme-text-muted);
    --front-primary-soft: var(--theme-primary-soft);
    background: var(--front-bg);
    color: var(--front-text);
}
.dedicated-login-page {
    --front-bg: var(--theme-page-bg);
    --front-card: var(--theme-surface-bg);
    --front-border: var(--theme-border);
    --front-text: var(--theme-text);
    --front-muted: var(--theme-text-muted);
    background: var(--front-bg);
    color: var(--front-text);
}
.dedicated-login-brand {
    color: var(--front-text);
}
.dedicated-login-brand:hover {
    color: var(--front-text);
}
.dedicated-login-card {
    background: var(--front-card);
    border: 1px solid var(--front-border);
    box-shadow: 0 12px 28px var(--theme-shadow-lg);
}
.front-hero h1 {
    color: var(--front-text);
}
.front-intro-card,
.front-login-card,
.front-panel {
    background: var(--front-card);
    border: 1px solid var(--front-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.front-intro-card p {
    color: var(--front-text);
}
.front-section-divider {
    background-color: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
    border-top: 1px solid var(--theme-header-border-strong);
    color: var(--theme-header-text);
}
.front-field label {
    color: var(--front-text);
}
.front-login-card .form-control:-webkit-autofill,
.front-login-card .form-control:-webkit-autofill:hover,
.front-login-card .form-control:-webkit-autofill:focus,
.dedicated-login-card .form-control:-webkit-autofill,
.dedicated-login-card .form-control:-webkit-autofill:hover,
.dedicated-login-card .form-control:-webkit-autofill:focus,
.front-reset-modal .form-control:-webkit-autofill,
.front-reset-modal .form-control:-webkit-autofill:hover,
.front-reset-modal .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--front-text);
    box-shadow: 0 0 0 1000px var(--theme-autofill-bg) inset !important;
}
.front-review-card:hover {
    border-color: var(--theme-border-primary);
    box-shadow: 0 10px 22px var(--theme-shadow-lg);
}
.front-review-card {
    background: var(--theme-surface-bg);
    border: 1px solid var(--front-border);
    color: var(--front-text);
}
.front-review-card img {
    border: 1px solid var(--front-border);
}
.front-review-card small {
    color: var(--front-muted);
}
.contact-page {
    --contact-bg: var(--theme-page-bg);
    --contact-card: var(--theme-surface-bg);
    --contact-border: var(--theme-border);
    --contact-text: var(--theme-text);
    --contact-muted: var(--theme-text-muted);
    --contact-primary: var(--theme-primary-dark);
    --contact-primary-soft: var(--theme-primary-soft);
    background: var(--contact-bg);
    color: var(--contact-text);
}
.contact-brand {
    color: var(--contact-text);
}
.contact-card {
    background: var(--contact-card);
    border: 1px solid var(--contact-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.contact-label {
    color: var(--contact-text);
}
.contact-label .required {
    color: var(--theme-danger);
}
.contact-verification {
    background: var(--contact-primary-soft);
    border: 1px solid var(--theme-border-primary);
}
.contact-verification-header {
    color: var(--contact-primary);
}
.contact-help {
    color: var(--contact-muted);
}
.preview-page {
    --preview-bg: var(--theme-page-bg);
    --preview-card: var(--theme-surface-bg);
    --preview-border: var(--theme-border);
    --preview-text: var(--theme-text);
    --preview-muted: var(--theme-text-muted);
    background: var(--preview-bg);
    color: var(--preview-text);
}
.preview-brand {
    color: var(--preview-text);
}
.preview-brand:hover {
    color: var(--preview-text);
}
.preview-card {
    background: var(--preview-card);
    border: 1px solid var(--preview-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.preview-demo-card {
    background: var(--preview-card);
    border: 1px solid var(--preview-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.preview-demo-kicker {
    color: var(--theme-primary);
}
.preview-demo-copy p,
.preview-demo-verification-copy p {
    color: var(--preview-muted);
}
.preview-demo-list li::before,
.preview-demo-verification-header i {
    color: var(--theme-success);
}
.preview-demo-verification {
    background: var(--theme-surface-muted);
    border: 1px solid var(--preview-border);
}
.preview-demo-verification-header {
    color: var(--preview-text);
}
.preview-gallery {
    background: var(--preview-card);
    border: 1px solid var(--preview-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.preview-gallery-card {
    background: var(--preview-card);
    border: 1px solid var(--preview-border);
    color: var(--preview-text);
}
.preview-gallery-card:hover {
    border-color: var(--theme-border-primary);
    box-shadow: 0 10px 22px var(--theme-shadow-lg);
}
.preview-gallery-card small {
    color: var(--preview-muted);
}
.preview-section-divider {
    background-color: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
    border-top: 1px solid var(--theme-header-border-strong);
    color: var(--theme-header-text);
}
.front-reset-modal {
    --front-border: var(--theme-border);
    --front-text: var(--theme-text);
}
.front-reset-modal .modal-content {
    border: 1px solid var(--front-border);
    box-shadow: 0 24px 60px var(--theme-shadow-xl);
}
.front-reset-modal .modal-header {
    background: var(--theme-surface-bg);
    border-bottom: 1px solid var(--front-border);
}
.front-reset-modal .modal-title {
    color: var(--front-text);
}
.front-reset-modal .modal-body {
    background: var(--theme-page-bg);
}
.front-reset-modal .modal-footer {
    background: var(--theme-surface-bg);
    border-top: 1px solid var(--front-border);
}
.front-preview-modal-body {
    background: var(--theme-page-bg);
}
.front-preview-slide {
    background: var(--theme-surface-bg);
    border: 1px solid var(--front-border);
}
.front-preview-slide img {
    background: var(--theme-surface-bg);
}
.front-preview-slide-footer {
    background: var(--theme-surface-bg);
    border-top: 1px solid var(--front-border);
}
.front-preview-slide-footer h3 {
    color: var(--front-text);
}
.front-preview-slide-footer p {
    color: var(--front-muted);
}
.front-preview-modal .carousel-control-prev,
.front-preview-modal .carousel-control-next {
    background: var(--theme-surface-bg);
    border: 1px solid var(--theme-front-outline);
    box-shadow: 0 10px 22px var(--theme-shadow-lg-strong);
    color: var(--theme-front-muted-alt);
}
.front-preview-modal .carousel-control-prev:hover,
.front-preview-modal .carousel-control-prev:focus,
.front-preview-modal .carousel-control-next:hover,
.front-preview-modal .carousel-control-next:focus {
    background: var(--theme-front-pill-bg);
    color: var(--theme-front-pill-text);
}
.front-preview-modal .carousel-control-prev-icon,
.front-preview-modal .carousel-control-next-icon {
    background-image: none;
}
.security-page {
    --security-bg: var(--theme-page-bg);
    --security-card: var(--theme-surface-bg);
    --security-border: var(--theme-border);
    --security-text: var(--theme-text);
    --security-muted: var(--theme-text-muted);
    background: var(--security-bg);
    color: var(--security-text);
}
.security-brand {
    color: var(--security-text);
}
.security-media,
.security-panel {
    background: var(--security-card);
    border: 1px solid var(--security-border);
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.security-media-caption {
    color: var(--security-muted);
}
.security-panel-intro {
    color: var(--security-text);
}
.privacy-panel-intro {
    color: var(--privacy-text);
}
.cookies-panel-intro {
    color: var(--cookies-text);
}
.cookies-page .cookie-link {
    color: var(--cookies-text);
}
.privacy-page,
.cookies-page {
    background: var(--content-page-bg, var(--theme-page-bg));
    color: var(--content-page-text, var(--theme-text));
}
.privacy-page {
    --privacy-bg: var(--theme-page-bg);
    --privacy-card: var(--theme-surface-bg);
    --privacy-border: var(--theme-border);
    --privacy-text: var(--theme-text);
    --privacy-muted: var(--theme-text-muted);
    --content-page-bg: var(--privacy-bg);
    --content-page-text: var(--privacy-text);
}
.cookies-page {
    --cookies-bg: var(--theme-page-bg);
    --cookies-card: var(--theme-surface-bg);
    --cookies-border: var(--theme-border);
    --cookies-text: var(--theme-text);
    --content-page-bg: var(--cookies-bg);
    --content-page-text: var(--cookies-text);
}
.privacy-brand,
.cookies-brand {
    color: var(--content-page-text, var(--theme-text));
}
/* SHARED PAGE BRAND HEADERS */
:is(
    .admin-brand,
    .about-brand,
    .contact-brand,
    .preview-brand,
    .create-brand,
    .profile-brand,
    .security-brand,
    .privacy-brand,
    .cookies-brand
) {
    color: var(--admin-text, var(--content-page-text, var(--theme-text)));
}
:is(
    .admin-brand,
    .about-brand,
    .contact-brand,
    .preview-brand,
    .create-brand,
    .profile-brand,
    .security-brand,
    .privacy-brand,
    .cookies-brand
):hover {
    color: var(--admin-text, var(--content-page-text, var(--theme-text)));
}
:is(
    .admin-brand,
    .about-brand,
    .contact-brand,
    .preview-brand,
    .create-brand,
    .profile-brand,
    .security-brand,
    .privacy-brand,
    .cookies-brand
) h1 {
    color: var(--admin-text, var(--content-page-text, var(--theme-text)));
}
.privacy-panel,
.cookies-panel {
    background: var(--content-card-bg, var(--theme-surface-bg));
    border: 1px solid var(--content-border, var(--theme-border));
    box-shadow: 0 8px 20px var(--theme-shadow-md);
}
.privacy-panel {
    --content-card-bg: var(--privacy-card);
    --content-border: var(--privacy-border);
}
.cookies-panel {
    --content-card-bg: var(--cookies-card);
    --content-border: var(--cookies-border);
}
@media (max-width: 768px) {
    .pool-sort-list {
        border-top: 1px solid var(--admin-border);
}
    .pool-sort-value::before {
        color: var(--admin-muted);
}
}
.report-modal-header {
    background: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border-primary);
}
.report-modal-title {
    color: var(--theme-primary-dark);
}

/* HELP GUIDE */
:root {
    --help-page-bg: var(--theme-page-bg);
    --help-text: var(--theme-text);
    --help-muted: var(--theme-text-muted);
    --help-card-bg: var(--theme-surface-bg);
    --help-card-border: var(--theme-border);
    --help-card-shadow: var(--theme-shadow-md);
    --help-soft-bg: var(--theme-surface-muted-bg);
    --help-accent: var(--theme-primary);
    --help-accent-dark: var(--theme-primary-dark);
    --help-mark-bg: var(--theme-warning-soft);
    --help-mark-text: var(--theme-text);
}
.helpquick-toggle,
.helpquick-close {
    background: var(--help-card-bg);
    color: var(--help-accent-dark);
}
.helpquick-toggle {
    border: 1px solid var(--help-card-border);
    box-shadow: 0 8px 18px var(--theme-shadow-lg);
}
.helpquick-toggle:hover,
.helpquick-toggle[aria-expanded="true"],
.helpquick-close:hover {
    background: var(--help-soft-bg);
    color: var(--help-accent);
}
.helpquick-popout {
    background: var(--help-card-bg);
    border: 1px solid var(--help-card-border);
    box-shadow: 0 16px 36px var(--theme-shadow-lg);
    color: var(--help-text);
}
.helpquick-header strong,
.helpquick-result strong {
    color: var(--help-text);
}
.helpquick-search i,
.helpquick-result span,
.helpquick-results p {
    color: var(--help-muted);
}
.helpquick-open {
    color: var(--help-accent-dark);
}
.helpquick-open:hover {
    color: var(--help-accent);
}
.helpquick-result {
    background: var(--help-soft-bg);
    border: 1px solid var(--help-card-border);
}
.helpquick-result:hover {
    border-color: var(--help-accent);
}
.help-page {
    background: var(--help-page-bg);
    color: var(--help-text);
}
.help-sidebar,
.help-intro-card,
.help-topic,
.help-glossary,
.help-print-index {
    background: var(--help-card-bg);
    border: 1px solid var(--help-card-border);
    box-shadow: 0 8px 20px var(--help-card-shadow);
}
.help-search-panel p,
.help-intro-card p,
.help-topic-header p,
.help-figure figcaption,
.help-glossary dd {
    color: var(--help-muted);
}
.help-kicker,
.help-sidebar h2,
.help-topic h2,
.help-glossary h2,
.help-glossary dt {
    color: var(--help-accent-dark);
}
.help-index-link {
    color: var(--help-text);
}
.help-index-link:hover,
.help-index-link:focus {
    background: var(--help-soft-bg);
    color: var(--help-accent-dark);
}
.help-bookmark {
    background: var(--help-soft-bg);
    color: var(--help-accent-dark);
}
.help-figure img,
.help-note,
.help-glossary-entry,
.help-no-results {
    border: 1px solid var(--help-card-border);
}
.help-note,
.help-glossary-entry,
.help-no-results {
    background: var(--help-soft-bg);
}
.help-note strong {
    color: var(--help-accent-dark);
}
mark {
    background: var(--help-mark-bg);
    color: var(--help-mark-text);
}
