*, *::before, *::after{box-sizing:border-box;margin:0;padding:0;}
html, body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);min-height:100%;}

:root{
    --nav-bg:#0f1117;
    --nav-bg-darker:#0f1117;
    --accent:#D00000;
    --accent-soft:#e85a5a;
    --accent-bg:#fceaea;
    --accent-deep:#a31919;     /* darker brand red used on banners and panels */
    --slate:#D00000;           /* banner background - bright brand red */
    --slate-soft:#bb1f1f;
    --text:#1a1a1a;
    --text-mute:#6b7280;
    --text-light:#9ca3af;
    --line:rgba(0,0,0,0.08);
    --bg:#f5f4f2;
    --bg-card:#ffffff;
    /* Lower-level surface colors. Light theme: cool white + warm grey.
       These get overridden by the dark theme below. */
    --bg-soft:#fafaf9;         /* slightly off-white - used for hover, table headers */
    --bg-elev:#ffffff;         /* elevated surfaces - cards, modals */
    --bg-popover:#ffffff;
    --line-strong:rgba(0,0,0,0.18);
    --shadow-card:0 1px 3px rgba(0,0,0,0.04);
    --shadow-modal:0 20px 60px rgba(0,0,0,0.18), 0 6px 20px rgba(0,0,0,0.08);
    --shadow-popover:0 10px 30px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    --chart-grid:rgba(0,0,0,0.05);
    --chart-tick:#6b7280;
    --hover-bg:#fafaf9;
    --bg-input:#ffffff;
    --bg-input-soft:#fafaf9;
}

/* ============================================================
   DARK THEME
   Activated by setting data-theme="dark" on <html>. We
   override the root variables and add a small number of
   selector-specific rules where light-theme styles use
   hard-coded colours that don't read well inverted.

   Palette principles:
     - Background: deep slate (#0f172a), not pure black.
     - Card / elevated surface: one step lighter (#1e293b).
     - Brand red stays exactly the same - visual identity
       is preserved across themes.
     - Text: off-white (#e2e8f0) for readability without
       harsh contrast.
     - Borders: low-opacity white so they read on slate
       without being garish.
   ============================================================ */
html[data-theme="dark"]{
    color-scheme: dark;
    --text:#f1f5f9;            /* slate-100 - high-contrast but not harsh white */
    --text-mute:#cbd5e1;        /* slate-300 - clearly secondary, still legible */
    --text-light:#94a3b8;       /* slate-400 - tertiary info; previously too dim */
    --line:rgba(255,255,255,0.08);
    --line-strong:rgba(255,255,255,0.16);
    --bg:#0f172a;
    --bg-card:#1e293b;
    --bg-soft:#1a2536;
    --bg-elev:#1e293b;
    --bg-popover:#243144;
    /* Brand red toned down for dark mode - same hue family but less
       saturated and slightly deeper, so banners read as a focused
       accent rather than a neon assault. Light mode is unchanged. */
    --slate:#a31919;
    --slate-soft:#8a1515;
    --accent:#cc2222;          /* keep the active-state red bright so toggles still pop */
    --accent-bg:rgba(204,34,34,0.12);
    --shadow-card:0 1px 3px rgba(0,0,0,0.4);
    --shadow-modal:0 20px 60px rgba(0,0,0,0.6), 0 6px 20px rgba(0,0,0,0.4);
    --shadow-popover:0 10px 30px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
    --chart-grid:rgba(255,255,255,0.06);
    --chart-tick:#cbd5e1;
    --hover-bg:#243144;
    --bg-input:#0f172a;
    --bg-input-soft:#1a2536;
}
html[data-theme="dark"] body{background:var(--bg);color:var(--text);}
/* Cards + elevated surfaces */
html[data-theme="dark"] .card, html[data-theme="dark"] .modal-card, html[data-theme="dark"] .lo-card{background:var(--bg-elev);border-color:var(--line);box-shadow:var(--shadow-card);}
html[data-theme="dark"] .modal-card{box-shadow:var(--shadow-modal);}
/* Modal body default text colour - the light-theme rule hard-codes
   #374151 which reads as near-black on the dark modal card. Switch
   to the themed text colour so anything that hasn't explicitly set
   its own color inherits something readable. */
html[data-theme="dark"] .modal-body{color:var(--text);}
/* ...but the legacy stylesheet ALSO has `p, a, li { color:#0f1117 }`, which hard-sets those
   elements directly (so they don't inherit the line above) and they read as near-black on the
   dark card — e.g. the AI "Generate document" dialog's labels. Re-theme them. color-scheme:dark
   also makes the dialog's native <select>/<checkbox> render dark. */
html[data-theme="dark"] .modal-card{color-scheme:dark;}
html[data-theme="dark"] .modal-card .modal-body p, html[data-theme="dark"] .modal-card .modal-body li{color:var(--text);}
/* Ghost-style action button (used as the secondary "Cancel" choice
   on action modals like Clear cache). Light theme: white background
   with dark text. In dark mode that white blob is the most visually
   prominent thing on the modal AND its dark text is unreadable. Flip
   to a dark-friendly surface tone matching the rest of the dark UI. */
html[data-theme="dark"] .btn-action.ghost{background:var(--bg-soft);color:var(--text);border-color:var(--line-strong);}
html[data-theme="dark"] .btn-action.ghost:hover{background:var(--hover-bg);color:var(--text);}
/* Clear cache modal: belt-and-braces dark-mode rules. We've seen
   reports of body text reading as near-black on dark slate in this
   modal specifically, despite the inline styles using var(--text).
   Force every child of the modal body to use themed text and ensure
   ul list markers (disc bullets) get the same treatment as their
   surrounding text. Scoped to #clearCacheModal so we don't disturb
   other modals' specific styling. */
html[data-theme="dark"] #clearCacheModal .modal-body, html[data-theme="dark"] #clearCacheModal .modal-body > div, html[data-theme="dark"] #clearCacheModal .modal-body strong{color:var(--text);}
html[data-theme="dark"] #clearCacheModal .modal-body ul, html[data-theme="dark"] #clearCacheModal .modal-body li{color:var(--text-mute);}
html[data-theme="dark"] #clearCacheModal .modal-body ul::marker, html[data-theme="dark"] #clearCacheModal .modal-body li::marker{color:var(--text-mute);}
/* Modal backdrop slightly darker since the page is already dark */
html[data-theme="dark"] .modal-bg{background:rgba(0,0,0,0.7);}
/* Inputs */
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea, html[data-theme="dark"] .si, html[data-theme="dark"] .fs{background:var(--bg-input-soft) !important;border-color:var(--line-strong) !important;color:var(--text) !important;}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder{color:var(--text-light);opacity:0.8;}
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus{background:var(--bg-input) !important;border-color:var(--accent) !important;}
/* Date inputs - pick the system-rendered controls up too */
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(0.85);}
/* Login overlay matches dark theme */
html[data-theme="dark"] #loginOverlay{background:linear-gradient(135deg,#0f172a 0%,#1a2536 100%);}
html[data-theme="dark"] .lo-card-title{color:var(--text);}
/* Tables */
html[data-theme="dark"] .tbl-wrap table thead th, html[data-theme="dark"] .tbl-wrap thead th, html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) table thead th{background:var(--bg-soft);color:var(--text-mute);border-bottom-color:var(--line);}
html[data-theme="dark"] .tbl-wrap table tbody td, html[data-theme="dark"] .tbl-wrap tbody td, html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) table tbody td{border-bottom-color:var(--line);color:var(--text);}
html[data-theme="dark"] .tbl-wrap tbody tr:hover, html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) table tbody tr:hover{background:var(--hover-bg);}
/* Activity-matrix table - has its own sticky header rules */
html[data-theme="dark"] .aam-tbl thead th{background:var(--bg-soft);}
html[data-theme="dark"] .aam-tbl thead th.aam-row-hd, html[data-theme="dark"] .aam-tbl tbody td.aam-row-hd{background:var(--bg-elev);}
html[data-theme="dark"] .aam-tbl thead th.aam-day-grp{background:#243144;color:var(--text);}
html[data-theme="dark"] .aam-tbl tbody tr.aam-totals td{background:var(--bg-soft);}
html[data-theme="dark"] .aam-detail-tbl thead th{background:var(--bg-soft);color:var(--text-mute);}
html[data-theme="dark"] .aam-detail-tbl tbody tr:hover{background:var(--hover-bg);}
/* Badges - most existing styles work, but a few that use hard-coded
   light backgrounds need adjustment so they read on dark */
html[data-theme="dark"] .bd-grey{background:rgba(255,255,255,0.08);color:#cbd5e1;border-color:rgba(255,255,255,0.12);}
html[data-theme="dark"] .bd-dark{background:rgba(255,255,255,0.12);color:var(--text);border-color:rgba(255,255,255,0.16);}
html[data-theme="dark"] .bd-green{background:rgba(21,128,61,0.18);color:#86efac;border-color:rgba(21,128,61,0.35);}
html[data-theme="dark"] .bd-amber{background:rgba(245,158,11,0.18);color:#fcd34d;border-color:rgba(245,158,11,0.35);}
html[data-theme="dark"] .bd-red{background:rgba(204,34,34,0.18);color:#fca5a5;border-color:rgba(204,34,34,0.35);}
html[data-theme="dark"] .bd-blue{background:rgba(30,95,168,0.18);color:#93c5fd;border-color:rgba(30,95,168,0.35);}
/* Buttons */
html[data-theme="dark"] .btn-tiny{background:#1a2536;color:var(--text);border-color:var(--line-strong);}
html[data-theme="dark"] .btn-tiny:hover{background:#243144;border-color:rgba(255,255,255,0.28);}
html[data-theme="dark"] .btn-tiny.ghost{background:transparent;}
html[data-theme="dark"] .slicer-btn{background:#1a2536;color:var(--text-mute);border-color:var(--line-strong);}
html[data-theme="dark"] .slicer-btn:hover{background:#243144;color:var(--text);}
/* Map mode bar + toggle buttons */
html[data-theme="dark"] .map-mode-bar{background:var(--bg-elev);border-color:var(--line);}
html[data-theme="dark"] .map-mode-btn{background:#1a2536;color:var(--text-mute);border-color:var(--line-strong);}
html[data-theme="dark"] .map-mode-btn:hover{background:#243144;color:var(--text);}
html[data-theme="dark"] .map-mode-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);}
html[data-theme="dark"] .map-mode-label{color:var(--text-mute);}
/* Boundary bar (Areas) */
html[data-theme="dark"] .bdy-bar{background:var(--bg-elev);border-color:var(--line);}
html[data-theme="dark"] .area-multi-btn{background:var(--bg-input-soft);color:var(--text);border-color:var(--line-strong);}
html[data-theme="dark"] .area-multi-btn:hover{border-color:rgba(255,255,255,0.28);}
html[data-theme="dark"] .area-multi-popover{background:var(--bg-popover);border-color:var(--line);box-shadow:var(--shadow-popover);}
html[data-theme="dark"] .area-multi-actions{border-bottom-color:var(--line);}
html[data-theme="dark"] .area-multi-list label{color:var(--text);}
html[data-theme="dark"] .area-multi-list label:hover{background:var(--hover-bg);}
html[data-theme="dark"] .area-multi-list .area-group-hd{color:var(--text-light);}
html[data-theme="dark"] .area-multi-search{border-bottom-color:var(--line);}
html[data-theme="dark"] .area-multi-search input{background:var(--bg-input-soft);border-color:var(--line-strong);color:var(--text);}
html[data-theme="dark"] .area-multi-search input:focus{border-color:var(--accent);}
html[data-theme="dark"] .area-multi-search svg{color:var(--text-light);}
/* Inner tabs */
html[data-theme="dark"] .inner-tab-bar{background:var(--bg-elev);border-bottom-color:var(--line);}
html[data-theme="dark"] .inner-tab{color:var(--text-mute);}
html[data-theme="dark"] .inner-tab:hover{color:var(--text);}
html[data-theme="dark"] .inner-tab.active{color:var(--text);}

/* Filter-overlay popup that appears briefly during heavy filtering */
html[data-theme="dark"] .filter-overlay{background:rgba(15,23,42,0.78);}
html[data-theme="dark"] .filter-overlay .fo-card{background:var(--bg-elev);border-color:var(--line);box-shadow:var(--shadow-modal);}
/* Filter cards on Locations */
html[data-theme="dark"] .loc-filter-card, html[data-theme="dark"] .loc-filter-col{background:var(--bg-elev);}
/* KPI tiles - most use brand red gradient which is fine.
   Slate-coloured stat panels need a darker base. */
html[data-theme="dark" ] .mstat, html[data-theme="dark"] .mstat{background:#243144;}
/* Chart legends, axis labels - Chart.js inherits from CSS where it
   can; the rest is set programmatically (see chart helpers). */
/* Section headers, captions */
html[data-theme="dark"] .card-hd{border-bottom-color:var(--line);}
html[data-theme="dark"] .card-title{color:var(--text);}
html[data-theme="dark"] .card-sub{color:var(--text-mute);}
/* Pager buttons */
html[data-theme="dark"] .pgr-btn{background:#1a2536;color:var(--text);border-color:var(--line-strong);}
html[data-theme="dark"] .pgr-btn:hover{background:#243144;}
html[data-theme="dark"] .pgr-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);}
/* Empty / load states */
html[data-theme="dark"] .empty-state, html[data-theme="dark"] .aam-empty{color:var(--text-mute);}
html[data-theme="dark"] .load-gate{background:var(--bg-elev);}
html[data-theme="dark"] .load-title{color:var(--text);}
html[data-theme="dark"] .load-sub{color:var(--text-mute);}
html[data-theme="dark"] .load-err{background:rgba(204,34,34,0.12);color:#fca5a5;border-color:rgba(204,34,34,0.3);}
/* Warn bar */
html[data-theme="dark"] .warn-bar{background:rgba(245,158,11,0.12);border-color:rgba(245,158,11,0.32);color:#fcd34d;}
/* Activity matrix - heat cells against dark background.
   Brighten the red overlay so it stays visible. */
html[data-theme="dark"] .aam-cell-count{color:var(--text);}
html[data-theme="dark"] .aam-cell-dwell{color:var(--text-mute);}
html[data-theme="dark"] .aam-cell-officers{color:var(--text-light);}
html[data-theme="dark"] .aam-cell-empty{color:#475569;}
/* Export modal choices */
html[data-theme="dark"] .export-choice{background:var(--bg-input-soft);border-color:var(--line-strong);color:var(--text);}
html[data-theme="dark"] .export-choice:hover{background:var(--hover-bg);border-color:var(--accent);}
html[data-theme="dark"] .export-choice-title{color:var(--text);}
html[data-theme="dark"] .export-choice-desc{color:var(--text-mute);}
html[data-theme="dark"] .export-progress{color:var(--text);}
html[data-theme="dark"] .export-progress .ep-spinner{border-color:var(--line);border-top-color:var(--accent);}
html[data-theme="dark"] .export-error{background:rgba(204,34,34,0.12);border-color:rgba(204,34,34,0.3);color:#fca5a5;}
/* Banners stay red on dark - that's intentional, the brand identity
   should anchor the page. The main banner uses var(--slate) which
   stays the same. We just slightly tone down the sub-text contrast. */
html[data-theme="dark"] .banner-sub{color:rgba(255,255,255,0.65);}

/* ============================================================
   DARK MODE - ELEMENT-LEVEL OVERRIDES
   The section above sets CSS-var defaults; this section catches
   every element that uses a hard-coded colour in light theme.
   Without these, anything using `background:#fff` or
   `background:#fafaf9` directly would stay light on dark.
   ============================================================ */

/* All card-like surfaces - KPI tiles, regular cards, slicers,
   alert legend, map mode bar, drawing-area bar, time slicer,
   load gates, file/headline cards. */
html[data-theme="dark"] .kpi, html[data-theme="dark"] .card, html[data-theme="dark"] .slicer, html[data-theme="dark"] .load-gate, html[data-theme="dark"] .alert-legend, html[data-theme="dark"] .map-mode-bar, html[data-theme="dark"] .bdy-bar, html[data-theme="dark"] .alert-detail-section, html[data-theme="dark"] .cg-headline, html[data-theme="dark"] .lo-card{background:var(--bg-elev) !important;border-color:var(--line) !important;}

/* Soft-tone surfaces (slightly off-white in light theme, darker
   slate panel in dark theme): date bar, loaded-range bar, chunk
   list, time slicer, modal meta footer, cohort cell headers. */
html[data-theme="dark"] .date-bar, html[data-theme="dark"] .loaded-range, html[data-theme="dark"] .chunk-list, html[data-theme="dark"] .time-slicer, html[data-theme="dark"] .modal-meta, html[data-theme="dark"] .cohort-stat, html[data-theme="dark"] .lo-render-block, html[data-theme="dark"] .cg-def{background:var(--bg-soft) !important;border-color:var(--line) !important;color:var(--text) !important;}

/* Cohort grid cells - light tint in light theme, slate tint in dark */
html[data-theme="dark"] .cohort-cell{background:var(--bg-elev);color:var(--text);}
html[data-theme="dark"] .cohort-cell.cohort-hd, html[data-theme="dark"] .cohort-cell.cohort-row-hd{background:var(--bg-soft);color:var(--text-mute);}

/* Hover-on-row: light theme uses #fafaf9, must darken in dark mode
   so text stays readable. */
html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) tr:hover td, html[data-theme="dark"] .cg-hotzone-row:hover{background:var(--hover-bg) !important;}

/* Search inputs and select dropdowns - many use background:#fff
   or background:#fafaf9 hard-coded. Override to dark surfaces.
   Also: bump left padding so text never crowds the magnifier icon
   in dark mode (where slightly different rendering can make the
   icon look thicker than in light mode). */
html[data-theme="dark"] .si{
    background-color:var(--bg-input-soft) !important;
    border-color:var(--line-strong) !important;
    color:var(--text) !important;
    padding-left:32px !important;
}
/* The .si search input has an embedded SVG magnifier with grey
   stroke. Brighten it for dark mode so it's visible - and explicitly
   restore no-repeat / position because shorthand resets those when
   we change the image URL. */
html[data-theme="dark"] .si{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23788396' stroke-width='1.8'/%3E%3Cpath d='m16.5 16.5 3.5 3.5' stroke='%23788396' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat:no-repeat !important;
    background-position:10px center !important;
}
html[data-theme="dark"] .fs{
    background:var(--bg-input-soft) !important;
    border-color:var(--line-strong) !important;
    color:var(--text) !important;
}
/* Date inputs in the top date bar */
html[data-theme="dark"] .date-bar input[type=date]{
    background:var(--bg-input-soft) !important;
    border-color:var(--line-strong) !important;
    color:var(--text) !important;
}

/* Time-slicer inputs and quick buttons */
html[data-theme="dark"] .ts-input{background:var(--bg-input-soft);border-color:var(--line-strong);color:var(--text);}
html[data-theme="dark"] .btn-quick{background:var(--bg-input-soft);border-color:var(--line-strong);color:var(--text-mute);}
html[data-theme="dark"] .btn-quick:hover{background:var(--hover-bg);color:var(--text);}

/* Date-range preset buttons (7d / 30d / 90d / 1yr / Refresh) */
html[data-theme="dark"] .date-preset{background:var(--bg-input-soft);border-color:var(--line-strong);color:var(--text-mute);}
html[data-theme="dark"] .date-preset:hover{background:var(--hover-bg);color:var(--text);}
html[data-theme="dark"] .date-preset.active{background:var(--accent);color:#fff;border-color:var(--accent);}
html[data-theme="dark"] .date-preset.custom-active{background:rgba(204,34,34,0.18);color:#fca5a5;border-color:rgba(204,34,34,0.4);}

/* Active-filter strip chips (the row showing "Boundary: X" etc) */
html[data-theme="dark"] .cf-chip{background:var(--bg-elev);border-color:rgba(204,34,34,0.4);color:var(--text);}
html[data-theme="dark"] .cf-strip-clear{background:var(--bg-elev);border-color:var(--line-strong);color:var(--text-mute);}
html[data-theme="dark"] .cf-strip-clear:hover{background:var(--hover-bg);color:var(--text);}

/* Tiny ghost buttons - used for map controls, table action buttons,
   activity matrix back button. */
html[data-theme="dark"] .btn-tiny.ghost{background:transparent !important;}
html[data-theme="dark"] .btn-tiny.ghost:hover{background:rgba(255,255,255,0.06) !important;}

/* Map containers - keep tile bg dark so any unloaded tile gaps
   look intentional rather than blinding white. */
html[data-theme="dark"] .leaflet-container{background:#0a0f1a;}
/* Leaflet popups, attribution, zoom controls */
html[data-theme="dark"] .leaflet-popup-content-wrapper, html[data-theme="dark"] .leaflet-popup-tip{background:var(--bg-elev);color:var(--text);}
html[data-theme="dark"] .leaflet-popup-close-button{color:var(--text);}
html[data-theme="dark"] .leaflet-control-attribution{background:rgba(30,41,59,0.85) !important;color:var(--text-mute) !important;}
html[data-theme="dark"] .leaflet-control-attribution a{color:#93c5fd;}
html[data-theme="dark"] .leaflet-bar a, html[data-theme="dark"] .leaflet-bar a:hover{background:var(--bg-elev);color:var(--text);border-color:var(--line);}

/* Custom chart legends (rendered as .leg-item divs above charts).
   Light theme uses #4b5563; dark mode needs the lighter slate. */
html[data-theme="dark"] .leg-item{color:var(--text-mute);}
html[data-theme="dark"] .leg-item span{color:var(--text-mute);}

/* ============================================================
   DARK MODE - TEXT-COLOUR SWEEP
   Many class definitions hard-code #6b7280 / #9ca3af / #4b5563
   for de-emphasised text (labels, sub-text, captions). On a dark
   slate background these read too dim. Map all of them to the
   theme-aware text-mute / text-light scale.
   ============================================================ */
html[data-theme="dark"] .card-sub, html[data-theme="dark"] .kpi-sub, html[data-theme="dark"] .fn-pct, html[data-theme="dark"] .chunk-info, html[data-theme="dark"] .slicer-count, html[data-theme="dark"] .date-bar-note, html[data-theme="dark"] .load-sub{color:var(--text-light) !important;}
html[data-theme="dark"] .fn-lbl{color:var(--text) !important;}
html[data-theme="dark"] .chunk-range, html[data-theme="dark"] .mono, html[data-theme="dark"] .slicer-lbl, html[data-theme="dark"] .inner-tab{color:var(--text-mute) !important;}
html[data-theme="dark"] .inner-tab.active, html[data-theme="dark"] .inner-tab:hover{color:var(--text) !important;}
/* Date separator arrow between FROM/TO inputs */
html[data-theme="dark"] .date-sep{color:var(--text-light);}
/* Pending/skipped row indicators in the loading gate */
html[data-theme="dark"] .lo-prog-row.pending .lp-ico{background:#243144;color:var(--text-light);}
html[data-theme="dark"] .lo-prog-row .lp-skip{color:var(--text-light);}
html[data-theme="dark"] .chunk-row.pending .chunk-icon{background:#243144;color:var(--text-light);}
/* Done / failed state colours read on slate too - bump green and
   red to lighter shades for legibility */
html[data-theme="dark"] .lo-prog-row.done, html[data-theme="dark"] .chunk-row.done .chunk-info, html[data-theme="dark"] .kpi.kpi-highlight .kpi-val, html[data-theme="dark"] .kpi-up{color:#86efac !important;}
html[data-theme="dark"] .lo-prog-row.failed, html[data-theme="dark"] .chunk-row.failed .chunk-info, html[data-theme="dark"] .lo-err, html[data-theme="dark"] .load-err, html[data-theme="dark"] .cert-alert{color:#fca5a5 !important;}

/* Brighten standardised secondary text classes in dark mode.
   These all use color:#6b7280 hard-coded in light theme, which
   is fine on near-white but reads too dim on slate. */
html[data-theme="dark"] .kpi-lbl, html[data-theme="dark"] .date-bar label, html[data-theme="dark"] .loaded-range, html[data-theme="dark"] .date-preset, html[data-theme="dark"] .refresh-btn, html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) th, html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) table thead th{color:var(--text-mute) !important;}
/* Same for column-data text that uses #6b7280 directly via td styling */
html[data-theme="dark"] :where(body:not(.gs-page-recordings2):not(.gs-mkt)) td{color:var(--text);}
/* Brighten table-cell text colour for any explicit class-based muted
   colouring */
html[data-theme="dark"] .text-mute{color:var(--text-mute) !important;}

/* Brighten hard-coded grey inline-style text in dark mode. Many
   dynamically-built table cells use style="color:#6b7280" or
   "#9ca3af" for de-emphasised data (timestamps, secondary
   references). On a dark slate background these read dim - shift
   them up the slate scale so they're comfortable to scan. */
html[data-theme="dark"] [style*="color:#6b7280"], html[data-theme="dark"] [style*="color: #6b7280"]{color:#cbd5e1 !important;}
html[data-theme="dark"] [style*="color:#9ca3af"], html[data-theme="dark"] [style*="color: #9ca3af"]{color:#94a3b8 !important;}
html[data-theme="dark"] [style*="color:#374151"], html[data-theme="dark"] [style*="color: #374151"]{color:var(--text) !important;}
html[data-theme="dark"] [style*="color:#1a1a1a"], html[data-theme="dark"] [style*="color: #1a1a1a"]{color:var(--text) !important;}
html[data-theme="dark"] [style*="color:#4b5563"], html[data-theme="dark"] [style*="color: #4b5563"]{color:#cbd5e1 !important;}
html[data-theme="dark"] [style*="color:#d1d5db"], html[data-theme="dark"] [style*="color: #d1d5db"]{color:#64748b !important;}

/* ============================================================
   DARK MODE - INLINE-STYLE BACKGROUND SWEEP
   The codebase has dynamically-generated rows and banners that
   hard-code light backgrounds (welfare rows in pink, focus
   banners in cream, the "assigned" count badge in #f3f4f6).
   These read as bright white boxes against dark slate. Map them
   to muted dark-friendly equivalents via attribute selectors so
   we don't have to touch every call site.
   ============================================================ */
/* Welfare-flagged / no-show row tint (was #fff8f8) - shift to a
   low-saturation red tint that reads as "needs attention" without
   blinding against dark slate. */
html[data-theme="dark"] [style*="background:#fff8f8"], html[data-theme="dark"] [style*="background: #fff8f8"]{background:rgba(204,34,34,0.10) !important;}
/* Focus banner / cardiac-area banner (#fff3f3) - same idea, a
   touch more saturated since these are full-width banners that
   need to register as a notification surface. */
html[data-theme="dark"] [style*="background:#fff3f3"], html[data-theme="dark"] [style*="background: #fff3f3"]{background:rgba(204,34,34,0.12) !important;border-color:rgba(204,34,34,0.4) !important;}
/* Overlap warning (cream #fff8eb) - low-sat amber tint. */
html[data-theme="dark"] [style*="background:#fff8eb"], html[data-theme="dark"] [style*="background: #fff8eb"]{background:rgba(245,158,11,0.12) !important;border-color:rgba(245,158,11,0.4) !important;}
/* "Assigned" matrix count badge (#f3f4f6 background) - this is
   the white empty box visible in the Notified column screenshot.
   Shift to a subtle slate tint that still reads as a neutral
   counter pill. */
html[data-theme="dark"] [style*="background:#f3f4f6"], html[data-theme="dark"] [style*="background: #f3f4f6"]{background:rgba(255,255,255,0.08) !important;color:#cbd5e1 !important;border-color:rgba(255,255,255,0.14) !important;}
/* Coloured matrix count badges - same shift to muted dark-mode
   equivalents the rest of the portal uses for the .bd-* classes.
   These are inline styles built by fmtMatrixCount() so we can't
   reach them by class. */
html[data-theme="dark"] [style*="background:#d1fae5"]{background:rgba(21,128,61,0.18) !important;color:#86efac !important;border-color:rgba(21,128,61,0.35) !important;}
html[data-theme="dark"] [style*="background:#fee2e2"]{background:rgba(204,34,34,0.18) !important;color:#fca5a5 !important;border-color:rgba(204,34,34,0.35) !important;}
html[data-theme="dark"] [style*="background:#fef3c7"]{background:rgba(245,158,11,0.18) !important;color:#fcd34d !important;border-color:rgba(245,158,11,0.35) !important;}
html[data-theme="dark"] [style*="background:#dcfce7"]{background:rgba(21,128,61,0.18) !important;color:#86efac !important;border-color:rgba(21,128,61,0.35) !important;}
html[data-theme="dark"] [style*="background:#ede9fe"]{background:rgba(91,33,182,0.20) !important;color:#c4b5fd !important;border-color:rgba(91,33,182,0.40) !important;}
/* List row separators in the alert-detail flyout use #f3f4f6 as
   a border-bottom; bare-eye it shows as a light grey line which
   is fine on light theme but glaring on slate. Hide-soften them. */
html[data-theme="dark"] [style*="border-bottom:0.5px solid #f3f4f6"]{border-bottom-color:rgba(255,255,255,0.08) !important;}

/* Active filter strip (the "ACTIVE FILTERS: Dispatch rule Immediate
   Transport" banner in the cardiac alert map). Was a near-white
   pink in light theme; flip to a dark-friendly red tint. */
html[data-theme="dark"] .cf-strip{background:rgba(204,34,34,0.08) !important;border-color:rgba(204,34,34,0.32) !important;}
html[data-theme="dark"] .cf-chip{background:var(--bg-elev) !important;border-color:rgba(204,34,34,0.32) !important;color:var(--text) !important;}
html[data-theme="dark"] .cf-strip-clear{background:var(--bg-elev) !important;border-color:var(--line-strong) !important;color:var(--text-mute) !important;}
html[data-theme="dark"] .cf-strip-clear:hover{background:var(--accent) !important;color:#fff !important;border-color:var(--accent) !important;}

/* Badge variants missing from the original dark-mode block. The
   teal / dark / purple badges are used for outcomes (On scene,
   Completed, etc.) and read badly with light-theme pastels on
   dark slate. */
html[data-theme="dark"] .bd-teal{background:rgba(13,148,136,0.18) !important;color:#7dd3c8 !important;border-color:rgba(13,148,136,0.35) !important;}
html[data-theme="dark"] .bd-dark{background:rgba(255,255,255,0.10) !important;color:var(--text) !important;border-color:rgba(255,255,255,0.18) !important;}
html[data-theme="dark"] .bd-purple{background:rgba(109,40,217,0.20) !important;color:#c4b5fd !important;border-color:rgba(109,40,217,0.40) !important;}

/* Funnel bar trough - light theme uses #f5f4f2 (warm grey); in
   dark mode the bar fill is brand red on a slate trough. */
html[data-theme="dark"] .fn-wrap{background:rgba(255,255,255,0.06) !important;}

/* Highlighted KPI tile (Cardiac sub-tab "CPR provided", "Defibrillation
   provided", etc.) uses a green-to-white gradient that turns into a
   bright stripe on dark slate. Replace with a low-saturation green-to-
   surface gradient that preserves the "this is a positive metric" cue. */
html[data-theme="dark"] .kpi.kpi-highlight{background:linear-gradient(180deg,rgba(21,128,61,0.18) 0%,var(--bg-elev) 80%) !important;border-color:rgba(21,128,61,0.35) !important;}

/* Chip slicers (team chips, user chips, etc.) - light theme uses
   #f5f4f2 / #eae9e7 hard-coded; we need a dark-mode equivalent. */
html[data-theme="dark"] .chip{background:var(--bg-soft);border-color:var(--line-strong);color:var(--text);}
html[data-theme="dark"] .chip:hover{background:var(--hover-bg);}
/* Active state must beat the base dark-chip rule's specificity
   (which is also class+attr). Using `.chip.chip.active` bumps the
   class count to give a clear win without `!important`. */
html[data-theme="dark"] .chip.chip.active{background:var(--accent);border-color:var(--accent);color:#fff;}
html[data-theme="dark"] .chip.chip.active:hover{background:var(--accent);}
html[data-theme="dark"] .chip:not(.active) .ct{color:var(--text-light);}

/* "Select all" / "Clear" buttons in the team filter */
html[data-theme="dark"] .slicer-btn{background:var(--bg-input-soft);border-color:var(--line-strong);color:var(--text-mute);}
html[data-theme="dark"] .slicer-btn:hover{background:var(--hover-bg);color:var(--text);}

/* Coverage-gap definition card and cell colours that use
   #f1d6d6 / brand-tinted borders */
html[data-theme="dark"] .cg-def{border-color:rgba(204,34,34,0.3);}

/* ============================================================
   LOGIN OVERLAY
   ============================================================ */
#loginOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg,#f5f4f2 0%,#eaeaea 100%);z-index:99999;display:flex;flex-direction:column;}
#loginOverlay.gs-hidden{display:none;}

/* Mirror the logged-in nav exactly */
.lo-nav{background:var(--nav-bg);height:50px;display:flex;align-items:center;padding:0 20px;gap:12px;flex-shrink:0;border-bottom:1px solid var(--nav-bg-darker);}
.lo-nav-brand{font-size:14px;font-weight:600;color:#fff;letter-spacing:0.02em;}
.lo-nav-pipe{width:1px;height:16px;background:rgba(255,255,255,0.15);flex-shrink:0;}
.lo-nav-product{font-size:10.5px;color:rgba(255,255,255,0.55);text-transform:uppercase;letter-spacing:0.08em;}

.lo-body{flex:1;display:flex;align-items:center;justify-content:center;padding:32px 20px;overflow-y:auto;}

.lo-card{background:#fff;border:0.5px solid rgba(0,0,0,0.08);border-radius:14px !important;padding:36px 40px 32px;width:100%;max-width:420px;box-shadow:0 8px 32px rgba(31,39,51,0.08);text-align:center;}
.lo-card-logo{height:54px;width:auto;display:block;margin:0 auto 18px;}
.lo-card-title{font-size:20px;font-weight:600;color:var(--text);margin-bottom:24px;letter-spacing:-0.01em;}
.lo-err{background:var(--accent-bg);border:0.5px solid rgba(204,34,34,0.2);border-radius:6px !important;padding:9px 13px;font-size:12px;color:#a32d2d;margin-bottom:16px;display:none;line-height:1.4;}

/* Per-API progress checklist shown during load */
.lo-prog-list{margin-top:18px;border-top:0.5px solid var(--line);padding-top:16px;display:none;}
.lo-prog-list.visible{display:block;}
.lo-prog-row{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:11.5px;color:var(--text-mute);}
.lo-prog-row .lp-ico{width:16px;height:16px;border-radius:50% !important;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:10px;}
.lo-prog-row.pending .lp-ico{background:#f0eeed;color:#bbb;}
.lo-prog-row.active .lp-ico{background:var(--accent);color:#fff;animation:lspin 0.85s linear infinite;border:none;}
.lo-prog-row.active .lp-ico::after{content:'';width:8px;height:8px;border:1.5px solid #fff;border-top-color:transparent;border-radius:50% !important;animation:lspin 0.85s linear infinite;}
.lo-prog-row.done .lp-ico{background:#15803d;color:#fff;}
.lo-prog-row.done .lp-ico::after{content:'\2713';font-size:10px;font-weight:700;}
.lo-prog-row.failed .lp-ico{background:#a32d2d;color:#fff;}
.lo-prog-row.failed .lp-ico::after{content:'!';font-size:11px;font-weight:700;}
.lo-prog-row.active{color:var(--text);}
.lo-prog-row.done{color:#15803d;}
.lo-prog-row.failed{color:#a32d2d;}
.lo-prog-row .lp-skip{margin-left:auto;font-size:10px;color:#bbb;}

/* Render progress - appears after all APIs are done while we build the
   dashboard. Splitting renders into separate ticks lets the bar advance
   visibly instead of the page going unresponsive on big datasets. */
.lo-render-block{margin-top:14px;padding:14px 14px 12px;background:#fafaf9;border:0.5px solid var(--line);border-radius:8px !important;}
.lo-render-title{font-size:12.5px;font-weight:600;color:var(--text);margin-bottom:8px;display:flex;align-items:center;gap:7px;}
.lo-render-title::before{content:'';width:10px;height:10px;border-radius:50% !important;border:2px solid var(--accent);border-top-color:transparent;animation:lspin 0.85s linear infinite;}
.lo-render-bar{height:6px;background:#eee;border-radius:3px !important;overflow:hidden;}
.lo-render-bar-fill{height:100%;background:var(--accent);transition:width 0.3s ease;}
.lo-render-sub{font-size:10.5px;color:var(--text-mute);margin-top:6px;font-variant-numeric:tabular-nums;min-height:14px;}

/* Filtering overlay - shown over a section while large filter-triggered
   renders run, so the user has feedback rather than thinking the page
   has hung. Sits above whichever element has position:relative. */
.filter-overlay{position:absolute;inset:0;background:rgba(255,255,255,0.78);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:80;display:flex;align-items:center;justify-content:center;border-radius:inherit !important;pointer-events:auto;}
.filter-overlay .fo-card{background:#fff;border:0.5px solid var(--line);border-radius:9px !important;padding:14px 18px;box-shadow:0 6px 24px rgba(0,0,0,0.08);display:flex;align-items:center;gap:11px;font-size:12px;color:var(--text);max-width:90%;}
.filter-overlay .fo-spin{width:14px;height:14px;border:2px solid #eee;border-top-color:var(--accent);border-radius:50% !important;animation:lspin 0.85s linear infinite;flex-shrink:0;}
.filter-overlay .fo-text{font-weight:500;}
.filter-overlay .fo-sub{color:var(--text-mute);font-size:11px;margin-left:6px;font-weight:400;}

.lo-card .lo-prog-list{text-align:left;}

/* ============================================================
   DASHBOARD SHELL
   ============================================================ */
#dashWrap{display:none;}
#dashWrap.gs-visible{display:block;}

.section-bar{background:var(--nav-bg);display:flex;align-items:stretch;padding:0 12px;gap:0;border-bottom:1px solid var(--nav-bg-darker);overflow-x:auto;}
.brand{display:flex;align-items:center;gap:9px;padding:0 12px 0 0;margin-right:8px;border-right:1px solid rgba(255,255,255,0.08);height:46px;flex-shrink:0;}
.brand-logo{height:22px;width:auto;display:block;}
.brand-text{color:#fff;font-size:13px;font-weight:600;letter-spacing:-0.01em;white-space:nowrap;}
@media (max-width: 700px){
    .brand-text{display:none;}
    .brand{padding-right:12px;margin-right:4px;}
}
.section-btn{height:46px;padding:0 12px;background:none;border:none;color:rgba(255,255,255,0.6);font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent;transition:color 0.15s,border-color 0.15s;display:flex;align-items:center;gap:7px;}
.section-btn:hover{color:rgba(255,255,255,0.9);}
.section-btn.active{color:#fff;border-bottom-color:var(--accent);}
.s-pip{width:6px;height:6px;border-radius:50% !important;background:var(--accent);opacity:0;transition:opacity 0.15s;}
.section-btn.active .s-pip{opacity:1;}
/* Theme toggle button. The auto-margin pushes everything from
   here onwards (clear cache + theme toggle) to the right edge of
   the nav. */
.section-btn.theme-btn{color:rgba(255,255,255,0.6);padding:0 12px;}
.section-btn.theme-btn:hover{color:#fff;border-bottom-color:transparent;}
.section-btn.theme-btn svg{display:block;}
.sec-build-pill{display:inline-block;margin-left:7px;padding:1px 7px;border-radius:9px !important;background:rgba(255,255,255,0.12);color:#fff;font-size:9.5px;font-weight:500;letter-spacing:0;text-transform:none;line-height:1.5;animation:pillPulse 1.6s ease-in-out infinite;}
.sec-build-pill-err{background:rgba(255,80,80,0.25);animation:none;}
@keyframes pillPulse{0%,100%{opacity:0.55;}50%{opacity:1;}}

/* ============================================================
   ADVANCED USER MANAGEMENT (AUM)
   - Padlock-prefixed nav tab that requires re-authentication
   - Two flows: bulk onboard from spreadsheet, and bulk
     permission-template apply to an existing team
   ============================================================ */
/* Advanced User Management nav button. Retains the same baseline
   shape as the other section buttons; cookie-based authentication
   means there is no separate locked/unlocked visual treatment. */

/* Page-level warning banner (live data) */
.aum-warn{display:flex;align-items:flex-start;gap:11px;padding:13px 16px;border-radius:9px !important;background:#fef3c7;border:0.5px solid #f59e0b;margin-bottom:16px;}
.aum-warn svg{flex-shrink:0;color:#92400e;margin-top:1px;}
.aum-warn-title{font-size:12.5px;font-weight:600;color:#78350f;margin-bottom:3px;}
.aum-warn-body{font-size:11.5px;color:#78350f;line-height:1.55;}
.aum-warn-body a{color:#78350f;text-decoration:underline;font-weight:500;}
html[data-theme="dark"] .aum-warn{background:rgba(245,158,11,0.14);border-color:rgba(245,158,11,0.4);}
/* Dark mode: keep the icon amber for visual continuity with light mode,
   but use the standard --text variable for body copy. Amber-on-amber
   was technically readable but failed the contrast check; --text against
   the dimmed amber tint reads cleanly. */
html[data-theme="dark"] .aum-warn svg{color:#fcd34d;}
html[data-theme="dark"] .aum-warn-title{color:var(--text);}
html[data-theme="dark"] .aum-warn-body{color:var(--text);}
html[data-theme="dark"] .aum-warn-body a{color:#fcd34d;}

/* Two-up cards for choosing flow */
.aum-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px;}
@media(max-width:1100px){.aum-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:680px){.aum-grid{grid-template-columns:1fr;}}
.aum-flow-card{background:var(--bg-card);border:0.5px solid var(--line);border-radius:11px !important;padding:18px 20px;transition:border-color 0.15s, box-shadow 0.15s;}
.aum-flow-card-hd{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.aum-flow-icon{width:34px;height:34px;border-radius:8px !important;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
html[data-theme="dark"] .aum-flow-icon{background:rgba(204,34,34,0.18);}
.aum-flow-title{font-size:13.5px;font-weight:600;color:var(--text);}
.aum-flow-sub{font-size:11.5px;color:var(--text-mute);margin-top:1px;}
.aum-flow-body{font-size:12px;color:var(--text-mute);line-height:1.6;margin-bottom:12px;}
.aum-flow-actions{display:flex;gap:8px;flex-wrap:wrap;}

/* Inline guidance / info notes */
.aum-note{padding:11px 14px;border-radius:8px !important;background:var(--bg-soft);border:0.5px solid var(--line);font-size:11.5px;color:var(--text-mute);line-height:1.55;margin-bottom:12px;}
.aum-note strong{color:var(--text);}
/* Dark-mode body contrast for .aum-note + .aum-help-list lives in
   the consolidated rule next to .aum-help-list below. */

/* Field rows in the dialogs */
.aum-field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;}
.aum-field label{font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:var(--text-mute);}
.aum-field label .req{color:var(--accent);margin-left:3px;}
.aum-field input[type="text"], .aum-field input[type="password"], .aum-field select{height:34px;padding:0 11px;border:0.5px solid var(--line-strong);border-radius:6px !important;font-size:12.5px;font-family:inherit;color:var(--text);background:var(--bg-input);outline:none;}
.aum-field input:focus, .aum-field select:focus{border-color:var(--accent);}
.aum-field-hint{font-size:11px;color:var(--text-light);margin-top:1px;}

/* Preview / progress table */
.aum-preview-tbl{width:100%;border-collapse:collapse;font-size:12px;}
.aum-preview-tbl thead th{background:var(--bg-soft);position:sticky;top:0;z-index:1;}
.aum-preview-tbl tbody td{vertical-align:top;}
.aum-preview-tbl tbody tr.row-conflict td{background:rgba(245,158,11,0.08);}
.aum-preview-tbl tbody tr.row-invalid td{background:rgba(204,34,34,0.07);}
.aum-preview-tbl tbody tr.row-skip td{opacity:0.55;}
html[data-theme="dark"] .aum-preview-tbl tbody tr.row-conflict td{background:rgba(245,158,11,0.14);}
html[data-theme="dark"] .aum-preview-tbl tbody tr.row-invalid td{background:rgba(204,34,34,0.14);}

/* Status pills inside preview/progress tables */
.aum-pill{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:11px !important;font-size:10.5px;font-weight:500;line-height:1.5;border:0.5px solid transparent;white-space:nowrap;}
.aum-pill-pending{background:var(--bg-soft);color:var(--text-mute);border-color:var(--line);}
.aum-pill-running{background:#e0f2fe;color:#075985;border-color:#bae6fd;}
.aum-pill-ok{background:#dcfce7;color:#166534;border-color:#bbf7d0;}
.aum-pill-skip{background:#f3f4f6;color:#4b5563;border-color:#e5e7eb;}
.aum-pill-warn{background:#fef3c7;color:#92400e;border-color:#fde68a;}
.aum-pill-err{background:#fee2e2;color:#991b1b;border-color:#fecaca;}
html[data-theme="dark"] .aum-pill-pending{background:rgba(255,255,255,0.06);color:#cbd5e1;border-color:rgba(255,255,255,0.12);}
html[data-theme="dark"] .aum-pill-running{background:rgba(56,189,248,0.18);color:#7dd3fc;border-color:rgba(56,189,248,0.35);}
html[data-theme="dark"] .aum-pill-ok{background:rgba(21,128,61,0.18);color:#86efac;border-color:rgba(21,128,61,0.35);}
html[data-theme="dark"] .aum-pill-skip{background:rgba(255,255,255,0.06);color:#94a3b8;border-color:rgba(255,255,255,0.12);}
html[data-theme="dark"] .aum-pill-warn{background:rgba(245,158,11,0.18);color:#fcd34d;border-color:rgba(245,158,11,0.35);}
html[data-theme="dark"] .aum-pill-err{background:rgba(204,34,34,0.18);color:#fca5a5;border-color:rgba(204,34,34,0.35);}

/* Conflict resolver radio toggle inside preview rows */
.aum-resolve{display:inline-flex;background:var(--bg-soft);border:0.5px solid var(--line);border-radius:6px !important;padding:2px;}
.aum-resolve label{font-size:10.5px;padding:3px 8px;border-radius:4px !important;cursor:pointer;color:var(--text-mute);font-weight:500;}
.aum-resolve label:has(input:checked){background:var(--accent);color:#fff;}
.aum-resolve input{display:none;}
html[data-theme="dark"] .aum-resolve{background:#1a2536;border-color:var(--line-strong);}

/* Drop zone */
.aum-drop{border:1.5px dashed var(--line-strong);border-radius:10px !important;padding:24px;text-align:center;background:var(--bg-soft);transition:background 0.15s, border-color 0.15s;cursor:pointer;}
.aum-drop:hover, .aum-drop.dragover{background:var(--accent-bg);border-color:var(--accent);}
.aum-drop-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:4px;}
.aum-drop-sub{font-size:11.5px;color:var(--text-mute);}
.aum-drop input[type="file"]{display:none;}

/* Counters strip above preview */
.aum-counters{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:14px;padding:11px 14px;background:var(--bg-soft);border:0.5px solid var(--line);border-radius:8px !important;}
.aum-counter{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text-mute);}
.aum-counter strong{color:var(--text);font-weight:600;font-size:13px;}
.aum-counter .dot{width:8px;height:8px;border-radius:50% !important;}
.aum-counter .dot.ok{background:#22c55e;}
.aum-counter .dot.warn{background:#f59e0b;}
.aum-counter .dot.err{background:#ef4444;}
.aum-counter .dot.info{background:#3b82f6;}
.aum-counter .dot.mute{background:#9ca3af;}

/* Modal sizing tweaks for AUM dialogs (wider, taller) */
.aum-modal .modal-card{max-width:880px;max-height:88vh;}
.aum-modal-body{padding:18px 22px;overflow-y:auto;flex:1;}
.aum-modal-foot{padding:12px 22px;border-top:0.5px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:var(--bg-soft);border-radius:0 0 12px 12px !important;}
.aum-modal-foot .left{display:flex;gap:8px;flex-wrap:wrap;}
.aum-modal-foot .right{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto;}
html[data-theme="dark"] .aum-modal-foot{background:#1a2536;}

/* Footer progress strip during execution */
.aum-progress-strip{display:flex;align-items:center;gap:10px;flex:1;font-size:12px;color:var(--text-mute);}
.aum-progress-bar{flex:1;height:6px;background:var(--line);border-radius:3px !important;overflow:hidden;min-width:120px;}
.aum-progress-bar-fill{height:100%;background:var(--accent);width:0%;transition:width 0.25s;}
.aum-progress-bar-fill.done{background:#22c55e;}
.aum-progress-bar-fill.stopped{background:#f59e0b;}

/* Stop button - red ghost style */
.aum-stop-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 14px;background:#fff;color:#991b1b;border:0.5px solid #fca5a5;border-radius:6px !important;font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background 0.15s;}
.aum-stop-btn:hover{background:#fee2e2;}
.aum-stop-btn:disabled{opacity:0.4;cursor:not-allowed;}
html[data-theme="dark"] .aum-stop-btn{background:rgba(204,34,34,0.12);color:#fca5a5;border-color:rgba(204,34,34,0.4);}
html[data-theme="dark"] .aum-stop-btn:hover{background:rgba(204,34,34,0.22);}

/* Summary panel shown after run */
.aum-summary{padding:14px 16px;border-radius:9px !important;background:var(--bg-soft);border:0.5px solid var(--line);margin-top:14px;}
.aum-summary-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:8px;display:flex;align-items:center;gap:8px;}
.aum-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:10px;}
.aum-summary-stat{padding:9px 12px;background:var(--bg-card);border:0.5px solid var(--line);border-radius:7px !important;}
.aum-summary-stat-lbl{font-size:10.5px;font-weight:500;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-mute);}
.aum-summary-stat-val{font-size:18px;font-weight:600;color:var(--text);margin-top:2px;}

/* Step pills shown above flow modals */
.aum-steps{display:flex;align-items:center;gap:6px;margin-bottom:16px;flex-wrap:wrap;}
.aum-step{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:14px !important;background:var(--bg-soft);border:0.5px solid var(--line);font-size:10.5px;color:var(--text-mute);font-weight:500;}
.aum-step .num{width:16px;height:16px;border-radius:50% !important;background:var(--line);color:var(--text-mute);display:inline-flex;align-items:center;justify-content:center;font-size:9.5px;font-weight:600;}
.aum-step.done{background:#dcfce7;border-color:#bbf7d0;color:#166534;}
.aum-step.done .num{background:#22c55e;color:#fff;}
.aum-step.active{background:var(--accent-bg);border-color:rgba(204,34,34,0.4);color:var(--accent-deep);}
.aum-step.active .num{background:var(--accent);color:#fff;}
html[data-theme="dark"] .aum-step.done{background:rgba(21,128,61,0.18);border-color:rgba(21,128,61,0.35);color:#86efac;}
html[data-theme="dark"] .aum-step.active{background:rgba(204,34,34,0.18);border-color:rgba(204,34,34,0.4);color:#fca5a5;}
.aum-step-arrow{color:var(--text-light);font-size:11px;}

/* Confirmation summary list */
.aum-confirm-list{max-height:240px;overflow-y:auto;background:var(--bg-soft);border:0.5px solid var(--line);border-radius:8px !important;padding:10px 14px;font-size:12px;line-height:1.7;}
.aum-confirm-list li{display:flex;justify-content:space-between;gap:10px;padding:3px 0;border-bottom:0.5px dashed var(--line);}
.aum-confirm-list li:last-child{border-bottom:none;}
.aum-confirm-list li .nm{color:var(--text);font-weight:500;}
.aum-confirm-list li .em{color:var(--text-mute);font-size:11px;}

/* Failure-reason cell in results */
.aum-fail-reason{font-size:10.5px;color:#991b1b;font-style:italic;}
html[data-theme="dark"] .aum-fail-reason{color:#fca5a5;}

/* Guidance section list */
.aum-help-list{font-size:12px;color:var(--text-mute);line-height:1.7;padding-left:18px;margin:0;}
.aum-help-list li{margin-bottom:4px;}
/* Inline links inside AUM help / note panels. Browser-default link
   colour is a dark blue that's effectively invisible against the
   dark-mode card background, and not great against the light-mode
   tinted card either. The brand accent reads cleanly on both. */
.aum-help-list a, .aum-note a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aum-help-list a:hover, .aum-note a:hover{
  filter: brightness(1.1);
}
/* Dark mode: bump body text contrast so help instructions are
   comfortably readable. Both the list AND each <li> get the
   override -- some browsers don't inherit `color` cleanly when
   the parent is a <ul> and the cascade has touched .aum-note,
   so the more specific selector guarantees the rule lands. */
html[data-theme="dark"] .aum-help-list, html[data-theme="dark"] .aum-help-list li, html[data-theme="dark"] .aum-note{color:var(--text);}

/* AUM input-mode chooser: paste grid vs file upload */
.aum-mode-tabs{display:flex;gap:8px;background:var(--bg-soft);border:0.5px solid var(--line);border-radius:9px !important;padding:4px;margin-bottom:14px;}
.aum-mode-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:11px 13px;border:0.5px solid transparent;border-radius:6px !important;background:transparent;cursor:pointer;font-family:inherit;color:var(--text-mute);transition:background 0.12s, color 0.12s, border-color 0.12s;text-align:center;}
.aum-mode-tab:hover{background:var(--bg-card);color:var(--text);}
.aum-mode-tab.active{background:var(--bg-card);border-color:var(--line-strong);color:var(--text);box-shadow:var(--shadow-card);}
.aum-mode-tab .aum-mode-tab-ico{width:30px;height:30px;border-radius:7px !important;background:var(--bg-soft);color:var(--text-mute);display:flex;align-items:center;justify-content:center;margin-bottom:1px;}
.aum-mode-tab.active .aum-mode-tab-ico{background:var(--accent-bg);color:var(--accent);}
html[data-theme="dark"] .aum-mode-tab.active .aum-mode-tab-ico{background:rgba(204,34,34,0.18);}
.aum-mode-tab-title{font-size:12.5px;font-weight:600;}
.aum-mode-tab-sub{font-size:11px;color:var(--text-mute);font-weight:400;}
.aum-mode-tab.active .aum-mode-tab-sub{color:var(--text-mute);}

/* Editable paste grid */
.aum-grid-wrap{border:0.5px solid var(--line);border-radius:9px !important;background:var(--bg-card);overflow:hidden;}
.aum-grid-toolbar{display:flex;align-items:center;gap:8px;padding:8px 11px;background:var(--bg-soft);border-bottom:0.5px solid var(--line);flex-wrap:wrap;font-size:11.5px;color:var(--text-mute);}
.aum-grid-toolbar .grow{flex:1;}
.aum-grid-tbl-scroll{max-height:340px;overflow:auto;}
.aum-grid-tbl{width:100%;border-collapse:collapse;font-size:12px;}
.aum-grid-tbl thead th{position:sticky;top:0;z-index:1;background:var(--bg-soft);}
.aum-grid-tbl thead th .req{color:var(--accent);margin-left:2px;}
.aum-grid-tbl tbody td{padding:0;border-bottom:0.5px solid var(--line);background:var(--bg-card);}
.aum-grid-tbl tbody td.aum-row-num{padding:6px 8px;color:var(--text-light);font-size:10.5px;text-align:center;width:30px;background:var(--bg-soft);border-right:0.5px solid var(--line);user-select:none;}
.aum-grid-tbl tbody td.aum-row-del{padding:0;width:30px;background:var(--bg-soft);border-right:0.5px solid var(--line);text-align:center;}
.aum-grid-tbl tbody td.aum-row-del button{width:24px;height:24px;border:none;background:none;color:var(--text-light);cursor:pointer;border-radius:4px !important;display:inline-flex;align-items:center;justify-content:center;}
.aum-grid-tbl tbody td.aum-row-del button:hover{background:rgba(204,34,34,0.12);color:var(--accent);}
.aum-grid-cell{display:block;padding:7px 9px;min-height:28px;outline:none;font-size:12px;color:var(--text);font-family:inherit;line-height:1.45;cursor:text;}
.aum-grid-cell:focus{background:var(--accent-bg);box-shadow:inset 0 0 0 1.5px var(--accent);}
html[data-theme="dark"] .aum-grid-cell:focus{background:rgba(204,34,34,0.12);}
.aum-grid-cell:empty::before{content:attr(data-placeholder);color:var(--text-light);pointer-events:none;}
.aum-grid-tbl tbody tr.aum-row-empty td.aum-row-num{color:#cbd5e1;}
.aum-grid-tbl tbody tr.aum-row-empty:hover td.aum-row-del button{color:var(--text-light);}
.aum-grid-foot{padding:9px 11px;border-top:0.5px solid var(--line);background:var(--bg-soft);display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--text-mute);}
.aum-grid-foot .grow{flex:1;}
.aum-grid-paste-hint{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;background:var(--accent-bg);color:var(--accent-deep);border-radius:11px !important;font-size:10.5px;font-weight:500;}
html[data-theme="dark"] .aum-grid-paste-hint{background:rgba(204,34,34,0.16);color:#fca5a5;}
.aum-grid-kbd{display:inline-block;padding:1px 5px;background:var(--bg-card);border:0.5px solid var(--line-strong);border-radius:3px !important;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:10px;color:var(--text);}

.date-bar{background:#fff;border-bottom:0.5px solid var(--line);padding:9px 24px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.date-bar label{font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:0.07em;color:#6b7280;}
.date-bar input[type=date]{height:30px;padding:0 9px;border:0.5px solid rgba(0,0,0,0.18);border-radius:6px !important;font-size:12px;font-family:inherit;color:var(--text);background:#fafaf9;outline:none;}
.date-bar input:focus{border-color:var(--accent);}
.date-preset{height:28px;padding:0 10px;background:#f5f4f2;border:0.5px solid rgba(0,0,0,0.12);border-radius:5px !important;font-size:11px;font-family:inherit;cursor:pointer;color:#6b7280;transition:all 0.12s;}
.date-preset:hover{background:#eae9e7;}
.date-preset.active{background:var(--accent);color:#fff;border-color:var(--accent);}
.date-preset.custom-active{background:#fff3f3;color:#cc2222;border-color:rgba(204,34,34,0.4);font-weight:600;display:inline-flex;align-items:center;gap:4px;cursor:default;}
.date-preset.custom-active::before{content:'';width:5px;height:5px;border-radius:50% !important;background:#cc2222;}
.date-sep{color:#d1d5db;}
.refresh-btn{height:28px;padding:0 11px;background:none;border:0.5px solid rgba(0,0,0,0.14);border-radius:5px !important;font-size:11px;font-family:inherit;cursor:pointer;color:#6b7280;display:flex;align-items:center;gap:5px;transition:all 0.12s;}
.refresh-btn:hover{background:#eae9e7;color:var(--text);}
.refresh-btn svg{width:11px;height:11px;}
/* Disabled state for the date bar - used on Users (where dates are
   meaningless because we always load all-time history). We dim and
   freeze the date inputs + presets but leave the Refresh button
   clickable, since the user may still want to re-fetch the data. */
.date-bar.disabled label, .date-bar.disabled input, .date-bar.disabled .date-preset{opacity:0.5;pointer-events:none;}
.date-bar-note{font-size:10.5px;color:#9ca3af;font-style:italic;margin-left:8px;}
.loaded-range{background:#fafaf9;border-bottom:0.5px solid var(--line);padding:5px 20px;font-size:10.5px;color:#6b7280;display:flex;align-items:center;gap:7px;}
.loaded-range::before{content:'';width:5px;height:5px;border-radius:50% !important;background:#22c55e;flex-shrink:0;}
.loaded-range.empty::before{background:#d1d5db;}
.loaded-range strong{color:var(--text);font-weight:600;}

/* ============================================================
   LOAD GATES
   ============================================================ */
.load-gate{background:#fff;border:0.5px solid var(--line);border-radius:11px !important;padding:48px 32px;text-align:center;margin-bottom:14px;}
.load-gate.gone{display:none;}
.load-spinner{width:40px;height:40px;border:3px solid #f0eeec;border-top-color:var(--accent);border-radius:50% !important;margin:0 auto 14px;animation:lspin 0.75s linear infinite;}
@keyframes lspin{to{transform:rotate(360deg);}}
.load-title{font-size:14px;font-weight:600;color:var(--text);margin-bottom:4px;}
.load-sub{font-size:11.5px;color:#9ca3af;}
.load-prog{width:240px;height:3px;background:#f0eeec;border-radius:2px !important;margin:13px auto 0;overflow:hidden;}
.load-prog-bar{height:100%;background:var(--accent);border-radius:2px !important;transition:width 0.3s;}
.load-heavy{background:#fffbeb;border:0.5px solid rgba(245,158,11,0.2);border-radius:8px !important;padding:11px 14px;margin:13px auto 0;max-width:460px;font-size:11.5px;color:#92600a;line-height:1.5;}
.load-err{background:var(--accent-bg);border:0.5px solid rgba(204,34,34,0.2);border-radius:8px !important;padding:12px 16px;margin:13px auto 0;max-width:480px;font-size:12px;color:#a32d2d;line-height:1.5;display:none;}
.load-action-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 18px;background:var(--accent);color:#fff;border:none;border-radius:6px !important;font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;margin-top:14px;transition:background 0.15s;}
.load-action-btn:hover{background:#aa1a1a;}
.load-action-btn:disabled{background:#e8d0d0;cursor:not-allowed;}

/* Chunk progress (used by hotspot batching) */
.chunk-list{max-width:520px;margin:14px auto 0;text-align:left;background:#fafaf9;border:0.5px solid var(--line);border-radius:8px !important;padding:10px 12px;max-height:240px;overflow-y:auto;}
.chunk-row{display:flex;align-items:center;gap:9px;padding:5px 4px;font-size:11px;border-bottom:0.5px dashed rgba(0,0,0,0.05);}
.chunk-row:last-child{border-bottom:none;}
.chunk-icon{width:14px;height:14px;border-radius:50% !important;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:9px;color:#fff;font-weight:700;}
.chunk-row.pending .chunk-icon{background:#e5e5e5;color:#9ca3af;}
.chunk-row.syncing .chunk-icon{background:var(--accent);}
.chunk-row.syncing .chunk-icon::after{content:'';width:7px;height:7px;border:1.4px solid #fff;border-top-color:transparent;border-radius:50% !important;animation:lspin 0.8s linear infinite;}
.chunk-row.done .chunk-icon{background:#15803d;}
.chunk-row.done .chunk-icon::after{content:'\2713';}
.chunk-row.failed .chunk-icon{background:#a32d2d;}
.chunk-row.failed .chunk-icon::after{content:'!';font-weight:700;}
.chunk-range{font-family:'SF Mono','Fira Mono',monospace;font-size:10.5px;color:#4b5563;flex:1;}
.chunk-info{font-size:10px;color:#9ca3af;}
.chunk-row.syncing .chunk-info{color:var(--accent);font-weight:500;}
.chunk-row.done .chunk-info{color:#15803d;}
.chunk-row.failed .chunk-info{color:#a32d2d;}
.chunk-retry{margin-left:6px;font-size:10px;color:var(--accent);background:none;border:none;cursor:pointer;text-decoration:underline;font-family:inherit;padding:0;}

.data-section{display:none;}
.data-section.visible{display:block;}
.dash-body{padding:18px 20px 50px 20px;}
.psec{display:none;}.psec.active{display:block;}

/* ============================================================
   BANNERS / KPIs / CARDS
   ============================================================ */
.banner{background:var(--slate);border-radius:11px !important;padding:18px 22px;margin-bottom:16px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.banner-title{font-size:18px;font-weight:600;color:#fff;}
.banner-sub{font-size:12px;color:rgba(255,255,255,0.55);margin-top:3px;}
/* Export button sits in the right-hand slot of the banner. We
   bias slightly off the white-on-slate banner palette: a subtle
   white-overlay button on hover, picking up the brand red on
   active states. */
.banner-export{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;background:rgba(255,255,255,0.1);border:0.5px solid rgba(255,255,255,0.18);border-radius:6px !important;color:#fff;font-size:11.5px;font-family:inherit;cursor:pointer;font-weight:500;transition:background 0.12s, border-color 0.12s;}
.banner-export:hover{background:rgba(255,255,255,0.16);border-color:rgba(255,255,255,0.32);}
.banner-export:disabled{opacity:0.4;cursor:not-allowed;}
.banner-export svg{flex-shrink:0;}
/* Lightweight modal styling for the export dialog. We re-use the
   .modal-bg / .modal-card pattern so behaviour matches other
   modals; the export-specific bits live inside. */
.export-choice{display:block;padding:14px 16px;border:0.5px solid var(--line);border-radius:8px !important;cursor:pointer;background:#fff;text-align:left;width:100%;font-family:inherit;color:var(--text);transition:border-color 0.12s, background 0.12s;}
.export-choice + .export-choice{margin-top:10px;}
.export-choice:hover{border-color:var(--accent);background:#fffafa;}
.export-choice-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:4px;}
.export-choice-desc{font-size:11px;color:var(--text-mute);line-height:1.5;}
/* A ping-level export choice disabled because the set exceeds the row
   cap: greyed and non-interactive, but its description still explains why. */
.export-choice:disabled{opacity:0.55;cursor:not-allowed;}
.export-choice:disabled:hover{border-color:var(--line);background:#fff;}
html[data-theme="dark"] .export-choice:disabled:hover{background:var(--bg-input-soft);border-color:var(--line-strong);}
.export-progress{padding:24px 18px;text-align:center;font-size:12px;color:var(--text);}
.export-progress .ep-spinner{width:32px;height:32px;border-radius:50% !important;border:3px solid #f3f2ee;border-top-color:var(--accent);animation:epspin 0.8s linear infinite;margin:0 auto 14px;}
@keyframes epspin{to{transform:rotate(360deg);}}
.export-error{padding:14px 16px;background:#fff4f4;border:0.5px solid rgba(204,34,34,0.25);border-radius:7px !important;color:#a32d2d;font-size:11.5px;line-height:1.55;}
.lpulse{width:6px;height:6px;border-radius:50% !important;background:#22c55e;animation:mpulse 1.4s infinite;}
@keyframes mpulse{0%,100%{opacity:1}50%{opacity:0.4}}

.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:11px;margin-bottom:15px;}
.kpi{background:#fff;border:0.5px solid var(--line);border-radius:10px !important;padding:14px 15px;position:relative;overflow:hidden;}
.kpi::after{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--a,var(--accent));}
.kpi-lbl{font-size:9.5px;font-weight:500;text-transform:uppercase;letter-spacing:0.07em;color:#6b7280;margin-bottom:5px;}
.kpi-val{font-size:26px;font-weight:600;color:var(--text);line-height:1;}
.kpi-sub{font-size:10px;color:#9ca3af;margin-top:5px;}
.kpi-up{font-size:10px;color:#16a34a;margin-top:5px;}
.kpi-dn{font-size:10px;color:var(--accent);margin-top:5px;}

/* highlight tile (cardiac-only "good results") */
.kpi.kpi-highlight{background:linear-gradient(180deg,#dcfce7 0%,#fff 80%);border-color:rgba(21,128,61,0.2);}
.kpi.kpi-highlight::after{background:#15803d;}
.kpi.kpi-highlight .kpi-val{color:#15803d;}

.g2{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:13px;}
.g3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:13px;margin-bottom:13px;}
.g4{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:13px;margin-bottom:13px;}
.g12{display:grid;grid-template-columns:1fr 2fr;gap:13px;margin-bottom:13px;}
.g21{display:grid;grid-template-columns:2fr 1fr;gap:13px;margin-bottom:13px;}
.g31{display:grid;grid-template-columns:3fr 1fr;gap:13px;margin-bottom:13px;}
/* Sortable table column headers */
table th.sortable{cursor:pointer;user-select:none;position:relative;}
table th.sortable:hover{background:#eae9e7;}
table th.sortable .sort-ind{display:inline-block;font-size:8px;color:#9ca3af;margin-left:4px;font-weight:400;width:8px;}
table th.sortable.sort-asc .sort-ind::before{content:'\25B2';color:#cc2222;}
table th.sortable.sort-desc .sort-ind::before{content:'\25BC';color:#cc2222;}

@media(max-width:900px){.g2, .g3, .g4, .g12, .g21, .g31{grid-template-columns:1fr;}}
@media(max-width:700px){
    .banner{padding:14px 16px;}
    .banner-title{font-size:17px;}
    .banner-sub{font-size:11px;}
    .psec{padding:14px 12px;}
    .date-bar{padding:9px 12px;gap:7px;}
    .date-bar label{font-size:9.5px;}
    .preset-btns{order:2;}
    .map-stat-row{grid-template-columns:repeat(2,1fr);}
    .kpi-row{gap:8px;}
    .kpi{padding:10px 11px;}
    .kpi-val{font-size:18px;}
    .card{padding:12px;}
    .card-hd{flex-wrap:wrap;gap:8px;}
    .sr{flex-wrap:wrap;gap:6px;}
    .sr .si{min-width:0;flex:1 1 100%;}
    .tbl-wrap{overflow-x:auto;}
    :where(body:not(.gs-page-recordings2):not(.gs-mkt)) table{font-size:11px;}
    .modal-card{max-height:92vh;border-radius:10px !important;}
}

.card{background:#fff;border:0.5px solid var(--line);border-radius:10px !important;padding:15px 17px;}
.card-hd{margin-bottom:11px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.card-title{font-size:12.5px;font-weight:600;color:var(--text);}
.card-sub{font-size:10.5px;color:var(--text-mute);margin-top:2px;}
.card-actions{display:flex;gap:6px;flex-shrink:0;}
.ch{position:relative;}
.ch140{height:140px;}.ch160{height:160px;}.ch180{height:180px;}.ch200{height:200px;}.ch220{height:220px;}.ch260{height:260px;}.ch320{height:320px;}
.leg{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:8px;}
.leg-item{display:flex;align-items:center;gap:4px;font-size:10.5px;color:#4b5563;}
.leg-dot{width:9px;height:9px;border-radius:2px !important;flex-shrink:0;}

.funnel{display:flex;flex-direction:column;gap:5px;margin-top:6px;}
.fn-row{display:flex;align-items:center;gap:8px;}
.fn-lbl{font-size:10.5px;color:#4b5563;width:140px;flex-shrink:0;text-align:right;}
.fn-wrap{flex:1;background:#f5f4f2;border-radius:3px !important;height:22px;overflow:hidden;}
.fn-bar{height:100%;border-radius:3px !important;display:flex;align-items:center;padding-left:8px;transition:width 0.7s ease;}
.fn-n{font-size:10px;font-weight:600;color:#fff;}
.fn-pct{font-size:10px;color:#9ca3af;width:40px;text-align:right;flex-shrink:0;}

/* ============================================================
   TABLES — ONE master GoodSAM table style for every table in the app.
   th: centred / uppercase / muted (--text-mute) / 10px / 600 / thin --line border.
   td: centred / --text ink / thin --line border / middle. Token-based, so dark
   mode themes automatically. Per-table rules (.aum-preview-tbl, .aum-grid-tbl,
   .aum-utbl, .aam-tbl, .aam-detail-tbl) keep ONLY their FUNCTIONAL bits — sticky +
   its background, dense/zero padding, editable cells, matrix separators, totals
   rows, validation states — and inherit ALL cosmetics from here. Any new table
   auto-matches. gs-mkt (marketing) layout tables excluded; recordings2 uses
   DataTables styled to match.
   ============================================================ */
.tbl-wrap{overflow-x:auto;}
:where(body:not(.gs-page-recordings2):not(.gs-mkt)) table{width:100%;border-collapse:collapse;font-size:11.5px;}
:where(body:not(.gs-page-recordings2):not(.gs-mkt)) th{text-align:center;padding:8px 10px;font-size:10px;color:var(--text-mute);font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:0.5px solid var(--line);white-space:nowrap;}
:where(body:not(.gs-page-recordings2):not(.gs-mkt)) td{text-align:center;padding:8px 10px;color:var(--text);border-bottom:0.5px solid var(--line);vertical-align:middle;}
:where(body:not(.gs-page-recordings2):not(.gs-mkt)) tr:last-child td{border-bottom:none;}
:where(body:not(.gs-page-recordings2):not(.gs-mkt)) tr:hover td{background:var(--bg-soft);}

/* Unified 2026-07-01: EVERY table centred (headers + data) across all dashboard
   pages. All the IN-REPO per-table aligns were set to center directly (general
   th+td above, .aum-preview/.aum-grid/.aum-utbl/.aam-* tables), so there are no
   in-repo deviations left. This rule remains as the single guarantee for what we
   CAN'T edit in-repo — recordings2's tables are DataTables aligned left by the
   cross-origin jquery.dataTables.css — plus it future-proofs any new/dynamic
   table. gs-mkt (marketing) excluded to protect email/footer layout tables. */
body:not(.gs-mkt) th,
body:not(.gs-mkt) td { text-align: center !important; }
.mono{font-family:'SF Mono','Fira Mono',monospace;font-size:10.5px;color:#6b7280;}
.bd{display:inline-block;padding:2px 8px;border-radius:20px !important;font-size:9.5px;font-weight:500;white-space:nowrap;}
.bd-red{background:var(--accent-bg);color:#a32d2d;}
.bd-green{background:#dcfce7;color:#15803d;}
.bd-blue{background:#e6f1fb;color:#185fa5;}
.bd-amber{background:#fef9c3;color:#92600a;}
.bd-grey{background:#f0eeed;color:#6b7280;}
.bd-teal{background:#e0f5f3;color:#0f7a6e;}
.bd-dark{background:#e5e7eb;color:#374151;}
.bd-purple{background:#ede9fe;color:#6d28d9;}

/* ============================================================
   FILTERS / SLICERS
   ============================================================ */
.sr{display:flex;gap:9px;align-items:center;margin-bottom:12px;flex-wrap:wrap;}
.si{flex:1;min-width:180px;height:32px;padding:0 10px 0 30px;border:0.5px solid rgba(0,0,0,0.16);border-radius:6px !important;font-size:12px;font-family:inherit;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23aaa' stroke-width='1.8'/%3E%3Cpath d='m16.5 16.5 3.5 3.5' stroke='%23aaa' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 9px center;outline:none;color:var(--text);}
.si:focus{border-color:var(--accent);}
.fs{height:32px;padding:0 10px;border:0.5px solid rgba(0,0,0,0.16);border-radius:6px !important;font-size:11.5px;font-family:inherit;background:#fff;color:#374151;outline:none;cursor:pointer;}
.fs:focus{border-color:var(--accent);}

/* Chip-style multi-select slicer */
.slicer{background:#fff;border:0.5px solid var(--line);border-radius:9px !important;padding:10px 12px;margin-bottom:11px;}
.slicer-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.slicer-lbl{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.07em;color:#6b7280;}
.slicer-count{font-size:10px;color:#9ca3af;}
.slicer-actions{display:flex;gap:4px;}
.slicer-btn{font-size:10px;color:var(--accent);background:none;border:none;cursor:pointer;font-family:inherit;padding:2px 6px;border-radius:4px !important;}
.slicer-btn:hover{background:var(--accent-bg);}
.slicer-search{margin-bottom:8px;}
.slicer-chips{display:flex;flex-wrap:wrap;gap:5px;max-height:120px;overflow-y:auto;padding:2px;}
/* Combined Locations filter card - team slicer + officer/range
   filters in two columns to eliminate the wasted right-side empty
   space the previous one-card-each layout had. */
.loc-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
@media (max-width:900px){.loc-filter-grid{grid-template-columns:1fr;gap:14px;}}
.loc-filter-col{display:flex;flex-direction:column;}
.loc-filter-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px;}
.loc-filter-title{font-size:10.5px;font-weight:600;color:var(--text-mute);text-transform:uppercase;letter-spacing:0.04em;}
.loc-filter-actions{display:flex;gap:4px;align-items:center;flex-wrap:wrap;}
.chip{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:20px !important;font-size:11px;background:#f5f4f2;border:0.5px solid var(--line);cursor:pointer;color:#4b5563;transition:all 0.12s;user-select:none;}
.chip:hover{background:#eae9e7;}
.chip.active{background:var(--accent);color:#fff;border-color:var(--accent);}
.chip .ct{font-size:9.5px;color:rgba(255,255,255,0.7);margin-left:2px;}
.chip:not(.active) .ct{color:#9ca3af;}

/* ============================================================
   STATUS BARS / WARNINGS
   ============================================================ */
.warn-bar{background:#fffbeb;border:0.5px solid rgba(245,158,11,0.25);border-radius:8px !important;padding:9px 13px;margin-bottom:13px;font-size:11px;color:#92600a;display:flex;align-items:flex-start;gap:8px;line-height:1.5;}
.cert-alert{background:var(--accent-bg);border:0.5px solid rgba(204,34,34,0.2);border-radius:8px !important;padding:9px 13px;margin-bottom:13px;font-size:11px;color:#a32d2d;display:flex;align-items:center;gap:8px;}

/* ============================================================
   INNER TABS (sub-sections)
   ============================================================ */
.inner-tab-bar{display:flex;gap:0;border-bottom:0.5px solid var(--line);margin-bottom:13px;background:#fff;border-radius:10px 10px 0 0 !important;padding:0 14px;overflow-x:auto;}
.inner-tab{height:42px;padding:0 16px;background:none;border:none;font-size:12px;font-weight:500;font-family:inherit;color:#6b7280;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;transition:color 0.15s,border-color 0.15s;display:flex;align-items:center;gap:6px;}
.inner-tab:hover{color:var(--text);}
.inner-tab.active{color:var(--accent);border-bottom-color:var(--accent);}
.inner-tab .ic{width:13px;height:13px;}

/* ============================================================
   MAPS
   ============================================================ */
#locationMap, #alertMap, #coverageMap{width:100%;height:480px;border-radius:9px !important;border:0.5px solid var(--line);}
#alertMap.full, #coverageMap.full{height:560px;}
#coverageMap{height:560px;}
/* Response time funnel - stacked horizontal bar drawn as plain DOM
   (Chart.js stacked horizontal bars look chartjs-y; a hand-rolled
   div bar reads as data, not as decoration). Each stage shows
   median + p90 with the median rendered as the solid bar and the
   p90 rendered as a light-tinted extension to its right. */
.stage-bar-block{display:flex;flex-direction:column;gap:11px;padding:8px 0 4px;}
.stage-bar-row{display:grid;grid-template-columns:160px 1fr 100px;gap:14px;align-items:center;}
.stage-bar-label{font-size:11.5px;color:var(--text);font-weight:600;}
.stage-bar-track{position:relative;height:22px;background:var(--bg-soft);border-radius:6px !important;overflow:hidden;}
.stage-bar-median{position:absolute;left:0;top:0;bottom:0;background:var(--accent);border-radius:6px 0 0 6px !important;}
.stage-bar-p90{position:absolute;top:0;bottom:0;background:rgba(204,34,34,0.18);}
.stage-bar-axis{position:absolute;left:0;right:0;bottom:-14px;display:flex;justify-content:space-between;font-size:9.5px;color:#9ca3af;}
.stage-bar-vals{font-size:11px;color:var(--text-mute);text-align:right;font-variant-numeric:tabular-nums;}
.stage-bar-vals strong{color:var(--text);font-weight:600;}
.stage-legend{display:flex;gap:14px;font-size:10.5px;color:var(--text-mute);margin-top:14px;align-items:center;justify-content:flex-end;}
.stage-legend-swatch{display:inline-block;width:12px;height:10px;border-radius:3px !important;margin-right:5px;vertical-align:-1px;}
/* Cohort retention grid */
.cohort-grid{display:grid;gap:1px;background:#e5e7eb;border-radius:6px !important;overflow:hidden;font-variant-numeric:tabular-nums;}
/* Coverage Gaps explainer panel - sits above the map controls and
   tells the user, in plain English, what they're looking at. */
.cg-explainer{display:flex;gap:14px;align-items:flex-start;background:var(--bg-card);border:0.5px solid var(--line);border-left:3px solid var(--accent);border-radius:8px !important;padding:14px 16px;margin-bottom:11px;}
.cg-explainer-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:34px;height:34px;background:rgba(204,34,34,0.10);border-radius:50% !important;}
.cg-explainer-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:5px;}
.cg-explainer-text{font-size:11.5px;line-height:1.6;color:var(--text);}
.cg-explainer-defs{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:11px;margin-top:11px;}
.cg-def{display:flex;gap:9px;align-items:flex-start;background:var(--bg-soft);padding:10px 11px;border-radius:7px !important;border:0.5px solid var(--line);}
.cg-def-pip{flex-shrink:0;width:11px;height:11px;border-radius:50% !important;margin-top:3px;}
.cg-def-title{font-size:11.5px;font-weight:700;color:var(--text);margin-bottom:2px;}
.cg-def-body{font-size:11px;line-height:1.45;color:var(--text);}
/* Headline KPI tile sitting above the smaller secondary tiles */
.cg-headline{background:var(--bg-card);border:0.5px solid var(--line);border-left:4px solid var(--accent);border-radius:8px !important;padding:14px 18px;margin-bottom:9px;}
.cg-headline-num{font-size:30px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-0.5px;line-height:1;}
.cg-headline-lbl{font-size:11px;color:var(--text-mute);text-transform:uppercase;letter-spacing:0.06em;margin-top:4px;}
.cg-headline-explain{font-size:11.5px;color:var(--text);margin-top:8px;line-height:1.45;}
/* Clickable hot-zone rows. Whole row is the click target - a subtle
   hover tint makes that obvious without shouting. */
.cg-hotzone-row{cursor:pointer;transition:background 0.12s ease;}
.cg-hotzone-row:hover{background:var(--hover-bg);}
.cg-hotzone-row td{vertical-align:top;}
/* Category-toggle buttons in the controls bar - each carries a
   coloured pip matching the gap type's marker colour, so the link
   between control and visualisation is visible. */
.cg-cat-btn{display:inline-flex;align-items:center;gap:6px;}
.cg-btn-pip{display:inline-block;width:8px;height:8px;border-radius:50% !important;flex-shrink:0;}
.cohort-cell{background:#fff;padding:7px 8px;font-size:10.5px;text-align:center;color:#374151;}
.cohort-cell.cohort-hd{background:#fafaf9;font-weight:600;color:#6b7280;font-size:9.5px;text-transform:uppercase;letter-spacing:0.04em;}
.cohort-cell.cohort-row-hd{background:#fafaf9;font-weight:600;color:#374151;text-align:left;font-size:11px;letter-spacing:0;text-transform:none;}
.cohort-cell.cohort-empty{background:#f9f9f8;color:#d1d5db;}
/* "No dispatch data" cell - reachable past month for the cohort, but
   the loaded dispatch window doesn't cover it. We use diagonal hatching
   so it's visually distinct from "future month" empty cells AND from
   "0% retention" coloured cells, making it obvious at a glance which
   cells the analysis can't speak to. */
.cohort-cell.cohort-nodata{background-image:repeating-linear-gradient(45deg, #f5f5f4 0 4px, #ebebe9 4px 8px);color:#9ca3af;cursor:help;}
.cohort-cell.cohort-data{cursor:default;font-weight:500;}
/* Cohort summary headline - sits above the grid and tells the user
   the takeaway in plain English. The grid is supporting detail. */
.cohort-headline{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-top:4px;}
.cohort-stat{background:#fafaf9;border:0.5px solid var(--line);border-radius:8px !important;padding:13px 15px;}
.cohort-stat-num{font-size:24px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-0.4px;line-height:1.1;}
.cohort-stat-lbl{font-size:10px;color:#6b7280;text-transform:uppercase;letter-spacing:0.06em;margin-top:5px;font-weight:600;}
.cohort-stat-sub{font-size:10.5px;color:#6b7280;margin-top:4px;line-height:1.4;}
/* Tile states for low-data scenarios. cohort-stat-nodata = the
   metric can't be computed at all from the loaded data; the number
   itself is "-". cohort-stat-lowconf = the metric is computable but
   based on too few responders to be reliable; the number is shown
   but greyed out. Both states make the tile visually recede so the
   user reads the high-confidence tiles first. */
.cohort-stat.cohort-stat-nodata{background:repeating-linear-gradient(45deg, #f5f5f4 0 6px, #ebebe9 6px 12px);}
.cohort-stat.cohort-stat-nodata .cohort-stat-num{color:#9ca3af;}
.cohort-stat.cohort-stat-lowconf{background:#f5f5f4;}
.cohort-stat.cohort-stat-lowconf .cohort-stat-num{color:#9ca3af;}
.cohort-stat.cohort-stat-lowconf .cohort-stat-sub{color:#92400e;}
.cohort-takeaway{background:#fffafa;border-left:3px solid var(--accent);padding:11px 14px;border-radius:6px !important;margin-top:11px;font-size:11.5px;line-height:1.55;color:#374151;}
.cohort-takeaway strong{color:#1a1a1a;}
/* Scope banner above the cohort tiles - explains which users and
   which dispatch window the analysis is based on. Spans full width
   of the headline grid. */
.cohort-scope{grid-column:1/-1;background:#f9fafb;border:0.5px solid #e5e7eb;border-radius:7px !important;padding:10px 13px;font-size:11.5px;line-height:1.55;color:#374151;}
.cohort-scope strong{color:#1a1a1a;}
/* Alerts Matrix detail flyout - appears as an expanded row beneath a
   matrix entry, showing assigned/accepted/rejected/etc. lists with
   timestamps. The grid arranges sections in two columns on wider
   screens so the flyout doesn't take excessive vertical room. */
.alert-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px 22px;}
.alert-detail-section{background:var(--bg-elev);border:0.5px solid var(--line);border-radius:6px !important;padding:10px 12px;}
.alert-detail-heading{font-size:11px;font-weight:600;color:var(--text-mute);margin-bottom:7px;text-transform:uppercase;letter-spacing:0.04em;display:flex;align-items:center;gap:7px;}
.map-controls{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:10px;align-items:center;}
.map-stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:10px;}
.mstat{background:var(--slate);border-radius:8px !important;padding:11px 13px;}
.mstat-lbl{font-size:9.5px;color:rgba(255,255,255,0.55);text-transform:uppercase;letter-spacing:0.07em;margin-bottom:3px;}
.mstat-val{font-size:20px;font-weight:600;color:#fff;}
.mstat-sub{font-size:9.5px;color:rgba(255,255,255,0.5);margin-top:2px;}
/* Area activity matrix - small heatmap-style cells. Top row has
   bucket labels (date / shift / hour), left column has area names.
   Cells show count (bold) and dwell time (smaller, muted). The
   background intensity is tied to dwell time so eyes scan to the
   busiest cells naturally. */
.aam-tbl{border-collapse:separate;border-spacing:0;font-size:11.5px;width:100%;}
.aam-tbl th, .aam-tbl td{padding:7px 9px;border-bottom:0.5px solid var(--line);}
.aam-tbl thead th{background:var(--bg-soft);position:sticky;top:0;z-index:1;}
.aam-tbl thead th.aam-row-hd, .aam-tbl tbody td.aam-row-hd{text-align:center;background:#fff;position:sticky;left:0;z-index:2;border-right:0.5px solid var(--line);min-width:160px;max-width:240px;}
.aam-tbl thead th.aam-row-hd{z-index:3;}
.aam-tbl tbody td.aam-row-hd{font-weight:500;color:var(--text);}
.aam-tbl thead th.aam-day-grp{border-bottom:0.5px solid var(--line);font-size:10.5px;color:var(--text);background:#f3f2ee;}
.aam-tbl tbody td.aam-cell{text-align:center;vertical-align:middle;line-height:1.3;cursor:default;}
.aam-tbl tbody td.aam-cell.aam-clickable{cursor:pointer;}
.aam-tbl tbody td.aam-cell.aam-clickable:hover{outline:2px solid var(--accent);outline-offset:-2px;}
/* Visual day separator - applied to cells/headers that sit on the
   right edge of a day's worth of buckets. Subtle but distinct. */
.aam-tbl th.aam-day-end, .aam-tbl td.aam-day-end{border-right:1.5px solid #d1d5db;}
.aam-tbl tbody td.aam-cell:hover{outline:1px solid rgba(204,34,34,0.4);outline-offset:-1px;}
.aam-cell-count{font-weight:600;color:var(--text);font-size:12.5px;}
.aam-cell-dwell{font-size:10px;color:var(--text-mute);margin-top:1px;}
.aam-cell-officers{font-size:9.5px;color:#94a3b8;margin-top:1px;font-weight:500;}
/* Detail table inside the cell-click modal - slightly tighter
   typography than the matrix itself, with the "Counts as" badge
   column right-aligned. */
.aam-detail-tbl{width:100%;border-collapse:collapse;font-size:11.5px;}
.aam-detail-tbl thead th{position:sticky;top:0;z-index:1;background:var(--bg-soft);}
.aam-detail-tbl th.num, .aam-detail-tbl td.num{font-variant-numeric:tabular-nums;}
.aam-detail-tbl tfoot td{padding:10px 12px;border-top:0.5px solid var(--line);}
/* Daily-totals "Total" row - sits in the tfoot. The acc/rej cells
   carry semantic colours that need theme-appropriate variants. */
.aam-detail-tbl tfoot tr.aam-detail-total td{background:var(--bg-soft);font-weight:600;color:var(--text);}
.aam-detail-tbl tfoot tr.aam-detail-total td.aam-detail-total-acc{color:#15803d;}
.aam-detail-tbl tfoot tr.aam-detail-total td.aam-detail-total-rej{color:#cc2222;}
html[data-theme="dark"] .aam-detail-tbl tfoot tr.aam-detail-total td.aam-detail-total-acc{color:#86efac;}
html[data-theme="dark"] .aam-detail-tbl tfoot tr.aam-detail-total td.aam-detail-total-rej{color:#fca5a5;}
/* Per-row semantic colour cells - adapt to dark theme. */
.aam-detail-tbl td.num-acc{color:#15803d;}
.aam-detail-tbl td.num-rej{color:#cc2222;}
html[data-theme="dark"] .aam-detail-tbl td.num-acc{color:#86efac;}
html[data-theme="dark"] .aam-detail-tbl td.num-rej{color:#fca5a5;}
.aam-detail-tbl tbody tr:hover{background:#fafaf9;}
.aam-detail-tbl tbody tr:last-child td{border-bottom:none;}
.aam-cell-empty{color:#cbd5e1;font-size:13px;line-height:1;}
.aam-tbl tbody tr.aam-totals td{background:#f7f6f3;font-weight:600;border-top:0.5px solid var(--line);}
.aam-tbl tbody tr.aam-totals td.aam-row-hd{font-weight:600;color:var(--text);}
.aam-empty{padding:30px 18px;text-align:center;color:var(--text-mute);font-size:11.5px;}
.aam-back-btn{margin-bottom:10px;}

/* Cardiac alert map legend */
.alert-legend{display:flex;flex-wrap:wrap;gap:9px;background:var(--bg-card);border:0.5px solid var(--line);border-radius:8px !important;padding:10px 13px;margin-bottom:11px;align-items:center;}
/* Map mode toggle bar - sits above alert map / hotspot map. Lets the
   user switch between clustered, individual markers, and heatmap, plus
   between sampled and full data coverage. */
.map-mode-bar{display:flex;flex-wrap:wrap;gap:13px;background:#fff;border:0.5px solid var(--line);border-radius:8px !important;padding:9px 12px;margin-bottom:8px;align-items:center;}
/* Native fullscreen styling. Browsers in fullscreen mode automatically
   make the target fill the viewport, but the dimensions need a hint
   for Leaflet maps which would otherwise stay at their original size.
   The :fullscreen pseudo-class targets the element that's currently
   in native fullscreen. */
:fullscreen{width:100vw !important;height:100vh !important;border-radius:0 !important;border:none !important;}
:-webkit-full-screen{width:100vw !important;height:100vh !important;border-radius:0 !important;border:none !important;}
:-ms-fullscreen{width:100vw !important;height:100vh !important;border-radius:0 !important;border:none !important;}
/* CSS fallback fullscreen - used when the native API isn't supported
   or rejects (older browsers, sandboxed iframes, etc). The map
   element gets fixed positioning over the viewport, and a small
   close button is added to the top-right. */
.map-expanded-fallback{position:fixed !important;inset:0 !important;width:100vw !important;height:100vh !important;border-radius:0 !important;border:none !important;z-index:10000 !important;background:#fff;}
.map-expanded-close{position:absolute;top:14px;right:14px;z-index:10001;width:36px;height:36px;border-radius:8px !important;background:rgba(255,255,255,0.95);border:0.5px solid rgba(0,0,0,0.18);cursor:pointer;color:#374151;font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(0,0,0,0.18);font-family:inherit;font-weight:300;}
.map-expanded-close:hover{background:#fff;color:#111;}
.map-mode-label{font-size:10.5px;font-weight:600;color:var(--text-mute);text-transform:uppercase;letter-spacing:0.04em;}
.map-mode-group{display:inline-flex;border:0.5px solid var(--line);border-radius:7px !important;overflow:hidden;}
.map-mode-btn{background:#fff;color:var(--text-mute);border:0;padding:6px 11px;font-size:11.5px;cursor:pointer;border-right:0.5px solid var(--line);transition:background 0.15s, color 0.15s;}
.map-mode-btn:last-child{border-right:0;}
.map-mode-btn:hover{background:#f9f9f8;color:var(--text);}
.map-mode-btn.active{background:var(--accent);color:#fff;}
.map-mode-btn.active:hover{background:var(--accent);color:#fff;}
/* Time slicer for hotspot map. Sits below the layer toggles, lets the
   user manipulate which loaded pings are shown without re-fetching. */
.time-slicer{background:#fafaf9;border:0.5px solid var(--line);border-radius:8px !important;padding:9px 12px;margin-bottom:8px;}
.ts-input{font-family:inherit;font-size:11.5px;padding:5px 8px;border:0.5px solid var(--line);border-radius:6px !important;background:#fff;color:var(--text);}
.ts-input:focus{outline:none;border-color:var(--accent);}
.btn-quick{background:#fff;border:0.5px solid var(--line);border-radius:6px !important;padding:3px 9px;font-size:10.5px;cursor:pointer;color:var(--text-mute);}
.btn-quick:hover{background:#f9f9f8;color:var(--text);}
/* Custom boundary toolbar */
.bdy-bar{display:flex;flex-wrap:wrap;gap:7px;align-items:center;background:#fff;border:0.5px solid var(--line);border-radius:8px !important;padding:8px 12px;margin-bottom:8px;position:relative;z-index:1000;}
.bdy-bar .fs{min-width:170px;}
/* Multi-area selector - a button-styled trigger that mimics a select
   element, plus a popover that holds checkboxes. Width is constrained
   by the wrapper; the popover anchors below the button. */
.area-multi-btn{height:28px;padding:0 11px;background:#fff;border:0.5px solid rgba(0,0,0,0.18);border-radius:5px !important;font-size:11.5px;font-family:inherit;cursor:pointer;color:var(--text);display:flex;align-items:center;gap:7px;width:100%;text-align:left;transition:border-color 0.12s;}
.area-multi-btn:hover{border-color:rgba(0,0,0,0.32);}
.area-multi-btn:focus{outline:none;border-color:var(--accent);}
.area-multi-popover{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1100;background:#fff;border:0.5px solid var(--line);border-radius:7px !important;box-shadow:0 10px 30px rgba(0,0,0,0.12),0 2px 6px rgba(0,0,0,0.06);max-height:380px;display:flex;flex-direction:column;}
.area-multi-actions{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:0.5px solid var(--line);}
.area-multi-list{overflow-y:auto;padding:4px 0;}
.area-multi-list .area-group-hd{padding:8px 14px 4px;font-size:9.5px;color:#9ca3af;text-transform:uppercase;letter-spacing:0.06em;font-weight:600;}
.area-multi-list label{display:flex;align-items:center;gap:8px;padding:6px 14px;font-size:11.5px;color:var(--text);cursor:pointer;}
.area-multi-list label:hover{background:#fafaf9;}
.area-multi-list input[type="checkbox"]{margin:0;cursor:pointer;}
.area-multi-list .area-empty{padding:10px 14px;font-size:11px;color:#9ca3af;font-style:italic;}
/* Search input inside the area-multi popover. Sits between the
   action row and the scrolling list so it stays visible as the
   user scrolls long region lists (hundreds of items after a UK
   parish shapefile import). */
.area-multi-search{position:relative;padding:6px 10px 8px;border-bottom:0.5px solid var(--line);display:flex;align-items:center;}
.area-multi-search svg{position:absolute;left:18px;top:50%;transform:translateY(-50%);color:#9ca3af;pointer-events:none;}
.area-multi-search input{width:100%;padding:6px 10px 6px 28px;border:0.5px solid rgba(0,0,0,0.18);border-radius:5px !important;font-size:11.5px;font-family:inherit;color:var(--text);background:var(--bg-input,#fff);outline:none;transition:border-color 0.12s;}
.area-multi-search input:focus{border-color:var(--accent);}
.area-multi-list .area-row-hidden{display:none;}
.area-multi-list .area-group-hd.group-empty{display:none;}
.btn-tiny.ghost{background:#fff;}
/* When the user is actively drawing, give the map a subtle red ring so
   they know they're in draw mode. */
.locmap-drawing #locationMap{box-shadow:0 0 0 3px rgba(204,34,34,0.3);}
/* The drawn boundary outline itself */
.bdy-poly{stroke:#cc2222;stroke-width:2.5;fill:#cc2222;fill-opacity:0.08;stroke-dasharray:6,4;}
/* Active filter strip on the cardiac alert map. Always visible when at
   least one filter (area or dispatch rule) is applied. Each chip has a
   small x to clear that filter; the trailing button clears everything. */
.cf-strip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 12px;margin-bottom:8px;background:#fff8f8;border:0.5px solid rgba(204,34,34,0.25);border-radius:8px !important;}
.cf-strip-label{font-size:10.5px;font-weight:600;color:#cc2222;text-transform:uppercase;letter-spacing:0.04em;}
.cf-chip{display:inline-flex;align-items:center;gap:7px;padding:4px 10px;background:#fff;border:0.5px solid rgba(204,34,34,0.3);border-radius:99px !important;font-size:11.5px;color:var(--text);}
.cf-chip-label{font-size:10px;text-transform:uppercase;color:#9ca3af;letter-spacing:0.04em;}
.cf-chip button{background:transparent;border:0;color:#9ca3af;cursor:pointer;font-size:14px;line-height:1;padding:0 0 0 4px;}
.cf-chip button:hover{color:var(--accent);}
.cf-strip-clear{margin-left:auto;background:#fff;border:0.5px solid var(--line);border-radius:6px !important;padding:4px 10px;font-size:11px;cursor:pointer;color:var(--text-mute);}
.cf-strip-clear:hover{background:var(--accent);color:#fff;border-color:var(--accent);}
.alert-legend-title{font-size:10px;text-transform:uppercase;letter-spacing:0.07em;color:var(--text-mute);margin-right:4px;}
.alert-legend-item{display:flex;align-items:center;gap:5px;font-size:10.5px;color:var(--text);}
.alert-legend-dot{width:11px;height:11px;border-radius:50% !important;border:1.5px solid var(--bg-card);box-shadow:0 0 0 1px rgba(0,0,0,0.15);}

/* In-map legend control rendered by Leaflet's L.control (bottom-left).
   Two swatches: solid accent for home alerts, dashed grey ring for
   third-party. Only shown when the include-third-party toggle is on
   AND there's at least one third-party marker. Uses theme variables
   so dark mode is automatic. */
.alert-map-legend{
  background:var(--bg-card);
  border:0.5px solid var(--line);
  border-radius:6px !important;
  padding:7px 10px;
  font-size:10.5px;
  color:var(--text);
  box-shadow:0 1px 3px rgba(0,0,0,0.18);
  line-height:1.5;
}
.alert-map-legend-row{display:flex;align-items:center;gap:7px;}
.alert-map-legend-swatch{width:11px;height:11px;border-radius:50% !important;flex-shrink:0;display:inline-block;}
.alert-map-legend-swatch.home{background:var(--accent);}
.alert-map-legend-swatch.third-party{
  background:transparent;
  border:1.5px dashed #6b7280;
}
html[data-theme="dark"] .alert-map-legend-swatch.third-party{
  border-color:#9ca3af;
}

.btn-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 14px;background:var(--accent);color:#fff;border:none;border-radius:6px !important;font-size:12px;font-weight:500;font-family:inherit;white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background 0.15s;}
.btn-action:hover{background:#aa1a1a;}
.btn-action.ghost{background:#fff;color:#374151;border:0.5px solid rgba(0,0,0,0.14);}
.btn-action.ghost:hover{background:#f5f4f2;}
.empty-state{text-align:center;padding:32px;color:#9ca3af;font-size:12px;}
/* Chart empty-state (feedback): mirrors the table's "No regions in this
   filter" message so an empty chart card reads the same as an empty
   table card instead of leaving a blank box. Absolute overlay so the
   canvas stays in the DOM for the next populated render (.ch is
   position:relative). */
.ch-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:16px;color:#9ca3af;font-size:12px;}
html[data-theme="dark"] .ch-empty{color:var(--text-mute);}

/* Modal for message content viewing */
.modal-bg{position:fixed;inset:0;background:rgba(15,20,30,0.55);z-index:9999;display:none;align-items:center;justify-content:center;padding:20px;}
.modal-bg.visible{display:flex;}
.modal-card{background:#fff;border-radius:12px !important;max-width:680px;width:100%;max-height:92vh;display:flex;flex-direction:column;box-shadow:0 20px 50px rgba(0,0,0,0.3);}
.modal-hd{padding:18px 22px;border-bottom:0.5px solid var(--line);display:flex;align-items:center;justify-content:space-between;}
.modal-title{font-size:14px;font-weight:600;color:var(--text);}
.modal-sub{font-size:11px;color:var(--text-mute);margin-top:2px;}
.modal-close{width:30px;height:30px;border-radius:6px !important;background:none;border:none;cursor:pointer;color:var(--text-mute);display:flex;align-items:center;justify-content:center;font-size:18px;}
.modal-close:hover{background:var(--hover-bg);color:var(--text);}
.modal-body{overflow-y:auto;font-size:12.5px;line-height:1.6;color:#374151;}
.modal-body.preserve-whitespace{padding:18px 22px;white-space:pre-wrap;word-wrap:break-word;}
/* Lift the legacy bootstrap.min.css ".modal-body{max-height:400px}" cap (loaded cross-origin by ALL gs-app pages: analytics / aum / recordings2 / aiScribe) so tall dialogs grow to their content up to the card's 92vh (88vh for .aum-modal) cap instead of scrolling inside a 400px box. The card max-height + .modal-body overflow-y:auto still scroll genuinely huge content internally — no min-height:0 needed, overflow-y:auto already makes the flex auto-min-size 0. AUM dialogs use .aum-modal-body (a different class) so they are unaffected. */
.modal-card .modal-body{max-height:none !important;height:auto !important;}
/* Chat-bubble layout for the alert-messages modal. Sender's messages
   align left in a soft grey bubble, "sent by me" messages align right
   in the brand red. Each row carries a sender name and timestamp so
   the thread reads chronologically without ambiguity. */
.am-thread{display:flex;flex-direction:column;gap:12px;}
.am-row{display:flex;flex-direction:column;max-width:78%;}
.am-row.am-sent-by-me{align-self:flex-end;align-items:flex-end;}
.am-row.am-from-them{align-self:flex-start;align-items:flex-start;}
.am-meta{font-size:10.5px;color:#9ca3af;margin-bottom:3px;display:flex;gap:6px;align-items:baseline;}
.am-meta-sender{font-weight:600;color:#374151;}
.am-bubble{padding:8px 12px;border-radius:12px !important;font-size:12.5px;line-height:1.5;word-wrap:break-word;white-space:pre-wrap;}
.am-row.am-from-them .am-bubble{background:#f3f4f6;color:#1a1a1a;border-bottom-left-radius:3px;}
.am-row.am-sent-by-me .am-bubble{background:var(--accent);color:#fff;border-bottom-right-radius:3px;}
.am-empty{padding:30px 0;text-align:center;color:#9ca3af;font-size:12px;}
/* App-status icons in the Users table. Solid green = enabled,
   muted red outline = explicitly disabled, faint grey = unknown.
   Hover tooltip carries the full state. */
.app-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:4px !important;}
.app-icon.app-on{color:#15803d;background:rgba(22,163,74,0.08);}
.app-icon.app-off{color:#cc2222;background:rgba(204,34,34,0.07);}
.app-icon.app-unknown{color:#d1d5db;background:transparent;}
.modal-meta{padding:12px 22px;border-top:0.5px solid var(--line);font-size:11px;color:#6b7280;background:#fafaf9;border-radius:0 0 12px 12px !important;}

.btn-tiny{padding:2px 8px;font-size:10px;background:#f5f4f2;border:0.5px solid rgba(0,0,0,0.1);border-radius:4px !important;cursor:pointer;font-family:inherit;color:#4b5563;}
.btn-tiny:hover{background:var(--accent);color:#fff;border-color:var(--accent);}
/* All Activity origin column. Small fixed width keeps the icon
   centred and prevents the column from pushing the Reference column
   around as the icon swaps between states. Stroke uses currentColor
   on the SVG so dark mode picks up the theme automatically. */
.origin-cell{width:22px;text-align:center;padding:0 2px;}
.origin-cell svg{vertical-align:middle;}

/* ============================================================
   GoodSAM Analytics Portal -- updates (see CHANGES.md)
   These additions support new UI surfaces wired into the JSP
   and JS for the present round of changes. Every rule below
   uses CSS variables for colour so dark mode works without
   per-rule overrides; the few selector-specific dark rules
   live at the bottom of this block.
   ============================================================ */

/* ---- 3.3.4: Chart height ladder. Defining a small set of
        fixed-height classes lets the JSP pick a sensible size
        per chart without dropping inline heights everywhere. ---- */
.ch240{height:240px;}
.ch280{height:280px;}
.ch300{height:300px;}

/* ---- 2.4: Brand strip with optional org name. The divider and
        org-name span are hidden by default and revealed once
        getDashboardInfo lands. On narrow screens both collapse
        so the section nav still fits. ---- */
.brand-divider{
  opacity:0.5;
  font-weight:500;
  color:rgba(255,255,255,0.55);
  margin:0 4px;
  font-size:14px;
  line-height:1;
}
.brand-org{
  font-size:14px;
  font-weight:500;
  color:rgba(255,255,255,0.78);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:280px;
}
html[data-theme="dark"] .brand-divider{color:rgba(255,255,255,0.5);}
html[data-theme="dark"] .brand-org{color:rgba(255,255,255,0.75);}
/* Hide the org-name portion of the brand below 1100px so the section
   nav fits comfortably at 1080p. Above 1100px, "Org Name - Analytics
   Portal" displays in full. Below 700px the brand text also
   disappears (covered by the earlier media query) leaving just the
   logo. */
@media (max-width:1100px){
  .brand-divider, .brand-org{display:none !important;}
}

/* ---- 4.1: Trash + dark-mode utility button gap. Only the first
        utility button in the nav bar pushes to the right edge.
        The .first-utility class anchors the auto-margin so the
        two icons sit immediately adjacent. ---- */
.section-btn.theme-btn{
  color: rgba(255, 255, 255, 0.6);
  padding: 0 12px;
}
.section-btn.theme-btn:hover{
  color: #fff;
  border-bottom-color: transparent;
}
.section-btn.theme-btn svg{ display:block; }
.section-btn.theme-btn.first-utility{ margin-left:auto; }

/* ---- 3.3.1: Third-party include toggle on the cardiac banner.
        Sits to the left of the Export button. Keep it compact and
        legible against the red banner background. ---- */
.cardiac-thirdparty-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11.5px;
  color:rgba(255,255,255,0.92);
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.cardiac-thirdparty-toggle .info-tip{
  display:inline-flex;align-items:center;justify-content:center;
  width:15px;height:15px;border-radius:50%;
  background:rgba(255,255,255,0.18);
  color:#fff;font-size:10px;font-weight:600;
  cursor:help;
}
/* The cardiac toggle uses the shared .switch component (see below).
   Two banner-specific overrides:
   1. The default checked-state colour is var(--accent) -- which IS
      the banner background, so the slider would disappear when on.
      Force a high-contrast white slider with a red knob instead.
   2. The unchecked slider is light grey, also low-contrast on red;
      darken it slightly so the off state reads clearly. */
.cardiac-thirdparty-toggle .switch input:checked + .switch-slider{
  background:rgba(255,255,255,0.85);
}
.cardiac-thirdparty-toggle .switch input:checked + .switch-slider::before{
  background:var(--accent);
}
.cardiac-thirdparty-toggle .switch-slider{
  background:rgba(0,0,0,0.28);
}
.cardiac-thirdparty-toggle .switch-label{
  font-size:11.5px;
  color:rgba(255,255,255,0.92);
}

/* Generic switch-row layout. Reuses the existing .switch component.
   Used by the cardiac third-party toggle and intended for any future
   labelled switch that wants the label sitting inline with the
   control. */
.switch-row{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.switch-label{
  font-size:12px;
  color:var(--text);
}

/* ---- Generic info-tip pill used in several places (cardiac toggle,
        users permissions header, location filter card). ---- */
.info-tip{
  display:inline-flex;align-items:center;justify-content:center;
  width:15px;height:15px;border-radius:50% !important;
  background:rgba(0,0,0,0.06);
  color:var(--text-mute);
  font-size:10px;font-weight:600;
  cursor:help;
  margin-left:4px;
}
html[data-theme="dark"] .info-tip{background:rgba(255,255,255,0.10);color:var(--text-mute);}

/* ---- 3.3.2: CPR/DF tile split sub-line. Sits below the existing
        kpi-sub at a slightly smaller font and muted colour. Empty
        text collapses the element so non-split tiles don't reserve
        space. ---- */
.kpi-sub-detail{
  font-size:10.5px;
  color:var(--text-mute);
  margin-top:3px;
  line-height:1.35;
}
.kpi-sub-detail:empty{display:none;}

/* ---- 3.4.3: Ping cap banner above the locations map. Hidden
        unless renderPings() activates the stratified sample. ---- */
.ping-cap-banner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  margin-bottom:10px;
  background:var(--bg-soft);
  border:0.5px solid var(--line-strong);
  border-left:3px solid var(--accent);
  border-radius:7px !important;
  font-size:11.5px;
  color:var(--text);
  line-height:1.5;
}

/* ---- 3.4.2: Shapefile-include toggle on the locations gate.
        Reuses the .switch component defined below. ---- */
.loc-shapefile-toggle{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:14px auto;
  padding:12px 14px;
  background:var(--bg-soft);
  border:0.5px solid var(--line);
  border-radius:8px !important;
  max-width:560px;
  text-align:left;
}
.loc-shapefile-toggle-text{flex:1;}
.loc-shapefile-toggle-title{
  font-size:12px;
  font-weight:600;
  color:var(--text);
  margin-bottom:3px;
}
.loc-shapefile-toggle-sub{
  font-size:11px;
  color:var(--text-mute);
  line-height:1.5;
}

/* ---- Generic iOS-style on/off switch. Used by the shapefile
        toggle and reusable elsewhere if needed. Accent colour is
        the brand red when on. ---- */
.switch{
  position:relative;
  display:inline-block;
  width:36px;
  height:20px;
  flex-shrink:0;
  margin-top:2px;
}
.switch input{
  opacity:0;
  width:0;
  height:0;
}
.switch-slider{
  position:absolute;cursor:pointer;
  top:0;left:0;right:0;bottom:0;
  background:#cbd5e1;
  border-radius:20px !important;
  transition:background 0.18s ease;
}
.switch-slider::before{
  content:'';
  position:absolute;
  height:16px;width:16px;
  left:2px;top:2px;
  background:#fff;
  border-radius:50% !important;
  transition:transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow:0 1px 2px rgba(0,0,0,0.18);
}
.switch input:checked + .switch-slider{background:var(--accent);}
.switch input:checked + .switch-slider::before{transform:translateX(16px);}
.switch input:focus + .switch-slider{box-shadow:0 0 0 2px rgba(208,0,0,0.18);}
html[data-theme="dark"] .switch-slider{background:#475569;}
html[data-theme="dark"] .switch-slider::before{background:#e2e8f0;}

/* ---- 3.4.5: Accuracy filter row inside the loc filter card. ---- */
.loc-accuracy-filter{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 0 0;
  margin-top:10px;
  border-top:0.5px solid var(--line);
  font-size:11.5px;
  color:var(--text);
  flex-wrap:wrap;
}
.loc-accuracy-filter input[type=number]{
  width:80px;
  padding:4px 7px;
  border:0.5px solid var(--line-strong);
  border-radius:5px !important;
  background:var(--bg-input);
  color:var(--text);
  font-size:11.5px;
  font-family:inherit;
}
.loc-accuracy-filter input[type=number]:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(208,0,0,0.12);
}
.loc-accuracy-unit{color:var(--text-mute);font-size:11px;}

/* ---- 3.5.1: Users confirm-before-load card. Replaces the spinner
        gate. The progress section uses the same .load-* shells as
        every other gate, so no new rules are needed for it. ---- */
.user-load-confirm{
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:34px 24px;
  text-align:center;
  color:var(--text);
}
.user-load-title{
  font-size:16px;
  font-weight:600;
  color:var(--text);
  margin-bottom:8px;
}
.user-load-body{
  font-size:12.5px;
  line-height:1.55;
  color:var(--text-mute);
  max-width:520px;
  margin-bottom:18px;
}

/* ---- 3.5.2: Admin and awaiting-approval badges on the user
        name cell. Both are inline-flex so they sit next to the
        name without affecting line height. ---- */
.user-badge{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:1px 6px;
  font-size:10px;
  font-weight:600;
  border-radius:10px !important;
  vertical-align:1px;
  margin-left:5px;
  line-height:1.4;
  white-space:nowrap;
}
.user-badge-admin{
  background:rgba(208,0,0,0.10);
  color:var(--accent);
  padding:1px 5px;
}
.user-badge-admin svg{display:block;}
.user-badge-pending{
  background:var(--accent);
  color:#fff;
}
html[data-theme="dark"] .user-badge-admin{background:rgba(208,0,0,0.20);}

/* ---- 3.5.3: Permissions icon column. Each icon is a small
        inline-flex pill; filled = enabled, outlined = not. ---- */
.perm-row{
  display:inline-flex;
  align-items:center;
  gap:3px;
  flex-wrap:nowrap;
}
.perm-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border-radius:4px !important;
  font-size:0;     /* clip any whitespace between span and svg */
}
.perm-ico svg{display:block;}
.perm-ico.on{
  background:var(--accent);
  color:#fff;
}
.perm-ico.off{
  background:transparent;
  color:var(--text-light);
  border:0.5px solid var(--line);
  opacity:0.55;
}
html[data-theme="dark"] .perm-ico.off{color:var(--text-mute);border-color:var(--line-strong);}

/* ---- 3.5.4: Permission filter chips row. Inherits .chip styling
        from elsewhere; the row wrapper handles label + clear-button
        layout. ---- */
.usr-perm-filter-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:8px;
  padding:9px 11px;
  background:var(--bg-soft);
  border:0.5px solid var(--line);
  border-radius:7px !important;
}
.usr-perm-filter-lbl{
  font-size:11px;
  font-weight:600;
  color:var(--text-mute);
}
.usr-perm-chips{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  flex:1;
}

/* Minimal generic chip styling used by the permission row.
   If a .chip rule already exists elsewhere this is a safe
   refinement -- the visual end-state is consistent across
   both selectors. */
.usr-perm-chips .chip, .usr-perm-filter-row .chip{
  display:inline-flex;
  align-items:center;
  padding:3px 9px;
  border-radius:14px !important;
  font-size:11px;
  font-family:inherit;
  background:var(--bg-card);
  border:0.5px solid var(--line-strong);
  color:var(--text);
  cursor:pointer;
  transition:background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.usr-perm-chips .chip:hover, .usr-perm-filter-row .chip:hover{
  background:var(--hover-bg);
}
.usr-perm-chips .chip.active, .usr-perm-filter-row .chip.active{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.usr-perm-chips .chip svg{display:block;}

/* ---- 3.5.2b: Service-account badge. Wrench icon, neutral colouring
        to distinguish from the brand-red admin/pending badges. Same
        inline-flex sizing as the other user-badges so they line up. ---- */
.user-badge-service{
  background:rgba(107,114,128,0.14);
  color:var(--text-mute);
  padding:1px 5px;
}
.user-badge-service svg{display:block;}
html[data-theme="dark"] .user-badge-service{
  background:rgba(255,255,255,0.10);
  color:var(--text-mute);
}

/* ---- 3.5.2c: Ghost-account badge. Red warning triangle to draw the
        eye -- these are records that should be investigated. Uses the
        same accent-on-tint colour scheme as user-badge-admin but with
        the brand red lifted for higher urgency. ---- */
.user-badge-ghost{
  background:rgba(208,0,0,0.14);
  color:var(--accent);
  padding:1px 5px;
}
.user-badge-ghost svg{display:block;}
html[data-theme="dark"] .user-badge-ghost{
  background:rgba(208,0,0,0.24);
}

/* ============================================================
   FOLLOW-UP FIXES
   ============================================================ */

/* ---- Fix #1: datetime-local inputs. Native control inherits the
        OS dark mode partially; setting color-scheme on the input
        flips the calendar icon and time popover to match the
        portal's data-theme. ---- */
/* .date-bar datetime-local inputs now inherit the shared, canonical look from
   `.gs-dp-input` (see the GSDatePicker section) so they match recordings2.
   Only color-scheme is kept here so the native control follows the theme. */
html[data-theme="dark"] input[type="datetime-local"]{
  color-scheme: dark;
}
html[data-theme="light"] input[type="datetime-local"]{
  color-scheme: light;
}
/* Inline "Adjusted - from must be before to" note that flashes when
   the picker auto-swaps a reversed range. */
.date-range-note{
  font-size: 11px;
  color: var(--accent);
  margin-left: 8px;
  font-style: italic;
}

/* ---- Fix #4: admin shield badge palette. Blue rather than red so
        "admin" reads as system/elevated rather than alert. Dedicated
        variables keep this independent of the brand --accent red. ---- */
:root{
  --badge-admin-bg-light: rgba(37, 99, 235, 0.12);   /* blue-600 @ 12% */
  --badge-admin-fg-light: #2563eb;                   /* blue-600 */
  --badge-admin-bg-dark:  rgba(96, 165, 250, 0.20);  /* blue-400 @ 20% */
  --badge-admin-fg-dark:  #60a5fa;                   /* blue-400 */
}
.user-badge-admin{
  background: var(--badge-admin-bg-light) !important;
  color: var(--badge-admin-fg-light) !important;
}
html[data-theme="dark"] .user-badge-admin{
  background: var(--badge-admin-bg-dark) !important;
  color: var(--badge-admin-fg-dark) !important;
}

/* ---- Fix #6: Coverage Gaps data-quality warning, themed. Was an
        inline-styled block on the JSP with hard-coded amber-on-cream
        that didn't survive dark mode. Now reuses the .aum-warn palette
        approach: amber tint + neutral text in dark mode. ---- */
.cg-data-warn{
  background: #fffbeb;
  border: 0.5px solid #fde68a;
  color: #92400e;
  padding: 11px 14px;
  border-radius: 7px !important;
  margin-bottom: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  align-items: flex-start;
  gap: 10px;
}
html[data-theme="dark"] .cg-data-warn{
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.4);
  color: var(--text);
}
html[data-theme="dark"] .cg-data-warn strong{ color: var(--text); }

/* ---- Fix #7: AUM intro + cards dark-mode polish. The flow cards and
        the "Before you start" note already use theme variables, but
        belt-and-braces overrides to ensure any inline strong / em
        children inherit cleanly. ---- */
html[data-theme="dark"] .aum-flow-card{
  background: var(--bg-card);
  border-color: var(--line);
}
html[data-theme="dark"] .aum-flow-body strong, html[data-theme="dark"] .aum-note strong, html[data-theme="dark"] .aum-help-list strong{
  color: var(--text);
}
html[data-theme="dark"] .aum-help-list em{
  color: var(--text-mute);
}

/* ---- 1.10: Accuracy-filter Apply / busy state ----
   The Apply button gets a stronger visual weight than the Clear
   button so it reads as the primary action. The busy pill (with a
   small spinner) appears next to the controls while filterMap runs
   so the user knows the page hasn't locked up. */
.slicer-btn-primary{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.slicer-btn-primary:hover{ filter: brightness(1.05); }
.slicer-btn-primary:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}
.loc-filter-busy{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-mute);
  margin-left: 4px;
}
.loc-filter-spinner{
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: locFilterSpin 0.7s linear infinite;
}
@keyframes locFilterSpin{
  to{ transform: rotate(360deg); }
}

/* ================================================================
   EMERGENCY KITS SECTION
   Styles for the Emergency Kits analytics page. Theme-aware via the
   CSS variables defined above (--bg-elev, --line, --text, --text-mute,
   --text-light, --accent, --bg-soft) so dark mode needs no extra
   rules except where Leaflet controls require explicit help.
   ================================================================ */
/* Filter card: two slicer columns side by side, stacking on
   narrow screens like the location filter grid. */
.kits-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
@media(max-width:900px){.kits-filter-grid{grid-template-columns:1fr;}}

/* Active-filter strip under the filter card. */
.kit-filter-strip{display:flex;align-items:center;gap:10px;margin-top:10px;padding:7px 10px;background:var(--bg-soft);border:0.5px solid var(--line);border-radius:6px;font-size:11px;color:var(--text-mute);}

/* Data-quality footnote under the KPI tiles. */
.kit-data-note{font-size:10.5px;color:var(--text-mute);margin:-4px 2px 13px;}

/* Clickable table rows. */
#tKits tbody tr.kit-row{cursor:pointer;}
#tKits tbody tr.kit-row:hover{background:var(--bg-soft);}

/* Map status legend (Leaflet control). Solid background so it
   stays readable over any basemap; variables keep it theme-aware. */
.kit-map-legend{background:var(--bg-elev,#fff);border:0.5px solid var(--line,rgba(0,0,0,0.1));border-radius:6px;padding:6px 9px;font-size:10.5px;color:var(--text,#374151);display:flex;flex-direction:column;gap:3px;box-shadow:0 1px 4px rgba(0,0,0,0.12);}
.kit-map-legend span{display:flex;align-items:center;gap:6px;}
.kit-map-legend i{width:10px;height:10px;border-radius:50%;display:inline-block;border:1px solid rgba(255,255,255,0.7);}
html[data-theme="dark"] .kit-map-legend{background:var(--bg-elev);color:var(--text);}

/* Detail modal layout: two columns on desktop, one on mobile. */
.kit-dt-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 26px;}
@media(max-width:760px){.kit-dt-grid{grid-template-columns:1fr;}}
.kit-dt-section{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:var(--text-mute);margin:14px 0 6px;padding-bottom:4px;border-bottom:0.5px solid var(--line);}
.kit-dt-row{display:grid;grid-template-columns:140px 1fr;gap:10px;padding:4px 0;font-size:11.5px;}
.kit-dt-lbl{color:var(--text-mute);}
.kit-dt-val{color:var(--text);overflow-wrap:anywhere;}

/* Weekly availability mini-grid in the detail modal. */
.kit-av-grid{border:0.5px solid var(--line);border-radius:6px;overflow:hidden;}
.kit-av-row{display:flex;justify-content:space-between;padding:4px 10px;font-size:11px;color:var(--text);border-bottom:0.5px solid var(--line);}
.kit-av-row:last-child{border-bottom:none;}
.kit-av-row.kit-av-closed span:last-child{color:var(--text-light);}

/* Modification history entries. */
.kit-mod-row{padding:6px 0;border-bottom:0.5px dashed var(--line);font-size:11.5px;color:var(--text);}
.kit-mod-row:last-child{border-bottom:none;}

/* Photo box: fixed-height container so the modal doesn't jump
   while the image loads; image scales to fit. */
.kit-photo-box{min-height:120px;max-height:260px;display:flex;align-items:center;justify-content:center;background:var(--bg-soft);border:0.5px solid var(--line);border-radius:8px;overflow:hidden;margin-bottom:4px;}
.kit-photo-box img{max-width:100%;max-height:256px;object-fit:contain;display:block;}

/* Active state for the map layer toggles (Markers / Heatmap) -
   analytics.css has no .btn-tiny.active rule, so define one here
   for both themes. */
.btn-tiny.active{background:var(--accent);color:#fff;border-color:var(--accent);}
html[data-theme="dark"] .btn-tiny.active{background:var(--accent);color:#fff;border-color:var(--accent);}

/* Equipment-icon map markers (S2.4). Pin colour comes inline from the
   active colour mode; the white type glyph is drawn inside the SVG, so
   no separate text layer is needed. Theme-agnostic - the pin draws its
   own white outline so it reads on light or dark basemaps. */
.kit-pin-wrap{background:none;border:none;}
.kit-pin{display:block;}
.kit-pin svg{display:block;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,0.4));}

/* Tile-seam fix (feedback): raster basemap tiles can leave hairline
   sub-pixel gaps between adjacent tiles, which show as faint vertical
   (and horizontal) lines - most visible on the light greyscale basemap
   and against the dark app background in dark mode (the page shows
   through the gap). Bleeding each tile so it overlaps its neighbour
   closes the seam. A half-pixel bleed is enough at 1x and 2x device
   pixel ratios, but NOT at the fractional ratios common on Windows
   laptops set to 125%/150% scaling (exactly the low-powered customer
   machines), where the gap can be up to ~1 device pixel - so we bleed
   a full CSS pixel, which covers every ratio. The overlap is basemap-
   on-basemap and therefore invisible. Applies to every Leaflet map. */
.leaflet-container .leaflet-tile{width:257px !important;height:257px !important;}

/* Address-search typeahead (S2.8): a suggestions dropdown under the
   input, themed via the same variables as the rest of the portal. */
.kit-addr-wrap{position:relative;display:inline-block;}
.kit-addr-suggest{position:absolute;top:calc(100% + 2px);left:0;right:0;z-index:1200;background:var(--bg-elev);border:0.5px solid var(--line);border-radius:6px;box-shadow:0 4px 14px rgba(0,0,0,0.18);max-height:240px;overflow-y:auto;}
.kit-addr-opt{padding:7px 10px;font-size:11.5px;color:var(--text);cursor:pointer;border-bottom:0.5px solid var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.kit-addr-opt:last-child{border-bottom:none;}
.kit-addr-opt:hover{background:var(--bg-soft);}

/* Greyed-out filter inputs whose value is not relevant for the current
   rule (e.g. days when "In date" or "Never checked" is selected). */
.input-disabled{opacity:0.4;cursor:not-allowed;background:var(--bg-soft);}

/* Reference include/exclude filter, laid out as two side-by-side cells
   (feedback: present nicely, save vertical space). Stacks on narrow
   screens. */
.ref-filter-row{display:flex;gap:22px;flex-wrap:wrap;align-items:flex-start;}
.ref-filter-col{flex:1 1 320px;display:flex;align-items:flex-start;gap:10px;min-width:0;}
.ref-filter-col .switch{margin-top:2px;flex:none;}
.ref-filter-field{flex:1;min-width:0;}
.ref-filter-lbl{font-size:11px;color:var(--text);margin-bottom:4px;}
.ref-filter-note{font-size:10px;color:var(--accent);margin-left:6px;}
.ref-filter-field .si{width:100%;max-width:none;}
.ref-filter-hint{font-size:10px;color:var(--text-mute);margin-top:8px;}

/* ============================================================================
   MASTER STYLESHEET — single source of truth for the GoodSAM portal pages.
   Layer 1 (above): the analytics design system (tokens + component classes).
   Layer 2 (below): per-page blocks migrated out of each page's inline <style>.
   Pages opt in via a body class (gs-page-*) so page-scoped rules never bleed.
   ----------------------------------------------------------------------------
   PAGE: advancedUserManagement.jsp  (classes are aum- and gs- prefixed, used only there).
   ============================================================================ */

  /* ===== Chrome tokens (identical to the redesigned Analytics page) ===== */

  /* ============================================================
     CONSOLIDATED SHARED RULES — promoted from per-page duplicates,
     auto-merged ONLY where byte-identical across every defining page.
     Placed before the per-page blocks so per-page @media overrides +
     kept exceptions still win by source order. (dedup_engine.py)
     ============================================================ */
  body.gs-app .gs-act .ic{ width:13px; height:13px; }
  body.gs-app .gs-actiongroup .gs-act{ border-radius:0 !important; }
  body.gs-app .gs-actiongroup .gs-act + .gs-act{ border-left:1px solid var(--gs-border) !important; }
  body.gs-app .gs-actiongroup .gs-act:first-child{ border-top-left-radius:8px !important; border-bottom-left-radius:8px !important; }
  body.gs-app .gs-actiongroup .gs-act:last-child{ border-top-right-radius:8px !important; border-bottom-right-radius:8px !important; }
  body.gs-app .gs-actiongroup.danger{ border-color:#F1C8C4; background:#F1C8C4; }
  body.gs-app .gs-actions{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
  body.gs-page-recordings2 .gs-avatar, body.gs-page-eventlog .gs-avatar, body.gs-page-kits .gs-avatar, body.gs-page-loneworking .gs-avatar{ width:28px; height:28px; border-radius:50% !important; background:var(--gs-red); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:none; }
  body.gs-page-recordings2 .gs-brand, body.gs-page-eventlog .gs-brand, body.gs-page-kits .gs-brand, body.gs-page-loneworking .gs-brand{ color:#fff; font-weight:700; font-size:15px; display:inline-flex; align-items:center; gap:8px; margin-right:16px; white-space:nowrap; }
  body.gs-app .gs-fbbanner-copy{ flex:1 1 auto; display:flex; flex-direction:column; gap:2px; line-height:1.4; min-width:0; }
  body.gs-app .gs-fbbanner-copy b{ color:var(--gs-ink); font-size:13.5px; }
  body.gs-app .gs-fbbanner-copy span{ color:var(--gs-text-2); font-size:12.5px; }
  body.gs-app .gs-fbbanner-cta{ flex:0 0 auto; white-space:nowrap; display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 14px; border:none; border-radius:8px !important; background:var(--gs-red); color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s; }
  body.gs-app .gs-fbbanner-cta svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; }
  body.gs-app .gs-fbbanner-cta:hover{ background:var(--gs-red-dark); }
  body.gs-app .gs-fbbanner-spark{ flex:0 0 auto; width:36px; height:36px; border-radius:10px !important; background:#fff; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(208,0,0,0.10); }
  body.gs-app .gs-fbbanner-spark svg{ width:19px; height:19px; stroke:var(--gs-red); fill:none; stroke-width:1.8; }
  body.gs-app .gs-fbbanner-x{ flex:0 0 auto; background:transparent; border:0; color:var(--gs-muted); font-size:22px; line-height:1; cursor:pointer; padding:0 4px; align-self:flex-start; }
  body.gs-app .gs-fbbanner-x:hover{ color:var(--gs-ink); }
  body.gs-app .gs-fbform{ display:flex; flex-direction:column; gap:10px; text-align:left; }
  body.gs-app .gs-fbform .gs-fbcount{ font-size:11px; color:var(--gs-faint); text-align:right; }
  body.gs-app .gs-fbform .gs-fberr{ font-size:12px; color:var(--gs-red); display:none; }
  body.gs-app .gs-fbform .gs-fberr.show{ display:block; }
  body.gs-app .gs-fbform textarea:focus{ outline:none; border-color:var(--gs-red); }
  body.gs-app .gs-filterbar:has(+ .gs-loaded-range){ margin-bottom:0 !important; }
  body.gs-app .gs-footer{ position:fixed; bottom:0; left:0; right:0; height:32px; background:#0f1117; color:var(--gs-faint); display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; z-index:899; }
  body.gs-app .gs-footer a{ color:#C9CED6; text-decoration:none; }
  body.gs-app .gs-footer a:hover{ color:#fff; }
  body.gs-app .gs-loaded-range .gs-lr-dot{ width:5px; height:5px; border-radius:50% !important; background:#22c55e; flex:none; }
  body.gs-app .gs-loaded-range b{ color:var(--gs-ink); font-weight:600; }
  body.gs-app .gs-loaded-range.empty .gs-lr-dot{ background:#d1d5db; }
  body.gs-page-recordings2 .gs-logout, body.gs-page-eventlog .gs-logout, body.gs-page-kits .gs-logout, body.gs-page-loneworking .gs-logout{ color:#C9CED6; font-size:12.5px; text-decoration:none; white-space:nowrap; }
  body.gs-page-recordings2 .gs-logout:hover, body.gs-page-eventlog .gs-logout:hover, body.gs-page-kits .gs-logout:hover, body.gs-page-loneworking .gs-logout:hover{ color:#fff; text-decoration:none; }
  body.gs-page-recordings2 .gs-nav-links, body.gs-page-eventlog .gs-nav-links, body.gs-page-kits .gs-nav-links, body.gs-page-loneworking .gs-nav-links{ display:flex; align-items:center; gap:2px; flex:1; min-width:0; overflow-x:auto; justify-content:center; }
  body.gs-page-recordings2 .gs-nav-links a, body.gs-page-eventlog .gs-nav-links a, body.gs-page-kits .gs-nav-links a, body.gs-page-loneworking .gs-nav-links a{ color:#C9CED6; font-size:13px; font-weight:500; text-decoration:none; padding:6px 10px; border-radius:6px !important; white-space:nowrap; }
  body.gs-page-recordings2 .gs-nav-links a.gs-active, body.gs-page-eventlog .gs-nav-links a.gs-active, body.gs-page-kits .gs-nav-links a.gs-active, body.gs-page-loneworking .gs-nav-links a.gs-active{ color:#fff; background:rgba(255,255,255,0.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.14); }
  body.gs-page-recordings2 .gs-nav-links a:hover, body.gs-page-eventlog .gs-nav-links a:hover, body.gs-page-kits .gs-nav-links a:hover, body.gs-page-loneworking .gs-nav-links a:hover{ color:#fff; background:rgba(255,255,255,0.06); text-decoration:none; }
  body.gs-page-recordings2 .gs-nav-right, body.gs-page-eventlog .gs-nav-right, body.gs-page-kits .gs-nav-right, body.gs-page-loneworking .gs-nav-right{ display:flex; align-items:center; gap:12px; margin-left:8px; }
  body.gs-app .gs-pill b{ font-weight:700; color:inherit; }
  body.gs-app .gs-pill-amber{ background:var(--gs-amber-bg); color:var(--gs-amber-tx); }
  body.gs-app .gs-pill-blue{ background:var(--gs-blue-bg); color:var(--gs-blue-tx); }
  body.gs-app .gs-pill-green{ background:var(--gs-green-bg); color:var(--gs-green-tx); }
  body.gs-app .gs-pill-grey{ background:var(--gs-grey-bg); color:var(--gs-grey-tx); }
  body.gs-app .gs-pill-purple{ background:var(--gs-purple-bg); color:var(--gs-purple-tx); }
  body.gs-app .gs-pill-red{ background:var(--gs-redpill-bg); color:var(--gs-redpill-tx); }
  body.gs-app .gs-pill.gs-nodot:before{ display:none; }
  body.gs-app .gs-pill:before{ content:""; width:6px; height:6px; border-radius:50% !important; background:currentColor; flex:none; }
  body.gs-app .gs-tablewrap{ background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:10px !important; padding:2px 6px 6px; overflow:auto; }
  body.gs-app .gs-theme-hint .gs-tilehint-arrow{ right:14px; }
  body.gs-app .gs-tilehint-text b{ color:#fff; }
  body.gs-app .gs-tilehint-x{ background:transparent; border:0; color:rgba(255,255,255,0.7); font-size:18px; line-height:1; cursor:pointer; padding:0 2px; flex:0 0 auto; }
  body.gs-app .gs-tilehint-x:hover{ color:#fff; }
  body.gs-page-recordings2 .gs-topnav, body.gs-page-eventlog .gs-topnav, body.gs-page-kits .gs-topnav, body.gs-page-loneworking .gs-topnav{ position:fixed; top:0; left:0; right:0; height:48px; background:#0f1117; display:flex; align-items:center; gap:8px; padding:0 16px; z-index:900; box-shadow:0 1px 0 rgba(255,255,255,0.06); }
  body.gs-app .ic{ width:13px; height:13px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  body.gs-app table.dataTable .gs-actions{ max-width:560px; margin-left:auto; margin-right:auto; }
  body.gs-app table.dataTable tbody td{ font-size:12px; color:var(--gs-ink); background:transparent; border-top:none; border-left:none; border-right:none; border-bottom:0.5px solid var(--gs-border-light); padding:9px 12px; vertical-align:middle; }
  body.gs-app table.dataTable tbody td a{ color:var(--gs-text-2) !important; font-weight:600; text-decoration:none; }
  body.gs-app table.dataTable tbody td a:hover{ color:var(--gs-red) !important; text-decoration:none; }
  body.gs-app table.dataTable tbody tr{ background:transparent; }
  body.gs-app table.dataTable tbody tr:last-child td{ border-bottom:none; }
  body.gs-app table.dataTable td.dataTables_empty{ text-align:center; padding:32px; color:var(--gs-faint); font-size:12px; }
  body.gs-app table.dataTable thead th.sorting:after{ content:"\2195"; }
  body.gs-app table.dataTable thead th.sorting_asc:after{ content:"\2191"; color:var(--gs-red); }
  body.gs-app table.dataTable thead th.sorting_desc:after{ content:"\2193"; color:var(--gs-red); }
  html[data-theme="dark"] body.gs-app .gs-act{ background-color:var(--gs-card) !important; color:var(--gs-text-2) !important; }
  html[data-theme="dark"] body.gs-app .gs-act.gs-primary{ background-color:var(--gs-blue-bg) !important; color:var(--gs-blue-tx) !important; }
  html[data-theme="dark"] body.gs-app .gs-act:hover{ background-color:#243144 !important; color:var(--gs-ink) !important; }
  html[data-theme="dark"] body.gs-app .gs-actiongroup.danger{ background:rgba(239,68,68,0.30) !important; border-color:rgba(239,68,68,0.45) !important; }
  html[data-theme="dark"] body.gs-app .gs-actiongroup.danger .gs-act:hover{ background-color:rgba(239,68,68,0.28) !important; }
  html[data-theme="dark"] body.gs-app .gs-fbbanner{ background:linear-gradient(135deg,rgba(204,34,34,0.16) 0%,rgba(167,139,250,0.16) 100%); border-color:var(--gs-border); }
  html[data-theme="dark"] body.gs-app .gs-fbbanner-spark{ background:var(--gs-card); box-shadow:0 2px 8px rgba(0,0,0,0.4); }
  html[data-theme="dark"] body.gs-app .gs-loaded-range{ background:var(--gs-card); color:#cbd5e1; }
  html[data-theme="dark"] body.gs-app table.dataTable{ background-color:var(--gs-card) !important; }
  html[data-theme="dark"] body.gs-app table.dataTable tbody tr:hover td{ background-color:#243144 !important; }
  /* ============================================================================
     gs-portal — shared modern chrome for LEGACY pages migrated onto master.css.
     Self-contained: the dark top-nav + footer + light token palette + body frame
     needed to wrap an old page. Opt in with <body class="gs-portal"> + the
     gsTopnav.jspf / gsFooter.jspf includes. Light-only on purpose: legacy page
     CONTENT is not dark-aware, so the body stays light (the chrome is dark in
     both themes anyway). Does NOT pull in gs-app's content restyling.
     ============================================================================ */
  body.gs-portal{
    --gs-red:#D00000; --gs-red-dark:#A80000; --gs-red-tint:#FBEAEA;
    --gs-ink:#0F1117; --gs-text:#3D434F; --gs-text-2:#3D434F; --gs-muted:#6B7280; --gs-faint:#9AA1AC;
    --gs-border:#D7DBE0; --gs-border-light:#E8EAEE; --gs-bg:#F4F5F7; --gs-card:#FFFFFF;
    --gs-green-bg:#E5F4E8; --gs-green-tx:#1E7B34;
    --gs-amber-bg:#FCF1DC; --gs-amber-tx:#92600A;
    --gs-redpill-bg:#FBEAEA; --gs-redpill-tx:#B42318;
    --gs-blue-bg:#E7EFF9; --gs-blue-tx:#1D4F91;
    --gs-purple-bg:#EFEAF8; --gs-purple-tx:#5B3E96;
    --gs-grey-bg:#EEF0F3; --gs-grey-tx:#4B5563;
    padding-top:56px !important; padding-bottom:42px !important;
  }
  /* full-screen pages (map/video apps): content is position:fixed/absolute and offset itself, so drop the body padding */
  body.gs-portal.gs-portal-fixed{ padding-top:0 !important; padding-bottom:0 !important; }
  /* ===== Marketing nav — sexy SECOND bar under the black gs-topnav (index etc.) ===== */
  body.gs-portal.gs-mkt{ padding-top:104px !important; padding-bottom:0 !important; }   /* gs-topnav 48 + marketing bar 56 */
  body.gs-portal{ --mn-ease:cubic-bezier(.22,.61,.36,1); }
  body.gs-portal:not(.gs-mkt){ background:#ffffff; }   /* portal pages: override legacy style.css body beige (#F5F4F2). gs-mkt marketing pages keep their own bg. */
  body.gs-portal .gs-mbar{ position:fixed; top:48px; left:0; right:0; z-index:890; height:56px; background:#fff; border-bottom:1px solid var(--gs-border-light); box-shadow:0 6px 16px -10px rgba(15,17,23,0.10); font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; }
  body.gs-portal .gs-mbar-inner{ display:flex; align-items:center; height:100%; max-width:1280px; margin:0 auto; padding:0 24px; }
  body.gs-portal .gs-mbar-spacer{ flex:1 1 0; min-width:0; display:flex; align-items:center; }
  body.gs-portal .gs-mbar-end{ flex:1 1 0; min-width:0; display:flex; align-items:center; justify-content:flex-end; }
  body.gs-portal .gs-mbar-demo{ display:inline-flex; align-items:center; gap:7px; font-size:13.5px; font-weight:700; letter-spacing:.005em; color:var(--gs-red); text-decoration:none; padding:8px 16px; border:1.5px solid var(--gs-red); border-radius:8px !important; white-space:nowrap; transition:background .16s var(--mn-ease), color .16s var(--mn-ease), box-shadow .16s var(--mn-ease); }
  body.gs-portal .gs-mbar-demo:hover{ background:var(--gs-red); color:#fff; box-shadow:0 7px 18px rgba(208,0,0,0.26); text-decoration:none; }
  body.gs-portal .gs-mbar-demo svg{ width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .16s var(--mn-ease); }
  body.gs-portal .gs-mbar-demo:hover svg{ transform:translateX(3px); }
  body.gs-portal .gs-mnav-list{ display:flex; align-items:stretch; gap:0; list-style:none; margin:0; padding:0; height:100%; flex:none; }
  body.gs-portal .gs-mnav-item{ position:relative; display:flex; align-items:stretch; }
  body.gs-portal .gs-mnav-top{ display:inline-flex; align-items:center; gap:5px; height:56px; padding:0 17px; margin:0; border:0; background:transparent; cursor:pointer; font-family:inherit; font-size:14.5px; font-weight:600; letter-spacing:.005em; line-height:1; color:var(--gs-ink); text-decoration:none; position:relative; transition:color .16s var(--mn-ease); }
  body.gs-portal .gs-mnav-top::after{ content:""; position:absolute; left:17px; right:17px; bottom:0; height:2px; background:var(--gs-red); border-radius:2px 2px 0 0 !important; transform:scaleX(0); transform-origin:left center; transition:transform .2s var(--mn-ease); }
  body.gs-portal .gs-mnav-item:hover > .gs-mnav-top, body.gs-portal .gs-mnav-top[aria-expanded="true"], body.gs-portal .gs-mnav-top:focus-visible{ color:var(--gs-red); outline:none; }
  body.gs-portal .gs-mnav-item:hover > .gs-mnav-top::after, body.gs-portal .gs-mnav-top[aria-expanded="true"]::after, body.gs-portal .gs-mnav-top:focus-visible::after{ transform:scaleX(1); }
  body.gs-portal .gs-mnav-caret{ width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; opacity:.5; transition:transform .2s var(--mn-ease), opacity .2s; }
  body.gs-portal .gs-mnav-item:hover .gs-mnav-caret, body.gs-portal .gs-mnav-top[aria-expanded="true"] .gs-mnav-caret{ transform:rotate(180deg); opacity:.9; }
  body.gs-portal .gs-mnav-mega{ position:absolute; top:100%; left:0; transform:translateY(4px); width:420px; max-width:calc(100vw - 32px); background:#fff; border:1px solid var(--gs-border-light); border-top:0; border-radius:0 0 14px 14px !important; box-shadow:0 18px 44px -14px rgba(15,17,23,0.26); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .18s var(--mn-ease), transform .2s var(--mn-ease), visibility .2s; z-index:20; }
  body.gs-portal .gs-mnav-item:nth-last-child(-n+2) > .gs-mnav-mega{ left:auto; right:0; }
  body.gs-portal .gs-mnav-mega--wide{ width:720px; }
  body.gs-portal .gs-mnav-mega::before{ content:""; position:absolute; top:-6px; left:0; right:0; height:6px; }
  body.gs-portal .gs-mnav-item:hover > .gs-mnav-mega, body.gs-portal .gs-mnav-mega.is-open{ opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); }
  body.gs-portal .gs-mnav-grid{ display:grid; grid-template-columns:1fr; gap:0; padding:18px; }
  body.gs-portal .gs-mnav-mega--wide .gs-mnav-grid{ grid-template-columns:1fr 240px; gap:20px; }
  body.gs-portal .gs-mnav-eyebrow{ margin:0 0 10px; padding:0 8px; font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--gs-faint); }
  body.gs-portal .gs-mnav-col--rows .gs-mnav-rows{ display:grid; grid-template-columns:1fr 1fr; gap:2px; }
  body.gs-portal .gs-mnav-rows{ display:flex; flex-direction:column; gap:2px; }
  body.gs-portal .gs-mnav-row{ display:flex; align-items:flex-start; gap:12px; padding:10px 8px; border-radius:10px !important; text-decoration:none; transition:background .14s var(--mn-ease); opacity:0; transform:translateY(4px); }
  body.gs-portal .gs-mnav-row:hover{ background:var(--gs-bg); text-decoration:none; }
  body.gs-portal .gs-mnav-ic{ position:relative; flex:none; width:38px; height:38px; border-radius:9px !important; display:inline-flex; align-items:center; justify-content:center; transition:background .16s var(--mn-ease), color .16s var(--mn-ease); }
  body.gs-portal .gs-mnav-ic::after{ content:""; position:absolute; inset:-2px; border-radius:11px !important; background:radial-gradient(circle at 50% 50%, transparent, transparent 70%); opacity:0; transition:opacity .18s var(--mn-ease); }
  body.gs-portal .gs-mnav-row:hover .gs-mnav-ic::after{ opacity:1; }
  body.gs-portal .gs-mnav-ic svg{ position:relative; z-index:1; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
  body.gs-portal .gs-ic-red{ background:var(--gs-red-tint); color:var(--gs-red); --ic-deep:#D00000; }
  body.gs-portal .gs-ic-purple{ background:var(--gs-purple-bg); color:var(--gs-purple-tx); --ic-deep:#5B3E96; }
  body.gs-portal .gs-ic-green{ background:var(--gs-green-bg); color:var(--gs-green-tx); --ic-deep:#1E7B34; }
  body.gs-portal .gs-ic-blue{ background:var(--gs-blue-bg); color:var(--gs-blue-tx); --ic-deep:#1D4F91; }
  body.gs-portal .gs-ic-amber{ background:var(--gs-amber-bg); color:var(--gs-amber-tx); --ic-deep:#B45309; }
  body.gs-portal .gs-ic-grey{ background:var(--gs-grey-bg); color:var(--gs-grey-tx); --ic-deep:#4B5563; }
  /* Solutions mega-tiles recoloured to each solution's section/page colour (+ deeper hover shade) */
  body.gs-portal .gs-sic-alert{ background:#F2E7F6; color:#8E24AA; --ic-deep:#8E24AA; }
  body.gs-portal .gs-sic-ai{ background:#ECE6FD; color:#6E3FEC; --ic-deep:#7C4DFF; }
  body.gs-portal .gs-sic-cardiac{ background:#FBE7E7; color:#D00000; --ic-deep:#D00000; }
  body.gs-portal .gs-sic-kit{ background:#FCE9DD; color:#D44A00; --ic-deep:#E65100; }
  body.gs-portal .gs-sic-instant{ background:#E6EDFD; color:#2158D6; --ic-deep:#2563EB; }
  body.gs-portal .gs-sic-volunteer{ background:#E1F4ED; color:#0B8E63; --ic-deep:#0D9E6F; }
  body.gs-portal .gs-mnav-row:hover .gs-mnav-ic{ background:var(--ic-deep, var(--gs-red)); color:#fff; box-shadow:0 6px 15px -6px var(--ic-deep, var(--gs-red)); }
  body.gs-portal .gs-mnav-tx{ display:flex; flex-direction:column; gap:2px; min-width:0; }
  body.gs-portal .gs-mnav-t{ display:inline-flex; align-items:center; gap:5px; font-size:14px; font-weight:600; color:var(--gs-ink); line-height:1.25; }
  body.gs-portal .gs-mnav-d{ font-size:12.5px; font-weight:400; color:var(--gs-muted); line-height:1.35; }
  body.gs-portal .gs-ext{ width:12px; height:12px; fill:none; stroke:var(--gs-faint); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:none; }
  /* Official square store logos in the APPS mega-panel icon tiles */
  body.gs-portal .gs-app-ic{ flex:none; width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; }
  body.gs-portal .gs-app-ic--gp{ background:#fff; border:1px solid var(--gs-border-light); border-radius:9px !important; }
  body.gs-portal .gs-app-ic--gp img{ width:21px; height:auto; display:block; }
  body.gs-portal .gs-app-ic--as img{ width:38px; height:38px; display:block; }
  body.gs-portal .gs-mnav-item:hover > .gs-mnav-mega .gs-mnav-row, body.gs-portal .gs-mnav-mega.is-open .gs-mnav-row, body.gs-portal .gs-mnav-item:hover > .gs-mnav-mega .gs-feature-card, body.gs-portal .gs-mnav-mega.is-open .gs-feature-card{ opacity:1; transform:none; transition:opacity .24s var(--mn-ease), transform .24s var(--mn-ease); }
  body.gs-portal .gs-mnav-row:nth-child(2){ transition-delay:.03s; }
  body.gs-portal .gs-mnav-row:nth-child(3){ transition-delay:.06s; }
  body.gs-portal .gs-mnav-row:nth-child(4){ transition-delay:.09s; }
  body.gs-portal .gs-mnav-row:nth-child(5){ transition-delay:.12s; }
  body.gs-portal .gs-mnav-row:nth-child(6){ transition-delay:.15s; }
  body.gs-portal .gs-mnav-feature{ display:flex; flex-direction:column; }
  body.gs-portal .gs-feature-card{ position:relative; flex:1; display:flex; flex-direction:column; gap:8px; padding:18px; border-radius:12px !important; text-decoration:none; overflow:hidden; background:linear-gradient(165deg,#171A22 0%,#0F1117 100%); opacity:0; transform:translateY(4px); }
  body.gs-portal .gs-feature-card::after{ content:""; position:absolute; inset:0; pointer-events:none; background:radial-gradient(120% 80% at 100% 0%, rgba(208,0,0,.22) 0%, rgba(208,0,0,0) 55%); }
  body.gs-portal .gs-feature-card > *{ position:relative; z-index:1; }
  body.gs-portal .gs-feature-tag{ display:inline-flex; align-items:center; gap:7px; align-self:flex-start; font-size:11.5px; font-weight:700; letter-spacing:.02em; color:#fff; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); padding:4px 10px; border-radius:999px !important; }
  body.gs-portal .gs-live-dot{ width:7px; height:7px; border-radius:50% !important; background:var(--gs-red); box-shadow:0 0 0 0 rgba(208,0,0,.6); animation:gsMnPulse 2s infinite; }
  @keyframes gsMnPulse{ 0%{ box-shadow:0 0 0 0 rgba(208,0,0,.55) } 70%{ box-shadow:0 0 0 7px rgba(208,0,0,0) } 100%{ box-shadow:0 0 0 0 rgba(208,0,0,0) } }
  body.gs-portal .gs-feature-h{ font-size:16px; font-weight:700; color:#fff; line-height:1.25; margin-top:2px; }
  body.gs-portal .gs-feature-d{ font-size:12.5px; font-weight:400; color:rgba(255,255,255,.62); line-height:1.45; }
  body.gs-portal .gs-feature-cta{ display:inline-flex; align-items:center; gap:6px; margin-top:auto; padding-top:10px; font-size:13px; font-weight:600; color:#fff; }
  body.gs-portal .gs-feature-cta svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .16s var(--mn-ease); }
  body.gs-portal .gs-feature-card:hover .gs-feature-cta svg{ transform:translateX(3px); }
  body.gs-portal .gs-mnav-foot{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 22px; border-top:1px solid var(--gs-border-light); background:var(--gs-bg); border-radius:0 0 13px 13px !important; }
  body.gs-portal .gs-mnav-trust{ display:inline-flex; align-items:center; gap:9px; font-size:12px; font-weight:600; letter-spacing:.01em; color:var(--gs-muted); }
  body.gs-portal .gs-trust-dot{ flex:none; width:7px; height:7px; border-radius:50% !important; background:var(--gs-green-tx); box-shadow:0 0 0 3px var(--gs-green-bg); }
  body.gs-portal .gs-mnav-deep{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--gs-text); text-decoration:none; white-space:nowrap; transition:color .14s var(--mn-ease); }
  body.gs-portal .gs-mnav-deep:hover{ color:var(--gs-red); text-decoration:none; }
  body.gs-portal .gs-mnav-deep svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .16s var(--mn-ease); }
  body.gs-portal .gs-mnav-deep:hover svg{ transform:translateX(3px); }
  body.gs-portal .gs-mnav-burger{ display:none; width:40px; height:40px; align-items:center; justify-content:center; border:0; background:transparent; border-radius:8px !important; cursor:pointer; color:var(--gs-ink); margin-left:-8px; flex:none; }
  body.gs-portal .gs-mnav-burger svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
  body.gs-portal .gs-mnav-drawer{ position:fixed; top:104px; left:0; right:0; bottom:0; background:#fff; padding:8px 16px 28px; overflow-y:auto; z-index:888; border-top:1px solid var(--gs-border-light); }
  body.gs-portal .gs-mnav-drawer[hidden]{ display:none; }
  body.gs-portal .gs-dw-grp{ border-bottom:1px solid var(--gs-border-light); }
  body.gs-portal .gs-dw-grp > summary{ list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; padding:15px 6px; font-size:16px; font-weight:600; color:var(--gs-ink); }
  body.gs-portal .gs-dw-grp > summary::-webkit-details-marker{ display:none; }
  body.gs-portal .gs-dw-grp > summary svg{ width:18px; height:18px; fill:none; stroke:var(--gs-faint); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .2s var(--mn-ease); }
  body.gs-portal .gs-dw-grp[open] > summary svg{ transform:rotate(180deg); }
  body.gs-portal .gs-dw-grp[open] > summary{ color:var(--gs-red); }
  body.gs-portal .gs-dw-grp a{ display:block; padding:12px 6px 12px 14px; font-size:14.5px; color:var(--gs-text); text-decoration:none; }
  body.gs-portal .gs-dw-grp a:active{ color:var(--gs-red); }
  body.gs-portal .gs-dw-link{ display:block; padding:15px 6px; font-size:16px; font-weight:600; color:var(--gs-ink); text-decoration:none; border-bottom:1px solid var(--gs-border-light); }
  body.gs-portal .gs-dw-trust{ display:flex; align-items:center; gap:9px; padding:18px 6px 0; font-size:12.5px; font-weight:600; color:var(--gs-muted); }
  @media (max-width:1023px){
    body.gs-portal .gs-mnav-list{ display:none; }
    body.gs-portal .gs-mnav-burger{ display:inline-flex; }
  }
  @media (prefers-reduced-motion:reduce){
    body.gs-portal .gs-mnav-top::after, body.gs-portal .gs-mnav-caret, body.gs-portal .gs-mnav-mega, body.gs-portal .gs-mnav-row, body.gs-portal .gs-feature-card, body.gs-portal .gs-feature-cta svg, body.gs-portal .gs-mnav-deep svg, body.gs-portal .gs-dw-grp > summary svg, body.gs-portal .gs-mbar-demo, body.gs-portal .gs-mbar-demo svg{ transition:none !important; }
    body.gs-portal .gs-mnav-row, body.gs-portal .gs-feature-card{ opacity:1 !important; transform:none !important; }
    body.gs-portal .gs-live-dot{ animation:none; }
  }

  /* top navigation (same look as the modernised pages) */
  body.gs-portal .gs-topnav{ position:fixed; top:0; left:0; right:0; height:48px; background:#0f1117; display:flex; align-items:center; gap:8px; padding:0 16px; z-index:900; box-shadow:0 1px 0 rgba(255,255,255,0.06); box-sizing:border-box; }
  body.gs-portal .gs-topnav .gs-brand{ display:inline-flex; align-items:center; gap:8px; margin-right:16px; white-space:nowrap; text-decoration:none; cursor:pointer; transition:opacity .15s ease; }
  body.gs-portal .gs-topnav a.gs-brand:hover{ opacity:0.85; }
  body.gs-portal .gs-topnav .gs-nav-links{ display:flex; align-items:center; gap:2px; flex:1; min-width:0; overflow-x:auto; justify-content:center; }
  body.gs-portal .gs-topnav .gs-nav-links a{ color:#C9CED6; font-size:13px; font-weight:500; text-decoration:none; padding:6px 10px; border-radius:6px !important; white-space:nowrap; }
  body.gs-portal .gs-topnav .gs-nav-links a.gs-active{ color:#fff; background:rgba(255,255,255,0.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.14); }
  body.gs-portal .gs-topnav .gs-nav-links a:hover{ color:#fff; background:rgba(255,255,255,0.06); text-decoration:none; }
  /* Horizontal-scroll affordance: visibly fade the overflowing edge(s) of the topnav links so it's
     obvious they scroll (mobile/narrow). gsTopnav.jspf JS toggles .gs-fade-l/.gs-fade-r by scroll pos;
     degrades gracefully (right edge fades on load whenever it overflows). */
  .gs-topnav .gs-nav-links.gs-fade-r{ -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 38px),transparent); mask-image:linear-gradient(to right,#000 calc(100% - 38px),transparent); }
  .gs-topnav .gs-nav-links.gs-fade-l{ -webkit-mask-image:linear-gradient(to right,transparent,#000 38px); mask-image:linear-gradient(to right,transparent,#000 38px); }
  .gs-topnav .gs-nav-links.gs-fade-l.gs-fade-r{ -webkit-mask-image:linear-gradient(to right,transparent,#000 38px,#000 calc(100% - 38px),transparent); mask-image:linear-gradient(to right,transparent,#000 38px,#000 calc(100% - 38px),transparent); }
  body.gs-portal .gs-topnav .gs-nav-right{ display:flex; align-items:center; gap:12px; margin-left:8px; }
  body.gs-portal .gs-topnav .gs-logout{ color:#C9CED6; font-size:12.5px; text-decoration:none; white-space:nowrap; }
  body.gs-portal .gs-topnav .gs-logout:hover{ color:#fff; text-decoration:none; }
  body.gs-portal .gs-topnav .gs-avatar{ width:28px; height:28px; border-radius:50% !important; background:var(--gs-red); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:none; cursor:pointer; text-decoration:none; }
  body.gs-portal .gs-topnav .gs-avatar:hover{ background:var(--gs-red-dark,#A80000); color:#fff; }
  /* logged-out state: Join Us + Login */
  body.gs-portal .gs-topnav .gs-nav-right-out{ margin-left:auto; gap:10px; }
  body.gs-portal .gs-topnav .gs-join{ display:inline-flex; align-items:center; gap:7px; background:var(--gs-red); color:#fff; font-size:13px; font-weight:700; letter-spacing:.01em; text-decoration:none; padding:8px 16px; border-radius:8px !important; white-space:nowrap; box-shadow:0 1px 2px rgba(208,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.13); transition:background .16s ease, transform .16s ease, box-shadow .16s ease; }
  body.gs-portal .gs-topnav .gs-join:hover{ background:#E11414; color:#fff; transform:translateY(-1px); box-shadow:0 7px 18px rgba(208,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.16); }
  body.gs-portal .gs-topnav .gs-join:active{ transform:translateY(0); box-shadow:0 1px 2px rgba(208,0,0,0.40); }
  body.gs-portal .gs-topnav .gs-join svg{ width:15px; height:15px; }
  body.gs-portal .gs-topnav .gs-login{ display:inline-flex; align-items:center; gap:7px; color:#D5D9E0; font-size:13px; font-weight:600; text-decoration:none; white-space:nowrap; padding:7px 15px; border:1px solid rgba(255,255,255,0.16); border-radius:8px !important; background:rgba(255,255,255,0.025); transition:color .16s ease, border-color .16s ease, background .16s ease; }
  body.gs-portal .gs-topnav .gs-login:hover{ color:#fff; border-color:rgba(255,255,255,0.42); background:rgba(255,255,255,0.08); text-decoration:none; }
  body.gs-portal .gs-topnav .gs-login svg{ width:14px; height:14px; }
  /* footer */
  body.gs-portal .gs-footer{ position:fixed; bottom:0; left:0; right:0; height:32px; background:#0f1117; color:var(--gs-faint); display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; z-index:899; }
  body.gs-portal .gs-footer p{ margin:0; }
  body.gs-portal .gs-footer a{ color:#C9CED6; text-decoration:none; }
  body.gs-portal .gs-footer a:hover{ color:#fff; }


  :where(body.gs-page-aum){
    --gs-red:#D00000; --gs-red-dark:#A80000; --gs-red-tint:#FBEAEA;
    --gs-ink:#0F1117; --gs-text:#3D434F; --gs-text-2:#3D434F; --gs-muted:#6B7280; --gs-faint:#9AA1AC;
    --gs-border:#D7DBE0; --gs-border-light:#E8EAEE;
    --gs-bg:#F4F5F7; --gs-card:#FFFFFF;
    --gs-amber-bg:#FCF1DC; --gs-amber-tx:#92600A;
    --gs-purple-bg:#EFEAF8; --gs-purple-tx:#5B3E96;
    --gs-topnav-bg:#0f1117;
  }
  html[data-theme="dark"] :where(body.gs-page-aum){
    --gs-ink:#F2F4F8; --gs-text:#C4CBD6; --gs-text-2:#C4CBD6; --gs-muted:#8B93A1; --gs-faint:#6B7280;
    --gs-border:#2A3242; --gs-border-light:#222A38;
    --gs-bg:#0F141C; --gs-card:#161D29;
    --gs-amber-bg:rgba(245,158,11,0.16); --gs-amber-tx:#E0A33C;
    --gs-purple-bg:rgba(167,139,250,0.16); --gs-purple-tx:#C4B5FD;
    --gs-topnav-bg:#0f1117;
  }

  /* ----- 1. Shared site header ----- */
  :where(body.gs-page-aum) .gs-topnav{ display:flex; align-items:center; gap:8px; height:48px; padding:0 16px; background:var(--gs-topnav-bg); box-shadow:0 1px 0 rgba(255,255,255,0.06); }
  :where(body.gs-page-aum) .gs-topnav .gs-brand{ display:inline-flex; align-items:center; gap:8px; flex:1 1 0; min-width:0; margin-right:0; }
  :where(body.gs-page-aum) .gs-topnav .gs-brand img{ height:22px; width:auto; display:block; }
  :where(body.gs-page-aum) .gs-topnav .gs-nav-links{ display:flex; align-items:center; gap:2px; flex:0 1 auto; justify-content:center; min-width:0; overflow-x:auto; }
  :where(body.gs-page-aum) .gs-topnav .gs-nav-links a{ color:#C9CED6; font-size:13px; font-weight:500; text-decoration:none; padding:6px 10px; border-radius:6px !important; white-space:nowrap; }
  :where(body.gs-page-aum) .gs-topnav .gs-nav-links a:hover{ color:#fff; background:rgba(255,255,255,0.06); }
  :where(body.gs-page-aum) .gs-topnav .gs-nav-links a.gs-active{ color:#fff; background:rgba(255,255,255,0.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.14); }
  :where(body.gs-page-aum) .gs-topnav .gs-nav-right{ display:flex; align-items:center; gap:12px; flex:1 1 0; justify-content:flex-end; margin-left:0; }
  :where(body.gs-page-aum) .gs-topnav .gs-logout{ color:#C9CED6; font-size:12.5px; text-decoration:none; white-space:nowrap; }
  :where(body.gs-page-aum) .gs-topnav .gs-logout:hover{ color:#fff; }
  :where(body.gs-page-aum) .gs-topnav .gs-avatar{ width:28px; height:28px; border-radius:50% !important; background:var(--gs-red); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:none; cursor:pointer; text-decoration:none; }
  :where(body.gs-page-aum) .gs-topnav .gs-avatar:hover{ background:var(--gs-red-dark, #A80000); color:#fff; }

  /* ----- 2. Page head ----- now inherited from the shared body.gs-app block (aum carries gs-app) ----- */

  /* ----- Page body ----- */
  /* Full-bleed content column (24px gutters) so the bulk-action cards,
     the directory table and the page header all share one width and
     left-align. Stays fluid/responsive at every viewport. */
  :where(body.gs-page-aum) .gs-aum-body{ padding:22px 24px 48px; }

  /* ----- Section headers / divider (bulk actions vs directory) ----- */
  :where(body.gs-page-aum) .aum-section-head{ margin:2px 0 16px; }
  :where(body.gs-page-aum) .aum-section-title{ margin:0; font-size:15px; font-weight:700; color:var(--gs-ink); display:flex; align-items:center; gap:9px; }
  :where(body.gs-page-aum) .aum-section-num{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:6px !important; background:var(--gs-red-tint,#FBEAEA); color:var(--gs-red); font-size:12px; font-weight:700; flex:none; }
  :where(body.gs-page-aum) .aum-section-desc{ margin:6px 0 0; font-size:12.5px; line-height:1.5; color:var(--gs-muted); max-width:780px; }
  :where(body.gs-page-aum) .aum-section-divider{ height:1px; background:var(--gs-border-light,var(--gs-border)); border:0; margin:32px 0 24px; }

  /* ----- Boot status banner ----- */
  :where(body.gs-page-aum) .aum-boot{ display:flex; align-items:center; gap:9px; font-size:12.5px; line-height:1.5; padding:10px 14px; border-radius:9px !important; margin-bottom:18px; }
  :where(body.gs-page-aum) .aum-boot.loading{ background:var(--gs-card); border:1px solid var(--gs-border); color:var(--gs-muted); }
  :where(body.gs-page-aum) .aum-boot.err{ background:var(--gs-amber-bg); border:1px solid var(--gs-amber-tx); color:var(--gs-amber-tx); }
  :where(body.gs-page-aum) .aum-boot.err strong{ color:var(--gs-ink); }
  :where(body.gs-page-aum) .aum-boot.err a{ color:var(--gs-amber-tx); font-weight:600; text-decoration:underline; }
  :where(body.gs-page-aum) .aum-boot-spin{ width:14px; height:14px; border:2px solid var(--gs-border); border-top-color:var(--gs-red); border-radius:50% !important; display:inline-block; animation:aumspin .7s linear infinite; }
  @keyframes aumspin{ to{ transform:rotate(360deg); } }

  /* ===== BETA badge + feedback banner (mirrors Analytics) ===== */
  /* .gs-beta-badge now inherited from the shared body.gs-app block */
  :where(body.gs-page-aum) .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:16px 24px 0; padding:13px 16px; border-radius:12px !important; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; }
  :where(body.gs-page-aum) .gs-fbbanner-spark{ flex:0 0 auto; width:36px; height:36px; border-radius:10px !important; background:#fff; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(208,0,0,0.10); }
  :where(body.gs-page-aum) .gs-fbbanner-spark svg{ width:19px; height:19px; stroke:var(--gs-red); fill:none; stroke-width:1.8; }
  :where(body.gs-page-aum) .gs-fbbanner-copy{ flex:1 1 auto; display:flex; flex-direction:column; gap:2px; line-height:1.4; min-width:0; }
  :where(body.gs-page-aum) .gs-fbbanner-copy b{ color:var(--gs-ink); font-size:13.5px; }
  :where(body.gs-page-aum) .gs-fbbanner-copy span{ color:var(--gs-text-2); font-size:12.5px; }
  :where(body.gs-page-aum) .gs-fbbanner-cta{ flex:0 0 auto; white-space:nowrap; display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 14px; border:none; border-radius:8px !important; background:var(--gs-red); color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s; }
  :where(body.gs-page-aum) .gs-fbbanner-cta:hover{ background:var(--gs-red-dark); }
  :where(body.gs-page-aum) .gs-fbbanner-cta svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; }
  :where(body.gs-page-aum) .gs-fbbanner-x{ flex:0 0 auto; background:transparent; border:0; color:var(--gs-muted); font-size:22px; line-height:1; cursor:pointer; padding:0 4px; align-self:flex-start; }
  :where(body.gs-page-aum) .gs-fbbanner-x:hover{ color:var(--gs-ink); }
  html[data-theme="dark"] :where(body.gs-page-aum) .gs-fbbanner{ background:linear-gradient(135deg,rgba(204,34,34,0.16) 0%,rgba(167,139,250,0.16) 100%); border-color:var(--gs-border); }
  html[data-theme="dark"] :where(body.gs-page-aum) .gs-fbbanner-spark{ background:var(--gs-card); box-shadow:0 2px 8px rgba(0,0,0,0.4); }
  :where(body.gs-page-aum) .gs-fbform{ display:flex; flex-direction:column; gap:10px; text-align:left; }
  :where(body.gs-page-aum) .gs-fbform label{ font-size:13px; font-weight:600; color:var(--text); }
  :where(body.gs-page-aum) .gs-fbform textarea{ width:100%; min-height:130px; resize:vertical; padding:10px 12px; border:1px solid var(--gs-border); border-radius:8px !important; font-family:inherit; font-size:13px; color:var(--text); background:var(--bg-input,#fff); box-sizing:border-box; }
  :where(body.gs-page-aum) .gs-fbform textarea:focus{ outline:none; border-color:var(--gs-red); }
  :where(body.gs-page-aum) .gs-fbform .gs-fbcount{ font-size:11px; color:var(--gs-faint); text-align:right; }
  :where(body.gs-page-aum) .gs-fbform .gs-fberr{ font-size:12px; color:var(--gs-red); display:none; }
  :where(body.gs-page-aum) .gs-fbform .gs-fberr.show{ display:block; }

  /* ===== Flow cards: keep the action buttons on one baseline across all 3 ===== */
  :where(body.gs-page-aum) .aum-grid > .aum-flow-card{ display:flex; flex-direction:column; }
  :where(body.gs-page-aum) .aum-grid > .aum-flow-card .aum-flow-body{ flex:1 1 auto; }
  :where(body.gs-page-aum) .aum-grid > .aum-flow-card .aum-flow-actions{ margin-top:auto; }

  /* ===== All-users bulk-management table ===== */
  :where(body.gs-page-aum) .aum-users{ margin-top:0; border:1px solid var(--line,var(--gs-border-light)); border-radius:12px !important; background:var(--bg-card,var(--gs-card)); padding:16px 20px 14px; }
  :where(body.gs-page-aum) .aum-users-hd{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
  :where(body.gs-page-aum) .aum-users-title{ font-size:15px; font-weight:700; color:var(--text,var(--gs-ink)); }
  :where(body.gs-page-aum) .aum-users-sub{ font-size:11.5px; color:var(--text-mute,var(--gs-muted)); margin-top:2px; }
  :where(body.gs-page-aum) .aum-users-filters{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
  :where(body.gs-page-aum) .aum-users-filters select{ height:32px; border:0.5px solid rgba(0,0,0,0.16); border-radius:6px !important; background:var(--bg-input,#fff); color:var(--text); font-size:12px; padding:0 8px; }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-users-filters select{ border-color:var(--gs-border); }
  :where(body.gs-page-aum) .aum-users-loading{ padding:6px 0 12px; }
  :where(body.gs-page-aum) .aum-users-bar{ height:4px; border-radius:3px; background:var(--bg-soft,#eef0f3); overflow:hidden; position:relative; }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-users-bar{ background:#222a38; }
  :where(body.gs-page-aum) .aum-users-bar span{ position:absolute; left:-40%; width:40%; height:100%; background:var(--accent,var(--gs-red)); border-radius:3px; animation:aumbar 1.05s ease-in-out infinite; }
  @keyframes aumbar{ 0%{ left:-40%; } 100%{ left:100%; } }
  :where(body.gs-page-aum) .aum-users-loadtext{ font-size:11.5px; color:var(--text-mute,var(--gs-muted)); margin-top:7px; }
  :where(body.gs-page-aum) .aum-users-actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; margin-bottom:10px; border-radius:9px !important; background:var(--bg-soft,#f6f7f9); border:1px solid var(--line,var(--gs-border-light)); }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-users-actions{ background:rgba(255,255,255,0.03); }
  :where(body.gs-page-aum) .aum-users-selinfo{ font-size:12.5px; font-weight:600; color:var(--text,var(--gs-ink)); }
  :where(body.gs-page-aum) .aum-users-actions .grow{ flex:1 1 auto; }
  :where(body.gs-page-aum) .aum-users-actions .btn-action[disabled]{ opacity:0.45; cursor:not-allowed; pointer-events:none; }
  :where(body.gs-page-aum) .aum-danger{ background:var(--accent,#D00000) !important; color:#fff !important; border:none !important; }
  :where(body.gs-page-aum) .aum-danger:hover{ background:#aa1a1a !important; }
  :where(body.gs-page-aum) .aum-danger[disabled]{ opacity:0.45; }
  /* Tidy affected-user list inside the bulk confirm dialog */
  :where(body.gs-page-aum) .aum-cu-list{ list-style:none; margin:6px 0 0; padding:4px 0; max-height:280px; overflow-y:auto; background:var(--bg-soft,#f6f7f9); border:0.5px solid var(--line,var(--gs-border-light)); border-radius:8px !important; }
  :where(body.gs-page-aum) .aum-cu-list li{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 14px; border-bottom:0.5px dashed var(--line,var(--gs-border-light)); }
  :where(body.gs-page-aum) .aum-cu-list li:last-child{ border-bottom:none; }
  :where(body.gs-page-aum) .aum-cu-nm{ font-weight:600; color:var(--text,var(--gs-ink)); font-size:12.5px; white-space:nowrap; }
  :where(body.gs-page-aum) .aum-cu-meta{ color:var(--text-mute,var(--gs-muted)); font-size:11.5px; text-align:right; }
  :where(body.gs-page-aum) .aum-cu-meta .em{ font-variant-numeric:tabular-nums; }
  :where(body.gs-page-aum) .aum-cu-meta .tm{ margin-left:10px; padding:1px 7px; border-radius:999px !important; background:var(--accent-bg,rgba(208,0,0,0.08)); color:var(--accent-deep,#a31919); font-size:10.5px; white-space:nowrap; }
  /* Dark-mode: analytics.css themes --text/--bg-soft but not --accent-deep,
     and .aum-modal-body isn't in its dark rules - cover both here. */
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-modal-body{ color:var(--text); }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-cu-list{ background:rgba(255,255,255,0.04); border-color:var(--line); }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-cu-nm{ color:var(--text); }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-cu-meta{ color:var(--text-mute); }
  html[data-theme="dark"] :where(body.gs-page-aum) .aum-cu-meta .tm{ background:rgba(204,34,34,0.22); color:#fca5a5; }
  :where(body.gs-page-aum) .aum-users-bulkerr{ font-size:12px; color:var(--gs-red); margin:6px 0 0; }
  /* table */
  :where(body.gs-page-aum) table.aum-utbl{ width:100%; border-collapse:collapse; font-size:12.5px; }
  :where(body.gs-page-aum) table.aum-utbl.aum-utbl-full{ min-width:980px; }
  :where(body.gs-page-aum) table.aum-utbl thead th{ position:sticky; top:0; z-index:1; background:var(--bg-card,var(--gs-card)); border-bottom:1px solid var(--line,var(--gs-border)); }
  :where(body.gs-page-aum) table.aum-utbl tbody td{ padding:8px 10px; border-bottom:0.5px solid var(--line,var(--gs-border-light)); color:var(--text,var(--gs-ink)); vertical-align:middle; white-space:nowrap; }
  :where(body.gs-page-aum) table.aum-utbl tbody tr:hover{ background:var(--bg-soft,rgba(0,0,0,0.025)); }
  :where(body.gs-page-aum) table.aum-utbl tbody tr.sel{ background:var(--accent-bg,rgba(208,0,0,0.08)); }
  :where(body.gs-page-aum) table.aum-utbl tbody tr.sel:hover{ background:var(--accent-bg,rgba(208,0,0,0.12)); }
  /* keep the checkbox column pinned while the wide table scrolls sideways */
  :where(body.gs-page-aum) .aum-utbl-chk{ width:34px; text-align:center; position:sticky; left:0; z-index:2; background:var(--bg-card,var(--gs-card)); }
  :where(body.gs-page-aum) table.aum-utbl tbody tr.sel .aum-utbl-chk{ background:var(--accent-bg,rgba(208,0,0,0.08)); }
  :where(body.gs-page-aum) .aum-utbl-chk input{ width:15px; height:15px; cursor:pointer; accent-color:var(--accent,var(--gs-red)); }
  :where(body.gs-page-aum) .aum-users-pager{ display:flex; align-items:center; justify-content:center; gap:12px; margin-top:12px; }
  :where(body.gs-page-aum) .aum-users-pageno{ font-size:12px; color:var(--text-mute,var(--gs-muted)); }
  :where(body.gs-page-aum) .aum-run-dot{ display:inline-block; width:8px; height:8px; border-radius:50% !important; margin-right:7px; background:#cbd5e1; vertical-align:middle; }
  :where(body.gs-page-aum) .aum-run-dot.running{ background:var(--gs-amber-tx); }
  :where(body.gs-page-aum) .aum-run-dot.ok{ background:#15803d; }
  :where(body.gs-page-aum) .aum-run-dot.err{ background:#B42318; }
  :where(body.gs-page-aum) .aum-run-dot.pending{ background:#cbd5e1; }

  /* Keep action modals within the viewport so they never push the window
     into horizontal scroll, and let the review table fit/wrap inside. */
  :where(body.gs-page-aum) .aum-modal .modal-card{ max-width:calc(100vw - 32px); box-sizing:border-box; }
  :where(body.gs-page-aum) #aumObPreviewTbl{ width:100%; min-width:0; }
  :where(body.gs-page-aum) #aumObPreviewTbl th, :where(body.gs-page-aum) #aumObPreviewTbl td{ white-space:normal; overflow-wrap:anywhere; }
  /* Disabled buttons in modal footers should look disabled (the base rule
     only covers the users-table bar), so a disabled Continue reads as such. */
  :where(body.gs-page-aum) .aum-modal-foot .btn-action[disabled]{ opacity:0.45; cursor:not-allowed; pointer-events:none; }

  @media (max-width:760px){
    :where(body.gs-page-aum) .gs-topnav .gs-nav-links{ display:none; }
    :where(body.gs-page-aum) .gs-pagehead{ flex-direction:column; align-items:stretch; }
    :where(body.gs-page-aum) .gs-fbbanner{ flex-wrap:wrap; }
    :where(body.gs-page-aum) .gs-fbbanner-cta{ width:100%; justify-content:center; }
  }

  /* Paste-grid inline autocomplete (Permission Template / Team suggestions) */
  :where(body.gs-page-aum) .aum-ac-pop{ position:fixed; z-index:100000; max-height:240px; overflow-y:auto;
    background:var(--bg-card,var(--gs-card)); border:1px solid var(--line,var(--gs-border));
    border-radius:8px !important; box-shadow:0 8px 24px rgba(15,17,23,0.18); padding:4px;
    font-size:12.5px; min-width:160px; }
  :where(body.gs-page-aum) .aum-ac-opt{ padding:6px 9px; border-radius:6px !important; cursor:pointer; color:var(--text,var(--gs-ink));
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  :where(body.gs-page-aum) .aum-ac-opt:hover, :where(body.gs-page-aum) .aum-ac-opt.hi{ background:var(--accent-bg,rgba(208,0,0,0.08)); color:var(--accent,var(--gs-red)); }

  /* Background "data refreshing" toast */
  :where(body.gs-page-aum) .aum-refresh-toast{ position:fixed; left:50%; bottom:22px; transform:translateX(-50%) translateY(8px);
    z-index:100001; display:flex; align-items:center; gap:9px;
    background:#15181F; color:#fff; padding:10px 15px; border-radius:10px !important;
    font-size:13px; box-shadow:0 10px 30px rgba(0,0,0,0.28); opacity:0; pointer-events:none;
    transition:opacity .2s ease, transform .2s ease; max-width:90vw; }
  :where(body.gs-page-aum) .aum-refresh-toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
  :where(body.gs-page-aum) .aum-refresh-spin{ width:14px; height:14px; border-radius:50%; border:2px solid rgba(255,255,255,0.35);
    border-top-color:#fff; animation:aumSpin .7s linear infinite; flex:none; }
  :where(body.gs-page-aum) .aum-refresh-check{ color:#34d399; font-weight:700; flex:none; }
  @keyframes aumSpin{ to{ transform:rotate(360deg); } }

/* ============================================================================
   PAGE: recordings2.jsp  (every selector scoped under body.gs-page-recordings2
   so its gs- classes, design tokens and dark theme never collide with the
   analytics-family pages; the duplicate reset was dropped). 
   ============================================================================ */
        /* reset dropped: identical to analytics global */

        body.gs-page-recordings2 .progressBar{
            background-color: #d00000;
            width: 0px;
            height: 10px;
            -moz-border-radius: 5px !important;
            -webkit-border-radius: 5px !important;
            -o-border-radius: 5px !important;
            border-radius: 5px !important;
            -moz-transition: .25s ease-out;
            -webkit-transition: .25s ease-out;
            -o-transition: .25s ease-out;
            transition: .25s ease-out;
        }

        body.gs-page-recordings2 img.lazy{
            opacity: 0;
            transform: scale(0.98);
            filter: blur(2px);
            transition:
                    opacity 0.4s ease-out,
                    transform 0.4s ease-out,
                    filter 0.4s ease-out;
            border-radius: 6px !important;
            display: block;
            width: 100%;
            height: auto;
            object-fit: cover;
            /*aspect-ratio: 4 / 3;*/
        }

        body.gs-page-recordings2 img.lazy.loaded{
            opacity: 1;
            transform: scale(1);
            filter: blur(0);
        }

        body.gs-page-recordings2 img.lazy:hover{
            transform: scale(1.03);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
            transition: transform 0.25s ease, box-shadow 0.25s ease;
            z-index: 2;
            position: relative;
        }

        /* ===================================================================
           Recordings visual refresh (re-skin layer)
           Layered on top of the existing platform CSS. No functional change.
           =================================================================== */
        /* Dark theme bootstrap lives in a tiny script before this style
           block; see the matching html[data-theme="dark"] overrides at the
           end of this stylesheet. Shares goodsam_portal_theme with the
           analytics portal so the preference follows the user. */
        body.gs-page-recordings2{
            --gs-red: #D00000;
            --gs-red-dark: #A80000;
            --gs-red-tint: #FBEAEA;
            --gs-ink: #0F1117;
            --gs-text-2: #3D434F;
            --gs-muted: #6B7280;
            --gs-faint: #9AA1AC;
            --gs-border: #D7DBE0;
            --gs-border-light: #E8EAEE;
            --gs-bg: #F4F5F7;
            --gs-card: #FFFFFF;
            --gs-green-bg: #E5F4E8;  --gs-green-tx: #1E7B34;
            --gs-amber-bg: #FCF1DC;  --gs-amber-tx: #92600A;
            --gs-redpill-bg: #FBEAEA; --gs-redpill-tx: #B42318;
            --gs-blue-bg: #E7EFF9;   --gs-blue-tx: #1D4F91;
            --gs-purple-bg: #EFEAF8; --gs-purple-tx: #5B3E96;
            --gs-grey-bg: #EEF0F3;   --gs-grey-tx: #4B5563;
        }

        body.gs-page-recordings2, body.gs-page-recordings2{
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
            color: var(--gs-ink);
            background: var(--gs-bg);
            min-height: 100%;
        }

        /* ----- Top navigation bar ----- */
        body.gs-page-recordings2 .gs-brand-mark{
            width: 9px; height: 9px;
            border-radius: 2px !important;
            background: var(--gs-red);
            display: inline-block;
        }

        /* ----- Footer ----- */

        /* ----- Page frame and header ----- */
        body.gs-page-recordings2 .gs-page{
            width: 100%;
            max-width: 100%;
            padding: 64px 20px 56px;
            text-align: left;
            box-sizing: border-box;
        }
        /* Pagehead (container, h1, .gs-pagedesc, actions, .gs-beta-badge) now comes from the
           shared `body.gs-app` block — identical to analytics. recordings2-only full-bleed
           margins are applied in the full-bleed section at the end of this file. */

        /* ----- Collapsible help ----- */
        body.gs-page-recordings2 .gs-help{
            margin: 6px 0 16px;
            border: 1px solid var(--gs-border-light);
            border-radius: 10px !important;
            background: var(--gs-card);
        }
        body.gs-page-recordings2 .gs-help summary{
            cursor: pointer;
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--gs-text-2);
            list-style: none;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        body.gs-page-recordings2 .gs-help summary::-webkit-details-marker{ display: none; }
        body.gs-page-recordings2 .gs-help summary:before{
            content: "";
            width: 7px; height: 7px;
            border-right: 2px solid var(--gs-faint);
            border-bottom: 2px solid var(--gs-faint);
            transform: rotate(-45deg);
            transition: transform 0.15s ease;
            flex: none;
        }
        body.gs-page-recordings2 .gs-help[open] summary:before{ transform: rotate(45deg); }
        body.gs-page-recordings2 .gs-help-body{
            padding: 0 16px 14px;
            font-size: 13px;
            color: var(--gs-text-2);
            line-height: 1.6;
            text-align: left;
        }
        body.gs-page-recordings2 .gs-help-body p{ margin: 0; }

        /* ----- Tabs ----- */
        /* ----- Section navigation (cards) ----- */

        

        

        

        /* ----- Filter strip ----- */
        body.gs-page-recordings2 .gs-filterbar{
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: flex-start;
            background: var(--gs-card);
            border: 1px solid var(--gs-border-light);
            border-radius: 10px !important;
            padding: 14px 16px 8px;
            margin: 0 0 14px;
            text-align: left;
        }
        body.gs-page-recordings2 .gs-field{ display: flex; flex-direction: column; align-items: flex-start; }
        body.gs-page-recordings2 .gs-field-label{
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--gs-muted);
            margin: 0 0 6px;
            line-height: 1.4;
            white-space: nowrap;
        }
        body.gs-page-recordings2 .gs-field input[type=text], body.gs-page-recordings2 .gs-field input[type=email], body.gs-page-recordings2 .gs-field input[type=number]{
            height: 36px;
            border: 1px solid var(--gs-border);
            border-radius: 8px !important;
            padding: 0 10px;
            font-family: inherit;
            font-size: 13px;
            color: var(--gs-ink);
            background: #fff;
            margin: 0;
            box-shadow: none;
            box-sizing: border-box;
        }
        body.gs-page-recordings2 .gs-field input:focus, body.gs-page-recordings2 .gs-field select:focus{
            border-color: var(--gs-red);
            outline: none;
            box-shadow: 0 0 0 3px rgba(208, 0, 0, 0.08);
        }
        body.gs-page-recordings2 .gs-date{ width: 110px; text-align: center; }
        body.gs-page-recordings2 .gs-help-slot{
            height: 16px;
            font-size: 11px;
            color: var(--gs-faint);
            margin-top: 4px;
            line-height: 1.4;
            white-space: nowrap;
        }

        /* ----- Selects (filter strip and table cells) ----- */
        body.gs-page-recordings2 .gs-select, body.gs-page-recordings2 select.border-radius-none{
            background-color: #fff;
            border: 1px solid var(--gs-border);
            border-radius: 8px !important;
            height: 36px;
            padding: 0 10px;
            font-family: inherit;
            font-size: 13px;
            color: var(--gs-ink);
            margin: 0;
            box-sizing: border-box;
        }
        body.gs-page-recordings2 table.dataTable select.border-radius-none{ height: 30px; font-size: 12px; }
        /* Dashed border while no value is selected (progressive enhancement) */
        body.gs-page-recordings2 select.border-radius-none:has(option[value='']:checked){
            border-style: dashed;
            color: var(--gs-muted);
        }

        /* ----- Toggle switch (replaces the native checkbox visually) ----- */
        .gs-switch{
            position: relative;
            display: inline-flex;
            align-items: center;
            cursor: pointer;
            height: 36px;
            margin: auto;
        }
        .gs-switch input{ position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
        .gs-switch-track{
            width: 40px; height: 22px;
            border-radius: 999px !important;
            background: #C9CED6;
            transition: background 0.15s ease;
            position: relative;
            display: inline-block;
            flex: none;
        }
        .gs-switch-track:after{
            content: "";
            position: absolute;
            top: 2px; left: 2px;
            width: 18px; height: 18px;
            border-radius: 50% !important;
            background: #fff;
            box-shadow: 0 1px 2px rgba(15, 17, 23, 0.25);
            transition: left 0.15s ease;
        }
        .gs-switch input:checked + .gs-switch-track{ background: var(--gs-red); }
        .gs-switch input:checked + .gs-switch-track:after{ left: 20px; }
        .gs-switch input:focus-visible + .gs-switch-track{ outline: 2px solid var(--gs-red); outline-offset: 2px; }

        /* ----- Buttons ----- */
        /* Legacy btn-u is restyled to the secondary look so popup content
           generated elsewhere picks up the new chrome automatically. */
        body.gs-page-recordings2 .btn-u, body.gs-page-recordings2 button.btn-u, body.gs-page-recordings2 a.btn-u{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 600;
            line-height: 1;
            padding: 10px 16px;
            border-radius: 8px !important;
            border: 1px solid var(--gs-border);
            background: #fff;
            background-image: none;
            color: var(--gs-ink);
            cursor: pointer;
            text-shadow: none;
            text-decoration: none;
            white-space: nowrap;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }
        body.gs-page-recordings2 .btn-u:hover{ background: #FAFBFC; border-color: var(--gs-faint); color: var(--gs-ink); text-decoration: none; }
        body.gs-page-recordings2 .gs-btn{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 600;
            line-height: 1;
            padding: 10px 16px;
            border-radius: 8px !important;
            border: 1px solid transparent;
            cursor: pointer;
            text-decoration: none;
            white-space: nowrap;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }
        body.gs-page-recordings2 .gs-btn-primary{ background: var(--gs-red); border-color: var(--gs-red); color: #fff; }
        body.gs-page-recordings2 .gs-btn-primary:hover{ background: var(--gs-red-dark); border-color: var(--gs-red-dark); color: #fff; }
        body.gs-page-recordings2 .gs-btn-secondary{ background: #fff; border-color: var(--gs-border); color: var(--gs-ink); }
        body.gs-page-recordings2 .gs-btn-secondary:hover{ background: #FAFBFC; border-color: var(--gs-faint); color: var(--gs-ink); }
        body.gs-page-recordings2 .gs-btn-ghost{ background: transparent; border-color: transparent; color: var(--gs-text-2); }
        body.gs-page-recordings2 .gs-btn-ghost:hover{ background: var(--gs-grey-bg); color: var(--gs-ink); }
        body.gs-page-recordings2 .gs-btn-danger{ background: #fff; border-color: #F1C8C4; color: var(--gs-redpill-tx); }
        body.gs-page-recordings2 .gs-btn-danger:hover{ background: var(--gs-redpill-bg); border-color: #E5ABA5; color: var(--gs-redpill-tx); }
        body.gs-page-recordings2 .gs-btn-sm{ padding: 7px 12px; font-size: 12.5px; }
        body.gs-page-recordings2 .gs-btn-xs{ padding: 4px 10px; font-size: 12px; border-radius: 6px !important; }
        body.gs-page-recordings2 .gs-btn-icon{ padding: 7px; }
        body.gs-page-recordings2 .gs-btn b, body.gs-page-recordings2 .gs-btn-xs b{ font-weight: 600; color: inherit; }

        /* ----- Table chrome ----- */
        /* Tables never clip. If the worst case (all generic columns enabled
           on a narrow viewport) genuinely cannot fit, the wrapper scrolls -
           and the Actions column is sticky on the right, so the buttons
           never leave the screen; the data scrolls underneath them. */
        body.gs-page-recordings2 table.dataTable tbody tr td:last-child, body.gs-page-recordings2 table.dataTable thead tr th:last-child{
            position: sticky;
            right: 0;
            z-index: 2;
            background-color: #fff !important;
        }
        /* The stripe-killer rule (tr.odd td / tr.even td -> transparent) has
           higher specificity than the sticky rule above, which made the
           sticky Actions cell see-through. These match it and win. */
        body.gs-page-recordings2 table.dataTable tbody tr.odd td:last-child, body.gs-page-recordings2 table.dataTable tbody tr.even td:last-child{ background-color: #fff !important; }
        body.gs-page-recordings2 table.dataTable tbody tr:hover td:last-child, body.gs-page-recordings2 table.dataTable tbody tr.odd:hover td:last-child, body.gs-page-recordings2 table.dataTable tbody tr.even:hover td:last-child{ background-color: #fafaf9 !important; }
        /* edge shadow only when the table actually overflows (class set in JS) */
        body.gs-page-recordings2 .gs-tablewrap.gs-scrolls table.dataTable tbody tr td:last-child, body.gs-page-recordings2 .gs-tablewrap.gs-scrolls table.dataTable thead tr th:last-child{
            box-shadow: -12px 0 12px -12px rgba(15, 17, 23, 0.28);
        }
        body.gs-page-recordings2 table.dataTable{ background: transparent; border: none; }
        body.gs-page-recordings2 table.dataTable thead th{
            font-size: 10px;
            font-weight: 600;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: var(--gs-muted);
            background: transparent;
            border-top: none;
            border-left: none;
            border-right: none;
            border-bottom: 0.5px solid var(--gs-border);
            padding: 9px 12px;
        }
        body.gs-page-recordings2 table.dataTable tbody tr:hover td{ background: #fafaf9; }
        body.gs-page-recordings2 table.dataTable tbody td a b{ font-weight: 600; }

        /* Sort indicators: faint arrows instead of the legacy background images */
        body.gs-page-recordings2 table.dataTable thead th.sorting, body.gs-page-recordings2 table.dataTable thead th.sorting_asc, body.gs-page-recordings2 table.dataTable thead th.sorting_desc, body.gs-page-recordings2 table.dataTable thead th.sorting_asc_disabled, body.gs-page-recordings2 table.dataTable thead th.sorting_desc_disabled{
            background-image: none !important;
            padding-right: 24px;
            position: relative;
            cursor: pointer;
        }
        body.gs-page-recordings2 table.dataTable thead th.sorting:after, body.gs-page-recordings2 table.dataTable thead th.sorting_asc:after, body.gs-page-recordings2 table.dataTable thead th.sorting_desc:after{
            position: absolute;
            right: 9px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 10px;
            color: var(--gs-faint);
            text-transform: none;
            letter-spacing: 0;
        }

        /* ----- Pills, chips and badges ----- */
        body.gs-page-recordings2 .gs-pill{
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            border-radius: 999px !important;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.5;
            white-space: nowrap;
            vertical-align: middle;
        }

        body.gs-page-recordings2 .gs-ref{
            display: inline-block;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
            font-size: 12px;
            background: var(--gs-grey-bg);
            border: 1px solid var(--gs-border-light);
            border-radius: 6px !important;
            padding: 3px 8px;
            color: var(--gs-ink);
            cursor: pointer;
            max-width: 220px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            vertical-align: middle;
        }
        body.gs-page-recordings2 .gs-ref:hover{ border-color: var(--gs-faint); }
        body.gs-page-recordings2 .gs-ref-empty{ font-style: italic; color: var(--gs-faint); font-size: 12.5px; }

        body.gs-page-recordings2 .gs-badge{
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: #fff;
            border: 1px solid var(--gs-border);
            border-radius: 999px !important;
            padding: 4px 12px;
            font-size: 12px;
            color: var(--gs-text-2);
            cursor: pointer;
            white-space: nowrap;
            transition: border-color 0.15s ease, background 0.15s ease;
        }
        body.gs-page-recordings2 .gs-badge:hover{ border-color: var(--gs-faint); background: #FAFBFC; }
        body.gs-page-recordings2 .gs-badge b{ font-weight: 600; color: var(--gs-ink); }

        body.gs-page-recordings2 .gs-link{ color: var(--gs-muted) !important; font-size: 12px; cursor: pointer; text-decoration: none; }
        body.gs-page-recordings2 .gs-link:hover{ color: var(--gs-red) !important; }
        body.gs-page-recordings2 .gs-link b{ font-weight: 600; }

        /* ----- Inline alerts ----- */
        body.gs-page-recordings2 .gs-alert{
            display: block;
            background: var(--gs-redpill-bg);
            color: var(--gs-redpill-tx);
            border: 1px solid #F1C8C4;
            border-radius: 8px !important;
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 600;
            text-align: left;
            margin-bottom: 14px;
        }

        /* ----- Table toolbar (AI Documents tab) ----- */
        body.gs-page-recordings2 .gs-table-toolbar{
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 8px;
            margin: 0 0 10px;
        }

        

        

        

        

        /* ----- Misc cell helpers ----- */
        body.gs-page-recordings2 .gs-cell-muted{ color: var(--gs-faint); font-size: 12.5px; }

        /* ===================== v2 components ===================== */

        /* Action toolbar groups: buttons never stretch; groups stack as whole rows. */
        body.gs-page-recordings2 .gs-actiongroup{
            display: inline-flex; flex-wrap: nowrap; gap: 1px;
            border: 1px solid var(--gs-border);
            border-radius: 8px !important; overflow: hidden;
            background: var(--gs-border-light); /* shows through the 1px gaps as dividers */
        }
        body.gs-page-recordings2 .gs-act{
            display: inline-flex; align-items: center; gap: 5px;
            border: none; background: #fff; padding: 6px 10px;
            font-size: 12px; font-weight: 500; color: var(--gs-text-2) !important;
            cursor: pointer; white-space: nowrap; font-family: inherit;
            flex: 0 0 auto; text-decoration: none;
            transition: background 0.12s ease, color 0.12s ease;
        }
        body.gs-page-recordings2 .gs-act:hover{ background: var(--gs-grey-bg); color: var(--gs-ink) !important; text-decoration: none; }
        body.gs-page-recordings2 .gs-actiongroup.danger .gs-act{ color: var(--gs-redpill-tx) !important; }
        body.gs-page-recordings2 .gs-actiongroup.danger .gs-act:hover{ background: var(--gs-redpill-bg); color: var(--gs-redpill-tx) !important; }
        /* Cap the action block in table cells so ultra-wide monitors give spare
           width to the data columns instead of one long row of buttons. */
        body.gs-page-recordings2 table.dataTable td .gs-status-stack{ display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 6px; }

        /* Session done state: quiet green tick once an action has been used.
           In-memory only; resets when the page reloads (same lifetime as the
           legacy grey visited-cell cue this replaces). */
        body.gs-page-recordings2 .gs-act-done{ background: var(--gs-green-bg) !important; color: var(--gs-green-tx) !important; animation: gs-done-pop 0.3s ease; }
        body.gs-page-recordings2 .gs-act-done:hover{ background: #D9EEDD !important; color: var(--gs-green-tx) !important; }
        body.gs-page-recordings2 .gs-act-done .ic path{ stroke-dasharray: 1; stroke-dashoffset: 1; animation: gs-tick-draw 0.35s ease-out forwards 0.05s; }
        body.gs-page-recordings2 .gs-act-done.gs-noanim, body.gs-page-recordings2 .gs-act-done.gs-noanim .ic path{ animation: none; stroke-dashoffset: 0; }
        @keyframes gs-tick-draw { to { stroke-dashoffset: 0; } }
        @keyframes gs-done-pop { 0% { transform: scale(1); } 40% { transform: scale(0.95); } 100% { transform: scale(1); } }

        /* Results bar with the table/tiles toggle */
        body.gs-page-recordings2 .gs-results-bar{ display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
        body.gs-page-recordings2 .gs-results-bar .gs-toggle-hintwrap{ margin-left: auto; }
        body.gs-page-recordings2 .gs-sourcefilter{ display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
        body.gs-page-recordings2 .gs-sourcefilter:empty{ display: none; }
        body.gs-page-recordings2 .gs-fchip{ display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px !important; border: 1px solid var(--gs-border); background: #fff; color: var(--gs-text-2); font-size: 12px; font-weight: 600; cursor: pointer; user-select: none; transition: background 0.12s ease, border-color 0.12s ease; }
        body.gs-page-recordings2 .gs-fchip .gs-fdot{ width: 8px; height: 8px; border-radius: 50% !important; background: currentColor; opacity: 0.85; }
        body.gs-page-recordings2 .gs-fchip.gs-fchip-all{ color: var(--gs-text-2); }
        body.gs-page-recordings2 .gs-fchip.active{ border-color: transparent; }
        body.gs-page-recordings2 .gs-fchip.active.tone-blue{ background: var(--gs-blue-bg); color: var(--gs-blue-tx); }
        body.gs-page-recordings2 .gs-fchip.active.tone-purple{ background: var(--gs-purple-bg); color: var(--gs-purple-tx); }
        body.gs-page-recordings2 .gs-fchip.active.tone-amber{ background: var(--gs-amber-bg); color: var(--gs-amber-tx); }
        body.gs-page-recordings2 .gs-fchip.active.tone-green{ background: var(--gs-green-bg); color: var(--gs-green-tx); }
        body.gs-page-recordings2 .gs-fchip.active.tone-red{ background: var(--gs-redpill-bg); color: var(--gs-redpill-tx); }
        body.gs-page-recordings2 .gs-fchip.active.tone-grey{ background: var(--gs-grey-bg); color: var(--gs-grey-tx); }
        body.gs-page-recordings2 .gs-fchip:not(.active) .gs-fdot{ color: var(--gs-faint); }
        body.gs-page-recordings2 .gs-fchip.gs-fchip-all.active{ background: var(--gs-ink); color: #fff; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-fchip{ background: var(--gs-card); border-color: var(--gs-border); }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-fchip.gs-fchip-all.active{ background: var(--gs-text-2); color: var(--gs-bg); }
        body.gs-page-recordings2 .gs-seg{ display: inline-flex; background: var(--gs-grey-bg); border: 1px solid var(--gs-border-light); border-radius: 8px !important; padding: 2px; gap: 2px; }
        body.gs-page-recordings2 .gs-seg button{
            border: none; background: transparent; padding: 6px 12px; border-radius: 6px !important;
            font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--gs-muted); cursor: pointer;
            display: inline-flex; align-items: center; gap: 6px;
        }
        body.gs-page-recordings2 .gs-seg button.active{ background: #fff; color: var(--gs-ink); box-shadow: 0 1px 2px rgba(15,17,23,0.08); }

        /* Tile view */
        body.gs-page-recordings2 .gs-tiles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 11px; text-align: left; }
        body.gs-page-recordings2 .gs-card{
            background: #fff; border: 0.5px solid var(--gs-border-light); border-radius: 10px !important;
            overflow: hidden; display: flex; flex-direction: column;
            transition: box-shadow 0.15s ease, border-color 0.15s ease;
        }
        body.gs-page-recordings2 .gs-card:hover{ border-color: var(--gs-border); box-shadow: 0 4px 16px rgba(15,17,23,0.07); }
        body.gs-page-recordings2 .gs-card-thumb{ position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2A2E37, #444A56); flex: none; overflow: hidden; }
        body.gs-page-recordings2 .gs-card-thumb img.lazy{ width: 100%; height: 100%; object-fit: cover; display: block; }
        body.gs-page-recordings2 .gs-card-thumb .thumb-topleft{ position: absolute; top: 10px; left: 10px; z-index: 2; }
        body.gs-page-recordings2 .gs-card-thumb .thumb-topright{ position: absolute; top: 10px; right: 10px; z-index: 2; }
        body.gs-page-recordings2 .gs-card-thumb.no-media{ display: flex; align-items: center; justify-content: center; color: #828B99; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
        body.gs-page-recordings2 .gs-format-chip{ background: rgba(15,17,23,0.75); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px !important; }
        body.gs-page-recordings2 .gs-card-body{ padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 9px; }
        body.gs-page-recordings2 .gs-card-titleline{ display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
        body.gs-page-recordings2 .gs-card-ref{
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
            font-size: 14.5px; font-weight: 700; color: var(--gs-ink);
            background: var(--gs-grey-bg); border: 1px solid var(--gs-border-light);
            border-radius: 7px !important; padding: 3px 9px;
            max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            cursor: pointer;
        }
        body.gs-page-recordings2 .gs-card-ref:hover{ border-color: var(--gs-faint); }
        body.gs-page-recordings2 .gs-card-ref.gs-card-ref-empty{ font-family: inherit; font-style: italic; font-weight: 500; color: var(--gs-faint); background: transparent; border: 1px dashed var(--gs-border); cursor: default; }
        body.gs-page-recordings2 .gs-card-meta{ font-size: 11.5px; color: var(--gs-faint); }
        body.gs-page-recordings2 .gs-card-person{ font-size: 12.5px; color: var(--gs-text-2); line-height: 1.5; }
        body.gs-page-recordings2 .gs-card-person b{ color: var(--gs-ink); font-weight: 600; }
        body.gs-page-recordings2 .gs-card-fields{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; border-top: 0.5px dashed var(--gs-border-light); padding-top: 9px; }
        body.gs-page-recordings2 .gs-card-field{ min-width: 0; }
        body.gs-page-recordings2 .gs-card-field .gs-field-label{ margin-bottom: 3px; display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
        body.gs-page-recordings2 .gs-card-field select.border-radius-none{ width: 100% !important; height: 30px; font-size: 12px; }
        body.gs-page-recordings2 .gs-status-stack{ display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
        body.gs-page-recordings2 .gs-card-actions{ border-top: 0.5px solid var(--gs-border-light); padding: 10px 14px; margin-top: auto; }
        /* Flatten groups into a uniform grid inside cards: every button the same size. */
        body.gs-page-recordings2 .gs-card-actions .gs-actions{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: none; }
        body.gs-page-recordings2 .gs-card-actions .gs-actiongroup{ display: contents; }
        body.gs-page-recordings2 .gs-card-actions .gs-act{ border: 1px solid var(--gs-border); border-radius: 8px !important; justify-content: center; padding: 6px 4px; font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
        body.gs-page-recordings2 .gs-card-actions .gs-actiongroup.danger .gs-act{ border-color: #F1C8C4; }
        body.gs-page-recordings2 .gs-card-actions .gs-act-done{ border-color: #BCE0C3 !important; }
        body.gs-page-recordings2 .gs-card-actions .gs-status-stack{ margin-top: 8px; }

        body.gs-page-recordings2 .gs-person-cell b{ color: var(--gs-ink); font-weight: 600; }
        body.gs-page-recordings2 .gs-meta-num{ font-variant-numeric: tabular-nums; }

        /* Fit comfortably on 1920x1080 at 125% Windows scaling (~1536px effective) */
        @media (max-width: 1640px) {
            body.gs-page-recordings2 .gs-page{ padding-left: 24px; padding-right: 24px; }
            body.gs-page-recordings2 table.dataTable thead th{ padding: 9px 7px; font-size: 10.5px; letter-spacing: 0.05em; }
            body.gs-page-recordings2 table.dataTable tbody td{ padding: 9px 7px; font-size: 12.5px; }
            body.gs-page-recordings2 table.dataTable thead th.sorting, body.gs-page-recordings2 table.dataTable thead th.sorting_asc, body.gs-page-recordings2 table.dataTable thead th.sorting_desc{ padding-right: 18px; }
            body.gs-page-recordings2 .gs-act{ padding: 5px 7px; font-size: 11px; gap: 4px; }
            body.gs-page-recordings2 .gs-act .ic{ width: 12px; height: 12px; }
            body.gs-page-recordings2 table.dataTable .gs-actions{ max-width: 460px; }
            body.gs-page-recordings2 table.dataTable select.border-radius-none, body.gs-page-recordings2 table.dataTable .gs-select{ height: 28px; font-size: 11.5px; padding: 0 8px; max-width: 130px; }
            body.gs-page-recordings2 .gs-filecell .gs-fileid{ font-size: 11.5px; }
            body.gs-page-recordings2 .gs-ref{ max-width: 150px; font-size: 11.5px; }
            body.gs-page-recordings2 .gs-badge{ padding: 3px 10px; font-size: 11.5px; }
            body.gs-page-recordings2 .gs-pill{ font-size: 11.5px; padding: 2px 8px; }
        }
        @media (max-width: 980px) {
            body.gs-page-recordings2 .gs-page{ padding: 60px 12px 52px; }
            body.gs-page-recordings2 .gs-pagehead{ flex-direction: column; align-items: stretch; }
            body.gs-page-recordings2 .gs-pagehead-actions{ justify-content: flex-start; }

            
            body.gs-page-recordings2 .gs-filterbar{ gap: 12px; }
        }
        @media (max-width: 640px) {
            body.gs-page-recordings2 .gs-filterbar{ flex-direction: column; align-items: stretch; }
            body.gs-page-recordings2 .gs-field{ width: 100%; }
            body.gs-page-recordings2 .gs-field input[type=text], body.gs-page-recordings2 .gs-field input[type=email], body.gs-page-recordings2 .gs-field select, body.gs-page-recordings2 .gs-date{ width: 100% !important; }
            body.gs-page-recordings2 .gs-filterbar .gs-btn{ width: 100%; }
            body.gs-page-recordings2 .gs-tiles{ grid-template-columns: 1fr; }
            body.gs-page-recordings2 .gs-results-bar{ justify-content: stretch; }
            body.gs-page-recordings2 .gs-nav-links{ display: none; }
        }

        /* ----- Section panes (Bootstrap tab-content/tab-pane no longer used) ----- */
        body.gs-page-recordings2 #mainTab > .gs-pane{ display: none; }
        body.gs-page-recordings2 #mainTab > .gs-pane.gs-pane-active{ display: block; }

        /* ----- Table preview thumbnails: fixed display box so column
                resizing (e.g. after a tiles round-trip) can never inflate them ----- */
        body.gs-page-recordings2 .gs-thumb-img{ max-width: 156px; max-height: 200px; width: auto !important; height: auto !important; display: block; margin: 0 auto; border-radius: 8px !important; }
        body.gs-page-recordings2 #allRecordingsTable thead th:first-child{ width: 172px; min-width: 172px; }

        /* ----- Thumbnail hide/show chip ----- */
        body.gs-page-recordings2 .gs-thumb-toggle{ display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 9px; border-radius: 999px !important; background: var(--gs-grey-bg); color: var(--gs-grey-tx); font-size: 10.5px; font-weight: 600; cursor: pointer; user-select: none; }
        body.gs-page-recordings2 .gs-thumb-toggle:hover{ background: var(--gs-border-light); color: var(--gs-ink); text-decoration: none; }
        body.gs-page-recordings2 .gs-thumb-toggle .ic{ width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
        body.gs-page-recordings2 .gs-thumb-overlay{ position: absolute; left: 8px; bottom: 8px; z-index: 3; margin-top: 0; background: rgba(255,255,255,0.92); }
        body.gs-page-recordings2 .gs-card-thumb.no-media .gs-thumb-overlay{ background: rgba(255,255,255,0.16); color: #C8CDD6; }

        /* ----- Tile-view discovery hint (one-time, dismissable) ----- */
        body.gs-page-recordings2 .gs-toggle-hintwrap{ position: relative; display: inline-flex; }
        body.gs-page-recordings2 .gs-tilehint{ position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; display: inline-flex; align-items: center; gap: 9px; max-width: 320px; padding: 10px 12px; background: var(--gs-ink); color: #fff; border-radius: 10px !important; box-shadow: 0 8px 28px rgba(15,17,23,0.28); font-size: 12.5px; line-height: 1.35; animation: gs-hint-in 0.35s ease; }
        body.gs-page-recordings2 .gs-tilehint .ic{ width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; flex: 0 0 auto; }
        body.gs-page-recordings2 .gs-tilehint-text{ white-space: normal; }
        body.gs-page-recordings2 .gs-tilehint-arrow{ position: absolute; top: -6px; right: 26px; width: 12px; height: 12px; background: var(--gs-ink); transform: rotate(45deg); border-radius: 2px; }
        @keyframes gs-hint-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-tilehint, html[data-theme="dark"] body.gs-page-recordings2 .gs-tilehint-arrow{ background: #2C3A52; }
        body.gs-page-recordings2 .gs-theme-hintwrap{ position: relative; display: inline-flex; }
        body.gs-page-recordings2 .gs-theme-hint{ max-width: 340px; }

        /* ----- AI Documents: line Delete up across rows even when the tool
                set differs. Pure layout on the STANDARD .gs-actions structure
                (no extra wrappers) so the overflow/compact system is
                unaffected: the actions block right-aligns and the danger
                group is pushed to a consistent rightmost slot. In compact
                mode Delete relocates into the More menu as usual and this
                rule simply finds no inline danger group to pin. ----- */
        body.gs-page-recordings2 #allDocumentsTable td .gs-actions{ display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; max-width: none; margin-left: auto; }
        body.gs-page-recordings2 #allDocumentsTable td .gs-actions .gs-actiongroup.danger{ margin-left: 6px; }

        /* ----- Long free-text cells (Messages content): clamp + click to expand ----- */
        body.gs-page-recordings2 .gs-clamp{ max-width: 340px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; cursor: pointer; }
        body.gs-page-recordings2 .gs-clamp.open{ -webkit-line-clamp: unset; display: block; }

        /* ----- Compact tier: applied per-table by gsMarkScrollableTables when
                the table would otherwise scroll horizontally. Buttons go
                icon-only (labels move to tooltips), media and selects
                tighten. If it still cannot fit, gs-scrolls is added and the
                wrapper scrolls with the sticky Actions column. ----- */
        /* Compact tier = overflow menu. View stays inline as a full labelled
           button; every other action moves into a "More" dropdown with full
           labels. The action ELEMENTS are the originals (relocated, not
           rebuilt) so the td-id click dispatch is unchanged. */
        body.gs-page-recordings2 .gs-compact table.dataTable .gs-actions{ max-width: 240px; }
        body.gs-page-recordings2 .gs-compact .gs-thumb-img{ max-width: 120px; max-height: 158px; }
        body.gs-page-recordings2 .gs-compact #allRecordingsTable thead th:first-child{ width: 136px; min-width: 136px; }
        body.gs-page-recordings2 .gs-compact table.dataTable .gs-select, body.gs-page-recordings2 .gs-compact table.dataTable select.border-radius-none{ max-width: 120px; }
        body.gs-page-recordings2 .gs-compact .gs-clamp{ max-width: 240px; }
        /* the More button only exists in compact mode */
        body.gs-page-recordings2 .gs-morewrap{ display: none; }
        body.gs-page-recordings2 .gs-compact .gs-morewrap.gs-has-items{ display: inline-flex; position: relative; }
        body.gs-page-recordings2 .gs-more-btn{ display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--gs-border); background: #fff; border-radius: 8px !important; padding: 6px 10px; font-size: 12px; font-weight: 500; color: var(--gs-text-2); cursor: pointer; white-space: nowrap; font-family: inherit; }
        body.gs-page-recordings2 .gs-more-btn:hover{ background: #fafaf9; color: var(--gs-ink); }
        body.gs-page-recordings2 .gs-more-btn .ic{ width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
        /* the menu itself: rendered inline but lifted out visually; JS pins it
           with fixed coords on open so the table's overflow never clips it */
        /* Legacy View playback popups float over the table; the global
           stylesheet z-orders them below our sticky Actions cell (which has
           its own stacking context). Lift them above everything so View never
           opens behind a column. */
        body.gs-page-recordings2 .framewrapgrey, body.gs-page-recordings2 .framewrapgreyconsultants{ z-index: 1300 !important; }
        body.gs-page-recordings2 .gs-more-menu{ display: none; position: fixed; z-index: 1200; min-width: 200px; background: #fff; border: 1px solid var(--gs-border); border-radius: 10px !important; box-shadow: 0 8px 28px rgba(15,17,23,0.18); padding: 6px; }
        body.gs-page-recordings2 .gs-more-menu.open{ display: block; }
        /* inside the menu every action is a full-width labelled row */
        body.gs-page-recordings2 .gs-more-menu .gs-actiongroup{ display: block; border: 0; background: transparent; }
        body.gs-page-recordings2 .gs-more-menu .gs-act{ display: flex; width: 100%; justify-content: flex-start; gap: 9px; border: 0 !important; border-radius: 7px !important; padding: 8px 10px; font-size: 12.5px; }
        body.gs-page-recordings2 .gs-more-menu .gs-act + .gs-act{ border-left: 0 !important; }
        body.gs-page-recordings2 .gs-more-menu .gs-act .ic{ width: 15px; height: 15px; }
        body.gs-page-recordings2 .gs-more-menu .gs-actiongroup.danger{ margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--gs-border-light); }
        body.gs-page-recordings2 .gs-more-menu .gs-actiongroup.danger .gs-act{ background: transparent !important; }
        body.gs-page-recordings2 .gs-more-menu .gs-actiongroup.danger .gs-act:hover{ background: var(--gs-redpill-bg) !important; }
        body.gs-page-recordings2 .gs-compact table.dataTable .gs-actions > .gs-actiongroup:not(:has(.gs-primary)){ display: none; }
        /* Fallback for engines without :has() - the relocation already MOVES
           these groups into the menu, so this rule is only a visual safety net.
           Menu contents (.gs-more-menu descendants) are never matched because
           the rule uses the direct-child combinator on .gs-actions. */

        /* Messages has no Actions column - don't pin its last (text) column */
        body.gs-page-recordings2 #allMessagesTable tbody tr td:last-child, body.gs-page-recordings2 #allMessagesTable thead tr th:last-child{ position: static; }

        /* ----- User / when / muted cell formatting ----- */
        body.gs-page-recordings2 .gs-usercell{ display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.35; }
        body.gs-page-recordings2 .gs-user-name{ font-weight: 600; color: var(--gs-ink); font-size: 12.5px; }
        body.gs-page-recordings2 .gs-user-mail{ color: var(--gs-muted); font-size: 11.5px; }
        body.gs-page-recordings2 .gs-user-org{ color: var(--gs-faint); font-size: 11px; }
        body.gs-page-recordings2 .gs-whencell{ display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.3; }
        body.gs-page-recordings2 .gs-when-date{ font-weight: 600; color: var(--gs-text-2); font-size: 12.5px; }
        body.gs-page-recordings2 .gs-when-time{ color: var(--gs-muted); font-size: 11.5px; }
        body.gs-page-recordings2 .gs-when-sub{ color: var(--gs-faint); font-size: 11px; }
        body.gs-page-recordings2 .gs-cell-muted{ color: var(--gs-faint); font-size: 12px; font-style: italic; }

        /* ----- File column (id / format / size as a tidy stack) ----- */
        body.gs-page-recordings2 .gs-filecell{ display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
        body.gs-page-recordings2 .gs-fileid{ font-family: "SF Mono", "Cascadia Code", Consolas, Menlo, monospace; font-size: 12px; font-weight: 600; color: var(--gs-ink); letter-spacing: 0.02em; }
        body.gs-page-recordings2 .gs-filemeta{ display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gs-text-2); white-space: nowrap; }
        body.gs-page-recordings2 .gs-chip-format{ background: var(--gs-grey-bg); color: var(--gs-grey-tx); font-size: 9.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px !important; }
        body.gs-page-recordings2 .gs-filemeta-sub{ font-size: 11px; color: var(--gs-faint); white-space: nowrap; }

        /* In-table selects must not balloon the column on orgs with several
           dropdown columns enabled */
        body.gs-page-recordings2 table.dataTable .gs-select, body.gs-page-recordings2 table.dataTable select.border-radius-none{ max-width: 150px; }

        /* ----- Row lead icons (type/page glyph in the first column) ----- */
        body.gs-page-recordings2 .gs-lead{ width: 42px; height: 42px; border-radius: 10px !important; display: inline-flex; align-items: center; justify-content: center; }
        body.gs-page-recordings2 .gs-lead .ic{ width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
        body.gs-page-recordings2 .gs-lead-blue{ background: var(--gs-blue-bg);   color: var(--gs-blue-tx); }
        body.gs-page-recordings2 .gs-lead-green{ background: var(--gs-green-bg);  color: var(--gs-green-tx); }
        body.gs-page-recordings2 .gs-lead-amber{ background: var(--gs-amber-bg);  color: var(--gs-amber-tx); }
        body.gs-page-recordings2 .gs-lead-purple{ background: var(--gs-purple-bg); color: var(--gs-purple-tx); }
        body.gs-page-recordings2 .gs-lead-grey{ background: var(--gs-grey-bg);   color: var(--gs-grey-tx); }
        body.gs-page-recordings2 th.gs-lead-th{ width: 56px; }

        /* ----- Info tooltips and the AI summary chip ----- */
        body.gs-page-recordings2 .gs-info-ic{ width: 15px; height: 15px; stroke: var(--gs-faint); fill: none; stroke-width: 1.8; stroke-linecap: round; vertical-align: -3px; cursor: help; }
        body.gs-page-recordings2 .gs-ai-summary{ display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 9px; border-radius: 999px !important; background: var(--gs-purple-bg); color: var(--gs-purple-tx); font-size: 11px; font-weight: 600; cursor: help; }
        body.gs-page-recordings2 .gs-ai-summary .ic{ width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

        /* ----- Hardening against the site-wide legacy/Bootstrap stylesheet.
                The global sheet loads after this page's styles and was
                striping rows, whitening buttons and drawing tab borders, so
                these use !important deliberately. ----- */
        
        body.gs-page-recordings2 #mainTab{ border: 0 !important; background: transparent !important; }
        body.gs-page-recordings2 .gs-btn, body.gs-page-recordings2 .gs-act{ background-image: none !important; text-shadow: none !important; box-shadow: none !important; text-decoration: none !important; }
        body.gs-page-recordings2 .gs-btn-primary, body.gs-page-recordings2 .gs-btn-primary:focus{ background-color: var(--gs-red) !important; border-color: var(--gs-red) !important; color: #fff !important; }
        body.gs-page-recordings2 .gs-btn-primary:hover{ background-color: var(--gs-red-dark) !important; border-color: var(--gs-red-dark) !important; color: #fff !important; }
        body.gs-page-recordings2 .gs-btn-secondary, body.gs-page-recordings2 .gs-btn-secondary:focus{ background-color: #fff !important; color: var(--gs-ink) !important; }
        body.gs-page-recordings2 .btn-u{ background-color: #fff !important; background-image: none !important; color: var(--gs-ink) !important; text-shadow: none !important; box-shadow: none !important; }
        body.gs-page-recordings2 a.gs-act, body.gs-page-recordings2 a.gs-act:hover, body.gs-page-recordings2 a.gs-act:focus, body.gs-page-recordings2 button.gs-act{ color: var(--gs-text-2) !important; text-decoration: none !important; }
        body.gs-page-recordings2 .gs-act{ background-color: #fff !important; }
        body.gs-page-recordings2 .gs-act:hover{ background-color: #fafaf9 !important; color: var(--gs-ink) !important; }
        body.gs-page-recordings2 .gs-actiongroup.danger .gs-act, body.gs-page-recordings2 .gs-actiongroup.danger a.gs-act{ color: var(--gs-redpill-tx) !important; }
        body.gs-page-recordings2 .gs-act-done, body.gs-page-recordings2 a.gs-act.gs-act-done{ background-color: var(--gs-green-bg) !important; color: var(--gs-green-tx) !important; }
        body.gs-page-recordings2 .gs-act-done:hover, body.gs-page-recordings2 a.gs-act.gs-act-done:hover{ background-color: #D9EEDD !important; color: var(--gs-green-tx) !important; }
        /* no row striping in any of these tables */
        body.gs-page-recordings2 table.dataTable{ background-color: #fff !important; }
        body.gs-page-recordings2 table.dataTable tbody tr, body.gs-page-recordings2 table.dataTable tbody tr.odd, body.gs-page-recordings2 table.dataTable tbody tr.even{ background-color: #fff !important; }
        body.gs-page-recordings2 table.dataTable tbody tr.odd td, body.gs-page-recordings2 table.dataTable tbody tr.even td{ background-color: transparent !important; }
        body.gs-page-recordings2 table.dataTable tbody tr:hover td{ background-color: #fafaf9 !important; }
        body.gs-page-recordings2 table.dataTable td, body.gs-page-recordings2 table.dataTable th{ background-image: none !important; }
        /* the page owns scrolling; no inner horizontal scrollbars */
        body.gs-page-recordings2 .dataTables_wrapper, body.gs-page-recordings2 .dataTables_scrollBody, body.gs-page-recordings2 .dataTables_scrollHead{ overflow: visible !important; width: 100% !important; }
        /* Columns must never compress below their content (the cause of
           action buttons overlapping neighbouring columns at 125 percent
           scaling with three generic columns). The table may exceed its
           wrapper; the wrapper scrolls and the Actions column is sticky. */
        body.gs-page-recordings2 table.dataTable{ width: auto !important; min-width: 100% !important; table-layout: auto !important; }
        /* In auto layout a cell can never be narrower than its content, so
           action rows cannot bleed over neighbouring columns. Centre-aligned
           content stays inside its own cell. */
        body.gs-page-recordings2 table.dataTable td{ overflow: visible; }
        /* Explicit separators inside connected button groups (the old 1px-gap
           trick was defeated by global border-radius rules) */
        body.gs-page-recordings2 .gs-actiongroup{ gap: 0; }
        /* ---- Decisive reset of action-group chrome INSIDE the More menu.
             Placed after all conflicting rules so it wins on source order.
             Without this the group's border, 1px gap and border-light
             background render as vertical lines beside the menu items. ---- */
        body.gs-page-recordings2 .gs-more-menu .gs-actiongroup{
            display: block !important; border: 0 !important; gap: 0 !important;
            background: transparent !important; border-radius: 0 !important;
            overflow: visible !important;
        }
        body.gs-page-recordings2 .gs-more-menu .gs-act{ border: 0 !important; }
        body.gs-page-recordings2 .gs-more-menu .gs-act + .gs-act{ border-left: 0 !important; border-top: 0 !important; }
        body.gs-page-recordings2 .gs-more-menu .gs-actiongroup + .gs-actiongroup{ border-top: 0 !important; }
        /* tile cards keep standalone rounded buttons (groups are flattened there) */
        body.gs-page-recordings2 .gs-card-actions .gs-actiongroup .gs-act{ border-radius: 8px !important; border-left: 1px solid var(--gs-border) !important; }
        body.gs-page-recordings2 .gs-card-actions .gs-actiongroup.danger .gs-act{ border-color: #F1C8C4 !important; }
        /* View actions: light blue tint (green is reserved for the session
           done-state); Delete: light red fill */
        body.gs-page-recordings2 .gs-act.gs-primary{ background-color: var(--gs-blue-bg) !important; color: var(--gs-blue-tx) !important; }
        body.gs-page-recordings2 .gs-act.gs-primary:hover{ background-color: #D9E7F7 !important; color: var(--gs-blue-tx) !important; }
        body.gs-page-recordings2 .gs-act.gs-primary.gs-act-done{ background-color: var(--gs-green-bg) !important; color: var(--gs-green-tx) !important; }
        body.gs-page-recordings2 .gs-actiongroup.danger .gs-act{ background-color: var(--gs-redpill-bg) !important; }
        body.gs-page-recordings2 .gs-actiongroup.danger .gs-act:hover{ background-color: #F5D9D6 !important; }
    
        /* ----- Tier-2: generic columns hidden + relocated into the More menu ----- */
        body.gs-page-recordings2 #allRecordingsTable.gs-gencols-hidden thead th.gs-genth{ display: none; }
        body.gs-page-recordings2 #allRecordingsTable td.gs-gentd-hidden{ display: none; }
        body.gs-page-recordings2 .gs-menu-gens{ margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--gs-border-light); display: flex; flex-direction: column; gap: 9px; }
        body.gs-page-recordings2 .gs-menu-genfield{ display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gs-faint); padding: 0 4px; }
        body.gs-page-recordings2 .gs-menu-genfield .gs-gencell{ font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--gs-ink); }
        body.gs-page-recordings2 .gs-menu-genfield select{ width: 100% !important; max-width: 100% !important; }
        /* free-text generic columns render a value + a "Change" link with an
           inline color:#333; override it inside the menu so it's legible in
           both themes (the in-table appearance is left untouched). */
        body.gs-page-recordings2 .gs-menu-genfield .gs-gencell a{ color: var(--gs-blue-tx) !important; text-decoration: none; }
        body.gs-page-recordings2 .gs-menu-genfield .gs-gencell a:hover{ text-decoration: underline; }
        body.gs-page-recordings2 .gs-menu-genfield .gs-gencell br + a{ display: inline-block; margin-top: 3px; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-menu-genfield .gs-gencell{ color: var(--gs-text-2); }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-menu-genfield .gs-gencell a{ color: #93C5FD !important; }

        /* ----- Restricted file indicator (replaces actions when the user
                has no access to an owned/restricted record) ----- */
        body.gs-page-recordings2 .gs-restricted{ display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px !important; background: var(--gs-redpill-bg); color: var(--gs-redpill-tx); border: 1px solid #F1C8C4; font-size: 12.5px; font-weight: 600; cursor: help; white-space: nowrap; }
        body.gs-page-recordings2 .gs-restricted .ic{ width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
        body.gs-page-recordings2 .gs-actions-restricted{ display: flex; justify-content: center; align-items: center; }
        body.gs-page-recordings2 #allRecordingsTable td .gs-actions-restricted{ max-width: none; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-restricted{ border-color: rgba(239,68,68,0.4); }

        /* ----- Beta badge + feedback banner ----- */
        /* .gs-beta-badge now comes from the shared body.gs-app block */
        body.gs-page-recordings2 .gs-fbbanner{ display: flex; align-items: center; gap: 14px; margin: 0; padding: 13px 16px; border-radius: 12px !important; background: linear-gradient(135deg, #FBEAEA 0%, #F3ECFB 100%); border: 1px solid #EAD9F2; animation: gs-fb-in 0.4s ease; }
        @keyframes gs-fb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
        /* feedback dialog (rendered via goodsam.js showMessage; these style its inner form) */
        body.gs-page-recordings2 .gs-fbform label{ font-size: 13px; font-weight: 600; color: var(--gs-ink); }
        body.gs-page-recordings2 .gs-fbform textarea{ width: 100%; min-height: 130px; resize: vertical; padding: 10px 12px; border: 1px solid var(--gs-border); border-radius: 8px !important; font-family: inherit; font-size: 13px; color: var(--gs-ink); box-sizing: border-box; }
        @media (max-width: 720px) {
            body.gs-page-recordings2 .gs-fbbanner{ flex-wrap: wrap; }
            body.gs-page-recordings2 .gs-fbbanner-cta{ width: 100%; justify-content: center; }
        }

        /* ============================================================
           DARK THEME - mirrors the analytics portal implementation.
           html[data-theme="dark"] re-points the design tokens; the
           rules below it fix places where light styles hard-code
           colours (mostly the #fff !importants in the hardening block,
           which need equally-weighted dark counterparts).
           ============================================================ */
        html[data-theme="dark"] body.gs-page-recordings2{
            color-scheme: dark;
            --gs-ink: #F1F5F9;
            --gs-text-2: #D7DDE6;
            --gs-muted: #A8B1BF;
            --gs-faint: #8B94A3;
            --gs-border: #344256;
            --gs-border-light: #283447;
            --gs-bg: #0F172A;
            --gs-card: #1E293B;
            --gs-red: #CC2222;
            --gs-red-dark: #E04040;
            --gs-red-tint: rgba(204, 34, 34, 0.14);
            --gs-green-bg: rgba(34, 197, 94, 0.16);   --gs-green-tx: #7EE2A8;
            --gs-amber-bg: rgba(245, 158, 11, 0.16);  --gs-amber-tx: #FBD38D;
            --gs-redpill-bg: rgba(239, 68, 68, 0.16); --gs-redpill-tx: #FCA5A5;
            --gs-blue-bg: rgba(96, 165, 250, 0.16);   --gs-blue-tx: #9CC4FB;
            --gs-purple-bg: rgba(167, 139, 250, 0.16);--gs-purple-tx: #C4B5FD;
            --gs-grey-bg: rgba(148, 163, 184, 0.14);  --gs-grey-tx: #CBD5E1;
        }
        html[data-theme="dark"] body.gs-page-recordings2{ background: var(--gs-bg); color: var(--gs-text-2); }
        /* buttons and cells hard-coded to white in the hardening block */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-act.gs-primary:hover{ background-color: rgba(96, 165, 250, 0.28) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-act.gs-primary.gs-act-done{ background-color: var(--gs-green-bg) !important; color: var(--gs-green-tx) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-actiongroup.danger .gs-act{ background-color: var(--gs-redpill-bg) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-act-done, html[data-theme="dark"] body.gs-page-recordings2 a.gs-act.gs-act-done{ background-color: var(--gs-green-bg) !important; color: var(--gs-green-tx) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-act-done:hover{ background-color: rgba(34, 197, 94, 0.26) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-btn-secondary, html[data-theme="dark"] body.gs-page-recordings2 .gs-btn-secondary:focus{ background-color: var(--gs-card) !important; color: var(--gs-ink) !important; border-color: var(--gs-border) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .btn-u{ background-color: var(--gs-card) !important; color: var(--gs-ink) !important; }
        /* table rows hard-coded white in the hardening block */
        html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr.odd, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr.even{ background-color: var(--gs-card) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr td:last-child, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable thead tr th:last-child, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr.odd td:last-child, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr.even td:last-child{ background-color: var(--gs-card) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr:hover td:last-child, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr.odd:hover td:last-child, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable tbody tr.even:hover td:last-child{ background-color: #243144 !important; }
        /* re-assert recordings2 header text colour: the analytics-base global dark rule (html[data-theme=dark] table thead th{color:var(--text-mute) !important}) is !important and would otherwise win over the non-important light th rule above, tinting headers #CBD5E1 instead of recordings2 muted #A8B1BF */
        html[data-theme="dark"] body.gs-page-recordings2 table.dataTable thead th{ color: #cbd5e1 !important; }
        /* form controls */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-field input[type=text], html[data-theme="dark"] body.gs-page-recordings2 .gs-field input[type=email], html[data-theme="dark"] body.gs-page-recordings2 .gs-field input[type=number], html[data-theme="dark"] body.gs-page-recordings2 .gs-select, html[data-theme="dark"] body.gs-page-recordings2 table.dataTable select.border-radius-none, html[data-theme="dark"] body.gs-page-recordings2 select, html[data-theme="dark"] body.gs-page-recordings2 input, html[data-theme="dark"] body.gs-page-recordings2 textarea{
            background-color: #16213A !important; color: var(--gs-text-2) !important; border-color: var(--gs-border) !important;
        }
        /* segmented view toggle */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-seg button.active{ background: #2C3A52; color: var(--gs-ink); box-shadow: none; }
        /* thumbnail chip overlays */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-thumb-overlay{ background: rgba(30, 41, 59, 0.92); color: var(--gs-text-2); }

        

        

        

        
        /* month/year header bar, nav arrows, and the label dropdown selectors */

        

        

        

        
        /* section nav cards (light rule paints them #fff !important) */

        
        /* allocations / owners badge */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-badge{ background: #2C3A52 !important; border-color: var(--gs-border) !important; color: var(--gs-text-2) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-badge:hover{ background: #344256 !important; }
        /* danger group chrome (light rule fills the wrapper solid pink) */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-actiongroup .gs-act + .gs-act{ border-left-color: var(--gs-border) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-card-actions .gs-actiongroup.danger .gs-act{ border-color: rgba(239, 68, 68, 0.45) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-card-actions .gs-act-done{ border-color: rgba(34, 197, 94, 0.4) !important; }
        /* tile cards */
        html[data-theme="dark"] body.gs-page-recordings2 .gs-card{ background: var(--gs-card) !important; border-color: var(--gs-border-light) !important; }
        /* secondary / legacy button hovers */
        html[data-theme="dark"] body.gs-page-recordings2 .btn-u:hover, html[data-theme="dark"] body.gs-page-recordings2 .gs-btn-secondary:hover{ background-color: #243144 !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-btn-danger{ background: var(--gs-card) !important; border-color: rgba(239, 68, 68, 0.45) !important; }
        /* include-deleted switch track */
        html[data-theme="dark"] .gs-switch-track{ background: #3A4860; }
        /* modal message area - the site stylesheet paints it white */

        /* keep the primary (default) modal button brand red */
        
        /* native select option lists */
        html[data-theme="dark"] body.gs-page-recordings2 select option{ background-color: var(--gs-card); color: var(--gs-text-2); }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-fbform textarea{ background: #16213A; color: var(--gs-text-2); border-color: var(--gs-border); }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-more-btn{ background: var(--gs-card) !important; color: var(--gs-text-2) !important; border-color: var(--gs-border) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-more-btn:hover{ background: #243144 !important; color: var(--gs-ink) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-more-menu{ background: var(--gs-card) !important; border-color: var(--gs-border) !important; box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-more-menu .gs-act{ background: transparent !important; color: var(--gs-text-2) !important; }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-more-menu .gs-act:hover{ background: #243144 !important; color: var(--gs-ink) !important; }
/* ============================================================
   PAGE: analytics.jsp  (analytics portal chrome)
   gs-topnav / gs-pagehead / gs-sections / inner-tab sub-tabs +
   beta badge, feedback banner, discovery hints, feedback form.
   Scoped under body.gs-page-analytics; keyframes renamed
   gs-fb-in-an / gs-hint-in-an to avoid colliding with the
   recordings2 layer (whose gs-fb-in uses a different distance).
   ============================================================ */
  body.gs-page-analytics{
    --gs-red:#D00000; --gs-red-dark:#A80000; --gs-red-tint:#FBEAEA;
    --gs-ink:#0F1117; --gs-text-2:#3D434F; --gs-muted:#6B7280; --gs-faint:#9AA1AC;
    --gs-border:#D7DBE0; --gs-border-light:#E8EAEE;
    --gs-bg:#F4F5F7; --gs-card:#FFFFFF;
    --gs-green-bg:#E5F4E8; --gs-green-tx:#1E7B34;
    --gs-amber-bg:#FCF1DC; --gs-amber-tx:#92600A;
    --gs-blue-bg:#E7EFF9;  --gs-blue-tx:#1D4F91;
    --gs-purple-bg:#EFEAF8; --gs-purple-tx:#5B3E96;
    --gs-grey-bg:#EEF0F3; --gs-grey-tx:#4B5563;
    --gs-topnav-bg:#0f1117;
  }
  html[data-theme="dark"] body.gs-page-analytics{
    --gs-ink:#F2F4F8; --gs-text-2:#C4CBD6; --gs-muted:#8B93A1; --gs-faint:#6B7280;
    --gs-border:#2A3242; --gs-border-light:#222A38;
    --gs-bg:#0F141C; --gs-card:#161D29;
    --gs-green-bg:rgba(34,197,94,0.16); --gs-green-tx:#5FCB7E;
    --gs-amber-bg:rgba(245,158,11,0.16); --gs-amber-tx:#E0A33C;
    --gs-blue-bg:rgba(96,165,250,0.16); --gs-blue-tx:#7CB3F5;
    --gs-purple-bg:rgba(167,139,250,0.16); --gs-purple-tx:#C4B5FD;
    --gs-grey-bg:rgba(148,163,184,0.14); --gs-grey-tx:#CBD5E1;
    --gs-topnav-bg:#0f1117;
  }

  /* ---- 1. Shared site header (global GoodSAM nav) ---- */
  body.gs-page-analytics #dashWrap .gs-topnav{
    display:flex; align-items:center; gap:8px;
    height:48px; padding:0 16px;
    background:var(--gs-topnav-bg);
    box-shadow:0 1px 0 rgba(255,255,255,0.06);
  }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-brand{
    display:inline-flex; align-items:center; gap:8px;
    color:#fff; font-weight:700; font-size:15px;
    flex:1 1 0; min-width:0; margin-right:0; white-space:nowrap;
  }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-brand img{ height:22px; width:auto; display:block; }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-brand-mark{
    width:9px; height:9px; border-radius:2px !important;
    background:var(--gs-red); display:inline-block;
  }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-nav-links{
    display:flex; align-items:center; gap:2px;
    flex:0 1 auto; justify-content:center; min-width:0; overflow-x:auto;
  }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-nav-links a{
    color:#C9CED6; font-size:13px; font-weight:500; text-decoration:none;
    padding:6px 10px; border-radius:6px !important; white-space:nowrap;
  }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-nav-links a:hover{ color:#fff; background:rgba(255,255,255,0.06); }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-nav-links a.gs-active{
    color:#fff; background:rgba(255,255,255,0.10);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.14);
  }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-nav-right{ display:flex; align-items:center; gap:12px; flex:1 1 0; justify-content:flex-end; margin-left:0; }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-logout{ color:#C9CED6; font-size:12.5px; text-decoration:none; white-space:nowrap; }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-logout:hover{ color:#fff; }
  body.gs-page-analytics #dashWrap .gs-topnav .gs-avatar{
    width:28px; height:28px; border-radius:50% !important;
    background:var(--gs-red); color:#fff;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:12px; font-weight:700; flex:none;
  }

  

  

  

  

  /* ---- 3. Section navigation cards (below the header) ---- */
  body.gs-page-analytics #dashWrap .gs-sections{
    display:flex; gap:8px; flex-wrap:wrap;
    padding:16px 24px;
    background:var(--gs-bg);
  }
  /* Keep the .section-btn class so existing JS (showSection /
     setSectionBuilding) keeps targeting these, but render them to
     match the Recordings page cards 1:1 (same border, radius, padding,
     icon, type and hover/active behaviour). High specificity + a few
     !importants so this wins over analytics.css regardless of load order. */
  body.gs-page-analytics #dashWrap .gs-sections .section-btn{
    position:relative;
    display:flex !important; align-items:center; gap:10px;
    flex:0 1 auto;
    padding:8px 14px 8px 10px !important;
    background:#fff !important;
    border:1px solid var(--gs-border-light) !important;
    border-radius:10px !important;
    box-shadow:none !important;
    cursor:pointer; text-align:left; line-height:1.25;
    color:var(--gs-text-2) !important;
    transition:border-color .15s ease, box-shadow .15s ease;
  }
  html[data-theme="dark"] body.gs-page-analytics #dashWrap .gs-sections .section-btn{ background:var(--gs-card) !important; }
  body.gs-page-analytics #dashWrap .gs-sections .section-btn:hover{
    border-color:var(--gs-border) !important;
    box-shadow:none !important;
  }
  body.gs-page-analytics #dashWrap .gs-sections .section-btn.active{
    border-color:rgba(208,0,0,0.4) !important;
    box-shadow:0 1px 6px rgba(208,0,0,0.08) !important;
  }
  body.gs-page-analytics #dashWrap .gs-sections .sec-ico{
    flex:none; width:30px; height:30px; border-radius:8px !important;
    display:inline-flex; align-items:center; justify-content:center;
    background:var(--gs-grey-bg); color:var(--gs-muted);
    transition:background .15s, color .15s;
  }
  body.gs-page-analytics #dashWrap .gs-sections .section-btn.active .sec-ico{ background:var(--gs-red-tint); color:var(--gs-red); }
  html[data-theme="dark"] body.gs-page-analytics #dashWrap .gs-sections .section-btn.active .sec-ico{ background:rgba(208,0,0,0.20); color:#FF6B6B; }
  body.gs-page-analytics #dashWrap .gs-sections .sec-ico svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  body.gs-page-analytics #dashWrap .gs-sections .sec-txt{ display:flex; flex-direction:column; min-width:0; }
  body.gs-page-analytics #dashWrap .gs-sections .sec-label{ font-size:13px; font-weight:600; color:var(--gs-ink); white-space:nowrap; }
  body.gs-page-analytics #dashWrap .gs-sections .sec-caption{ font-size:11px; color:var(--gs-faint); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  /* Background "building" pill that setSectionBuilding() injects */
  body.gs-page-analytics #dashWrap .gs-sections .section-btn .sec-build-pill{
    position:absolute; top:-7px; right:-7px;
    background:var(--gs-amber-bg); color:var(--gs-amber-tx);
    font-size:9.5px; font-weight:700; line-height:1;
    padding:3px 6px; border-radius:999px !important;
    box-shadow:0 1px 4px rgba(0,0,0,0.18); white-space:nowrap;
  }
  body.gs-page-analytics #dashWrap .gs-sections .section-btn .sec-build-pill.sec-build-pill-err{ background:var(--gs-redpill-bg,#FBEAEA); color:#B42318; }
  /* hide any legacy pip span if it appears */
  body.gs-page-analytics #dashWrap .gs-sections .section-btn .s-pip{ display:none !important; }

  /* ---- 4. Inner sub-tabs (Overview / Daily Trends / ...) ---- */
  /* The markup already uses .inner-tab-bar / .inner-tab; we just
     re-skin it into a clean underline-style sub-tab row that reads
     clearly as a third level under the section banner. */
  body.gs-page-analytics #dashWrap .inner-tab-bar{
    display:flex !important; flex-wrap:wrap; gap:2px;
    border-bottom:1px solid var(--gs-border) !important;
    background:transparent !important;
    padding:0 !important; margin:0 0 18px !important;
  }
  body.gs-page-analytics #dashWrap .inner-tab-bar .inner-tab{
    appearance:none; border:0 !important; background:transparent !important;
    padding:9px 14px !important; margin:0 !important;
    font-size:13px; font-weight:600; cursor:pointer;
    color:var(--gs-muted) !important;
    border-bottom:2px solid transparent !important;
    border-radius:0 !important;
    transition:color .15s, border-color .15s, background .15s;
  }
  body.gs-page-analytics #dashWrap .inner-tab-bar .inner-tab:hover{
    color:var(--gs-ink) !important;
    background:rgba(127,127,127,0.06) !important;
  }
  body.gs-page-analytics #dashWrap .inner-tab-bar .inner-tab.active{
    color:var(--gs-red) !important;
    border-bottom-color:var(--gs-red) !important;
    background:transparent !important;
  }

  /* ===== BETA badge + feedback banner (ported from the Recordings page) ===== */
  /* .gs-beta-badge now from the shared body.gs-app block */
  body.gs-page-analytics .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:16px 24px 0; padding:13px 16px; border-radius:12px !important; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; animation:gs-fb-in-an 0.4s ease; }
  @keyframes gs-fb-in-an{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }

  /* ===== One-time discovery hints (dark pop-up tooltips, dismissable) ===== */
  body.gs-page-analytics .gs-hintwrap{ position:relative; }
  body.gs-page-analytics #dashWrap .gs-sections.gs-hintwrap, body.gs-page-analytics #dashWrap .date-bar.gs-hintwrap{ position:relative; }
  body.gs-page-analytics .gs-tilehint{ position:absolute; z-index:60; display:inline-flex; align-items:center; gap:9px; max-width:340px; padding:10px 12px; background:var(--gs-ink); color:#fff; border-radius:10px !important; box-shadow:0 8px 28px rgba(15,17,23,0.28); font-size:12.5px; line-height:1.35; animation:gs-hint-in-an 0.35s ease; }
  body.gs-page-analytics .gs-tilehint svg{ width:16px; height:16px; stroke:#fff; fill:none; stroke-width:2; flex:0 0 auto; }
  body.gs-page-analytics .gs-tilehint-text{ white-space:normal; flex:1 1 auto; }
  body.gs-page-analytics .gs-tilehint-arrow{ position:absolute; top:-6px; width:12px; height:12px; background:var(--gs-ink); transform:rotate(45deg); border-radius:2px; }
  @keyframes gs-hint-in-an{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }
  html[data-theme="dark"] body.gs-page-analytics .gs-tilehint, html[data-theme="dark"] body.gs-page-analytics .gs-tilehint-arrow{ background:#2C3A52; }
  body.gs-page-analytics .gs-theme-hint{ top:calc(100% + 12px); right:0; width:300px; max-width:none; }
  body.gs-page-analytics .gs-date-hint{ top:calc(100% + 10px); left:20px; width:330px; max-width:none; }
  body.gs-page-analytics .gs-date-hint .gs-tilehint-arrow{ left:50px; }
  body.gs-page-analytics .gs-section-hint{ top:calc(100% + 10px); left:24px; width:340px; max-width:none; }
  body.gs-page-analytics .gs-section-hint .gs-tilehint-arrow{ left:90px; }
  /* Address-search result pin (divIcon) - strip Leaflet's default white box */
  body.gs-page-analytics .gs-geo-pin{ background:none !important; border:none !important; }

  /* ===== Feedback dialog inner form ===== */
  body.gs-page-analytics .gs-fbform label{ font-size:13px; font-weight:600; color:var(--text); }
  body.gs-page-analytics .gs-fbform textarea{ width:100%; min-height:130px; resize:vertical; padding:10px 12px; border:1px solid var(--gs-border); border-radius:8px !important; font-family:inherit; font-size:13px; color:var(--text); background:var(--bg-input,#fff); box-sizing:border-box; }

  /* ---- Responsive ---- */
  @media (max-width:760px){
    body.gs-page-analytics #dashWrap .gs-topnav .gs-nav-links{ display:none; }
    body.gs-page-analytics #dashWrap .gs-pagehead{ flex-direction:column; align-items:stretch; }
    body.gs-page-analytics #dashWrap .gs-sections .section-btn{ flex:1 1 100%; }
    body.gs-page-analytics .gs-fbbanner{ flex-wrap:wrap; }
    body.gs-page-analytics .gs-fbbanner-cta{ width:100%; justify-content:center; }
    body.gs-page-analytics .gs-tilehint{ max-width:260px; }
  }

/* ============================================================
   SHARED CHROME (design system) — body.gs-app
   Section-nav cards + page-head action buttons, defined once for
   every modernised page (recordings2, analytics, …). --gs-* tokens
   are supplied per-page so each page keeps its palette.
   ============================================================ */
  body.gs-app .gs-sections{ display:flex; gap:8px; flex-wrap:wrap; padding:16px 24px; background:var(--gs-bg); }
  body.gs-app .gs-sections .section-btn{ position:relative; display:flex !important; align-items:center; gap:10px; flex:0 1 auto; padding:8px 14px 8px 10px !important; background:#fff !important; border:1px solid var(--gs-border-light) !important; border-radius:10px !important; box-shadow:none !important; cursor:pointer; text-align:left; line-height:1.25; color:var(--gs-text-2) !important; transition:border-color .15s ease, box-shadow .15s ease; }
  html[data-theme="dark"] body.gs-app .gs-sections .section-btn{ background:var(--gs-card) !important; }
  body.gs-app .gs-sections .section-btn:hover{ border-color:var(--gs-border) !important; box-shadow:none !important; }
  body.gs-app .gs-sections .section-btn.active{ border-color:rgba(208,0,0,0.4) !important; box-shadow:0 1px 6px rgba(208,0,0,0.08) !important; }
  body.gs-app .gs-sections .sec-ico{ flex:none; width:30px; height:30px; border-radius:8px !important; display:inline-flex; align-items:center; justify-content:center; background:var(--gs-grey-bg); color:var(--gs-muted); transition:background .15s, color .15s; }
  body.gs-app .gs-sections .section-btn.active .sec-ico{ background:var(--gs-red-tint); color:var(--gs-red); }
  html[data-theme="dark"] body.gs-app .gs-sections .section-btn.active .sec-ico{ background:rgba(208,0,0,0.20); color:#FF6B6B; }
  body.gs-app .gs-sections .sec-ico svg, body.gs-app .gs-sections .sec-ico .ic{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  body.gs-app .gs-sections .sec-txt{ display:flex; flex-direction:column; min-width:0; }
  body.gs-app .gs-sections .sec-label{ font-size:13px; font-weight:600; color:var(--gs-ink); white-space:nowrap; }
  body.gs-app .gs-sections .sec-caption{ font-size:11px; color:var(--gs-faint); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; }
  /* page-head action buttons */
  body.gs-app .gs-ph-btn{ display:inline-flex; align-items:center; justify-content:center; gap:7px; height:34px; padding:0 14px; border:1px solid var(--gs-border); border-radius:8px !important; background:var(--gs-card); color:var(--gs-text-2); font-size:13px; font-weight:600; cursor:pointer; transition:background .15s, border-color .15s, color .15s; }
  body.gs-app .gs-ph-btn:hover{ border-color:var(--gs-muted); color:var(--gs-ink); }
  body.gs-app .gs-ph-btn.gs-icon-only{ width:34px; padding:0; }
  body.gs-app .gs-ph-btn svg, body.gs-app .gs-ph-btn .ic{ width:15px; height:15px; }
  body.gs-app .gs-ph-btn.gs-ph-primary{ background:var(--gs-red); border-color:var(--gs-red); color:#fff; }
  body.gs-app .gs-ph-btn.gs-ph-primary:hover{ background:var(--gs-red-dark); border-color:var(--gs-red-dark); color:#fff; }
  /* page-head container + title — canonical, mirrors the analytics pagehead so every gs-app page matches.
     Per-page overrides (e.g. recordings2 full-bleed margins) live in their own page sections. */
  body.gs-app .gs-pagehead{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:20px 24px 14px; background:var(--gs-bg); border-bottom:1px solid var(--gs-border-light); }
  body.gs-app .gs-pagehead h1{ margin:0; font-size:20px; font-weight:700; line-height:1.15; color:var(--gs-ink); display:flex; align-items:center; gap:10px; }
  body.gs-app .gs-pagehead .gs-ph-div{ font-weight:400; font-size:18px; color:var(--gs-faint); margin:0 8px; }
  body.gs-app .gs-pagehead .gs-ph-org{ font-weight:500; font-size:14px; color:var(--gs-muted); }
  body.gs-app .gs-pagehead .gs-pagedesc{ margin:6px 0 0; font-size:13px; color:var(--gs-muted); max-width:680px; }
  body.gs-app .gs-pagehead-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
  body.gs-app .gs-beta-badge{ display:inline-flex; align-items:center; padding:3px 9px; border-radius:999px !important; background:var(--gs-purple-bg); color:var(--gs-purple-tx); font-size:10.5px; font-weight:700; letter-spacing:0.08em; }
  @media (max-width:760px){ body.gs-app .gs-sections .section-btn{ flex:1 1 100%; } }

/* ---- filter / search bar: 2-row layout + quick-range presets (analytics-aligned) ---- */
  body.gs-app .gs-filterbar{ display:flex; flex-direction:column; align-items:stretch; gap:12px; background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:10px !important; padding:14px 18px; box-shadow:none; }
  html[data-theme="dark"] body.gs-app .gs-filterbar{ background:var(--gs-card); border-color:var(--gs-border); }
  body.gs-app .gs-fb-row{ display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; width:100%; }
  body.gs-app .gs-fb-dates{ align-items:flex-end; }
  body.gs-app .gs-filterbar .gs-field{ display:flex; flex-direction:row; align-items:center; gap:8px; width:auto; }
  body.gs-app .gs-filterbar .gs-field-label{ font-size:10px; font-weight:600; letter-spacing:0.07em; color:var(--gs-muted); margin:0; white-space:nowrap; text-transform:uppercase; }
  body.gs-app .gs-filterbar input[type=text], body.gs-app .gs-filterbar input[type="datetime-local"], body.gs-app .gs-filterbar select{ height:32px !important; border:0.5px solid var(--gs-border); border-radius:6px !important; padding:0 10px; font-size:12.5px; font-family:inherit; background:var(--gs-card); color:var(--gs-ink); box-shadow:none; min-width:0; margin:0; }
  body.gs-app .gs-filterbar input:focus, body.gs-app .gs-filterbar select:focus{ outline:none; border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  body.gs-app .gs-filterbar input[type="datetime-local"], body.gs-app .gs-filterbar .gs-date{ width:185px !important; }
  body.gs-app .gs-filterbar #numberEmailReference{ width:230px; }
  body.gs-app .gs-filterbar .gs-help-slot{ font-size:10.5px; font-style:italic; color:var(--gs-faint); margin:0; }
  body.gs-app .gs-filterbar .gs-field .gs-help-slot:empty{ display:none; }
  /* quick-range pills reuse the analytics .date-preset styling (defined globally in the base) */
  body.gs-app .gs-presets{ display:flex; gap:6px; margin-left:6px; align-items:center; }
  body.gs-app .gs-fb-search{ margin-left:auto; }

/* ---- recordings2: full-bleed chrome strips + status line (match analytics' full-width layout).
       Content sits in a 24px-padded container, so the strips use negative margins to reach the edge. ---- */
  body.gs-page-recordings2 .gs-pagehead,
  body.gs-page-recordings2 #functionSelector,
  body.gs-page-recordings2 .gs-filterbar,
  body.gs-page-recordings2 .gs-loaded-range{ margin-left:-24px; margin-right:-24px; padding-left:24px; padding-right:24px; }
  body.gs-page-recordings2 .gs-filterbar{ border-radius:0 !important; border:0; border-bottom:0.5px solid var(--gs-border-light); background:var(--gs-card); margin-bottom:0 !important; }
  body.gs-page-recordings2 .gs-loaded-range{ display:flex; align-items:center; gap:7px; font-size:10.5px; color:var(--gs-muted); background:#FAFAF9; border-bottom:0.5px solid var(--gs-border-light); padding-top:5px; padding-bottom:5px; margin-bottom:12px; }

/* ---- recordings2: form controls inside the native modal-card dialogs (light; dark handled by the
       global recordings2 dark form rule). Keeps migrated pop-up inputs consistent with the dialog. ---- */
  body.gs-page-recordings2 .modal-card input[type=text], body.gs-page-recordings2 .modal-card input[type=email], body.gs-page-recordings2 .modal-card input[type=number], body.gs-page-recordings2 .modal-card input[type=password], body.gs-page-recordings2 .modal-card select{ width:100%; box-sizing:border-box; height:34px; border:0.5px solid var(--gs-border); border-radius:6px !important; padding:0 10px; font-size:13px; font-family:inherit; background:#fff; color:var(--gs-ink); outline:none; }
  body.gs-page-recordings2 .modal-card input:focus, body.gs-page-recordings2 .modal-card select:focus{ border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }

/* recordings2: drop the legacy <br> spacer between the section cards and the panes (match analytics adjacency) */
  body.gs-page-recordings2 #mainTab > br{ display:none; }

/* ============================================================
   EVENT LOG PAGE — modernised chrome + tables. Mirrors the
   recordings2 / analytics design system. Self-contained: its own
   --gs-* token palette (light + dark) feeds the shared body.gs-app
   blocks (sections, pagehead, filter bar, buttons); the topnav,
   footer, page frame, panes and dataTable chrome below are the
   page-scoped pieces recordings2 keeps to itself. Editing this block
   never touches recordings2/analytics/aum.
   ============================================================ */
  body.gs-page-eventlog{
    --gs-red: #D00000; --gs-red-dark: #A80000; --gs-red-tint: #FBEAEA;
    --gs-ink: #0F1117; --gs-text-2: #3D434F; --gs-muted: #6B7280; --gs-faint: #9AA1AC;
    --gs-border: #D7DBE0; --gs-border-light: #E8EAEE; --gs-bg: #F4F5F7; --gs-card: #FFFFFF;
    --gs-green-bg: #E5F4E8;  --gs-green-tx: #1E7B34;
    --gs-amber-bg: #FCF1DC;  --gs-amber-tx: #92600A;
    --gs-redpill-bg: #FBEAEA; --gs-redpill-tx: #B42318;
    --gs-blue-bg: #E7EFF9;   --gs-blue-tx: #1D4F91;
    --gs-purple-bg: #EFEAF8; --gs-purple-tx: #5B3E96;
    --gs-grey-bg: #EEF0F3;   --gs-grey-tx: #4B5563;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--gs-ink); background: var(--gs-bg); min-height: 100%;
  }
  /* ----- Top navigation bar ----- */
  /* ----- Footer ----- */
  /* ----- Page frame + full-bleed chrome strips (content sits in a 24px-padded container) ----- */
  body.gs-page-eventlog .gs-page{ width:100%; max-width:100%; padding:64px 24px 56px; text-align:left; box-sizing:border-box; }
  body.gs-page-eventlog .gs-pagehead,
  body.gs-page-eventlog #functionSelector,
  body.gs-page-eventlog .gs-filterbar,
  body.gs-page-eventlog .gs-loaded-range{ margin-left:-24px; margin-right:-24px; padding-left:24px; padding-right:24px; }
  body.gs-page-eventlog .gs-filterbar{ border-radius:0 !important; border:0; border-bottom:0.5px solid var(--gs-border-light); background:var(--gs-card); margin-bottom:18px !important; }
  /* loaded-range status strip below the filter bar (analytics' loaded-range, recordings2 full-bleed) */
  body.gs-page-eventlog .gs-loaded-range{ display:flex; align-items:center; gap:7px; font-size:10.5px; color:var(--gs-muted); background:#FAFAF9; border-bottom:0.5px solid var(--gs-border-light); padding-top:5px; padding-bottom:5px; margin-bottom:12px; }
  /* ----- Section panes ----- */
  body.gs-page-eventlog #mainTab > .gs-pane{ display:none; }
  body.gs-page-eventlog #mainTab > .gs-pane.gs-pane-active{ display:block; }
  /* ----- Table chrome ----- */
  body.gs-page-eventlog table.dataTable{ background:transparent; border:none; }
  body.gs-page-eventlog table.dataTable thead th{ font-size:10px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; color:var(--gs-muted); background:transparent; border-top:none; border-left:none; border-right:none; border-bottom:0.5px solid var(--gs-border); padding:9px 12px; }
  /* kill the legacy dataTables zebra striping (match recordings2's flat rows) */
  body.gs-page-eventlog table.dataTable tbody tr, body.gs-page-eventlog table.dataTable tbody tr.odd, body.gs-page-eventlog table.dataTable tbody tr.even{ background-color:#fff !important; }
  body.gs-page-eventlog table.dataTable tbody tr.odd td, body.gs-page-eventlog table.dataTable tbody tr.even td{ background-color:transparent !important; }
  body.gs-page-eventlog table.dataTable tbody tr:hover td{ background:#fafaf9; }
  /* Sort indicators: faint arrows instead of the legacy background images */
  body.gs-page-eventlog table.dataTable thead th.sorting, body.gs-page-eventlog table.dataTable thead th.sorting_asc, body.gs-page-eventlog table.dataTable thead th.sorting_desc, body.gs-page-eventlog table.dataTable thead th.sorting_asc_disabled, body.gs-page-eventlog table.dataTable thead th.sorting_desc_disabled{ background-image:none !important; padding-left:24px; padding-right:24px; position:relative; cursor:pointer; }
  body.gs-page-eventlog table.dataTable thead th.sorting:after, body.gs-page-eventlog table.dataTable thead th.sorting_asc:after, body.gs-page-eventlog table.dataTable thead th.sorting_desc:after{ position:absolute; right:9px; top:50%; transform:translateY(-50%); font-size:10px; color:var(--gs-faint); text-transform:none; letter-spacing:0; }
  /* ----- Centered headers + action buttons / status pills (recordings2 .gs-act framework) ----- */
  body.gs-page-eventlog table.dataTable thead th{ text-align:center; }
  body.gs-page-eventlog .gs-pill{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px !important; font-size:12px; font-weight:600; line-height:1.5; white-space:nowrap; vertical-align:middle; }
  body.gs-page-eventlog .gs-ref{ display:inline-block; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; font-size:12px; background:var(--gs-grey-bg); border:1px solid var(--gs-border-light); border-radius:6px !important; padding:3px 8px; color:var(--gs-ink); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
  body.gs-page-eventlog .gs-actiongroup{ display:inline-flex; flex-wrap:nowrap; gap:1px; border:1px solid var(--gs-border); border-radius:8px !important; overflow:hidden; background:var(--gs-border-light); }
  body.gs-page-eventlog .gs-act{ display:inline-flex; align-items:center; gap:5px; border:none; background:#fff; padding:6px 10px; font-size:12px; font-weight:500; color:var(--gs-text-2) !important; cursor:pointer; white-space:nowrap; font-family:inherit; flex:0 0 auto; text-decoration:none; transition:background 0.12s ease, color 0.12s ease; }
  body.gs-page-eventlog .gs-act:hover{ background:var(--gs-grey-bg); color:var(--gs-ink) !important; text-decoration:none; }
  /* primary (blue) action — matches recordings2's "View files" View button */
  body.gs-page-eventlog .gs-act.gs-primary{ background-color:var(--gs-blue-bg) !important; color:var(--gs-blue-tx) !important; }
  body.gs-page-eventlog .gs-act.gs-primary:hover{ background-color:#D9E7F7 !important; color:var(--gs-blue-tx) !important; }
  body.gs-page-eventlog .gs-cell-muted{ color:var(--gs-faint); font-size:12.5px; }
  body.gs-page-eventlog .gs-arrow{ color:var(--gs-faint); font-size:11px; }
  /* ---- Lead activity-nature icon column (recordings2 style). Dark mode is free via the page's --gs-*-bg/tx tokens. ---- */
  body.gs-page-eventlog .gs-lead{ width:42px; height:42px; border-radius:10px !important; display:inline-flex; align-items:center; justify-content:center; }
  body.gs-page-eventlog .gs-lead .ic{ width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  body.gs-page-eventlog .gs-lead-red{ background:var(--gs-redpill-bg); color:var(--gs-redpill-tx); }
  body.gs-page-eventlog .gs-lead-blue{ background:var(--gs-blue-bg); color:var(--gs-blue-tx); }
  body.gs-page-eventlog .gs-lead-green{ background:var(--gs-green-bg); color:var(--gs-green-tx); }
  body.gs-page-eventlog .gs-lead-amber{ background:var(--gs-amber-bg); color:var(--gs-amber-tx); }
  body.gs-page-eventlog .gs-lead-purple{ background:var(--gs-purple-bg); color:var(--gs-purple-tx); }
  body.gs-page-eventlog .gs-lead-grey{ background:var(--gs-grey-bg); color:var(--gs-grey-tx); }
  body.gs-page-eventlog th.gs-lead-th{ width:56px; }
  /* ---- Directional flow connector (replaces the old heavy down-arrow in Start/End + Resources). ---- */
  body.gs-page-eventlog .gs-flow{ display:flex; flex-direction:column; align-items:center; gap:2px; margin:5px 0; line-height:0; }
  body.gs-page-eventlog .gs-flow i{ width:1.5px; height:9px; background:var(--gs-border); border-radius:1px; }
  body.gs-page-eventlog .gs-flow svg{ width:10px; height:10px; color:var(--gs-faint); }
  /* ---- Rule-pill sub-line (rule short name under the coloured pill) + geocoding placeholder. ---- */
  body.gs-page-eventlog .gs-rule{ display:inline-flex; flex-direction:column; align-items:center; }
  body.gs-page-eventlog .gs-rule-spacer{ height:14px; margin-bottom:4px; }   /* mirrors the sub below so the pill stays vertically centred */
  body.gs-page-eventlog .gs-rule-sub{ margin-top:4px; font-size:10.5px; line-height:14px; white-space:nowrap; color:var(--gs-muted); }
  body.gs-page-eventlog .gs-rule-sub b{ font-weight:600; }
  body.gs-page-eventlog .gs-addr-resolving{ color:var(--gs-muted); font-style:italic; }

  body.gs-page-eventlog .gs-addr{ margin-bottom:6px; line-height:1.4; }
  html[data-theme="dark"] body.gs-page-eventlog .gs-act.gs-primary:hover{ background-color:rgba(96,165,250,0.28) !important; color:var(--gs-blue-tx) !important; }
  html[data-theme="dark"] body.gs-page-eventlog .gs-ref{ background:var(--gs-grey-bg); border-color:var(--gs-border); color:var(--gs-ink); }
  /* Form controls inside the native modal-card dialogs (the map pop-up) */
  body.gs-page-eventlog .modal-card input[type=text], body.gs-page-eventlog .modal-card input[type=email], body.gs-page-eventlog .modal-card input[type=number], body.gs-page-eventlog .modal-card input[type=password], body.gs-page-eventlog .modal-card select{ width:100%; box-sizing:border-box; height:34px; border:0.5px solid var(--gs-border); border-radius:6px !important; padding:0 10px; font-size:13px; font-family:inherit; background:#fff; color:var(--gs-ink); outline:none; }
  body.gs-page-eventlog .modal-card input:focus, body.gs-page-eventlog .modal-card select:focus{ border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  /* ----- Dark mode ----- */
  html[data-theme="dark"] body.gs-page-eventlog{
    color-scheme: dark;
    --gs-ink:#F1F5F9; --gs-text-2:#D7DDE6; --gs-muted:#A8B1BF; --gs-faint:#8B94A3;
    --gs-border:#344256; --gs-border-light:#283447; --gs-bg:#0F172A; --gs-card:#1E293B;
    --gs-red:#CC2222; --gs-red-dark:#E04040; --gs-red-tint:rgba(204,34,34,0.14);
    --gs-green-bg:rgba(34,197,94,0.16); --gs-green-tx:#7EE2A8;
    --gs-amber-bg:rgba(245,158,11,0.16); --gs-amber-tx:#FBD38D;
    --gs-redpill-bg:rgba(239,68,68,0.16); --gs-redpill-tx:#FCA5A5;
    --gs-blue-bg:rgba(96,165,250,0.16); --gs-blue-tx:#9CC4FB;
    --gs-purple-bg:rgba(167,139,250,0.16); --gs-purple-tx:#C4B5FD;
    --gs-grey-bg:rgba(148,163,184,0.14); --gs-grey-tx:#CBD5E1;
    background:var(--gs-bg); color:var(--gs-text-2);
  }
  html[data-theme="dark"] body.gs-page-eventlog table.dataTable tbody tr, html[data-theme="dark"] body.gs-page-eventlog table.dataTable tbody tr.odd, html[data-theme="dark"] body.gs-page-eventlog table.dataTable tbody tr.even{ background-color:var(--gs-card) !important; }
  /* re-assert header colour over the analytics-base global dark th rule (which is !important) */
  html[data-theme="dark"] body.gs-page-eventlog table.dataTable thead th{ color:#A8B1BF !important; }
  html[data-theme="dark"] body.gs-page-eventlog .gs-filterbar input[type=text], html[data-theme="dark"] body.gs-page-eventlog .gs-filterbar input[type="datetime-local"], html[data-theme="dark"] body.gs-page-eventlog .gs-filterbar select, html[data-theme="dark"] body.gs-page-eventlog .modal-card input, html[data-theme="dark"] body.gs-page-eventlog .modal-card select{ background-color:#16213A !important; color:var(--gs-text-2) !important; border-color:var(--gs-border) !important; }

  /* ===== Beta feedback banner + dialog form (5th per-page copy; mirrors analytics/recordings2) ===== */
  body.gs-page-eventlog .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:0; padding:13px 16px; border-radius:12px !important; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; animation:gs-fb-in-el 0.4s ease; }
  @keyframes gs-fb-in-el{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }
  /* Feedback dialog inner form */
  body.gs-page-eventlog .gs-fbform label{ font-size:13px; font-weight:600; color:var(--gs-ink); }
  body.gs-page-eventlog .gs-fbform textarea{ width:100%; min-height:130px; resize:vertical; padding:10px 12px; border:1px solid var(--gs-border); border-radius:8px !important; font-family:inherit; font-size:13px; color:var(--gs-ink); background:var(--gs-card); box-sizing:border-box; }
  @media (max-width:760px){
    body.gs-page-eventlog .gs-fbbanner{ flex-wrap:wrap; }
    body.gs-page-eventlog .gs-fbbanner-cta{ width:100%; justify-content:center; }
  }

/* ============================================================
   KITS PAGE — modernised chrome + table. Mirrors the eventLog /
   recordings2 / analytics design system. Self-contained: its own
   --gs-* token palette (light + dark) feeds the shared body.gs-app
   blocks (sections, pagehead, filter bar, buttons); the topnav,
   footer, page frame, panes and dataTable chrome below are the
   page-scoped pieces (copied from the eventLog block). Editing this
   block never touches eventLog/recordings2/analytics/aum.
   ============================================================ */
  body.gs-page-kits{
    --gs-red: #D00000; --gs-red-dark: #A80000; --gs-red-tint: #FBEAEA;
    --gs-ink: #0F1117; --gs-text-2: #3D434F; --gs-muted: #6B7280; --gs-faint: #9AA1AC;
    --gs-border: #D7DBE0; --gs-border-light: #E8EAEE; --gs-bg: #F4F5F7; --gs-card: #FFFFFF;
    --gs-green-bg: #E5F4E8;  --gs-green-tx: #1E7B34;
    --gs-amber-bg: #FCF1DC;  --gs-amber-tx: #92600A;
    --gs-redpill-bg: #FBEAEA; --gs-redpill-tx: #B42318;
    --gs-blue-bg: #E7EFF9;   --gs-blue-tx: #1D4F91;
    --gs-purple-bg: #EFEAF8; --gs-purple-tx: #5B3E96;
    --gs-grey-bg: #EEF0F3;   --gs-grey-tx: #4B5563;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--gs-ink); background: var(--gs-bg); min-height: 100%;
  }
  /* ----- Top navigation bar ----- */
  /* ----- Footer ----- */
  /* ----- Page frame + full-bleed chrome strips (content sits in a 24px-padded container) ----- */
  body.gs-page-kits .gs-page{ width:100%; max-width:100%; padding:64px 24px 56px; text-align:left; box-sizing:border-box; }
  body.gs-page-kits .gs-pagehead,
  body.gs-page-kits #functionSelector,
  body.gs-page-kits .gs-filterbar,
  body.gs-page-kits .gs-loaded-range{ margin-left:-24px; margin-right:-24px; padding-left:24px; padding-right:24px; }
  body.gs-page-kits .gs-filterbar{ border-radius:0 !important; border:0; border-bottom:0.5px solid var(--gs-border-light); background:var(--gs-card); margin-bottom:18px !important; }
  /* the "Approved only" toggle field: the shared .gs-switch carries margin:auto (it centres in
     recordings2's card grid); reset it here so it sits inline next to its label in the filter bar. */
  body.gs-page-kits .gs-filterbar .gs-switch{ margin:0; }
  /* loaded-range status strip below the filter bar (analytics' loaded-range, recordings2 full-bleed) */
  body.gs-page-kits .gs-loaded-range{ display:flex; align-items:center; gap:7px; font-size:10.5px; color:var(--gs-muted); background:#FAFAF9; border-bottom:0.5px solid var(--gs-border-light); padding-top:5px; padding-bottom:5px; margin-bottom:12px; }
  /* ----- Section panes ----- */
  body.gs-page-kits #mainTab > .gs-pane{ display:none; }
  body.gs-page-kits #mainTab > .gs-pane.gs-pane-active{ display:block; }
  /* ----- Table chrome ----- */
  body.gs-page-kits table.dataTable{ background:transparent; border:none; }
  body.gs-page-kits table.dataTable thead th{ font-size:10px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; color:var(--gs-muted); background:transparent; border-top:none; border-left:none; border-right:none; border-bottom:0.5px solid var(--gs-border); padding:9px 12px; text-align:center; }
  /* kill the legacy dataTables zebra striping (match recordings2's flat rows) */
  body.gs-page-kits table.dataTable tbody tr, body.gs-page-kits table.dataTable tbody tr.odd, body.gs-page-kits table.dataTable tbody tr.even{ background-color:#fff !important; }
  body.gs-page-kits table.dataTable tbody tr.odd td, body.gs-page-kits table.dataTable tbody tr.even td{ background-color:transparent !important; }
  body.gs-page-kits table.dataTable tbody tr:hover td{ background:#fafaf9; }
  body.gs-page-kits table.dataTable tbody td a:not(.gs-act){ color:var(--gs-text-2) !important; font-weight:600; text-decoration:none; }
  body.gs-page-kits table.dataTable tbody td a:not(.gs-act):hover{ color:var(--gs-red) !important; text-decoration:none; }
  /* Sort indicators: faint arrows instead of the legacy background images */
  body.gs-page-kits table.dataTable thead th.sorting, body.gs-page-kits table.dataTable thead th.sorting_asc, body.gs-page-kits table.dataTable thead th.sorting_desc, body.gs-page-kits table.dataTable thead th.sorting_asc_disabled, body.gs-page-kits table.dataTable thead th.sorting_desc_disabled{ background-image:none !important; padding-right:24px; position:relative; cursor:pointer; }
  body.gs-page-kits table.dataTable thead th.sorting:after, body.gs-page-kits table.dataTable thead th.sorting_asc:after, body.gs-page-kits table.dataTable thead th.sorting_desc:after{ position:absolute; right:9px; top:50%; transform:translateY(-50%); font-size:10px; color:var(--gs-faint); text-transform:none; letter-spacing:0; }
  /* ----- Action buttons + status/category pills (recordings2 framework, scoped to kits) ----- */
  body.gs-page-kits .gs-actiongroup{ display:inline-flex; flex-wrap:nowrap; gap:0; border:1px solid var(--gs-border); border-radius:8px !important; overflow:hidden; background:var(--gs-border-light); }
  body.gs-page-kits .gs-act{ display:inline-flex; align-items:center; gap:5px; border:none; background:#fff !important; padding:6px 10px; font-size:12px; font-weight:500; color:var(--gs-text-2) !important; cursor:pointer; white-space:nowrap; font-family:inherit; flex:0 0 auto; text-decoration:none !important; transition:background 0.12s ease, color 0.12s ease; }
  body.gs-page-kits a.gs-act:hover, body.gs-page-kits .gs-act:hover{ background:#fafaf9 !important; color:var(--gs-ink) !important; }
  body.gs-page-kits .gs-act.gs-primary{ background-color:var(--gs-blue-bg) !important; color:var(--gs-blue-tx) !important; }
  body.gs-page-kits .gs-act.gs-primary:hover{ background-color:#D9E7F7 !important; color:var(--gs-blue-tx) !important; }
  html[data-theme="dark"] body.gs-page-kits .gs-act.gs-primary:hover{ background-color:rgba(96,165,250,0.28) !important; }
  body.gs-page-kits .gs-pill{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px !important; font-size:12px; font-weight:600; line-height:1.5; white-space:nowrap; vertical-align:middle; }
  body.gs-page-kits .gs-cell-muted{ color:var(--gs-faint); font-size:12.5px; }
  /* Form controls inside the native modal-card dialogs (error pop-ups) */
  body.gs-page-kits .modal-card input[type=text], body.gs-page-kits .modal-card input[type=email], body.gs-page-kits .modal-card input[type=number], body.gs-page-kits .modal-card input[type=password], body.gs-page-kits .modal-card select{ width:100%; box-sizing:border-box; height:34px; border:0.5px solid var(--gs-border); border-radius:6px !important; padding:0 10px; font-size:13px; font-family:inherit; background:#fff; color:var(--gs-ink); outline:none; }
  body.gs-page-kits .modal-card input:focus, body.gs-page-kits .modal-card select:focus{ border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  /* ----- Dark mode ----- */
  html[data-theme="dark"] body.gs-page-kits{
    color-scheme: dark;
    --gs-ink:#F1F5F9; --gs-text-2:#D7DDE6; --gs-muted:#A8B1BF; --gs-faint:#8B94A3;
    --gs-border:#344256; --gs-border-light:#283447; --gs-bg:#0F172A; --gs-card:#1E293B;
    --gs-red:#CC2222; --gs-red-dark:#E04040; --gs-red-tint:rgba(204,34,34,0.14);
    --gs-green-bg:rgba(34,197,94,0.16); --gs-green-tx:#7EE2A8;
    --gs-amber-bg:rgba(245,158,11,0.16); --gs-amber-tx:#FBD38D;
    --gs-redpill-bg:rgba(239,68,68,0.16); --gs-redpill-tx:#FCA5A5;
    --gs-blue-bg:rgba(96,165,250,0.16); --gs-blue-tx:#9CC4FB;
    --gs-purple-bg:rgba(167,139,250,0.16); --gs-purple-tx:#C4B5FD;
    --gs-grey-bg:rgba(148,163,184,0.14); --gs-grey-tx:#CBD5E1;
    background:var(--gs-bg); color:var(--gs-text-2);
  }
  html[data-theme="dark"] body.gs-page-kits table.dataTable tbody tr, html[data-theme="dark"] body.gs-page-kits table.dataTable tbody tr.odd, html[data-theme="dark"] body.gs-page-kits table.dataTable tbody tr.even{ background-color:var(--gs-card) !important; }
  /* re-assert header colour over the analytics-base global dark th rule (which is !important) */
  html[data-theme="dark"] body.gs-page-kits table.dataTable thead th{ color:#A8B1BF !important; }
  html[data-theme="dark"] body.gs-page-kits .gs-filterbar input[type=text], html[data-theme="dark"] body.gs-page-kits .gs-filterbar input[type="datetime-local"], html[data-theme="dark"] body.gs-page-kits .gs-filterbar select, html[data-theme="dark"] body.gs-page-kits .modal-card input, html[data-theme="dark"] body.gs-page-kits .modal-card select{ background-color:#16213A !important; color:var(--gs-text-2) !important; border-color:var(--gs-border) !important; }

  /* ===== Beta feedback banner + dialog form (per-page copy; mirrors analytics/recordings2/eventLog) ===== */
  body.gs-page-kits .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:0; padding:13px 16px; border-radius:12px !important; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; animation:gs-fb-in-kit 0.4s ease; }
  @keyframes gs-fb-in-kit{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }
  /* Feedback dialog inner form */
  body.gs-page-kits .gs-fbform label{ font-size:13px; font-weight:600; color:var(--gs-ink); }
  body.gs-page-kits .gs-fbform textarea{ width:100%; min-height:130px; resize:vertical; padding:10px 12px; border:1px solid var(--gs-border); border-radius:8px !important; font-family:inherit; font-size:13px; color:var(--gs-ink); background:var(--gs-card); box-sizing:border-box; }
  @media (max-width:760px){
    body.gs-page-kits .gs-fbbanner{ flex-wrap:wrap; }
    body.gs-page-kits .gs-fbbanner-cta{ width:100%; justify-content:center; }
  }

/* ============================================================
   LONE WORKING PAGE — modernised chrome + tables. Mirrors the
   recordings2 / analytics design system. Self-contained: its own
   --gs-* token palette (light + dark) feeds the shared body.gs-app
   blocks (sections, pagehead, filter bar, buttons); the topnav,
   footer, page frame, panes and dataTable chrome below are the
   page-scoped pieces recordings2 keeps to itself. Editing this block
   never touches recordings2/analytics/aum.
   ============================================================ */
  body.gs-page-loneworking{
    --gs-red: #D00000; --gs-red-dark: #A80000; --gs-red-tint: #FBEAEA;
    --gs-ink: #0F1117; --gs-text-2: #3D434F; --gs-muted: #6B7280; --gs-faint: #9AA1AC;
    --gs-border: #D7DBE0; --gs-border-light: #E8EAEE; --gs-bg: #F4F5F7; --gs-card: #FFFFFF;
    --gs-green-bg: #E5F4E8;  --gs-green-tx: #1E7B34;
    --gs-amber-bg: #FCF1DC;  --gs-amber-tx: #92600A;
    --gs-redpill-bg: #FBEAEA; --gs-redpill-tx: #B42318;
    --gs-blue-bg: #E7EFF9;   --gs-blue-tx: #1D4F91;
    --gs-purple-bg: #EFEAF8; --gs-purple-tx: #5B3E96;
    --gs-grey-bg: #EEF0F3;   --gs-grey-tx: #4B5563;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--gs-ink); background: var(--gs-bg); min-height: 100%;
  }
  /* ----- Top navigation bar ----- */
  /* ----- Footer ----- */
  /* ----- Page frame + full-bleed chrome strips (content sits in a 24px-padded container) ----- */
  body.gs-page-loneworking .gs-page{ width:100%; max-width:100%; padding:64px 24px 56px; text-align:left; box-sizing:border-box; }
  body.gs-page-loneworking .gs-pagehead,
  body.gs-page-loneworking #functionSelector,
  body.gs-page-loneworking .gs-filterbar,
  body.gs-page-loneworking .gs-loaded-range{ margin-left:-24px; margin-right:-24px; padding-left:24px; padding-right:24px; }
  body.gs-page-loneworking .gs-filterbar{ border-radius:0 !important; border:0; border-bottom:0.5px solid var(--gs-border-light); background:var(--gs-card); margin-bottom:18px !important; }
  /* loaded-range status strip below the filter bar (analytics' loaded-range, recordings2 full-bleed) */
  body.gs-page-loneworking .gs-loaded-range{ display:flex; align-items:center; gap:7px; font-size:10.5px; color:var(--gs-muted); background:#FAFAF9; border-bottom:0.5px solid var(--gs-border-light); padding-top:5px; padding-bottom:5px; margin-bottom:12px; }
  /* ----- Section panes ----- */
  body.gs-page-loneworking #mainTab > .gs-pane{ display:none; }
  body.gs-page-loneworking #mainTab > .gs-pane.gs-pane-active{ display:block; }
  /* ----- Table chrome ----- */
  body.gs-page-loneworking table.dataTable{ background:transparent; border:none; }
  body.gs-page-loneworking table.dataTable thead th{ font-size:10px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; color:var(--gs-muted); background:transparent; border-top:none; border-left:none; border-right:none; border-bottom:0.5px solid var(--gs-border); padding:9px 12px; }
  /* kill the legacy dataTables zebra striping (match recordings2's flat rows) */
  body.gs-page-loneworking table.dataTable tbody tr, body.gs-page-loneworking table.dataTable tbody tr.odd, body.gs-page-loneworking table.dataTable tbody tr.even{ background-color:#fff !important; }
  body.gs-page-loneworking table.dataTable tbody tr.odd td, body.gs-page-loneworking table.dataTable tbody tr.even td{ background-color:transparent !important; }
  body.gs-page-loneworking table.dataTable tbody tr:hover td{ background:#fafaf9; }
  /* Sort indicators: faint arrows instead of the legacy background images */
  body.gs-page-loneworking table.dataTable thead th.sorting, body.gs-page-loneworking table.dataTable thead th.sorting_asc, body.gs-page-loneworking table.dataTable thead th.sorting_desc, body.gs-page-loneworking table.dataTable thead th.sorting_asc_disabled, body.gs-page-loneworking table.dataTable thead th.sorting_desc_disabled{ background-image:none !important; padding-right:24px; position:relative; cursor:pointer; }
  body.gs-page-loneworking table.dataTable thead th.sorting:after, body.gs-page-loneworking table.dataTable thead th.sorting_asc:after, body.gs-page-loneworking table.dataTable thead th.sorting_desc:after{ position:absolute; right:9px; top:50%; transform:translateY(-50%); font-size:10px; color:var(--gs-faint); text-transform:none; letter-spacing:0; }
  /* Form controls inside the native modal-card dialogs (the map pop-up) */
  body.gs-page-loneworking .modal-card input[type=text], body.gs-page-loneworking .modal-card input[type=email], body.gs-page-loneworking .modal-card input[type=number], body.gs-page-loneworking .modal-card input[type=password], body.gs-page-loneworking .modal-card select{ width:100%; box-sizing:border-box; height:34px; border:0.5px solid var(--gs-border); border-radius:6px !important; padding:0 10px; font-size:13px; font-family:inherit; background:#fff; color:var(--gs-ink); outline:none; }
  body.gs-page-loneworking .modal-card input:focus, body.gs-page-loneworking .modal-card select:focus{ border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  /* ----- Dark mode ----- */
  html[data-theme="dark"] body.gs-page-loneworking{
    color-scheme: dark;
    --gs-ink:#F1F5F9; --gs-text-2:#D7DDE6; --gs-muted:#A8B1BF; --gs-faint:#8B94A3;
    --gs-border:#344256; --gs-border-light:#283447; --gs-bg:#0F172A; --gs-card:#1E293B;
    --gs-red:#CC2222; --gs-red-dark:#E04040; --gs-red-tint:rgba(204,34,34,0.14);
    --gs-green-bg:rgba(34,197,94,0.16); --gs-green-tx:#7EE2A8;
    --gs-amber-bg:rgba(245,158,11,0.16); --gs-amber-tx:#FBD38D;
    --gs-redpill-bg:rgba(239,68,68,0.16); --gs-redpill-tx:#FCA5A5;
    --gs-blue-bg:rgba(96,165,250,0.16); --gs-blue-tx:#9CC4FB;
    --gs-purple-bg:rgba(167,139,250,0.16); --gs-purple-tx:#C4B5FD;
    --gs-grey-bg:rgba(148,163,184,0.14); --gs-grey-tx:#CBD5E1;
    background:var(--gs-bg); color:var(--gs-text-2);
  }
  html[data-theme="dark"] body.gs-page-loneworking table.dataTable tbody tr, html[data-theme="dark"] body.gs-page-loneworking table.dataTable tbody tr.odd, html[data-theme="dark"] body.gs-page-loneworking table.dataTable tbody tr.even{ background-color:var(--gs-card) !important; }
  /* re-assert header colour over the analytics-base global dark th rule (which is !important) */
  html[data-theme="dark"] body.gs-page-loneworking table.dataTable thead th{ color:#A8B1BF !important; }
  html[data-theme="dark"] body.gs-page-loneworking .gs-filterbar input[type=text], html[data-theme="dark"] body.gs-page-loneworking .gs-filterbar input[type="datetime-local"], html[data-theme="dark"] body.gs-page-loneworking .gs-filterbar select, html[data-theme="dark"] body.gs-page-loneworking .modal-card input, html[data-theme="dark"] body.gs-page-loneworking .modal-card select{ background-color:#16213A !important; color:var(--gs-text-2) !important; border-color:var(--gs-border) !important; }

  /* ===== Beta feedback banner + dialog form (5th per-page copy; mirrors analytics/recordings2) ===== */
  body.gs-page-loneworking .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:0; padding:13px 16px; border-radius:12px !important; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; animation:gs-fb-in-lw 0.4s ease; }
  @keyframes gs-fb-in-lw{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }
  /* Feedback dialog inner form */
  body.gs-page-loneworking .gs-fbform label{ font-size:13px; font-weight:600; color:var(--gs-ink); }
  body.gs-page-loneworking .gs-fbform textarea{ width:100%; min-height:130px; resize:vertical; padding:10px 12px; border:1px solid var(--gs-border); border-radius:8px !important; font-family:inherit; font-size:13px; color:var(--gs-ink); background:var(--gs-card); box-sizing:border-box; }
  @media (max-width:760px){
    body.gs-page-loneworking .gs-fbbanner{ flex-wrap:wrap; }
    body.gs-page-loneworking .gs-fbbanner-cta{ width:100%; justify-content:center; }
  }

  /* ----- KPI stat cards (current lone workers / overdue check-outs) ----- */
  body.gs-page-loneworking .lw-stats{ display:flex; gap:14px; margin:18px 0 26px; flex-wrap:wrap; }
  body.gs-page-loneworking .lw-stat{ flex:1 1 240px; display:flex; align-items:center; gap:14px; background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:12px !important; padding:15px 18px; box-shadow:0 1px 3px rgba(15,17,23,0.04); }
  body.gs-page-loneworking .lw-stat-ico{ flex:none; width:42px; height:42px; border-radius:11px !important; display:inline-flex; align-items:center; justify-content:center; }
  body.gs-page-loneworking .lw-stat-ico svg{ width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  body.gs-page-loneworking .lw-stat.is-active .lw-stat-ico{ background:var(--gs-green-bg); color:var(--gs-green-tx); }
  body.gs-page-loneworking .lw-stat.is-overdue .lw-stat-ico{ background:var(--gs-redpill-bg); color:var(--gs-redpill-tx); }
  body.gs-page-loneworking .lw-stat-body{ display:flex; flex-direction:column; min-width:0; }
  body.gs-page-loneworking .lw-stat-num{ font-size:26px; font-weight:700; line-height:1.05; color:var(--gs-ink); }
  body.gs-page-loneworking .lw-stat-label{ font-size:12px; color:var(--gs-muted); margin-top:3px; }
  body.gs-page-loneworking .lw-stat-link{ margin-top:6px; font-size:12px; font-weight:600; color:var(--gs-red); cursor:pointer; align-self:flex-start; background:none; border:0; padding:0; font-family:inherit; }
  body.gs-page-loneworking .lw-stat-link:hover{ text-decoration:underline; }
  body.gs-page-loneworking .lw-main{ width:100%; }
  /* ----- Table action buttons + status pills (recordings2 framework, scoped here) ----- */
  body.gs-page-loneworking .gs-actiongroup{ display:inline-flex; flex-wrap:nowrap; gap:1px; border:1px solid var(--gs-border); border-radius:8px !important; overflow:hidden; background:var(--gs-border-light); }
  body.gs-page-loneworking .gs-act{ display:inline-flex; align-items:center; gap:5px; border:none; background:#fff; padding:6px 10px; font-size:12px; font-weight:500; color:var(--gs-text-2) !important; cursor:pointer; white-space:nowrap; font-family:inherit; flex:0 0 auto; text-decoration:none; transition:background 0.12s ease, color 0.12s ease; }
  body.gs-page-loneworking .gs-act:hover{ background:var(--gs-grey-bg); color:var(--gs-ink) !important; text-decoration:none; }
  body.gs-page-loneworking .gs-act.gs-primary{ background:var(--gs-blue-bg); color:var(--gs-blue-tx) !important; }
  body.gs-page-loneworking .gs-act.gs-primary:hover{ background:#D9E7F7; color:var(--gs-blue-tx) !important; }
  body.gs-page-loneworking .gs-actiongroup.danger .gs-act{ color:var(--gs-redpill-tx) !important; }
  body.gs-page-loneworking .gs-actiongroup.danger .gs-act:hover{ background:var(--gs-redpill-bg); color:var(--gs-redpill-tx) !important; }
  /* override the generic table-link colour rule so action buttons keep their own colours */
  body.gs-page-loneworking table.dataTable tbody td a.gs-act{ color:var(--gs-text-2) !important; font-weight:500; }
  body.gs-page-loneworking table.dataTable tbody td a.gs-act:hover{ color:var(--gs-ink) !important; }
  body.gs-page-loneworking table.dataTable tbody td .gs-actiongroup.danger a.gs-act, body.gs-page-loneworking table.dataTable tbody td .gs-actiongroup.danger a.gs-act:hover{ color:var(--gs-redpill-tx) !important; }
  body.gs-page-loneworking table.dataTable tbody td a.gs-act.gs-primary, body.gs-page-loneworking table.dataTable tbody td a.gs-act.gs-primary:hover{ color:var(--gs-blue-tx) !important; }
  /* status pills */
  body.gs-page-loneworking .gs-pill{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px !important; font-size:11.5px; font-weight:600; line-height:1.5; white-space:nowrap; vertical-align:middle; }
  /* stacked cell content + status text + reason hint */
  body.gs-page-loneworking .lw-stack{ display:flex; flex-direction:column; align-items:center; gap:6px; }
  body.gs-page-loneworking .lw-strong{ font-weight:600; color:var(--gs-ink); }
  body.gs-page-loneworking .lw-muted{ color:var(--gs-muted); font-size:11.5px; }
  body.gs-page-loneworking .lw-time{ font-weight:600; color:var(--gs-ink); }
  body.gs-page-loneworking .lw-when{ display:flex; flex-direction:column; align-items:center; gap:1px; }
  body.gs-page-loneworking .lw-when-tag{ font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--gs-muted); font-weight:700; }
  body.gs-page-loneworking .lw-when-date{ font-weight:600; color:var(--gs-ink); font-size:12.5px; }
  body.gs-page-loneworking .lw-when-time{ font-size:11.5px; color:var(--gs-muted); font-weight:500; }
  body.gs-page-loneworking .lw-status{ font-size:11.5px; font-weight:600; }
  body.gs-page-loneworking .lw-status-green{ color:var(--gs-green-tx); }
  body.gs-page-loneworking .lw-status-amber{ color:var(--gs-amber-tx); }
  body.gs-page-loneworking .lw-status-red{ color:var(--gs-redpill-tx); }
  body.gs-page-loneworking .lw-status-blue{ color:var(--gs-blue-tx); }
  body.gs-page-loneworking .lw-status-grey{ color:var(--gs-muted); }
  body.gs-page-loneworking .lw-reason{ display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--gs-muted); cursor:help; }
  body.gs-page-loneworking .lw-reason .ic{ width:12px; height:12px; }
  /* centered table headers (cells already centered via fnCreatedRow) + switch centering */
  body.gs-page-loneworking table.dataTable thead th{ text-align:center; }
  body.gs-page-loneworking table.dataTable td .gs-switch{ margin:0 auto; }
  /* dark mode for the action buttons (recordings2 parity) */
  html[data-theme="dark"] body.gs-page-loneworking .gs-act.gs-primary:hover{ background-color:rgba(96,165,250,0.28) !important; }
  html[data-theme="dark"] body.gs-page-loneworking .gs-actiongroup.danger .gs-act{ background-color:var(--gs-redpill-bg) !important; color:var(--gs-redpill-tx) !important; }



/* ==========================================================================
   GSDatePicker — custom date+time picker popup (driven by master.js).
   Brand-red, modern; replaces the native datetime-local popup. Self-contained
   (literal colours) so it renders identically on every page.
   ========================================================================== */
  .gs-dp-input{ cursor:pointer; }
  .gs-dp-input::-webkit-calendar-picker-indicator{ display:none; }   /* hide native icon */
  /* Canonical filter-bar date input — the recordings2 look, keyed on the class
     master.js adds to every datetime-local input, so every gs-app page's
     .date-bar / .gs-filterbar renders date fields identically (one source). */
  body.gs-app .date-bar input.gs-dp-input,
  body.gs-app .gs-filterbar input.gs-dp-input{
    height:32px !important; width:185px !important; max-width:100%; margin:0; min-width:0;
    text-align:center; font-size:12.5px; font-family:inherit; padding:0 10px !important;
    border:0.5px solid var(--gs-border); border-radius:6px !important;
    background:var(--gs-card); color:var(--gs-ink); box-shadow:none; outline:none;
  }
  body.gs-app .date-bar input.gs-dp-input:focus,
  body.gs-app .gs-filterbar input.gs-dp-input:focus{ border-color:#D00000; box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  /* Dark: pin both pages to the same values (recordings2's look) so they stay
     identical — the per-page dark tokens differ, and global `html[data-theme=dark]
     input` rules would otherwise override, so we set explicit values here. */
  html[data-theme="dark"] body.gs-app .date-bar input.gs-dp-input,
  html[data-theme="dark"] body.gs-app .gs-filterbar input.gs-dp-input{
    background:#16213A !important; border-color:#344256 !important; color:#D7DDE6 !important;
  }
  .gs-dp{ position:absolute; z-index:10000; background:#fff; border:0.5px solid rgba(0,0,0,0.10);
          border-radius:14px !important; box-shadow:0 14px 46px rgba(15,17,23,0.18);
          padding:14px; font-family:inherit; font-size:13px; color:#0F1117; user-select:none;
          animation:gs-dp-in .13s ease; }
  @keyframes gs-dp-in{ from{ opacity:0; transform:translateY(-5px); } to{ opacity:1; transform:translateY(0); } }
  .gs-dp-body{ display:flex; gap:14px; align-items:flex-start; }
  .gs-dp-cal{ width:252px; }
  .gs-dp-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
  .gs-dp-title{ font-size:14px; font-weight:700; color:#0F1117; border:none; background:transparent;
               cursor:pointer; padding:5px 9px; border-radius:8px !important; transition:background .12s;
               display:inline-flex; align-items:center; }
  .gs-dp-title:hover{ background:#F3F4F6; }
  .gs-dp-title.is-static, .gs-dp-title.is-static:hover{ cursor:default; background:transparent; }
  .gs-dp-caret{ font-size:9px; opacity:0.55; margin-left:5px; line-height:1; }
  .gs-dp-nav{ width:30px; height:30px; border:none; background:transparent; border-radius:8px !important;
              cursor:pointer; font-size:19px; line-height:1; color:#6B7280; display:flex; align-items:center;
              justify-content:center; transition:background .12s, color .12s; }
  .gs-dp-nav:hover{ background:#F3F4F6; color:#0F1117; }
  .gs-dp-dow{ display:grid; grid-template-columns:repeat(7,1fr); margin-bottom:2px; }
  .gs-dp-dow span{ text-align:center; font-size:10.5px; font-weight:600; color:#9CA3AF; padding:4px 0; }
  .gs-dp-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
  .gs-dp-day{ height:32px; border:none; background:transparent; border-radius:8px !important; cursor:pointer;
              font-size:12.5px; color:#0F1117; transition:background .1s, color .1s; }
  .gs-dp-day:hover{ background:#F3F4F6; }
  .gs-dp-day.is-other{ color:#C9CED6; }
  .gs-dp-day.is-today{ box-shadow:inset 0 0 0 1.5px #D00000; color:#D00000; font-weight:700; }
  .gs-dp-day.is-selected{ background:#D00000 !important; color:#fff !important; font-weight:700; box-shadow:none; }
  .gs-dp-mgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding-top:6px; min-height:229px; align-content:center; box-sizing:border-box; }
  .gs-dp-mcell{ height:50px; border:none; background:transparent; border-radius:9px !important; cursor:pointer;
               font-size:13px; font-weight:500; color:#0F1117; transition:background .1s, color .1s; }
  .gs-dp-mcell:hover{ background:#F3F4F6; }
  .gs-dp-mcell.is-today{ box-shadow:inset 0 0 0 1.5px #D00000; color:#D00000; font-weight:700; }
  .gs-dp-mcell.is-selected{ background:#D00000 !important; color:#fff !important; font-weight:700; box-shadow:none; }
  .gs-dp-time{ display:flex; gap:8px; }
  .gs-dp-col{ width:52px; box-sizing:border-box; height:267px; overflow-y:auto; border:0.5px solid rgba(0,0,0,0.08);
              border-radius:12px !important; padding:6px 5px; scrollbar-width:thin; }
  .gs-dp-col::-webkit-scrollbar{ width:6px; } .gs-dp-col::-webkit-scrollbar-thumb{ background:#D7DBE0; border-radius:3px; }
  .gs-dp-opt{ display:block; width:100%; height:32px; border:none; background:transparent; border-radius:7px !important;
              cursor:pointer; font-size:13px; color:#0F1117; transition:background .1s, color .1s; }
  .gs-dp-opt:hover{ background:#F3F4F6; }
  .gs-dp-opt.is-selected{ background:#D00000 !important; color:#fff !important; font-weight:700; }
  .gs-dp-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; padding-top:10px;
               border-top:0.5px solid rgba(0,0,0,0.08); }
  .gs-dp-link{ border:none; background:transparent; color:#D00000; font-size:12.5px; font-weight:600; cursor:pointer;
               padding:4px 8px; border-radius:6px !important; transition:background .12s; }
  .gs-dp-link:hover{ background:#FBEAEA; }
  .gs-dp-done{ border:none; background:#D00000; color:#fff; font-size:12.5px; font-weight:600; cursor:pointer;
               padding:7px 18px; border-radius:8px !important; transition:background .12s; }
  .gs-dp-done:hover{ background:#A80000; }
  /* dark theme */
  .gs-dp-dark{ background:#1E293B; border-color:rgba(255,255,255,0.10); color:#F1F5F9; box-shadow:0 14px 46px rgba(0,0,0,0.55); }
  .gs-dp-dark .gs-dp-title{ color:#F1F5F9; } .gs-dp-dark .gs-dp-title:hover{ background:#2C3A52; }
  .gs-dp-dark .gs-dp-title.is-static:hover{ background:transparent; }
  .gs-dp-dark .gs-dp-mcell{ color:#F1F5F9; } .gs-dp-dark .gs-dp-mcell:hover{ background:#2C3A52; }
  .gs-dp-dark .gs-dp-nav{ color:#94A3B8; } .gs-dp-dark .gs-dp-nav:hover{ background:#2C3A52; color:#F1F5F9; }
  .gs-dp-dark .gs-dp-day{ color:#F1F5F9; } .gs-dp-dark .gs-dp-day:hover{ background:#2C3A52; } .gs-dp-dark .gs-dp-day.is-other{ color:#5B6677; }
  .gs-dp-dark .gs-dp-col{ border-color:rgba(255,255,255,0.10); } .gs-dp-dark .gs-dp-col::-webkit-scrollbar-thumb{ background:#3A4A63; }
  .gs-dp-dark .gs-dp-opt{ color:#F1F5F9; } .gs-dp-dark .gs-dp-opt:hover{ background:#2C3A52; }
  .gs-dp-dark .gs-dp-foot{ border-color:rgba(255,255,255,0.10); }
  .gs-dp-dark .gs-dp-link:hover{ background:#3A2122; }

/* ==========================================================================
   AI SCRIBE page (body.gs-page-aiscribe) — re-skinned onto the gs-app system.
   Chrome (tokens, topnav, feedback banner/form) mirrors the other portal pages
   (those are per-page-scoped); pagehead/modal/btn-action are inherited shared.
   ========================================================================== */
  :where(body.gs-page-aiscribe){
    --gs-red:#D00000; --gs-red-dark:#A80000; --gs-red-tint:#FBEAEA;
    --gs-ink:#0F1117; --gs-text:#3D434F; --gs-text-2:#3D434F; --gs-muted:#6B7280; --gs-faint:#9AA1AC;
    --gs-border:#D7DBE0; --gs-border-light:#E8EAEE;
    --gs-bg:#F4F5F7; --gs-card:#FFFFFF; --gs-topnav-bg:#0f1117;
    --gs-green-bg:#E5F4E8; --gs-green-tx:#1E7B34; --gs-amber-bg:#FCF1DC; --gs-amber-tx:#92600A; --gs-redpill-bg:#FBEAEA; --gs-redpill-tx:#B42318; --gs-blue-bg:#E7EFF9; --gs-blue-tx:#1D4F91; --gs-purple-bg:#EFEAF8; --gs-purple-tx:#5B3E96; --gs-grey-bg:#EEF0F3; --gs-grey-tx:#4B5563;
  }
  html[data-theme="dark"] :where(body.gs-page-aiscribe){
    --gs-ink:#F2F4F8; --gs-text:#C4CBD6; --gs-text-2:#C4CBD6; --gs-muted:#8B93A1; --gs-faint:#6B7280;
    --gs-border:#2A3242; --gs-border-light:#222A38;
    --gs-bg:#0F141C; --gs-card:#161D29; --gs-topnav-bg:#0f1117;
    --gs-green-bg:rgba(34,197,94,0.16); --gs-green-tx:#7EE2A8; --gs-amber-bg:rgba(245,158,11,0.16); --gs-amber-tx:#FBD38D; --gs-redpill-bg:rgba(239,68,68,0.16); --gs-redpill-tx:#FCA5A5; --gs-blue-bg:rgba(96,165,250,0.16); --gs-blue-tx:#9CC4FB; --gs-purple-bg:rgba(167,139,250,0.16); --gs-purple-tx:#C4B5FD; --gs-grey-bg:rgba(148,163,184,0.14); --gs-grey-tx:#CBD5E1;
  }
  body.gs-page-aiscribe{ background:var(--gs-bg); color:var(--gs-ink); font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif; min-height:100%; }

  /* ===== Action buttons + status pills (shared look with recordings2) ===== */
  body.gs-page-aiscribe .gs-pill{
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px !important;
    font-size: 12px; font-weight: 600; line-height: 1.5;
    white-space: nowrap; vertical-align: middle;
  }


  body.gs-page-aiscribe .gs-actiongroup{
    display: inline-flex; flex-wrap: nowrap; gap: 1px;
    border: 1px solid var(--gs-border);
    border-radius: 8px !important; overflow: hidden;
    background: var(--gs-border-light);
  }
  body.gs-page-aiscribe .gs-act{
    display: inline-flex; align-items: center; gap: 5px;
    border: none; background: #fff; padding: 6px 10px;
    font-size: 12px; font-weight: 500; color: var(--gs-text-2) !important;
    cursor: pointer; white-space: nowrap; font-family: inherit;
    flex: 0 0 auto; text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
  }
  body.gs-page-aiscribe .gs-act:hover{ background: var(--gs-grey-bg); color: var(--gs-ink) !important; text-decoration: none; }
  body.gs-page-aiscribe .gs-actiongroup.danger .gs-act{ color: var(--gs-redpill-tx) !important; }
  body.gs-page-aiscribe .gs-actiongroup.danger .gs-act:hover{ background: var(--gs-redpill-bg); color: var(--gs-redpill-tx) !important; }
  body.gs-page-aiscribe .gs-act.gs-primary{ background-color: var(--gs-blue-bg) !important; color: var(--gs-blue-tx) !important; }
  body.gs-page-aiscribe .gs-act.gs-primary:hover{ background-color: #D9E7F7 !important; color: var(--gs-blue-tx) !important; }

  html[data-theme="dark"] body.gs-page-aiscribe .gs-act.gs-primary:hover{ background-color: rgba(96, 165, 250, 0.28) !important; }
  html[data-theme="dark"] body.gs-page-aiscribe .gs-actiongroup.danger .gs-act{ background-color: var(--gs-redpill-bg) !important; }

  /* ----- topnav (per-page, mirrors the other pages) ----- */
  :where(body.gs-page-aiscribe) .gs-topnav{ display:flex; align-items:center; gap:8px; height:48px; padding:0 16px; background:var(--gs-topnav-bg); box-shadow:0 1px 0 rgba(255,255,255,0.06); }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-brand{ display:inline-flex; align-items:center; gap:8px; flex:1 1 0; min-width:0; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-brand img{ height:22px; width:auto; display:block; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-nav-links{ display:flex; align-items:center; gap:2px; flex:0 1 auto; justify-content:center; min-width:0; overflow-x:auto; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-nav-links a{ color:#C9CED6; font-size:13px; font-weight:500; text-decoration:none; padding:6px 10px; border-radius:6px !important; white-space:nowrap; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-nav-links a:hover{ color:#fff; background:rgba(255,255,255,0.06); }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-nav-links a.gs-active{ color:#fff; background:rgba(255,255,255,0.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.14); }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-nav-right{ display:flex; align-items:center; gap:12px; flex:1 1 0; justify-content:flex-end; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-logout{ color:#C9CED6; font-size:12.5px; text-decoration:none; white-space:nowrap; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-logout:hover{ color:#fff; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-avatar{ width:28px; height:28px; border-radius:50% !important; background:var(--gs-red); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:none; cursor:pointer; text-decoration:none; }
  :where(body.gs-page-aiscribe) .gs-topnav .gs-avatar:hover{ background:var(--gs-red-dark); }

  /* ----- feedback banner (per-page, mirrors the other pages) ----- */
  :where(body.gs-page-aiscribe) .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:16px 24px 0; padding:13px 16px; border-radius:12px !important; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-spark{ flex:0 0 auto; width:36px; height:36px; border-radius:10px !important; background:#fff; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(208,0,0,0.10); }
  :where(body.gs-page-aiscribe) .gs-fbbanner-spark svg{ width:19px; height:19px; stroke:var(--gs-red); fill:none; stroke-width:1.8; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-copy{ flex:1 1 auto; display:flex; flex-direction:column; gap:2px; line-height:1.4; min-width:0; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-copy b{ color:var(--gs-ink); font-size:13.5px; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-copy span{ color:var(--gs-text-2); font-size:12.5px; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-cta{ flex:0 0 auto; white-space:nowrap; display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 14px; border:none; border-radius:8px !important; background:var(--gs-red); color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-cta:hover{ background:var(--gs-red-dark); }
  :where(body.gs-page-aiscribe) .gs-fbbanner-cta svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-x{ flex:0 0 auto; background:transparent; border:0; color:var(--gs-muted); font-size:22px; line-height:1; cursor:pointer; padding:0 4px; align-self:flex-start; }
  :where(body.gs-page-aiscribe) .gs-fbbanner-x:hover{ color:var(--gs-ink); }
  html[data-theme="dark"] :where(body.gs-page-aiscribe) .gs-fbbanner{ background:linear-gradient(135deg,rgba(204,34,34,0.16) 0%,rgba(167,139,250,0.16) 100%); border-color:var(--gs-border); }
  html[data-theme="dark"] :where(body.gs-page-aiscribe) .gs-fbbanner-spark{ background:var(--gs-card); box-shadow:0 2px 8px rgba(0,0,0,0.4); }

  /* ----- feedback form (#fbModal) ----- */
  :where(body.gs-page-aiscribe) .gs-fbform{ display:flex; flex-direction:column; gap:10px; text-align:left; }
  :where(body.gs-page-aiscribe) .gs-fbform label{ font-size:13px; font-weight:600; color:var(--gs-ink); }
  :where(body.gs-page-aiscribe) .gs-fbform textarea{ width:100%; min-height:130px; resize:vertical; padding:10px 12px; border:1px solid var(--gs-border); border-radius:8px !important; font-family:inherit; font-size:13px; color:var(--gs-ink); background:var(--gs-card); box-sizing:border-box; }
  :where(body.gs-page-aiscribe) .gs-fbform textarea:focus{ outline:none; border-color:var(--gs-red); }
  :where(body.gs-page-aiscribe) .gs-fbform .gs-fbcount{ font-size:11px; color:var(--gs-faint); text-align:right; }
  :where(body.gs-page-aiscribe) .gs-fbform .gs-fberr{ font-size:12px; color:var(--gs-red); display:none; }
  :where(body.gs-page-aiscribe) .gs-fbform .gs-fberr.show{ display:block; }

  /* ----- content: form card + scribes table ----- */
  body.gs-page-aiscribe .gs-aiscribe-body{ padding:18px 24px 80px; }
  body.gs-page-aiscribe .ais-grid{ display:grid; grid-template-columns:minmax(0,460px) minmax(0,1fr); gap:18px; align-items:start; }
  @media (max-width:980px){ body.gs-page-aiscribe .ais-grid{ grid-template-columns:1fr; } }
  body.gs-page-aiscribe .ais-card{ background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:12px !important; padding:18px 20px; }
  body.gs-page-aiscribe .ais-card-title{ font-size:14px; font-weight:700; color:var(--gs-ink); margin:0 0 14px; }
  body.gs-page-aiscribe .ais-label{ display:block; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:var(--gs-muted); margin:16px 0 6px; }
  body.gs-page-aiscribe .ais-form .ais-label:first-of-type{ margin-top:0; }
  body.gs-page-aiscribe .ais-input{ width:100%; box-sizing:border-box; border:0.5px solid var(--gs-border); border-radius:8px !important; padding:0 11px; height:36px; font-size:13px; font-family:inherit; background:var(--gs-card); color:var(--gs-ink); outline:none; }
  /* min-height (190px) sets the floor: bootstrap.min.css forces textarea{height:40px!important}, but min-height is a separate property it doesn't touch, so this wins without !important */
  body.gs-page-aiscribe .ais-textarea{ min-height:190px; height:190px; padding:11px 13px !important; resize:vertical; line-height:1.55; font-size:13px; }
  body.gs-page-aiscribe .ais-input:focus{ border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  body.gs-page-aiscribe .ais-input:disabled{ opacity:.55; cursor:not-allowed; }
  body.gs-page-aiscribe .bootstrap-select.disabled{ opacity:.55; }
  body.gs-page-aiscribe #whichTemplate + .bootstrap-select{ width:100% !important; }
  body.gs-page-aiscribe #whichTemplate + .bootstrap-select > .btn{ height:36px; border:0.5px solid var(--gs-border) !important; border-radius:8px !important; background:var(--gs-card) !important; color:var(--gs-ink) !important; font-size:13px; box-shadow:none !important; }
  /* OPEN dropdown menu — themed via tokens so it works in light AND dark (bootstrap-select left it white in dark) */
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu{ background:var(--gs-card); border:0.5px solid var(--gs-border); border-radius:8px !important; padding:4px; font-size:13px; box-shadow:0 10px 30px rgba(0,0,0,0.18); }
  html[data-theme="dark"] body.gs-page-aiscribe .bootstrap-select .dropdown-menu{ box-shadow:0 12px 34px rgba(0,0,0,0.55); }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu.inner{ background:transparent; border:none; box-shadow:none; padding:0; border-radius:0 !important; }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a{ color:var(--gs-ink); border-radius:6px !important; padding:7px 10px; }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a .text{ color:var(--gs-ink); }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a:hover, body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a:focus, body.gs-page-aiscribe .bootstrap-select .dropdown-menu li.active > a{ background:rgba(0,0,0,0.05); color:var(--gs-ink); }
  html[data-theme="dark"] body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a:hover, html[data-theme="dark"] body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a:focus, html[data-theme="dark"] body.gs-page-aiscribe .bootstrap-select .dropdown-menu li.active > a{ background:rgba(255,255,255,0.07); }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu li.selected > a{ background:rgba(208,0,0,0.10); color:var(--gs-ink); }
  html[data-theme="dark"] body.gs-page-aiscribe .bootstrap-select .dropdown-menu li.selected > a{ background:rgba(208,0,0,0.22); }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu .check-mark{ color:var(--gs-red); }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu .divider{ background:var(--gs-border); }
  body.gs-page-aiscribe .bootstrap-select .bs-searchbox{ padding:6px 6px 4px; }
  body.gs-page-aiscribe .bootstrap-select .bs-searchbox input{ height:32px; border:0.5px solid var(--gs-border) !important; border-radius:6px !important; font-size:13px; background:var(--gs-card) !important; color:var(--gs-ink) !important; box-shadow:none !important; }
  body.gs-page-aiscribe .bootstrap-select .no-results{ background:transparent; color:var(--gs-muted); font-size:12.5px; padding:8px 10px; }
  body.gs-page-aiscribe .record-btn{ background:var(--gs-red); color:#fff; border:none; border-radius:8px !important; padding:0 18px; height:40px; font-size:14px; font-weight:600; font-family:inherit; cursor:pointer; display:inline-flex; align-items:center; gap:8px; white-space:nowrap; transition:background .12s; }
  body.gs-page-aiscribe .record-btn:hover{ background:var(--gs-red-dark); }
  body.gs-page-aiscribe .record-btn.ais-dark, body.gs-page-aiscribe #stopBtn{ background:#0F1117; }
  body.gs-page-aiscribe .record-btn.ais-dark:hover, body.gs-page-aiscribe #stopBtn:hover{ background:#2a2f3a; }
  body.gs-page-aiscribe .record-btn__text{ margin-left:2px; }
  /* stop button is shown alone while recording -> centre it (JS sets display:flex) */
  body.gs-page-aiscribe #stopBtn{ width:fit-content; margin-left:auto; margin-right:auto; }
  body.gs-page-aiscribe .ais-actions{ margin-top:18px; }
  body.gs-page-aiscribe .ais-btn-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  body.gs-page-aiscribe .ais-or{ color:var(--gs-faint); font-size:13px; }
  /* Embedded (in-app) + narrow phones: stack the record buttons full-width, equal size, with a
     centred OR between them. The inline wrapping row looks messy at app width (the "OR" clings to
     "Start Recording" and "Select File" drops onto its own line at a different width). */
  body.gs-page-aiscribe.ais-app .ais-btn-row{ flex-direction:column; align-items:stretch; gap:10px; }
  body.gs-page-aiscribe.ais-app .ais-btn-row .record-btn{ width:100%; justify-content:center; height:46px; font-size:15px; }
  body.gs-page-aiscribe.ais-app .ais-btn-row .ais-or{ text-align:center; margin:2px 0; }
  @media (max-width:480px){
    body.gs-page-aiscribe .ais-btn-row{ flex-direction:column; align-items:stretch; gap:10px; }
    body.gs-page-aiscribe .ais-btn-row .record-btn{ width:100%; justify-content:center; height:46px; }
    body.gs-page-aiscribe .ais-btn-row .ais-or{ text-align:center; margin:2px 0; }
  }
  /* "Record system audio" - a modern settings-row panel (label + description on the left, shared
     .gs-switch on the right). NB: .gs-switch carries margin:auto, so reset it here or it floats to the far edge. */
  body.gs-page-aiscribe .ais-sysaudio{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin:6px 0 16px; padding:12px 14px; background:var(--gs-bg); border:0.5px solid var(--gs-border-light); border-radius:10px !important; }
  body.gs-page-aiscribe .ais-sysaudio-info{ display:flex; flex-direction:column; gap:3px; min-width:0; }
  body.gs-page-aiscribe .ais-sysaudio-label{ font-size:13px; font-weight:600; color:var(--gs-ink); }
  body.gs-page-aiscribe .ais-sysaudio-desc{ font-size:11.5px; line-height:1.45; color:var(--gs-muted); }
  body.gs-page-aiscribe .ais-sysaudio .gs-switch{ margin:0; flex:none; }
  body.gs-page-aiscribe .ais-visualizer{ max-width:100%; width:100%; height:80px; margin-top:16px; border:0.5px solid var(--gs-border); background:var(--gs-card); border-radius:8px !important; }
  /* ----- upload feedback (centralised: progress / success / error share one .block) ----- */
  body.gs-page-aiscribe #uploads{ margin-top:14px; }
  body.gs-page-aiscribe #uploads .block{ display:flex; flex-direction:column; align-items:center; gap:9px; width:100%; margin:0 0 12px; padding:16px; background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:10px !important; box-sizing:border-box; text-align:center; }
  body.gs-page-aiscribe #uploads .block.is-progress{ align-items:stretch; }
  body.gs-page-aiscribe #uploads .block .progressBar{ background:var(--gs-red); width:0; height:8px; border-radius:6px !important; transition:.25s ease-out; }
  body.gs-page-aiscribe #uploads .block .ais-up-pct{ font-size:12px; color:var(--gs-muted); text-align:center; }
  body.gs-page-aiscribe #uploads .block .ais-up-icon{ width:34px; height:34px; border-radius:50% !important; display:flex; align-items:center; justify-content:center; font-size:19px; font-weight:700; line-height:1; }
  body.gs-page-aiscribe #uploads .block.is-success .ais-up-icon{ background:rgba(30,123,52,0.12); color:#1E7B34; }
  body.gs-page-aiscribe #uploads .block.is-error .ais-up-icon{ background:rgba(208,0,0,0.10); color:var(--gs-red); }
  body.gs-page-aiscribe #uploads .block .ais-up-msg{ font-size:13px; font-weight:600; line-height:1.45; max-width:340px; }
  body.gs-page-aiscribe #uploads .block.is-success .ais-up-msg{ color:#1E7B34; }
  body.gs-page-aiscribe #uploads .block.is-error .ais-up-msg{ color:var(--gs-red); font-weight:500; }
  body.gs-page-aiscribe #uploads .block .ais-up-retry{ margin-top:2px; }

  /* ----- loading overlay: the standard GoodSAM running-man (runningMap.gif background on the legacy
     `.modal` element, shown via `body.loading .modal`). Its ONLY bug was the inline `margin-top:30px`
     on the element, which pushed it down 30px and left the top strip uncovered. Kill that margin, lift
     it above everything, and block interaction (pointer-events:none). Dark mode swaps the white wash
     for a dark one; the running-man image is untouched. ----- */
  body.gs-page-aiscribe.loading{ overflow:hidden; pointer-events:none; }
  body.gs-page-aiscribe.loading .modal{ margin:0 !important; z-index:100000 !important; }
  html[data-theme="dark"] body.gs-page-aiscribe.loading .modal{ background-color:rgba(17,21,26,0.62) !important; }
  /* gs-portal legacy pages: SAME running-man overlay fix as aiScribe. The inline margin-top:30px on the
     .modal loader shoves it down so it covers only PART of the page ("misses half the buttons" on
     manageOrganisation / consultation etc). Reset margin + raise z so it fully covers + blocks input. */
  body.gs-portal.loading{ overflow:hidden; pointer-events:none; }
  body.gs-portal.loading .modal{ margin:0 !important; z-index:100000 !important; }
  body.gs-page-aiscribe .ais-note{ margin-top:12px; color:var(--gs-muted); display:block; }
  body.gs-page-aiscribe table#allScribesTable{ width:100% !important; border-collapse:collapse; background:transparent; border:none; }
  body.gs-page-aiscribe table#allScribesTable thead th{ font-size:10px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; color:var(--gs-muted); text-align:center; background:transparent; border:none; border-bottom:0.5px solid var(--gs-border); padding:9px 10px; white-space:nowrap; }
  body.gs-page-aiscribe table#allScribesTable tbody td{ font-size:12px; color:var(--gs-ink); text-align:center; background:transparent; border:none; border-bottom:0.5px solid var(--gs-border-light); padding:9px 10px; white-space:nowrap; vertical-align:middle; }
  body.gs-page-aiscribe table#allScribesTable .gs-actions{ flex-wrap:nowrap; }
  body.gs-page-aiscribe table#allScribesTable .gs-iconbtn{ padding:6px 9px; }
  body.gs-page-aiscribe table#allScribesTable tbody tr{ background:transparent; }
  body.gs-page-aiscribe table#allScribesTable tbody tr:hover td{ background:#fafaf9; }
  body.gs-page-aiscribe table#allScribesTable tbody tr:last-child td{ border-bottom:none; }
  html[data-theme="dark"] body.gs-page-aiscribe table#allScribesTable tbody tr:hover td{ background:#1a2230; }
  body.gs-page-aiscribe table#allScribesTable tbody td a{ color:var(--gs-text-2) !important; font-weight:600; text-decoration:none; }
  body.gs-page-aiscribe table#allScribesTable tbody td a:hover{ color:var(--gs-red) !important; text-decoration:none; }
  body.gs-page-aiscribe table#allScribesTable td.dataTables_empty{ text-align:center; padding:32px; color:var(--gs-faint); font-size:12px; }
  /* sort indicators: faint arrows instead of legacy background images, brand-red when active (matches recordings2) */
  body.gs-page-aiscribe table#allScribesTable thead th.sorting, body.gs-page-aiscribe table#allScribesTable thead th.sorting_asc, body.gs-page-aiscribe table#allScribesTable thead th.sorting_desc, body.gs-page-aiscribe table#allScribesTable thead th.sorting_asc_disabled, body.gs-page-aiscribe table#allScribesTable thead th.sorting_desc_disabled{ background-image:none !important; padding-right:22px; position:relative; cursor:pointer; }
  body.gs-page-aiscribe table#allScribesTable thead th.sorting:after, body.gs-page-aiscribe table#allScribesTable thead th.sorting_asc:after, body.gs-page-aiscribe table#allScribesTable thead th.sorting_desc:after{ position:absolute; right:7px; top:50%; transform:translateY(-50%); font-size:10px; color:var(--gs-faint); text-transform:none; letter-spacing:0; }
  body.gs-page-aiscribe table#allScribesTable thead th.sorting:after{ content:"\2195"; }
  body.gs-page-aiscribe table#allScribesTable thead th.sorting_asc:after{ content:"\2191"; color:var(--gs-red); }
  body.gs-page-aiscribe table#allScribesTable thead th.sorting_desc:after{ content:"\2193"; color:var(--gs-red); }
  /* Embedded in-app view (userIsOnTheApp): match the GoodSAM app's look - light grey page so the
     white card lifts off it (no more white-on-white), softer shadow, no page title, tighter padding. */
  body.gs-page-aiscribe.ais-app{ background:var(--gs-bg); }
  body.gs-page-aiscribe.ais-app .gs-aiscribe-body{ padding:16px 14px 32px; }
  body.gs-page-aiscribe.ais-app .ais-grid{ grid-template-columns:1fr; }
  body.gs-page-aiscribe.ais-app .ais-form{ max-width:560px; margin:0 auto; }
  body.gs-page-aiscribe.ais-app .ais-card{ border-radius:16px !important; padding:20px 18px; box-shadow:0 1px 3px rgba(15,17,23,0.08), 0 1px 2px rgba(15,17,23,0.05); }
  body.gs-page-aiscribe.ais-app .ais-card-title{ display:none; }
  /* iOS auto-zooms when a focused field has font-size < 16px - bump the embedded form fields to 16px
     so tapping an input no longer zooms the webview in (the conditional viewport meta also locks zoom). */
  body.gs-page-aiscribe.ais-app input,
  body.gs-page-aiscribe.ais-app textarea,
  body.gs-page-aiscribe.ais-app select{ font-size:16px !important; }
  /* Double-tap-to-zoom is NOT covered by the viewport meta - touch-action:manipulation disables it
     page-wide (incl. the open multiselect dropdown), so accidental taps/double-taps never zoom in. */
  body.gs-page-aiscribe{ touch-action: manipulation; }
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu,
  body.gs-page-aiscribe .bootstrap-select .dropdown-menu li a,
  body.gs-page-aiscribe .bs-searchbox input{ touch-action: manipulation; }
  html[data-theme="dark"] body.gs-page-aiscribe.ais-app .ais-card{ box-shadow:0 2px 10px rgba(0,0,0,0.45); }

/* =========================================================================
   Modern marketing SITE footer  ·  .gs-mfooter   (reusable: gsMarketingFooter.jspf)
   (distinct from .gs-footer = the dashboard's fixed 32px bottom mini-bar)
   Desktop: brand + 3 always-open link columns.
   Mobile: brand + COLLAPSIBLE accordion sections. Progressive enhancement —
   JS adds .js-accordion; with no JS every panel stays open. Responsive via
   CSS @container queries (named gsftr) so it adapts to the footer's own width.
   ========================================================================= */
.gs-mfooter{ background:#0f1117; color:#fff; container:gsftr / inline-size; font-family:'Outfit',Helvetica,Arial,sans-serif; -webkit-font-smoothing:antialiased; }
.gs-mfooter *{ box-sizing:border-box; }
.gs-mfooter-inner{ max-width:1200px; margin:0 auto; padding:60px 32px 28px; }
.gs-mfooter-top{ display:grid; grid-template-columns:1.35fr 2fr; gap:56px; }
/* brand block */
.gs-mfooter-brand{ max-width:340px; }
.gs-mfooter-logo{ display:inline-block; background:#fff; border-radius:12px !important; padding:7px 11px; line-height:0; text-decoration:none; }
.gs-mfooter-logo img{ height:34px; width:auto; display:block; }
.gs-mfooter-tag{ margin:20px 0 22px; color:rgba(255,255,255,.55); font-size:13.5px; line-height:1.65; }
.gs-mfooter-social{ display:flex; gap:10px; }
.gs-mfooter-social a{ width:44px; height:44px; border-radius:12px !important; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,.07); color:#fff !important; text-decoration:none; transition:background .18s ease, transform .18s ease; }
.gs-mfooter-social a:hover{ background:var(--gs-red,#d00000); transform:translateY(-2px); }
.gs-mfooter-social svg{ width:17px; height:17px; fill:currentColor; }
/* link columns */
.gs-mfooter-cols{ display:grid; grid-template-columns:repeat(3,1fr); gap:32px; }
.gs-mfooter-h{ display:flex; align-items:center; justify-content:space-between; width:100%; gap:10px; background:none; border:0; padding:0; margin:2px 0 14px; font-family:inherit; font-size:11.5px; text-transform:uppercase; letter-spacing:.09em; color:rgba(255,255,255,.5); font-weight:700; text-align:left; cursor:default; }
.gs-mfooter-chev{ display:none; width:15px; height:15px; flex:none; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .25s ease; }
.gs-mfooter-col a{ display:block; width:fit-content; color:rgba(255,255,255,.74); text-decoration:none; font-size:14px; line-height:1.2; padding:7px 0; transition:color .15s ease, transform .15s ease; }
.gs-mfooter-col a:hover{ color:#fff; transform:translateX(3px); }
/* bottom bar */
.gs-mfooter-bottom{ display:flex; align-items:center; justify-content:space-between; gap:14px 28px; flex-wrap:wrap; margin-top:48px; padding-top:24px; border-top:1px solid rgba(255,255,255,.08); }
.gs-mfooter-copy{ color:rgba(255,255,255,.5); font-size:13px; margin:0; }
.gs-mfooter-legal{ display:flex; flex-wrap:wrap; gap:10px 22px; }
.gs-mfooter-legal a{ color:rgba(255,255,255,.6); text-decoration:none; font-size:13px; transition:color .15s ease; }
.gs-mfooter-legal a:hover{ color:#fff; }
/* keyboard focus (a11y) */
.gs-mfooter-logo:focus-visible,
.gs-mfooter-social a:focus-visible,
.gs-mfooter-h:focus-visible,
.gs-mfooter-col a:focus-visible,
.gs-mfooter-legal a:focus-visible{ outline:2px solid #fff; outline-offset:3px; }
/* ---- responsive (container-query: adapts to the footer's width) ---- */
@container gsftr (max-width: 880px){
  .gs-mfooter-top{ grid-template-columns:1fr; gap:40px; }
  .gs-mfooter-brand{ max-width:none; }
}
@container gsftr (max-width: 560px){
  .gs-mfooter-inner{ padding:38px 22px 26px; }
  .gs-mfooter-top{ gap:22px; }   /* socials->sections gap == sections->copyright gap (symmetry) */
  .gs-mfooter-cols{ grid-template-columns:1fr; gap:0; }
  .gs-mfooter-bottom{ flex-direction:column; align-items:flex-start; gap:14px; margin-top:0; padding-top:22px; }
  .gs-mfooter-legal a{ min-height:40px; display:flex; align-items:center; }
  /* --- accordion (only once JS has enabled it; without JS sections stay open) --- */
  .gs-mfooter.js-accordion .gs-mfooter-col{ border-top:1px solid rgba(255,255,255,.09); }
  .gs-mfooter.js-accordion .gs-mfooter-h{ cursor:pointer; padding:17px 2px; margin:0; min-height:56px; }
  .gs-mfooter.js-accordion .gs-mfooter-chev{ display:block; }
  .gs-mfooter.js-accordion .gs-mfooter-col.gs-open .gs-mfooter-chev{ transform:rotate(180deg); }
  .gs-mfooter.js-accordion .gs-mfooter-panel{ display:grid; grid-template-rows:0fr; transition:grid-template-rows .28s ease; }
  .gs-mfooter.js-accordion .gs-mfooter-col.gs-open .gs-mfooter-panel{ grid-template-rows:1fr; }
  .gs-mfooter.js-accordion .gs-mfooter-panel-inner{ overflow:hidden; min-height:0; }
  .gs-mfooter.js-accordion .gs-mfooter-col a{ min-height:44px; display:flex; align-items:center; }
  .gs-mfooter.js-accordion .gs-mfooter-panel-inner > a:last-child{ margin-bottom:8px; }
}
