@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url("../fonts/Inter/InterVariable.woff2") format("woff2");}
@font-face{font-family:'Inter';font-style:italic;font-weight:100 900;font-display:swap;src:url("../fonts/Inter/InterVariable-Italic.woff2") format("woff2");}
*, *::before, *::after{box-sizing:border-box;margin:0;padding:0;}
html, body{font-family:'Inter';background:var(--bg);color:var(--text);min-height:100%;}
body.gs-mkt :where(h1,h2,h3,h4,h5,h6),
body.gs-portal :where(h1,h2,h3,h4,h5,h6){line-height:1.25;}
h1,h2,h3,h4,h5,h6{font-family:inherit;}
.ui-widget,.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:inherit;}
body.gs-portal, body.gs-mkt{padding-left:0;padding-right:0;}

:root{
    --nav-bg:#0f1117;
    --nav-bg-darker:#0f1117;
    --accent:#D00000;
    --accent-soft:#e85a5a;
    --accent-bg:#fceaea;
    --accent-deep:#a31919;
    --slate:#D00000;
    --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;
    --bg-elev:#ffffff;
    --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 data-theme="dark" on <html>; overrides root vars plus a few selector rules where light theme hard-codes colours. */
html[data-theme="dark"]{
    color-scheme: dark;
    --text:#f1f5f9;
    --text-mute:#cbd5e1;
    --text-light:#94a3b8;
    --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: catches elements using hard-coded light colours the var defaults above don't reach. */

/* All card-like surfaces (KPI tiles, cards, slicers, bars, load gates, file 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: off-white in light theme, darker slate panel in dark. */
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"] .date-bar input[type=date]{
    background:var(--bg-input-soft) !important;
    border-color:var(--line-strong) !important;
    color:var(--text) !important;
}

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);}
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);}
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;}
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: remap hard-coded grey de-emphasised text (#6b7280/#9ca3af/#4b5563) to theme-aware text-mute/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;}
html[data-theme="dark"] .date-sep{color:var(--text-light);}
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);}
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: map hard-coded light inline-style backgrounds to dark tints via attribute selectors (avoids touching 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);}
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;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;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%;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%;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;}
.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%;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;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;pointer-events:auto;}
.filter-overlay .fo-card{background:#fff;border:0.5px solid var(--line);border-radius:9px;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%;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%;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;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. */

.aum-warn{display:flex;align-items:flex-start;gap:11px;padding:13px 16px;border-radius:9px;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;}

.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;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;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;}

.aum-note{padding:11px 14px;border-radius:8px;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;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;padding:2px;}
.aum-resolve label{font-size:10.5px;padding:3px 8px;border-radius:4px;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;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;}
.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%;}
.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:min(88vh, calc(100vh - 96px));}
.aum-modal-body{padding:18px 22px;overflow-y:auto;flex:1;overscroll-behavior:contain;}
.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;}
.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;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;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;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;}
.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;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%;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;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;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;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;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;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;}
/* Entry-stage validation feedback: red = won't pass validation (bad email
   format / unusable date), amber = allowed but suspicious (past expiry).
   Declared after :focus so the tint stays visible while editing; the
   focus ring itself is untouched (box-shadow comes from :focus). */
.aum-grid-cell.aum-cell-err{background:rgba(220,38,38,0.10);}
.aum-grid-cell.aum-cell-warn{background:rgba(245,158,11,0.14);}
html[data-theme="dark"] .aum-grid-cell.aum-cell-err{background:rgba(248,113,113,0.18);}
html[data-theme="dark"] .aum-grid-cell.aum-cell-warn{background:rgba(245,158,11,0.20);}
.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);}
/* Update flow shows five extra "New ..." columns; give the table enough
   width that eleven columns scroll horizontally instead of crushing. */
.aum-grid-tbl.upd-cols{min-width:1280px;}
/* "→ new value" hint under a review-table cell (Update flow). */
.aum-new-val{display:block;font-size:10.5px;color:#92400e;white-space:nowrap;}
html[data-theme="dark"] .aum-new-val{color:#fcd34d;}
.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;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;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;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%;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;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%;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;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%;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;margin:13px auto 0;overflow:hidden;}
.load-prog-bar{height:100%;background:var(--accent);border-radius:2px;transition:width 0.3s;}
.load-heavy{background:#fffbeb;border:0.5px solid rgba(245,158,11,0.2);border-radius:8px;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;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;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;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%;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%;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;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;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;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%;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;color:#a32d2d;font-size:11.5px;line-height:1.55;}
.lpulse{width:6px;height:6px;border-radius:50%;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;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;}

@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:min(92vh, calc(100vh - 96px));border-radius:10px;}
}

.card{background:#fff;border:0.5px solid var(--line);border-radius:10px;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;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;height:22px;overflow:hidden;}
.fn-bar{height:100%;border-radius:3px;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);}

/* Centre all non-gs-mkt tables: the one guarantee for what we can't edit in-repo (recordings2's cross-origin DataTables align left); gs-mkt excluded to protect email/footer layout. */
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;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;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;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;}
.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;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;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;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;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;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;overflow:hidden;}
.stage-bar-median{position:absolute;left:0;top:0;bottom:0;background:var(--accent);border-radius:6px 0 0 6px;}
.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;margin-right:5px;vertical-align:-1px;}
/* Cohort retention grid */
.cohort-grid{display:grid;gap:1px;background:#e5e7eb;border-radius:6px;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;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%;}
.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;border:0.5px solid var(--line);}
.cg-def-pip{flex-shrink:0;width:11px;height:11px;border-radius:50%;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;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%;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;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;}
/* cohort-stat-nodata: metric uncomputable (shows "-"). cohort-stat-lowconf: computable but too few
   responders, greyed. Both recede so high-confidence tiles read 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;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;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;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;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 heatmap: count (bold) + dwell (muted) per cell; background intensity tracks
   dwell so the eye finds the busiest cells. */
.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;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;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;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;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;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;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;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;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;}
.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;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;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%;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;
  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%;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;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;}
/* Overlay-click attention nudge: pop-ups never dismiss on outside clicks - the
   footer buttons head-shake instead (class applied by the master.js modal rules). */
@keyframes gsBtnAttn{0%,100%{transform:translateX(0);}20%{transform:translateX(-5px);}40%{transform:translateX(5px);}60%{transform:translateX(-3px);}80%{transform:translateX(2px);}}
.btn-action.gs-attn{animation:gsBtnAttn 0.4s ease;}
/* Modal rule 2: inside a modal, the Close/Cancel (ghost) button is always on the
   left and the primary (red) is always on the right - regardless of the order the
   builder/markup appends them. Footers are flex, so `order` reorders them without
   touching every call site. Scoped to .modal-card so table/toolbar buttons are
   unaffected. */
.modal-card .btn-action.ghost{order:0;}
.modal-card .btn-action:not(.ghost){order:1;}

/* ---- GSUploader: drag & drop file uploader (master.js GSUploader.attach) ----
   Pretty drop-zone + live progress list. Theme-aware via --gs-* tokens (light
   hex fallbacks so it survives on a page that isn't gs-app/gs-portal). */
.gsu{display:block;}
.gsu-input{display:none;}
.gsu-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:28px 22px;text-align:center;cursor:pointer;border:1.5px dashed var(--gs-border,#D7DBE0);border-radius:12px;background:var(--gs-input-bg,#FBFBFD);transition:background .15s,border-color .15s,box-shadow .15s;}
.gsu-drop:hover{border-color:var(--gs-red,#D00000);}
.gsu-drop.is-dragover{border-color:var(--gs-red,#D00000);background:var(--gs-red-tint,#FBEAEA);box-shadow:0 0 0 3px var(--gs-red-tint,#FBEAEA);}
.gsu-drop-ico{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--gs-red-tint,#FBEAEA);color:var(--gs-red,#D00000);}
.gsu-drop-ico svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.gsu-drop-title{font-size:14px;font-weight:600;color:var(--gs-text,#3D434F);}
.gsu-drop-hint{font-size:12px;color:var(--gs-muted,#6B7280);}
.gsu-drop-btn{margin-top:5px;height:30px;}
.gsu-list{margin-top:12px;display:flex;flex-direction:column;gap:8px;}
.gsu-list:empty{display:none;}
.gsu-item{background:var(--gs-card,#fff);border:0.5px solid var(--gs-border-light,#E8EAEE);border-radius:10px;padding:11px 13px;box-sizing:border-box;text-align:left;}
.gsu-item-head{display:flex;align-items:center;gap:10px;}
.gsu-item-texts{flex:1;min-width:0;}
.gsu-name{font-size:13px;font-weight:600;color:var(--gs-text,#3D434F);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.gsu-meta{font-size:11px;color:var(--gs-muted,#6B7280);margin-top:1px;}
.gsu-status{flex-shrink:0;min-width:40px;display:flex;align-items:center;justify-content:flex-end;font-size:12px;font-weight:600;color:var(--gs-muted,#6B7280);}
.gsu-ico{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.gsu-ico svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;}
.gsu-bar{margin-top:9px;height:7px;border-radius:5px;background:var(--gs-border-light,#E8EAEE);overflow:hidden;}
.gsu-bar-fill{height:100%;width:0;border-radius:5px;background:var(--gs-red,#D00000);transition:width .2s ease-out;}
.gsu-err{margin-top:7px;font-size:12px;font-weight:500;color:var(--gs-red,#D00000);}
.gsu-item.is-success .gsu-ico{background:var(--gs-green-bg,#E5F4E8);color:var(--gs-green-tx,#1E7B34);}
.gsu-item.is-success .gsu-bar-fill{background:var(--gs-green-tx,#1E7B34);}
.gsu-item.is-error .gsu-ico{background:var(--gs-red-tint,#FBEAEA);color:var(--gs-red,#D00000);}
.gsu-item.is-error .gsu-bar{display:none;}

.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:56px 20px 40px;}   /* chrome-aware: top 48px header + 8, bottom 32px footer + 8 - centering inside this zone gives EQUAL breathing to header-bottom and footer-top at any card height */
.modal-bg.visible{display:flex;}
/* Standard modal widths: small (350px) is the default, large is .modal-lg (800px).
   Any other width is a deliberate per-modal override (inline max-width on the card). */
.modal-card{background:#fff;border-radius:12px;max-width:350px;width:100%;max-height:min(92vh, calc(100vh - 96px));display:flex;flex-direction:column;box-shadow:0 20px 50px rgba(0,0,0,0.3);}   /* 96px = the .modal-bg chrome padding (56 top + 40 bottom): a max-height card exactly fills the zone between header and footer with 8px breathing at both ends */
.modal-card.modal-sm{max-width:350px;}
.modal-card.modal-lg{max-width:800px;}
.modal-hd{padding:12px 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 rule 1: no top-right close. Every pop-up closes from the bottom footer
   (the leftmost button). Hidden rather than removed so builders / static markup
   that still emit a .modal-close keep working - the JS enforcer (modalrules.js)
   reuses each hidden x's handler to wire a bottom Close where one is missing. */
.modal-close{display:none !important;}
.modal-body{overflow-y:auto;overflow-x:hidden;font-size:12.5px;line-height:1.6;color:#374151;overscroll-behavior:contain;}
/* Tall dialogs must LOOK scrollable: macOS overlay scrollbars stay hidden until
   the first scroll, so clipped content reads as "the pop-up goes off screen".
   ::-webkit-scrollbar styling forces an always-visible classic scrollbar in
   Chrome/Safari. Do NOT also set the standard scrollbar-width/scrollbar-color
   here - in Chrome 121+ the standard properties take precedence and fall back
   to the auto-hiding overlay. Firefox (no ::-webkit-scrollbar support) gets
   the standard properties via the @supports block below. */
.modal-body::-webkit-scrollbar, .aum-modal-body::-webkit-scrollbar{width:11px;}
.modal-body::-webkit-scrollbar-track, .aum-modal-body::-webkit-scrollbar-track{background:transparent;}
.modal-body::-webkit-scrollbar-thumb, .aum-modal-body::-webkit-scrollbar-thumb{background:rgba(15,23,42,0.30);border-radius:6px;border:3px solid #fff;}
.modal-body::-webkit-scrollbar-thumb:hover, .aum-modal-body::-webkit-scrollbar-thumb:hover{background:rgba(15,23,42,0.5);}
html[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb, html[data-theme="dark"] .aum-modal-body::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.28);border-color:var(--bg-elev,#1E293B);}
@supports not selector(::-webkit-scrollbar){
  .modal-body, .aum-modal-body{scrollbar-width:thin;scrollbar-color:rgba(15,23,42,0.30) transparent;}
  html[data-theme="dark"] .modal-body, html[data-theme="dark"] .aum-modal-body{scrollbar-color:rgba(255,255,255,0.28) transparent;}
}
.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;}
.modal-card input, .modal-card select, .modal-card textarea{box-sizing:border-box;max-width:100%;}
/* ---- Draggable-popup resize grabber (central) --------------------------------
   The bottom-right SE grabber that gsMakeResizable() (master.js) appends to a
   floating popup - replaces the jQuery UI .resizable() handle. Used by the video/
   recording frame pop-ups and readings panels on videos/videos2/resources/
   consultation/recordings/recordings2. Unscoped + literal colours so it renders
   the same on gs-app and legacy (gsModalOnly) pages alike. */
.gs-resize-handle{
    position:absolute; right:0; bottom:0; width:16px; height:16px;
    cursor:se-resize; z-index:1000; touch-action:none; border-radius:0 0 5px 0;
    background:linear-gradient(135deg, transparent 0 50%, rgba(0,0,0,0.28) 50% 100%);
}
/* ---- Floating video pop-up ("framewrap"): a draggable/resizable card holding a
   /viewVideoInIframe frame plus a vertical rail of icon buttons. Built by JS on
   videos2/recordings2 and the legacy videos/resources/consultation/recordings
   pages; the .gs-resize-handle grabber above and gsMakeDraggable/gsMakeResizable
   (master.js) drive it. Moved here from style.css (2026-07) onto the --gs-* tokens
   so it themes with the console instead of being a hard white/grey box.

   ONE card style: the old four near-identical classes (framewrap / *ForConsultation
   / *grey / *greyconsultants) only ever differed by size - the grey/white backgrounds
   now come from --gs-card, and JS sets top/right inline the moment a popup opens, so
   the default slot below is just a fallback. New JS emits .framewrap (+ .framewrap-wide
   for the 760x552 recordings-from-consultants box), but the legacy names are KEPT as
   selector aliases here on purpose: these popups are built by server-rendered JSP, and
   a stale/cached compiled JSP that still emits framewrapgrey/greyconsultants must NOT
   render as an unstyled, position-less (invisible) div. So one rule styles every name.
   (consultation.jsp also tags popups with the no-style marker "consultation-frame" so
   grouproom.js can clear them.) ---- */
.framewrap, .framewrapForConsultation, .framewrapgrey, .framewrapgreyconsultants{
    position:fixed; box-sizing:border-box; margin:0;
    top:82px; right:80px; width:312px; height:416px;   /* exact 3:4 portrait (312x416) - the ratio an unconstrained mobile stream defaults to (VGA 4:3, phone held portrait). Was 342x418 (312 video + 30px rail); rail is gone (floating dock), so the card is the video */
    background:var(--gs-card,#fff);
    border:0.5px solid var(--gs-border,#D7DBE0);
    border-radius:14px;
    box-shadow:0 12px 32px rgba(15,17,23,0.22), 0 2px 6px rgba(15,17,23,0.08);
    /* 1300 clears recordings2's sticky Actions column + its .gs-more-menu (1200);
       still far below modals/overlays/loaders (~100000). One base value for every
       page - no per-page z-index override. The maximise/minimise handlers in the
       page JS re-assert this same 1300 inline. */
    z-index:1300;
    /* The right-hand button rail is a flex COLUMN: buttons stack top-down and any that
       are hidden (PiP when it is not a live stream) or absent collapse with NO gap. The
       iframe is absolutely positioned (.frame below) so it stays out of this column. */
    display:flex; flex-direction:column; align-items:flex-end; padding:6px 0 0 0; gap:8px;
}
.framewrap-wide, .framewrapgreyconsultants{ width:736px; height:552px; }   /* exact 4:3 LANDSCAPE (736x552) for the wider consultant-recording previews - rail-removed like the base card */

/* Maximised state (maximise button). Fill the viewport between the 48px sticky
   .gs-topnav and the 32px fixed .gs-footer, with a 5px gap on every side (top
   48+5=53, bottom 32+5=37, left/right 5). !important so it beats the dragged/
   resized inline top/right/width/height; removing the class restores the popup
   to wherever it was. One rule for every page - the page JS only toggles it. */
.framewrap-max{
    top:53px !important; right:5px !important; bottom:37px !important; left:5px !important;
    width:auto !important; height:auto !important;
}

/* iframe fills the card ABSOLUTELY, leaving a 30px strip on the right for the rail.
   Absolute so it does not join the framewrap's flex column (only the buttons stack).
   NB the iframe is a replaced element: width/height MUST be explicit - `right:30px`
   with `width:auto` would NOT stretch it (auto resolves to the intrinsic 300x150). */
.frame{
    position:absolute; top:0; left:0;
    width:calc(100% - 30px); height:100%;
    border:0; margin:0; display:block;
    border-radius:14px 0 0 14px !important;
}

/* Rail buttons: flex-column items, 30px wide (= the rail); the icon is centered inside,
   so the left/right gap is equal by construction. The compound `.gs-tip` selector (NOT
   !important) makes display:flex beat .gs-tip{display:inline-block} by specificity, while
   still letting an inline `display:none` win normally - that is how the PiP button starts
   hidden and is revealed only when the iframe reports a live stream (master.js
   gsOnIframeStreamLive). A hidden/absent button collapses the column with no gap. */
.video-close-img.gs-tip, .video-maximise-img.gs-tip, .video-pictureinpicture-img.gs-tip,
.video-forward-img.gs-tip, .video-screenshot-img.gs-tip, .video-rotate-img.gs-tip, .video-blur-img.gs-tip{
    flex:none; width:30px; height:30px;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; transition:transform .12s ease;
}
.video-close-img:hover, .video-maximise-img:hover, .video-pictureinpicture-img:hover,
.video-forward-img:hover, .video-screenshot-img:hover, .video-rotate-img:hover,
.video-blur-img:hover{ transform:scale(1.12); }
.video-close-img > img, .video-maximise-img > img, .video-pictureinpicture-img > img,
.video-forward-img > img, .video-screenshot-img > img, .video-rotate-img > img,
.video-blur-img > img{ width:22px; height:22px; display:block; }

/* Standalone reuse: the vitals-panel close button (videos2 #readingsDiv) borrows
   .video-close-img for the glyph but is NOT inside a framewrap flex column, so pin it. */
#readingsDivCloseButton{ position:absolute; top:8px; right:8px; }

/* ---- Floating glass dock (2026-07 redesign) --------------------------------
   The white 30px rail is retired: the video goes full-bleed and the controls
   float over its right edge in a dark-glass pill, echoing the in-video LIVE
   badge and the .gs-tip-bubble ink. Markup comes from master.js
   gsBuildFramewrapChrome() (dragzone + .framewrap-dock + SVG buttons).
   Everything below is gated on the dock's presence via :has(), so a stale
   compiled JSP still emitting the old direct-child rail markup keeps the
   legacy white-rail styles above and stays fully usable. Ink-glass over video
   is theme-invariant - dark mode needs no extra rules. */
.framewrap:has(.framewrap-dock){ padding:0; }
.framewrap:has(.framewrap-dock) .frame{ width:100%; border-radius:14px !important; }


/* The dock: vertical dark-glass pill over the video's top-right. SAME glass
   recipe as the consultation/consultationPublic call-control bar (.cpx-ctrlbar/
   .cpx-ctrl - frosted rgba(28,30,38,.82) pill of circular glass-disc buttons):
   the platform's one language for controls floating over live video. Idle it
   fades to 30% so it stops competing with the stream; hover/focus anywhere on
   the card wakes it. Touch has no hover, so it stays awake there. */
.framewrap-dock{
    position:absolute; top:10px; right:10px; z-index:2;   /* top == right (10px) so the margins match; == the embedded LIVE pill's top (viewVideoInIframe) */
    display:flex; flex-direction:column; align-items:center; gap:5px;
    padding:4px 3px;
    background:rgba(28,30,38,.82);
    -webkit-backdrop-filter:blur(16px);
    backdrop-filter:blur(16px);
    border:1px solid rgba(255,255,255,.1);
    border-radius:999px;
    box-shadow:0 10px 30px rgba(0,0,0,.4);
    opacity:0.3; transition:opacity .18s ease;
}
@supports not (backdrop-filter:blur(1px)){
    .framewrap-dock{ background:rgba(28,30,38,.95); }
}
.framewrap:hover .framewrap-dock,
.framewrap:focus-within .framewrap-dock{ opacity:1; }
@media (hover:none){ .framewrap-dock{ opacity:1; } }

/* Dock cells: circular glass discs around white stroke glyphs - .cpx-ctrl's
   exact treatment (visible disc + border, hover .22 wash, press scale) at dock
   scale. Placed after the legacy rail rules, so the shared class names resolve
   to this look inside a dock and to the old rail look outside one; runtime
   inline display:none (live-only PiP/blur, image-only rotate) still wins and
   the pill collapses gap-free. */
.framewrap-dock > .gs-tip{
    flex:none; width:24px; height:24px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; color:#fff;
    background:rgba(255,255,255,.13);
    border:1px solid rgba(255,255,255,.16);
    transition:background .15s ease, border-color .15s ease, transform .12s ease;
}
.framewrap-dock > .gs-tip:hover{ transform:none; background:rgba(255,255,255,.22); }
.framewrap-dock > .gs-tip:active{ transform:scale(.94); }
/* Latched feature (blur ON): white disc + ink glyph, = .cpx-ctrl.is-active. */
.framewrap-dock > .gs-tip.is-on{ background:#fff; border-color:#fff; color:var(--gs-ink,#0F1117); }
.framewrap-dock svg{
    width:13px; height:13px; display:block;
    fill:none; stroke:currentColor; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round;
    pointer-events:none;
}
/* Close: solid red disc, = .cpx-ctrl.is-off / the call-bar's destructive red. */
.framewrap-dock > .video-close-img{ background:var(--gs-red,#D00000); border-color:var(--gs-red,#D00000); }
.framewrap-dock > .video-close-img:hover{ background:var(--gs-red-dark,#A80000); }

/* Drag handle: the six-dot grip cell at the top of the dock (built by
   gsBuildFramewrapChrome). The full-bleed iframe swallows pointerdown, so the
   dock is the card-owned surface that lets gsMakeDraggable (bound on the card,
   unchanged) start a drag - the grip is its visible, tooltip-labelled
   affordance, and every dock button doubles as a drag surface via the same
   press-and-move-3px threshold (a clean click stays a click). Edge-anchored
   handles were tried and collide with everything: top = LIVE pill + attachment
   timeline + dock, bottom = the recorded-video native controls. AFTER the cell
   rules on purpose: same specificity, so source order lets these overrides win. */
.framewrap-dock > .framewrap-grip{
    background:transparent; border-color:transparent;    /* a handle, not a button */
    height:16px; border-radius:8px;
    color:rgba(255,255,255,.75);
    cursor:grab; touch-action:none;
    /* deliberate sectioning: extra air ABOVE (11px total vs the 5px button gap)
       separates the handle from the actions; a little air BELOW (7px total) so
       the dots don't kiss the pill's bottom edge. */
    margin-top:6px; margin-bottom:3px;
}
.framewrap-dock > .framewrap-grip:hover{ background:rgba(255,255,255,.13); color:#fff; }
.framewrap-dock > .framewrap-grip:active{ cursor:grabbing; transform:none; }
.framewrap-dock > .framewrap-grip svg{ width:14px; height:14px; }

/* Resize grabber: a dock-language glass mini-disc in the bottom-right corner -
   the dock cell recipe (ink glass + white wash + 1px ring + white stroke glyph)
   holding a 45-degree double-arrow, so the popup's chrome is one system: glass
   discs top-right (dock) and bottom-right (resize). The element itself is a
   30x30 transparent hit box (biggest grab target yet); the visible disc is a
   20px ::before inset 4px, whose centre lands concentric with the card's 14px
   corner radius. Idles faded and wakes on card hover, in step with the dock. */
.framewrap:has(.framewrap-dock) .gs-resize-handle{
    width:30px; height:30px;                /* hit box only - the visual is ::before */
    background:none; box-shadow:none;
    border-radius:0 0 14px 0;
    opacity:.35; transition:opacity .18s ease;
}
.framewrap:has(.framewrap-dock) .gs-resize-handle::before{
    content:""; position:absolute; right:4px; bottom:4px;
    width:20px; height:20px; border-radius:50%; box-sizing:border-box;
    border:1px solid rgba(255,255,255,.16);
    /* dock recipe, flattened: cell wash (white .13) over pill glass (.82 ink) */
    background-color:rgba(28,30,38,.82);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7l10 10M12 7H7v5M12 17h5v-5'/%3E%3C/svg%3E"),
        linear-gradient(rgba(255,255,255,.13),rgba(255,255,255,.13));
    background-repeat:no-repeat;
    background-position:center, 0 0;
    background-size:11px 11px, 100% 100%;
    -webkit-backdrop-filter:blur(16px);
    backdrop-filter:blur(16px);
    box-shadow:0 6px 18px rgba(0,0,0,.4);   /* carries it on bright daylight frames */
    transition:background-color .15s ease, transform .12s ease;
}
@supports not (backdrop-filter:blur(1px)){
    .framewrap:has(.framewrap-dock) .gs-resize-handle::before{ background-color:rgba(28,30,38,.95); }
}
/* hover ~= the dock cells' .13 -> .22 wash bump, pre-composited; press-scale like a dock cell */
.framewrap:has(.framewrap-dock) .gs-resize-handle:hover::before{ background-color:rgba(46,50,62,.92); }
.framewrap:has(.framewrap-dock) .gs-resize-handle:active::before{ transform:scale(.94); }
.framewrap:has(.framewrap-dock):hover .gs-resize-handle,
.framewrap:has(.framewrap-dock) .gs-resize-handle:active{ opacity:1; }
@media (hover:none){ .framewrap:has(.framewrap-dock) .gs-resize-handle{ opacity:1; } }

/* ---- Form controls inside showMessage() pop-ups (central) -----------------------
   gsOpenModal wraps every pop-up's body in .gsm-content, and getPopUpInputLabel() emits
   .gsm-label. Call sites pass raw HTML whose inline styles only set layout
   (width/height/margin), so these rules supply the design-system look: font (kills the
   browser's default monospace <textarea>), border, padding, focus ring, dark mode via
   vars. Component modals that build their own markup (feedback dialog, device picker)
   don't use .gsm-content, so they're untouched; page-level .modal-card overrides are more
   specific and still win where they exist. */
.gsm-content input[type=text],
.gsm-content input[type=email],
.gsm-content input[type=number],
.gsm-content input[type=password],
.gsm-content input[type=search],
.gsm-content input[type=tel],
.gsm-content input[type=url],
.gsm-content input[type=date],
.gsm-content input[type=time],
.gsm-content input[type=datetime-local],
.gsm-content input:not([type]),
.gsm-content select,
.gsm-content textarea{
    width:100%; box-sizing:border-box;
    background-color:var(--gs-input-bg); box-shadow:none;
    border:0.5px solid var(--gs-border); border-radius:8px !important;
    padding:0 11px; height:36px;
    font-size:13px; font-family:inherit; line-height:1.5;
    color:var(--gs-ink);
    outline:none; transition:border-color .12s, box-shadow .12s;
}
.gsm-content textarea{ height:auto; min-height:110px; padding:10px 12px; resize:vertical; line-height:1.55; }
.gsm-content select{
    -webkit-appearance:none; -moz-appearance:none; appearance:none; cursor:pointer; padding-right:34px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA1AC' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 12px center;
}
.gsm-content input:focus, .gsm-content select:focus, .gsm-content textarea:focus{
    border-color:var(--gs-red); box-shadow:0 0 0 2px rgba(208,0,0,0.12);
}
.gsm-content .gsm-invalid{
    border-color:var(--gs-red,#D00000) !important; box-shadow:0 0 0 2px rgba(208,0,0,0.12) !important;
}
.gsm-content input[type=checkbox], .gsm-content input[type=radio]{
    width:17px; height:17px; accent-color:var(--gs-red); vertical-align:middle; cursor:pointer;
}
.gsm-content .gsm-label{ color:var(--gs-ink); font-weight:600; }
html[data-theme="dark"] .gsm-content input:not([type=checkbox]):not([type=radio]),
html[data-theme="dark"] .gsm-content select,
html[data-theme="dark"] .gsm-content textarea{ background:#16213A; color:var(--gs-text-2); border-color:var(--gs-border); }

/* ==========================================================================
   .gsm-split - in-modal master-detail shell for the Add User / Edit User /
   Permission Template modal (allPermissions.snippet). A fixed-height card with
   a left rail (nav + per-area access switch) and a scrolling right panel.
   Built self-contained (NOT reusing the body.gs-app-only .gs-optcard/.gs-toggleform)
   so it renders identically on manageOrganisation (gs-portal only) and
   manageOrganisation2 (gs-app). Reuses the GLOBAL .gs-switch, .gsm-content inputs,
   .btn-action footer; --gs-* tokens carry a hex fallback for defensive rendering.
   Interaction is wired by gsWirePermissionModal() in master.js.
   ========================================================================== */
/* Widen + fix the height of the hosting card ONLY when it carries a .gsm-split.
   ".modal-bg .modal-card:has()" out-specifies ".modal-card.modal-lg" (source order safe). */
.modal-bg .modal-card:has(.gsm-split){ max-width:1040px; width:100%; height:min(760px, 92vh); }
.modal-card:has(.gsm-split) > .modal-body{ padding:0 !important; overflow:hidden !important; display:flex; flex:1 1 auto; min-height:0; }
.modal-card:has(.gsm-split) > .modal-body > .gsm-content{ display:flex; flex:1 1 auto; min-height:0; width:100%; }
.gsm-split{ display:flex; flex:1 1 auto; min-height:0; width:100%; font-size:13px; color:var(--gs-ink,#0F1117); }

/* ---- left rail ---- */
.gsm-rail{ flex:0 0 258px; min-width:0; overflow-y:auto; overflow-x:hidden; background:var(--gs-bg,#F4F5F7); border-right:1px solid var(--gs-border-light,#E8EAEE); padding:12px 10px 16px; }
.gsm-rail-label{ font-size:10px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--gs-faint,#9AA1AC); padding:14px 12px 6px; }
.gsm-nav{ display:flex; align-items:center; gap:4px; border-radius:8px; margin:2px 0; position:relative; }
.gsm-nav::before{ content:""; position:absolute; left:0; top:7px; bottom:7px; width:3px; border-radius:2px; background:transparent; }
.gsm-nav.active{ background:var(--gs-red-tint,#FBEAEA); }
.gsm-nav.active::before{ background:var(--gs-red,#D00000); }
.gsm-nav:not(.active):hover{ background:var(--gs-grey-bg,#EEF0F3); }
.gsm-nav-btn{ flex:1 1 auto; display:flex; align-items:center; gap:8px; border:0; background:none; font:inherit; font-size:13px; color:var(--gs-ink,#0F1117); text-align:left; padding:9px 4px 9px 14px; cursor:pointer; border-radius:8px; min-width:0; }
.gsm-nav.active .gsm-nav-btn{ font-weight:600; color:var(--gs-red-dark,#A80000); }
.gsm-nav-name{ flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gsm-nav-glyph{ flex:none; width:14px; height:14px; opacity:0.4; color:var(--gs-muted,#6B7280); }
.gsm-nav.active .gsm-nav-glyph{ opacity:0.9; color:var(--gs-red,#D00000); }
.gsm-nav .gs-switch{ margin:0 8px 0 0; height:auto; flex:none; }

/* ---- right panel ---- */
.gsm-panel-wrap{ flex:1 1 auto; min-width:0; min-height:0; overflow-y:auto; overflow-x:hidden; background:var(--gs-card,#FFFFFF); }
.gsm-panel{ display:none; padding:24px 28px 30px; }
.gsm-panel.active{ display:block; }
.gsm-panel-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:16px; border-bottom:1px solid var(--gs-border-light,#E8EAEE); margin-bottom:20px; }
.gsm-panel-head h2{ font-size:16px; font-weight:700; margin:0 0 3px; color:var(--gs-ink,#0F1117); }
.gsm-panel-head p{ margin:0; font-size:12.5px; color:var(--gs-muted,#6B7280); }
.gsm-ph-txt{ min-width:0; }
.gsm-access{ display:flex; align-items:center; gap:9px; flex:none; padding-top:2px; cursor:pointer; }
.gsm-access-state{ font-size:12px; font-weight:600; color:var(--gs-faint,#9AA1AC); min-width:20px; text-align:right; }
.gsm-panel.access-on .gsm-access-state{ color:var(--gs-red-dark,#A80000); }
.gsm-access .gs-switch{ margin:0; height:auto; }

/* prompt shown while access is off */
.gsm-enable-note{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:var(--gs-grey-bg,#EEF0F3); border:1px dashed var(--gs-border,#D7DBE0); border-radius:10px; padding:12px 16px; font-size:12.5px; color:var(--gs-muted,#6B7280); margin-bottom:20px; }
.gsm-panel.access-on .gsm-enable-note{ display:none; }
.gsm-enable-link{ border:0; background:none; color:var(--gs-red,#D00000); font:inherit; font-weight:600; cursor:pointer; padding:0; text-decoration:underline; }

/* option fieldsets */
fieldset.gsm-options{ border:0; padding:0; margin:0 0 24px; min-width:0; }
fieldset.gsm-options:last-child{ margin-bottom:0; }
fieldset.gsm-options:disabled{ opacity:0.45; }
.gsm-group-title{ font-size:11px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--gs-faint,#9AA1AC); margin:0 0 12px; }
.gsm-no-options{ font-size:12.5px; color:var(--gs-faint,#9AA1AC); margin:0; }

/* option row: label left, switch right, tinted when on */
.gsm-optgrid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:10px 14px; }
.gsm-opt{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 14px; border:1px solid var(--gs-border,#D7DBE0); border-radius:10px; background:var(--gs-card,#FFFFFF); cursor:pointer; transition:border-color .15s ease, background .15s ease; margin:0; }
.gsm-opt:hover{ border-color:var(--gs-muted,#6B7280); }
.gsm-opt:has(input:checked){ border-color:var(--gs-red,#D00000); background:var(--gs-red-tint,#FBEAEA); }
.gsm-opt-txt{ min-width:0; }
.gsm-opt-name{ display:block; font-size:13px; font-weight:500; color:var(--gs-ink,#0F1117); }
.gsm-opt-sub{ display:block; font-size:11px; color:var(--gs-faint,#9AA1AC); margin-top:2px; }
.gsm-opt .gs-switch{ margin:0; height:auto; flex:none; }
fieldset.gsm-options:disabled .gsm-opt{ cursor:default; }

/* field grid (User details + Responder reg fields) */
.gsm-fieldgrid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:16px 18px; }
.gsm-field{ min-width:0; }
.gsm-field > label, .gsm-field .gsm-label{ display:block; font-size:12.5px; font-weight:600; margin:0 0 6px; color:var(--gs-ink,#0F1117); }
.gsm-field .gsm-hint{ font-weight:400; color:var(--gs-faint,#9AA1AC); }
.gsm-field input, .gsm-field select{ width:100%; }
.gsm-prefixed{ display:flex; align-items:center; gap:6px; }
.gsm-prefixed b{ flex:none; font-size:13px; color:var(--gs-muted,#6B7280); }
.gsm-prefixed input{ flex:1 1 auto; }
.gsm-block{ margin-bottom:20px; }

/* segmented account-type control */
.gsm-seg{ display:inline-flex; border:1px solid var(--gs-border,#D7DBE0); border-radius:10px; padding:3px; background:var(--gs-grey-bg,#EEF0F3); margin-bottom:20px; }
.gsm-seg-btn{ border:0; background:none; font:inherit; font-size:12.5px; font-weight:600; color:var(--gs-muted,#6B7280); padding:7px 16px; border-radius:7px; cursor:pointer; }
.gsm-seg-btn.active{ background:var(--gs-card,#FFFFFF); color:var(--gs-red-dark,#A80000); box-shadow:0 1px 3px rgba(15,17,23,0.12); }

/* responsive: rail collapses to a horizontal scrolling strip */
@media (max-width: 720px){
  .gsm-split{ flex-direction:column; }
  .gsm-rail{ flex:0 0 auto; flex-direction:row; display:flex; overflow-x:auto; overflow-y:hidden; border-right:0; border-bottom:1px solid var(--gs-border-light,#E8EAEE); padding:10px 12px; gap:6px; }
  .gsm-rail-label{ display:none; }
  .gsm-nav{ flex:0 0 auto; border:1px solid var(--gs-border,#D7DBE0); background:var(--gs-card,#FFFFFF); }
  .gsm-nav.active{ border-color:var(--gs-red,#D00000); }
  .gsm-nav::before{ display:none; }
  .gsm-nav-name{ max-width:150px; }
  .gsm-panel{ padding:20px 18px 26px; }
}
/* Google Places Autocomplete appends its suggestions dropdown (.pac-container) to
   <body> with a default inline z-index of 1000, which renders it BEHIND the .modal-bg
   overlay (9999) whenever an address field lives inside a pop-up (e.g. the incidents
   "Trigger" dialog's activityAddress). Lift it above the modal so the suggestions are
   visible and clickable. */
.pac-container{z-index:100000 !important;}
/* ============================================================
   Device-selection modal (camera / mic pre-join). Rendered by
   driver.js's gsOpenDeviceModal into the shared
   .modal-card, so the chrome (card / header / .btn-action footer) is
   the standard modal above; these rules are only the body content.
   ============================================================ */
.gsdp{text-align:left;}
.gsdp > *:first-child{margin-top:0 !important;}
.gsdp-preview{position:relative;border-radius:12px;overflow:hidden;background:#12151b;height:160px;margin-top:10px;}
.gsdp-preview video{display:block;width:100%;height:100%;object-fit:cover;}
.gsdp-camlabel{position:absolute;left:10px;bottom:10px;display:flex;align-items:center;gap:6px;max-width:72%;background:rgba(0,0,0,0.5);color:#fff;padding:4px 10px;border-radius:20px;font-size:11.5px;font-weight:500;}
.gsdp-camlabel svg{width:14px;height:14px;flex:none;}
.gsdp-camlabel span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gsdp-live{position:absolute;right:10px;top:10px;display:flex;align-items:center;gap:5px;background:rgba(0,0,0,0.42);color:#fff;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:500;}
.gsdp-live i{width:6px;height:6px;border-radius:50%;background:#22c55e;display:inline-block;}
.gsdp-note{font-size:11.5px;color:#9aa1ac;margin:8px 2px 0;text-align:center;}
.gsdp-field{display:flex;align-items:center;gap:10px;box-sizing:border-box;border:1px solid #e3e6ea;border-radius:10px;padding:0 12px;height:44px;margin-top:10px;background:#fff;}
.gsdp-ic{flex:none;display:flex;color:#6b7280;}
.gsdp-ic svg{width:18px;height:18px;}
.gsdp-field select{flex:1;min-width:0;height:42px !important;padding:0 8px !important;margin:0 !important;border:none !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;outline:none !important;font-size:13.5px !important;color:#1a1a1a !important;cursor:pointer;-webkit-appearance:none !important;-moz-appearance:none !important;appearance:none !important;}
.gsdp-chev{flex:none;display:flex;color:#9aa1ac;}
.gsdp-chev svg{width:16px;height:16px;}
.gsdp-meterwrap{margin-top:10px;margin-bottom:8px;padding:0 2px;}
/* Audio-output picker row (video calls): select + "Test" chime button. */
.gsdp-outrow{display:flex;gap:8px;margin-top:10px;align-items:stretch;}
.gsdp-outrow .gsdp-field{flex:1;min-width:0;margin-top:0;}
.gsdp-testbtn{display:inline-flex;align-items:center;gap:7px;height:44px;padding:0 15px;border:1px solid #e3e6ea;border-radius:10px;background:#fff;color:#374151;font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;flex-shrink:0;transition:background 0.15s,border-color 0.15s;}
.gsdp-testbtn:hover{background:#f5f4f2;}
.gsdp-testbtn:disabled{opacity:0.55;cursor:default;}
.gsdp-testbtn svg{width:15px;height:15px;color:#6b7280;}
html[data-theme="dark"] .gsdp-testbtn{background:#0f141c;border-color:#2a3242;color:#cbd5e1;}
html[data-theme="dark"] .gsdp-testbtn:hover{background:#161d29;}
html[data-theme="dark"] .gsdp-testbtn svg{color:#8b94a3;}
.gsdp-meter{display:block !important;width:100% !important;height:14px !important;margin:0 !important;border:none !important;background:transparent !important;box-sizing:border-box;}
#gsConnBadge:empty{display:none;}
#gsConnBadge > div{margin:0 !important;}
.gsdp-ft{display:flex;gap:8px;justify-content:flex-end;margin-top:16px;flex-wrap:wrap;}
.modal-ft{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;}
.modal-ft, .modal-card .gsdp-ft, .modal-card .modal-body > div[style*="flex-end"]{
  border-top:0.5px solid var(--line);
  margin:16px -22px -18px;
  padding:10px 22px;
}
/* Feet at CARD level (engine + enforcer-injected since master.js V=15): they sit
   BELOW the scrolling .modal-body as flex siblings - always visible with no
   sticky/background tricks, and the body's scrollbar ends above them, mirroring
   the header side. Transparent, so the card's rounded bottom shows through. */
.modal-card > .modal-ft, .modal-card > .gsdp-ft{ margin:0; }
/* LEGACY in-body feet (static markup rows still inside .modal-body): keep them
   reachable by pinning to the scrollport bottom. bottom:-18px cancels the -18px
   stretch margin; opaque bg + matching radius because content scrolls beneath. */
.modal-card .modal-body > .gsdp-ft, .modal-card .modal-body > .modal-ft{
  position:sticky; bottom:-18px; z-index:3; background:#fff;
  border-radius:0 0 12px 12px;
}
html[data-theme="dark"] .modal-card .modal-body > .gsdp-ft, html[data-theme="dark"] .modal-card .modal-body > .modal-ft{ background:var(--bg-elev, #1E293B); }
/* padding:0 modal bodies: the -22px/-18px stretch margins assume the default
   22/18px body padding - drop the overhang and pin flush at 0. */
.modal-card .modal-body[style*="padding:0"] > .gsdp-ft{ margin:16px 0 0; bottom:0; }
html[data-theme="dark"] .gsdp-note, html[data-theme="dark"] .gsdp-ic{color:#8b93a1;}
html[data-theme="dark"] .gsdp-field{background:#0f141c;border-color:#2a3242;}
html[data-theme="dark"] .gsdp-field select{color:#f2f4f8 !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;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;}
.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;}

.btn-tiny{padding:2px 8px;font-size:10px;background:#f5f4f2;border:0.5px solid rgba(0,0,0,0.1);border-radius:4px;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
   ============================================================ */

/* Chart height ladder: fixed-height classes let the JSP size charts without inline heights. */
.ch240{height:240px;}
.ch280{height:280px;}
.ch300{height:300px;}

/* Brand strip with optional org name: divider + org name hidden until getDashboardInfo lands;
   both collapse on narrow screens. */
.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: label sits inline with a reused .switch 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%;
  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;
  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;
  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;
  transition:background 0.18s ease;
}
.switch-slider::before{
  content:'';
  position:absolute;
  height:16px;width:16px;
  left:2px;top:2px;
  background:#fff;
  border-radius:50%;
  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;
  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;
  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);}

/* ---- Instant hover tooltip for the permission icons (built + positioned
        by master.js, appended to <body> so the scrollable user table never
        clips it). Upgrades the icons' native `title` into an immediate,
        readable bubble. ---- */
.gs-permtip{
  position:absolute;
  z-index:2000;
  left:0; top:0;
  background:#1F2430;
  color:#fff;
  font-size:11.5px;
  font-weight:600;
  line-height:1.3;
  padding:5px 9px;
  border-radius:6px;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  transform:translateY(2px);
  transition:opacity .1s ease, transform .1s ease;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.gs-permtip.is-on{opacity:1;transform:translateY(0);}
.gs-permtip::after{
  content:'';
  position:absolute;
  left:50%;
  top:100%;
  margin-left:-5px;
  border:5px solid transparent;
  border-top-color:#1F2430;
}
.gs-permtip.gs-permtip--below::after{
  top:auto;
  bottom:100%;
  border-top-color:transparent;
  border-bottom-color:#1F2430;
}

/* ---- Shared hover/tap tooltip. `gs-tip` is THE one tooltip class: put it on ANY
        element (control, map toggle, status pill, info icon) and master.js gives it
        a single body-appended, viewport-clamped bubble (.gs-tip-bubble) that reads
        the host's aria-label and auto-flips to whichever side has room — priority
        up > right > down > left. Callers pass NO direction. z-index clears app
        modals and body-append means no overflow/scroll/modal container can clip it. ---- */
.gs-tip{ display:inline-block; cursor:pointer; }
/* gs-tip-info: the info-icon preset — a gs-tip that also renders the standalone
   red "i" glyph (drop an inline <svg> inside). Focusable + tap-to-pin for touch.
   Replaces the old gsm-pop-info + gsm-tip component (which is gone here; only
   messaging.jsp keeps its own inline gsPublicSide copy). */
.gs-tip-info{ position:relative; top:-1.5px; display:inline-flex; vertical-align:middle; width:16px; height:16px;
              flex:none; margin-left:6px; color:var(--gs-red,#D00000); cursor:pointer;
              -webkit-tap-highlight-color:transparent; }
.gs-tip-info svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2;
                  stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.gs-tip-bubble{
  position:absolute; left:0; top:0; z-index:2147483000;
  max-width:240px; padding:9px 12px;
  background:var(--gs-ink,#0F1117); color:#fff; text-align:center;
  font:400 12px/1.4 'Inter';
  border-radius:10px; box-shadow:0 8px 24px rgba(15,17,23,0.28);
  white-space:normal; pointer-events:none;
  opacity:0; visibility:hidden; transform:translateY(2px);
  transition:opacity .12s ease, transform .12s ease, visibility .12s; }
.gs-tip-bubble.is-on{ opacity:1; visibility:visible; transform:none; }

/* ---- 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;
}
.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;
}

/* Chip styling for the permission rows; safe refinement if a .chip rule already exists. */
.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);
  --badge-admin-fg-light: #2563eb;
  --badge-admin-bg-dark:  rgba(96, 165, 250, 0.20);
  --badge-admin-fg-dark:  #60a5fa;
}
.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; reuses the .aum-warn amber palette so it survives dark mode. */
.cg-data-warn{
  background: #fffbeb;
  border: 0.5px solid #fde68a;
  color: #92400e;
  padding: 11px 14px;
  border-radius: 7px;
  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: belt-and-braces dark-mode overrides so AUM card 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 ===== theme-aware via the --bg/--text/--accent vars; dark mode needs extras only for Leaflet controls. */
/* 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;}

#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: bleed each raster basemap tile a full CSS pixel (257px) to close
   hairline sub-pixel gaps, incl. ~1 device px at Windows 125/150% fractional DPR. All Leaflet maps. */
.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. Layer 1 = analytics design system + tokens;
   Layer 2 (below) = per-page blocks, opt-in via body.gs-page-* so rules never bleed. PAGE: advancedUserManagement.jsp */

  /* CONSOLIDATED SHARED RULES - promoted from per-page duplicates (byte-identical only),
   placed before per-page blocks so per-page overrides + exceptions still win by source order. */

/* GLOBAL - body.gs-app (shared across every modern page). Per-page overrides below
   win by source order; some responsive gs-app rules live in @media blocks further down. */

body.gs-app .gs-act .ic{ width:13px; height:13px; }
body.gs-app .gs-actiongroup .gs-act{ border-radius:0; }
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-app .gs-filterbar:has(+ .gs-loaded-range){ margin-bottom:0 !important; }
body.gs-app .gs-loaded-range .gs-lr-dot{ width:5px; height:5px; border-radius:50%; 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-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%; background:currentColor; flex:none; }
body.gs-app .gs-tablewrap{ background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:10px; 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-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; text-align:center; }
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; }
tr.gsdt-empty-row td.dataTables_empty{ padding:0 !important; border-bottom:none !important; background:transparent; }
tr.gsdt-empty-row:hover td{ background:transparent !important; }
.gsdt-empty{ display:flex; flex-direction:column; align-items:center; gap:9px; padding:46px 20px; text-align:center; }
.gsdt-empty-ic{ display:inline-flex; }
.gsdt-empty-ic svg{ width:40px; height:40px; color:var(--gs-faint,#9AA1AC); opacity:0.9; }
.gsdt-empty-title{ font-size:14px; font-weight:600; color:var(--gs-ink,#0F1117); letter-spacing:-0.01em; }
.gsdt-empty-sub{ font-size:12.5px; color:var(--gs-muted,#6B7280); max-width:360px; line-height:1.5; }
html[data-theme="dark"] .gsdt-empty-title{ color:var(--gs-ink,#F1F5F9); }
.modal-card .gsdt-empty{ padding:14px 16px; gap:6px; }
.modal-card .gsdt-empty-sub{ display:none; }
.modal-card .gsdt-empty-ic svg{ width:34px; height:34px; }
/* Modal tables become their own PANEL (no wrapper card): bordered/rounded/shaded header.
   !important throughout because the gs-app skin forces table backgrounds transparent + collapses borders. Token-driven for dark. */
.modal-card table.dataTable{
  border-collapse:separate !important; border-spacing:0 !important;
  border:1px solid var(--gs-border-light,#E8EAEE) !important; border-radius:10px;
  background:var(--gs-card,#fff) !important; overflow:hidden;
}
.modal-card table.dataTable thead th{
  background:var(--gs-bg,#F4F5F7) !important;
  border-bottom:1px solid var(--gs-border-light,#E8EAEE) !important;
  padding:9px 12px !important;
}
.modal-card table.dataTable thead th:first-child{ border-top-left-radius:10px; }
.modal-card table.dataTable thead th:last-child{ border-top-right-radius:10px; }
.modal-card table.dataTable thead th.sorting, .modal-card table.dataTable thead th.sorting_asc, .modal-card table.dataTable thead th.sorting_desc, .modal-card table.dataTable thead th.sorting_asc_disabled, .modal-card table.dataTable thead th.sorting_desc_disabled, .modal-card table.dataTable thead th.sortable{ padding-right:24px !important; }
.modal-card table.dataTable tbody td{ border-bottom:1px solid var(--gs-border-light,#E8EAEE) !important; }
.modal-card table.dataTable tbody tr:last-child td{ border-bottom:none !important; }
.modal-card table.dataTable tbody tr:last-child td:first-child{ border-bottom-left-radius:10px; }
.modal-card table.dataTable tbody tr:last-child td:last-child{ border-bottom-right-radius:10px; }
.modal-card tr.gsdt-empty-row td.dataTables_empty{ background:transparent !important; border:none !important; border-radius:0; }
/* Sort-arrow GLYPHS - the ONE treatment for the whole site. Keyed on the `.sorting*` classes
   (DataTables auto + hand-rolled aiScribe/eventLog) AND `.sortable` (analytics/AUM), with NO
   body scope, so gs-app and legacy gs-portal pages all render identically. Idle = faint
   up-down; asc/desc = brand-red (the asc/desc rules sit AFTER idle so they win on active columns
   that carry both `.sortable` and `.sorting_asc`). See the sprite-kill + positioning block below. */
thead th.sorting:after, thead th.sortable:after{ content:"\2195"; color:var(--gs-faint,#9AA1AC); }
thead th.sorting_asc:after{ content:"\2191"; color:var(--gs-red,#D00000); }
thead th.sorting_desc:after{ content:"\2193"; color:var(--gs-red,#D00000); }
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-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; }
/* Shared dark-mode --gs-* tokens for every gs-app page; per-page gs-page-* dark blocks
   override with the same values by source order, and a page with no own dark block inherits these. */
/* ----- Design tokens (LIGHT). One definition for every modern surface:
   gs-portal + gs-app (the aiScribe app-webview is now a gs-app page + .gs-embedded). Dark set is the block below. ----- */
body.gs-portal, body.gs-app{
  --gs-amber-bg:#FCF1DC; --gs-amber-tx:#92600A; --gs-bg:#F4F5F7; --gs-blue-bg:#E7EFF9; --gs-blue-tx:#1D4F91;
  --gs-border:#D7DBE0; --gs-border-light:#E8EAEE; --gs-card:#FFFFFF; --gs-faint:#9AA1AC; --gs-green-bg:#E5F4E8;
  --gs-green-tx:#1E7B34; --gs-grey-bg:#EEF0F3; --gs-grey-tx:#4B5563; --gs-ink:#0F1117; --gs-muted:#6B7280;
  --gs-purple-bg:#EFEAF8; --gs-purple-tx:#5B3E96; --gs-red:#D00000; --gs-red-dark:#A80000; --gs-red-tint:#FBEAEA;
  --gs-redpill-bg:#FBEAEA; --gs-redpill-tx:#B42318; --gs-text:#3D434F; --gs-text-2:#3D434F; --gs-topnav-bg:#0f1117;
  --gs-input-bg:#F2F4F7;
}
  html[data-theme="dark"] body.gs-app{
    color-scheme: dark;
    --gs-ink:#F1F5F9; --gs-text:#D7DDE6; --gs-text-2:#D7DDE6; --gs-muted:#A8B1BF; --gs-faint:#8B94A3;
    --gs-border:#344256; --gs-border-light:#283447; --gs-bg:#0F172A; --gs-card:#1E293B; --gs-input-bg:#16213A;
    --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;
  }
/* Google Maps native controls restyled to the GoodSAM card look, light + dark, platform-wide.
   Targets Google's stable control classes (no-op if renamed); zoom +/- glyphs are raster <img>s so dark inverts them. */
.gm-style .gm-bundled-control{ margin:12px 16px !important; }
.gm-style .gm-bundled-control .gmnoprint > div{ border-radius:12px !important; overflow:hidden !important; background:var(--gs-card,#FFFFFF) !important; border:0.5px solid var(--gs-border,#D7DBE0) !important; box-shadow:0 4px 14px rgba(15,17,23,0.14), 0 1px 2px rgba(15,17,23,0.06) !important; }
.gm-style button.gm-control-active{ background:var(--gs-card,#FFFFFF) !important; transition:background .15s; }
.gm-style button.gm-control-active:hover{ background:var(--gs-bg,#F4F5F7) !important; }
.gm-style .gm-bundled-control .gmnoprint > div > div{ background:var(--gs-border-light,#E8EAEE) !important; }
.gm-style .gm-style-mtc-bbw{ display:inline-flex !important; border-radius:9px !important; background:var(--gs-card,#FFFFFF) !important; border:0.5px solid var(--gs-border,#D7DBE0) !important; box-shadow:0 4px 14px rgba(15,17,23,0.14), 0 1px 2px rgba(15,17,23,0.06) !important; }
.gm-style .gm-style-mtc-bbw .gm-style-mtc{ display:inline-flex !important; position:relative !important; }
.gm-style .gm-style-mtc-bbw > .gm-style-mtc:not(:last-child){ border-right:0.5px solid var(--gs-border-light,#E8EAEE) !important; }
.gm-style .gm-style-mtc-bbw button{ border:none !important; border-radius:0 !important; box-shadow:none !important; background:transparent !important; height:28px !important; padding:0 12px !important; font-family:inherit !important; font-weight:600 !important; font-size:12px !important; color:var(--gs-muted,#6B7280) !important; }
.gm-style .gm-style-mtc-bbw > .gm-style-mtc:first-child button{ border-top-left-radius:9px !important; border-bottom-left-radius:9px !important; }
.gm-style .gm-style-mtc-bbw > .gm-style-mtc:last-child button{ border-top-right-radius:9px !important; border-bottom-right-radius:9px !important; }
.gm-style .gm-style-mtc-bbw button:hover{ background:rgba(15,17,23,0.04) !important; }
.gm-style .gm-style-mtc-bbw button[aria-checked="true"]{ background:rgba(15,17,23,0.06) !important; color:var(--gs-ink,#0F1117) !important; }
html[data-theme="dark"] .gm-style .gm-style-mtc-bbw button:hover{ background:rgba(255,255,255,0.08) !important; }
html[data-theme="dark"] .gm-style .gm-style-mtc-bbw button[aria-checked="true"]{ background:rgba(255,255,255,0.12) !important; }
.gm-style .gm-style-mtc ul[role="menu"]{ border-radius:12px !important; overflow:hidden !important; padding:4px !important; background:var(--gs-card,#FFFFFF) !important; border:0.5px solid var(--gs-border,#D7DBE0) !important; box-shadow:0 10px 28px rgba(15,17,23,0.18), 0 1px 2px rgba(15,17,23,0.06) !important; }
.gm-style .gm-style-mtc ul[role="menu"] li{ border-radius:8px !important; margin:1px 0 !important; color:var(--gs-ink,#0F1117) !important; background:transparent !important; font-family:inherit !important; font-size:13px !important; }
.gm-style .gm-style-mtc ul[role="menu"] li:hover{ background:var(--gs-bg,#F4F5F7) !important; }
.gm-style .gm-style-mtc ul[role="menu"] li[aria-checked="true"]{ color:var(--gs-red,#D00000) !important; font-weight:600 !important; }
.gm-style .gm-style-mtc-bbw .gm-style-mtc ul[role="menu"]{ position:absolute !important; top:calc(100% + 6px) !important; left:0 !important; z-index:1000 !important; }
html[data-theme="dark"] .gm-style button.gm-control-active img{ filter:invert(1) brightness(1.7) !important; }
html[data-theme="dark"] .gm-style .gm-style-mtc img{ filter:invert(1) brightness(1.7) !important; }
.gm-style img[src*="gstatic.com/"], .gm-style img[src*="googleapis.com/"]{ max-width:none !important; }
.gm-style .gm-style-iw-c{
    border-radius:12px !important;
    padding:0 !important;
    background:var(--gs-card,#FFFFFF) !important;
    box-shadow:0 10px 30px rgba(15,17,23,0.20), 0 2px 6px rgba(15,17,23,0.08) !important;
}
.gm-style .gm-style-iw-d{ overflow:auto !important; margin-top:0 !important; padding:12px 14px 14px !important; }
.gm-style .gm-style-iw button.gm-ui-hover-effect{
    top:8px !important; right:8px !important; width:24px !important; height:24px !important;
    opacity:1 !important; border-radius:50% !important;
    background:var(--gs-red,#D00000) !important;
    box-shadow:0 1px 3px rgba(0,0,0,0.25) !important;
    display:flex !important; align-items:center !important; justify-content:center !important;
    transition:background .12s !important;
}
.gm-style .gm-style-iw button.gm-ui-hover-effect:hover{ background:var(--gs-red-dark,#A80000) !important; }
.gm-style .gm-style-iw button.gm-ui-hover-effect > span{
    margin:0 !important; width:11px !important; height:11px !important;
    -webkit-mask-size:contain !important; mask-size:contain !important;
    background-color:#FFFFFF !important;
}
.gm-style .gm-style-iw-tc::after{ background:var(--gs-card,#FFFFFF) !important; }
/* dark mode: recolour bubble, tail and content text (the red close disc + white cross stay as-is) */
html[data-theme="dark"] .gm-style .gm-style-iw-c{ background:var(--gs-card,#1E293B) !important; color:var(--gs-ink,#F1F5F9) !important; }
html[data-theme="dark"] .gm-style .gm-style-iw-d{ color:var(--gs-ink,#F1F5F9) !important; }
html[data-theme="dark"] .gm-style .gm-style-iw-tc::after{ background:var(--gs-card,#1E293B) !important; }

/* OS-maps switcher (.gs-tip holding #changeMaps) - fully styled here, single source, pages carry no inline style.
   Scoped via :has(> #changeMaps) so it never hits other .gs-tip. Fixed 250px up / 16px in; edit here to move everywhere. */
.gs-tip:has(> #changeMaps){
    position:fixed !important; bottom:220px !important; right:16px !important; z-index:900 !important;
    width:30px !important; height:30px !important;
    display:flex !important; align-items:center !important; justify-content:center !important;
    background:var(--gs-card,#FFFFFF) !important; border:0.5px solid var(--gs-border,#D7DBE0) !important;
    border-radius:6px !important; box-shadow:0 1px 4px rgba(0,0,0,0.15) !important;
    pointer-events:auto !important; cursor:pointer !important;   /* pointer-events:auto - videos2 sits near its pointer-events:none beacon */
}
.gs-tip:has(> #changeMaps) > #changeMaps{
    width:16px !important; height:16px !important; fill:none !important; stroke:var(--gs-muted,#6B7280) !important;
    stroke-width:2 !important; stroke-linecap:round; stroke-linejoin:round; transition:stroke .15s; cursor:pointer;
}
.gs-tip:has(> #changeMaps):hover > #changeMaps{ stroke:var(--gs-red,#D00000) !important; }  /* red hover, from videos2's old .gs-vmaptoggle */

#osMapCanvas .mapboxgl-ctrl-top-right{ top:50% !important; right:0 !important; bottom:auto !important; transform:translateY(-50%) !important; }
#osMapCanvas .mapboxgl-ctrl-top-right .mapboxgl-ctrl{ margin:0 16px 0 0 !important; }
#osMapCanvas .mapboxgl-ctrl-group{ border-radius:12px !important; overflow:hidden !important; background:var(--gs-card,#FFFFFF) !important; border:0.5px solid var(--gs-border,#D7DBE0) !important; box-shadow:0 4px 14px rgba(15,17,23,0.14), 0 1px 2px rgba(15,17,23,0.06) !important; }
#osMapCanvas .mapboxgl-ctrl-group button{ width:28px !important; height:28px !important; background-color:var(--gs-card,#FFFFFF) !important; border:none !important; transition:background .15s !important; }
#osMapCanvas .mapboxgl-ctrl-group button + button{ border-top:0.5px solid var(--gs-border-light,#E8EAEE) !important; }
#osMapCanvas .mapboxgl-ctrl-group button:hover{ background-color:var(--gs-bg,#F4F5F7) !important; }
html[data-theme="dark"] #osMapCanvas .mapboxgl-ctrl-group button .mapboxgl-ctrl-icon{ filter:invert(1) brightness(1.7) !important; }
#osMapCanvas ~ #menu{
    position:absolute !important; right:16px !important; top:auto !important; bottom:calc(50% + 40px) !important;
    z-index:2 !important; margin:0 !important; padding:8px 12px !important;
    background:var(--gs-card,#FFFFFF) !important; border:0.5px solid var(--gs-border,#D7DBE0) !important;
    border-radius:12px !important; box-shadow:0 4px 14px rgba(15,17,23,0.14), 0 1px 2px rgba(15,17,23,0.06) !important;
    font:500 14px/28px 'Inter', -apple-system, sans-serif !important; color:var(--gs-ink,#0F1117) !important;
}
#osMapCanvas ~ #menu input[type="radio"]{ accent-color:var(--gs-red,#D00000) !important; width:15px !important; height:15px !important; margin:0 8px 0 0 !important; vertical-align:middle !important; cursor:pointer !important; }
#osMapCanvas ~ #menu label{ margin:0 !important; padding:0 !important; color:var(--gs-ink,#0F1117) !important; font-weight:500 !important; vertical-align:middle !important; cursor:pointer !important; }
#osMapCanvas .mapboxgl-popup{ z-index:10 !important; }
#osMapCanvas .mapboxgl-popup-content{
    border-radius:12px !important; padding:36px 14px 14px !important;
    background:var(--gs-card,#FFFFFF) !important; color:var(--gs-ink,#0F1117) !important;
    box-shadow:0 10px 30px rgba(15,17,23,0.20), 0 2px 6px rgba(15,17,23,0.08) !important;
}
#osMapCanvas .mapboxgl-popup-close-button{
    width:24px !important; height:24px !important; top:8px !important; right:8px !important;
    border:0 !important; padding:0 !important; border-radius:50% !important;
    background:var(--gs-red,#D00000) !important; color:#FFFFFF !important;
    box-shadow:0 1px 3px rgba(0,0,0,0.25) !important;
    font-size:0 !important; line-height:1 !important;
    display:flex !important; align-items:center !important; justify-content:center !important;
}
#osMapCanvas .mapboxgl-popup-close-button::before{
    content:"" !important; width:11px !important; height:11px !important; background-color:#FFFFFF !important;
    -webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3C/svg%3E") no-repeat center / contain !important;
}
#osMapCanvas .mapboxgl-popup-close-button:hover{ background:var(--gs-red-dark,#A80000) !important; }
#osMapCanvas .mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
#osMapCanvas .mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
#osMapCanvas .mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{ border-bottom-color:var(--gs-card,#FFFFFF) !important; }
#osMapCanvas .mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
#osMapCanvas .mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
#osMapCanvas .mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{ border-top-color:var(--gs-card,#FFFFFF) !important; }
#osMapCanvas .mapboxgl-popup-anchor-left .mapboxgl-popup-tip{ border-right-color:var(--gs-card,#FFFFFF) !important; }
#osMapCanvas .mapboxgl-popup-anchor-right .mapboxgl-popup-tip{ border-left-color:var(--gs-card,#FFFFFF) !important; }
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-content{ background:var(--gs-card,#1E293B) !important; color:var(--gs-ink,#F1F5F9) !important; }
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{ border-bottom-color:var(--gs-card,#1E293B) !important; }
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
html[data-theme="dark"] #osMapCanvas .mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{ border-top-color:var(--gs-card,#1E293B) !important; }

/* ----- Pills, chips and badges ----- */
        body.gs-app .gs-pill{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-weight:600; line-height:1.5; white-space:nowrap; vertical-align:middle; }
body.gs-app .gs-pill{ font-size:12px; }
/* Action toolbar groups: buttons never stretch; groups stack as whole rows. */
        body.gs-app .gs-actiongroup{ display: inline-flex; flex-wrap: nowrap; gap: 1px; border: 1px solid var(--gs-border); border-radius: 8px; overflow: hidden; background: var(--gs-border-light); /* shows through the 1px gaps as dividers */ }
body.gs-app .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-app .gs-act:hover{ background: var(--gs-grey-bg); color: var(--gs-ink) !important; text-decoration: none; }
body.gs-app .gs-actiongroup.danger .gs-act{ color: var(--gs-redpill-tx) !important; }
body.gs-app .gs-actiongroup.danger .gs-act:hover{ background: var(--gs-redpill-bg); color: var(--gs-redpill-tx) !important; }
body.gs-app .gs-card{
            background: #fff; border: 0.5px solid var(--gs-border-light); border-radius: 10px;
            overflow: hidden; display: flex; flex-direction: column;
            transition: box-shadow 0.15s ease, border-color 0.15s ease;
        }
body.gs-app .gs-card:hover{ border-color: var(--gs-border); box-shadow: 0 4px 16px rgba(15,17,23,0.07); }
body.gs-app .gs-card-thumb{ position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2A2E37, #444A56); flex: none; overflow: hidden; }
body.gs-app .gs-card-thumb img.lazy{ width: 100%; height: 100%; object-fit: cover; display: block; }
body.gs-app .gs-card-thumb .thumb-topleft{ position: absolute; top: 10px; left: 10px; z-index: 2; }
body.gs-app .gs-card-thumb .thumb-topright{ position: absolute; top: 10px; right: 10px; z-index: 2; }
body.gs-app .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-app .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; }
body.gs-app .gs-card-body{ padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 9px; }
body.gs-app .gs-card-titleline{ display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
body.gs-app .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; padding: 3px 9px;
            max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            cursor: pointer;
        }
body.gs-app .gs-card-ref:hover{ border-color: var(--gs-faint); }
body.gs-app .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-app .gs-card-meta{ font-size: 11.5px; color: var(--gs-faint); }
body.gs-app .gs-card-person{ font-size: 12.5px; color: var(--gs-text-2); line-height: 1.5; }
body.gs-app .gs-card-person b{ color: var(--gs-ink); font-weight: 600; }
body.gs-app .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-app .gs-card-field{ min-width: 0; }
body.gs-app .gs-card-field .gs-field-label{ font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gs-muted); margin-bottom: 3px; display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
body.gs-app .gs-card-field select.gs-select{ width: 100% !important; height: 30px; font-size: 12px; }
body.gs-app .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-app .gs-card-actions .gs-actions{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: none; }
body.gs-app .gs-card-actions .gs-actiongroup{ display: contents; }
body.gs-app .gs-card-actions .gs-act{ border: 1px solid var(--gs-border); border-radius: 8px; justify-content: center; padding: 6px 4px; font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.gs-app .gs-card-actions .gs-actiongroup.danger .gs-act{ border-color: #F1C8C4; }
body.gs-app .gs-card-actions .gs-act-done{ border-color: #BCE0C3 !important; }
body.gs-app .gs-card-actions .gs-status-stack{ margin-top: 8px; }
body.gs-app .gs-thumb-overlay{ position: absolute; left: 8px; bottom: 8px; z-index: 3; margin-top: 0; background: rgba(255,255,255,0.92); }
body.gs-app .gs-card-thumb.no-media .gs-thumb-overlay{ background: rgba(255,255,255,0.16); color: #C8CDD6; }
/* tile cards keep standalone rounded buttons (groups are flattened there) */
        body.gs-app .gs-card-actions .gs-actiongroup .gs-act{ border-radius: 8px; border-left: 1px solid var(--gs-border) !important; }
body.gs-app .gs-card-actions .gs-actiongroup.danger .gs-act{ border-color: #F1C8C4 !important; }
        html[data-theme="dark"] body.gs-app .gs-thumb-overlay{ background: rgba(30, 41, 59, 0.92); color: var(--gs-text-2); }
html[data-theme="dark"] body.gs-app .gs-card-actions .gs-actiongroup.danger .gs-act{ border-color: rgba(239, 68, 68, 0.45) !important; }
html[data-theme="dark"] body.gs-app .gs-card-actions .gs-act-done{ border-color: rgba(34, 197, 94, 0.4) !important; }
        html[data-theme="dark"] body.gs-app .gs-card{ background: var(--gs-card) !important; border-color: var(--gs-border-light) !important; }
:where(body.gs-app, body.gs-portal) .gs-sections{ display:flex; gap:8px; flex-wrap:wrap; padding:16px 24px; background:var(--gs-bg); }
:where(body.gs-app, body.gs-portal) .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; 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"] :where(body.gs-app, body.gs-portal) .gs-sections .section-btn{ background:var(--gs-card) !important; }
:where(body.gs-app, body.gs-portal) .gs-sections .section-btn:hover{ border-color:var(--gs-border) !important; box-shadow:none !important; }
:where(body.gs-app, body.gs-portal) .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; }
:where(body.gs-app, body.gs-portal) .gs-sections .sec-ico{ flex:none; width:30px; height:30px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; background:var(--gs-grey-bg); color:var(--gs-muted); transition:background .15s, color .15s; }
:where(body.gs-app, body.gs-portal) .gs-sections .section-btn.active .sec-ico{ background:var(--gs-red-tint); color:var(--gs-red); }
html[data-theme="dark"] :where(body.gs-app, body.gs-portal) .gs-sections .section-btn.active .sec-ico{ background:rgba(208,0,0,0.20); color:#FF6B6B; }
:where(body.gs-app, body.gs-portal) .gs-sections .sec-ico svg, :where(body.gs-app, body.gs-portal) .gs-sections .sec-ico .ic{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
:where(body.gs-app, body.gs-portal) .gs-sections .sec-txt{ display:flex; flex-direction:column; min-width:0; }
:where(body.gs-app, body.gs-portal) .gs-sections .sec-label{ font-size:13px; font-weight:600; color:var(--gs-ink); white-space:nowrap; }
:where(body.gs-app, body.gs-portal) .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; }
  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; 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; background:var(--gs-purple-bg); color:var(--gs-purple-tx); font-size:10.5px; font-weight:700; letter-spacing:0.08em; }
/* ---- filter / search bar: 2-row layout + quick-range presets (analytics-aligned) ---- */
  body.gs-app .gs-filterbar{ display:flex; flex-wrap:wrap; flex-direction:column; align-items:stretch; gap:12px; text-align:left; background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:10px; 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:36px !important; border:0.5px solid var(--gs-border); border-radius:6px !important; padding:0 10px !important; font-size:12.5px; font-family:inherit; background:var(--gs-input-bg); color:var(--gs-ink); box-shadow:none; min-width:0; margin:0; line-height:normal; }
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; }
body.gs-app .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; }
/* 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:36px !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-input-bg); 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;
  }
/* Level-2 sub-section nav (level-1 .gs-sections comes from the shared body.gs-app rules).
   "Segment Rail": one hairline-framed strip of flush tabs with quiet dividers; the active tab
   gets a solid red accent-bar + red-tint fill + red bold label. Dark uses the same token-driven
   tints (--gs-red-tint is a translucent red wash on the slate card; --gs-grey-bg a light overlay). */
:where(body.gs-app, body.gs-portal) .gs-subsections{ display:flex; flex-wrap:wrap; gap:0; padding:3px; margin:2px 0 20px; background:var(--gs-card); border:1px solid var(--gs-border); border-radius:9px; box-shadow:0 1px 2px rgba(15,17,23,0.04); }
html[data-theme="dark"] :where(body.gs-app, body.gs-portal) .gs-subsections{ box-shadow:none; }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn{ position:relative; display:inline-flex; align-items:center; padding:6px 13px; border:0; background:transparent; color:var(--gs-text-2); font-family:inherit; font-size:12px; font-weight:500; line-height:1.3; letter-spacing:0.01em; white-space:nowrap; cursor:pointer; border-radius:6px; -webkit-appearance:none; appearance:none; transition:background .13s, color .13s, padding .13s; }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn::before{ content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width:1px; height:13px; background:var(--gs-border-light); opacity:1; transition:opacity .13s; }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn:first-child::before, :where(body.gs-app, body.gs-portal) .gs-subsections .section-btn:hover::before, :where(body.gs-app, body.gs-portal) .gs-subsections .section-btn.active::before, :where(body.gs-app, body.gs-portal) .gs-subsections .section-btn:hover + .section-btn::before, :where(body.gs-app, body.gs-portal) .gs-subsections .section-btn.active + .section-btn::before{ opacity:0; }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn:hover{ color:var(--gs-ink); background:var(--gs-grey-bg); }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn.active{ color:var(--gs-red-dark); background:var(--gs-red-tint); font-weight:600; padding-left:16px; }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn.active::after{ content:""; position:absolute; left:5px; top:50%; transform:translateY(-50%); width:3px; height:14px; border-radius:2px; background:var(--gs-red); }
html[data-theme="dark"] :where(body.gs-app, body.gs-portal) .gs-subsections .section-btn.active{ color:var(--gs-red-dark); }
html[data-theme="dark"] :where(body.gs-app, body.gs-portal) .gs-subsections .section-btn::before{ background:var(--gs-border); }
:where(body.gs-app, body.gs-portal) .gs-subsections .section-btn .ic{ width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
/* dataTables control chrome (search box, page-size select, info/pagination) —
   shared across every gs-app console page; pages that hide these controls are
   simply unaffected. */
body.gs-app .dataTables_wrapper .dataTables_filter input,
body.gs-app .dataTables_wrapper .dataTables_length select{ background:var(--gs-input-bg); color:var(--gs-ink); border:1px solid var(--gs-border); border-radius:6px; }
body.gs-app .dataTables_wrapper .dataTables_info,
body.gs-app .dataTables_wrapper .dataTables_paginate,
body.gs-app .dataTables_wrapper .dataTables_length,
body.gs-app .dataTables_wrapper .dataTables_filter{ color:var(--gs-muted); font-size:12px; }
body.gs-app .dataTables_wrapper .paginate_button{ color:var(--gs-text-2) !important; }
body.gs-app .dataTables_wrapper .paginate_button.current{ color:var(--gs-red) !important; font-weight:700; }
body.gs-app .gs-cell-name{ font-weight:700; color:var(--gs-ink); font-size:12.5px; }
body.gs-app table.dataTable td .gs-actiongroup{ margin:0 auto; }
/* legacy on/off input + Turn button kept in DOM for the handlers, hidden visually */
body.gs-app .gs-opt-hidden{ display:none !important; }
body.gs-app .gs-optcard{ background:var(--gs-card); border:0.5px solid var(--gs-border-light); border-radius:12px; padding:16px 18px; box-sizing:border-box; }
body.gs-app .gs-optcard .control-label{ display:block; margin:0 0 9px; font-weight:600; font-size:12.5px; color:var(--gs-text-2); }
body.gs-app .gs-optcard .controls{ margin:0; }
body.gs-app .gs-optcard select,
body.gs-app .gs-optcard input[type="text"],
body.gs-app .gs-optcard input[type="password"]{ width:100% !important; margin:0; box-sizing:border-box; }
body.gs-app .gs-optcard .btn-u{ margin-top:10px; }
/* toggle card: label on the left, switch on the right (the hidden input+button collapse out) */
body.gs-app .gs-toggleform{ display:flex; align-items:center; gap:14px; margin:0; }
body.gs-app .gs-toggleform .control-label{ flex:1 1 auto; margin:0; }
/* canonical .gs-switch carries margin:auto - reset it and right-align in the card */
body.gs-app .gs-toggleform .gs-switch{ margin:0 0 0 auto; }
/* option rows -> equal-gap responsive card grid (scoped to rows that hold cards) */
body.gs-app .gs-optrow{ display:flex; flex-wrap:wrap; align-items:stretch; gap:14px; margin:0 0 14px !important; }
body.gs-app .gs-optrow > [class*="span"]{ float:none !important; width:auto !important; min-width:0; margin:0 !important; flex:1 1 260px; }
/* a grid cell that stacks several option cards (multi-option cell) spaces them out */
body.gs-app .gs-optrow > [class*="span"] > .gs-optcard + .gs-optcard{ margin-top:12px; }
.gs-page .gs-fbbanner{ margin:0; }
body.gs-app .gs-ref{ display:inline-block; font-size:12px; background:var(--gs-grey-bg); border:1px solid var(--gs-border-light); border-radius:6px; padding:3px 8px; color:var(--gs-ink); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
/* ----- Misc cell helpers ----- */
        body.gs-app .gs-cell-muted{ color: var(--gs-faint); font-size: 12.5px; }
body.gs-app .gs-status-stack{ display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
body.gs-app .gs-tilehint{ position:absolute; z-index:60; display:inline-flex; align-items:center; gap:9px; padding:10px 12px; background:var(--gs-ink); color:#fff; border-radius:10px; box-shadow:0 8px 28px rgba(15,17,23,0.28); font-size:12.5px; line-height:1.35; }
body.gs-app .gs-tilehint-arrow{ position:absolute; top:-6px; width:12px; height:12px; background:var(--gs-ink); transform:rotate(45deg); border-radius:2px; }
/* ----- Row lead icons (type/page glyph in the first column) ----- */
        body.gs-app .gs-lead{ width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
body.gs-app .gs-lead .ic{ width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.gs-app .gs-lead-blue{ background: var(--gs-blue-bg); color: var(--gs-blue-tx); }
body.gs-app .gs-lead-green{ background: var(--gs-green-bg); color: var(--gs-green-tx); }
body.gs-app .gs-lead-amber{ background: var(--gs-amber-bg); color: var(--gs-amber-tx); }
body.gs-app .gs-lead-purple{ background: var(--gs-purple-bg); color: var(--gs-purple-tx); }
body.gs-app .gs-lead-grey{ background: var(--gs-grey-bg); color: var(--gs-grey-tx); }
body.gs-app th.gs-lead-th{ width: 56px; }
/* View actions: light blue tint (green is reserved for the session
           done-state); Delete: light red fill */
        body.gs-app .gs-act.gs-primary{ background-color: var(--gs-blue-bg) !important; color: var(--gs-blue-tx) !important; }
body.gs-app .gs-act.gs-primary:hover{ background-color: #D9E7F7 !important; color: var(--gs-blue-tx) !important; }
html[data-theme="dark"] body.gs-app .gs-act.gs-primary:hover{ background-color:rgba(96,165,250,0.28) !important; }
body.gs-app table.dataTable{ background: transparent; border: none; }
body.gs-app 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; }
body.gs-app table.dataTable tbody td a b{ font-weight: 600; }
/* Sort indicators: faint arrows instead of the legacy background images */
        /* padding-right is !important so it beats the more-specific gs-app header rules
           (body.gs-app table.dataTable thead th{padding:9px 12px} + its <=1640px 9px 7px
           variant) - otherwise the centred header text runs under the absolute arrow. */
        thead th.sorting, thead th.sorting_asc, thead th.sorting_desc, thead th.sorting_asc_disabled, thead th.sorting_desc_disabled, thead th.sortable{ background-image:none !important; padding-right:24px !important; position:relative; cursor:pointer; user-select:none; }
/* layout only - each state sets its own colour above (idle faint, asc/desc brand-red) so the
   later-in-file positioning rule must NOT re-declare colour or it would override red back to faint. */
thead th.sorting:after, thead th.sorting_asc:after, thead th.sorting_desc:after, thead th.sortable:after{ position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 10px; text-transform: none; letter-spacing: 0; }
/* 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-app table.dataTable td .gs-status-stack{ display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 6px; }
body.gs-app table.dataTable tbody tr, body.gs-app table.dataTable tbody tr.odd, body.gs-app table.dataTable tbody tr.even{ background-color: #fff !important; }
body.gs-app table.dataTable tbody tr.odd td, body.gs-app table.dataTable tbody tr.even td{ background-color: transparent !important; }
body.gs-app table.dataTable tbody tr:hover td{ background-color: #fafaf9 !important; }
/* table rows hard-coded white in the hardening block */
        html[data-theme="dark"] body.gs-app table.dataTable tbody tr, html[data-theme="dark"] body.gs-app table.dataTable tbody tr.odd, html[data-theme="dark"] body.gs-app 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-app table.dataTable thead th{ color:#A8B1BF !important; }
/* ===================== end GLOBAL - body.gs-app ===================== */

  /* UNIFIED beta feedback banner - ONE unscoped ruleset for every page rendering #gsFeedbackBanner; wrapper-gutter pages zero the base margin below. */
  .gs-fbbanner{ display:flex; align-items:center; gap:14px; margin:16px 24px 0; padding:13px 16px; border-radius:12px; background:linear-gradient(135deg,#FBEAEA 0%,#F3ECFB 100%); border:1px solid #EAD9F2; animation:gs-fbbanner-in 0.4s ease; }
  @keyframes gs-fbbanner-in{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }

  .gs-fbbanner-copy{ flex:1 1 auto; display:flex; flex-direction:column; gap:2px; line-height:1.4; min-width:0; }
  .gs-fbbanner-copy b{ color:var(--gs-ink); font-size:13.5px; }
  .gs-fbbanner-copy span{ color:var(--gs-text-2); font-size:12.5px; }
  .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; background:var(--gs-red); color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s; }
  .gs-fbbanner-cta svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; }
  .gs-fbbanner-cta:hover{ background:var(--gs-red-dark); }
  .gs-fbbanner-spark{ flex:0 0 auto; width:36px; height:36px; border-radius:10px; background:#fff; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(208,0,0,0.10); }
  .gs-fbbanner-spark svg{ width:19px; height:19px; stroke:var(--gs-red); fill:none; stroke-width:1.8; }
  .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; }
  .gs-fbbanner-x:hover{ color:var(--gs-ink); }
  @media (max-width:760px){
    .gs-fbbanner{ flex-wrap:wrap; }
    .gs-fbbanner-cta{ width:100%; justify-content:center; }
  }
  /* UNIFIED feedback dialog form - opened by the banner CTA, rendered via the master.js showMessage engine; dark-mode aware via gs-app tokens. */
  .gs-fbform{ display:flex; flex-direction:column; gap:10px; text-align:left; }
  .gs-fbform label{ font-size:13px; font-weight:600; color:var(--gs-ink); }
  .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, #fff); box-sizing:border-box; }
  .gs-fbform textarea:focus{ outline:none; border-color:var(--gs-red); }
  .gs-fbform .gs-fbcount{ font-size:11px; color:var(--gs-faint); text-align:right; }
  .gs-fbform .gs-fberr{ font-size:12px; color:var(--gs-red); display:none; }
  .gs-fbform .gs-fberr.show{ display:block; }

  /* UNIFIED fixed site footer (gsFooter.jspf) — one unscoped ruleset for
     app + portal pages (was two identical scoped copies). */
  .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; }
  .gs-footer p{ margin:0; }
  .gs-footer a{ color:#C9CED6; text-decoration:none; }
  .gs-footer a:hover{ color:#fff; }

  html[data-theme="dark"] .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"] .gs-fbbanner-spark{ background:var(--gs-card); box-shadow:0 2px 8px rgba(0,0,0,0.4); }

  /* ============================================================================
     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{ padding-top:0 !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:0 !important; padding-bottom:0 !important; }   /* gs-topnav + marketing bar are sticky/in-flow now (was 104px = 48+56 for the fixed stack) */
  body.gs-portal{ --mn-ease:cubic-bezier(.22,.61,.36,1); }
  body.gs-portal:not(.gs-mkt){ background:var(--gs-bg, #F4F5F7); }   /* portal pages: unify on the light-grey app bg (--gs-bg = #F4F5F7), matching the gs-app pages. Overrides the legacy style.css beige (#F5F4F2). gs-mkt marketing keeps its own bg. */
  html:has(> body.gs-portal:not(.gs-mkt)){ background:var(--gs-bg, #F4F5F7); }   /* match <html> to the body so no bg mismatch shows below short content, above the fixed footer. */
  body.gs-portal .gs-mbar{ position:sticky; top:48px; 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:'Inter'; }
  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; 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; 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; 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; 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; 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; 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; }
  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; 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; }
  body.gs-portal .gs-live-dot{ width:7px; height:7px; border-radius:50%; 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; }
  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%; 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; 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; }
  }

  /* ============================================================================
     UNIFIED GoodSAM top-nav — ONE unscoped ruleset for every page that includes
     gsTopnav.jspf (marketing, portal, app dashboards, consoles). Sticky in flow:
     pins on scroll, occupies its 48px, no body-padding compensation anywhere.
     The ONLY positioning modifiers are the two scoped rules right below:
       - gs-portal-fixed  -> full-viewport apps keep position:fixed (their content
         is fixed/absolute hard-coded to top:48px and the body never scrolls)
       - non-mkt portal   -> 8px breathing room below the bar (was body padding 56px)
     ============================================================================ */
  .gs-topnav{ position:sticky; top:0; height:48px; background:var(--gs-topnav-bg, #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-portal-fixed .gs-topnav{ position:fixed; top:0; left:0; right:0; }
  body.gs-portal:not(.gs-mkt):not(.gs-portal-fixed) .gs-topnav{ margin-bottom:8px; }
  .gs-topnav .gs-brand{ display:inline-flex; align-items:center; gap:8px; flex:1 1 0; min-width:max-content; margin-right:0; color:#fff; font-weight:700; font-size:15px; white-space:nowrap; text-decoration:none; cursor:pointer; transition:opacity .15s ease; }   /* min-width:max-content — never crush the logo on narrow viewports where nav-links overflow-scroll (min-width:0 collapsed it to 0px) */
  .gs-topnav a.gs-brand:hover{ opacity:0.85; }
  .gs-topnav .gs-brand-mark{ width:9px; height:9px; border-radius:2px; background:var(--gs-red, #D00000); display:inline-block; }
  .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; }
  .gs-topnav .gs-nav-links a{ color:#C9CED6; font-size:13px; font-weight:500; text-decoration:none; padding:6px 10px; border-radius:6px; white-space:nowrap; }
  .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); }
  .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); }
  .gs-topnav .gs-nav-right{ display:flex; align-items:center; gap:12px; flex:1 1 0; justify-content:flex-end; margin-left:0; }
  .gs-topnav .gs-logout{ color:#C9CED6; font-size:12.5px; text-decoration:none; white-space:nowrap; }
  .gs-topnav .gs-logout:hover{ color:#fff; text-decoration:none; }
  .gs-topnav .gs-avatar{ width:28px; height:28px; border-radius:50%; background:var(--gs-red, #D00000); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:none; cursor:pointer; text-decoration:none; }
  .gs-topnav .gs-avatar:hover{ background:var(--gs-red-dark,#A80000); color:#fff; }
  /* logged-out state: Join Us + Login */
  .gs-topnav .gs-nav-right-out{ margin-left:auto; gap:10px; }
  .gs-topnav .gs-join{ display:inline-flex; align-items:center; gap:7px; background:var(--gs-red, #D00000); color:#fff; font-size:13px; font-weight:700; letter-spacing:.01em; text-decoration:none; padding:8px 16px; border-radius:8px; 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; }
  .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); }
  .gs-topnav .gs-join:active{ transform:translateY(0); box-shadow:0 1px 2px rgba(208,0,0,0.40); }
  .gs-topnav .gs-join svg{ width:15px; height:15px; }
  .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; background:rgba(255,255,255,0.025); transition:color .16s ease, border-color .16s ease, background .16s ease; }
  .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; }
  .gs-topnav .gs-login svg{ width:14px; height:14px; }

  /* ----- 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; 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; 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%; display:inline-block; animation:aumspin .7s linear infinite; }
  @keyframes aumspin{ to{ transform:rotate(360deg); } }

  /* ===== 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; 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; 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; }
  :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; 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; }
  :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%; 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; }
  }

  /* 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; 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; 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;
    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;
            display: block;
            width: 100%;
            height: auto;
            object-fit: cover;
        }

        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 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. */
  /* Page body base (font/color/bg/min-height). No shared body.gs-app base sets these,
     so these four are load-bearing. NB the same 4 props are repeated on gs-page-eventlog/
     kits/loneworking/aiscribe/manageorganisation2 - a future pass could hoist to one
     shared body.gs-app{} base. */
        body.gs-page-recordings2{
            font-family: 'Inter';
            color: var(--gs-ink);
            background: var(--gs-bg);
            min-height: 100%;
        }

        /* ----- Page frame and header ----- */
        body.gs-page-recordings2 .gs-page, body.gs-page-eventlog .gs-page, body.gs-page-kits .gs-page, body.gs-page-loneworking .gs-page, body.gs-page-manageresponder .gs-page{ width:100%; max-width:100%; text-align:left; box-sizing:border-box; }

        /* ----- Filter strip ----- */
        /* Filter controls inherit the shared body.gs-app .gs-filterbar system; only .gs-help-slot and the .gs-select block are recordings2-specific. */
        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.gs-select{
            background-color: var(--gs-input-bg);
            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.gs-select{ height: 30px; font-size: 12px; }
        /* Dashed border while no value is selected (progressive enhancement) */
        body.gs-page-recordings2 select.gs-select: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;
            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%;
            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;
            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; }
        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: var(--gs-card) !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: var(--gs-card) !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 .gs-ref{ font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; cursor:pointer; }
        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;
            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;
            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;
        }

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

        /* 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; 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%; 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: #D3D8E0; color: var(--gs-grey-tx); }
        html[data-theme="dark"] body.gs-page-recordings2 .gs-fchip.active.tone-grey{ background: rgba(148,163,184,0.24); 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; padding: 2px; gap: 2px; }
        body.gs-page-recordings2 .gs-seg button{
            border: none; background: transparent; padding: 6px 12px; border-radius: 6px;
            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. The .gs-tiles GRID is recordings2's layout; the .gs-card COMPONENT
           below is SHARED (body.gs-app) - a media/record card (thumb + ref chip + person
           + field grid + actions footer) any modern page can use. A page adopting .gs-card
           supplies its own grid/flex container. Helper classes .gs-format-chip /
           .gs-thumb-overlay are promoted too; .gs-card-field .gs-field-label is
           self-contained (carries its own font props, doesn't need recordings2's base). */
        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-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-app table.dataTable thead th{ padding: 9px 7px; font-size: 10.5px; letter-spacing: 0.05em; }
            body.gs-app table.dataTable tbody td{ padding: 9px 7px; font-size: 12.5px; }
            table.dataTable thead th.sorting, table.dataTable thead th.sorting_asc, table.dataTable thead th.sorting_desc{ padding-right: 18px; }
            body.gs-page-recordings2 .gs-act, body.gs-page-manageorganisation2 .gs-act{ padding: 5px 7px; font-size: 11px; gap: 4px; }
            body.gs-page-recordings2 .gs-act .ic, body.gs-page-manageorganisation2 .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.gs-select, 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, body.gs-page-manageorganisation2 .gs-pill{ font-size: 11.5px; padding: 2px 8px; }
        }
        @media (max-width: 980px) {
            body.gs-page-recordings2 .gs-page{ padding: 12px 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 (shared gs-sections tab engine; Bootstrap tab-content/tab-pane no longer used).
           Keyed on the .gs-panes container class (not a hardcoded per-page list) so any page can adopt the
           tab system with no master.css edit, and the child combinator supports 2-level nesting (manageOrganisation2). ----- */
        .gs-panes > .gs-pane{ display: none; }
        .gs-panes > .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; }
        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; 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; }

        /* ----- 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{ top:calc(100% + 12px); right:0; max-width:320px; 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{ right:26px; }
        @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.gs-select{ 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: var(--gs-card); border-radius: 8px; 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 */
        body.gs-page-recordings2 .gs-more-menu{ display: none; position: fixed; z-index: 1200; min-width: 200px; background: var(--gs-card); border: 1px solid var(--gs-border); border-radius: 10px; 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; 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; }

        /* ----- 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; }
        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.gs-select{ max-width: 150px; }

        /* ----- 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; 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: var(--gs-card) !important; color: var(--gs-ink) !important; }
        body.gs-page-recordings2 .btn-u{ background-color: var(--gs-card) !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-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: var(--gs-card) !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;
            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; }

        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; 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); }

        /* DARK THEME - mirrors the analytics portal. html[data-theme=dark] re-points the tokens; rules below fix light styles that hard-code #fff (the hardening-block !importants need dark counterparts). */
        /* buttons and cells hard-coded to white in the hardening block */
        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, html[data-theme="dark"] body.gs-page-aiscribe .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; }

        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 */
        /* 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.gs-select, 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: var(--gs-input-bg) !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; }

        /* 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; }

        /* 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 */

        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-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-pagehead / gs-sections / inner-tab sub-tabs + beta badge +
   discovery hints. Scoped under body.gs-page-analytics.
   ============================================================ */

  /* ---- 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;
    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;
    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;
    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;
    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;
  }
  /* ===== 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{ max-width:340px; animation:gs-hint-in 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; }
  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; }

  /* ---- 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-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.
   ============================================================ */

  @media (max-width:760px){ :where(body.gs-app, body.gs-portal) .gs-sections .section-btn{ flex:1 1 100%; } }

/* ---- 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, body.gs-page-eventlog .gs-pagehead, body.gs-page-eventlog #functionSelector, body.gs-page-eventlog .gs-filterbar, body.gs-page-eventlog .gs-loaded-range, body.gs-page-kits .gs-pagehead, body.gs-page-kits #functionSelector, body.gs-page-kits .gs-filterbar, body.gs-page-kits .gs-loaded-range, body.gs-page-loneworking .gs-pagehead, body.gs-page-loneworking #functionSelector, body.gs-page-loneworking .gs-filterbar, body.gs-page-loneworking .gs-loaded-range, body.gs-page-manageresponder .gs-pagehead, body.gs-page-manageresponder #functionSelector{ margin-left:-24px; margin-right:-24px; padding-left:24px; padding-right:24px; }
  body.gs-page-recordings2 .gs-filterbar{ border-radius:0; border:0; border-bottom:0.5px solid var(--gs-border-light); background:var(--gs-card); margin-bottom:0 !important; }

/* 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{
    font-family: 'Inter';
    color: var(--gs-ink); background: var(--gs-bg); min-height: 100%;
}
  /* ----- Page frame + full-bleed chrome strips (content sits in a 24px-padded container) ----- */
  body.gs-page-recordings2 .gs-page, body.gs-page-eventlog .gs-page, body.gs-page-kits .gs-page, body.gs-page-loneworking .gs-page, body.gs-page-manageresponder .gs-page{ padding:16px 24px 56px; }
    body.gs-page-eventlog .gs-filterbar, body.gs-page-kits .gs-filterbar, body.gs-page-loneworking .gs-filterbar{ border-radius:0; border:0; border-bottom:0.5px solid var(--gs-border-light); background:var(--gs-card); margin-bottom:18px !important; }
    /* ----- Section panes ----- */
      /* ----- Table chrome ----- */
      /* kill the legacy dataTables zebra striping (match recordings2's flat rows) */
        /* 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{ padding-left:24px; }
    /* ----- Centered headers + action buttons / status pills (recordings2 .gs-act framework) ----- */
    body.gs-page-eventlog .gs-ref{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; }
        /* primary (blue) action - matches recordings2's "View files" View button */
        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-red{ background:var(--gs-redpill-bg); color:var(--gs-redpill-tx); }
              /* ---- 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-ref{ background:var(--gs-grey-bg); border-color:var(--gs-border); color:var(--gs-ink); }
      /* ----- Dark mode ----- */
  html[data-theme="dark"] body.gs-page-eventlog{
    color-scheme: dark;
    background:var(--gs-bg); color:var(--gs-text-2);
}

  /* Filter-bar controls only - dark modal pop-up inputs are handled centrally by the .gsm-content dark rule. */
  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-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-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{ background-color:#16213A !important; color:var(--gs-text-2) !important; border-color:var(--gs-border) !important; }

  /* Feedback dialog inner form */

/* ============================================================
   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{
    font-family: 'Inter';
    color: var(--gs-ink); background: var(--gs-bg); min-height: 100%;
}
  /* ----- Page frame + full-bleed chrome strips (content sits in a 24px-padded container) ----- */
        /* 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; }
      /* ----- Table chrome ----- */
  /* kill the legacy dataTables zebra striping (match recordings2's flat rows) */
  /* Sort indicators: faint arrows instead of the legacy background images */
      /* ----- 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; overflow:hidden; background:var(--gs-border-light); }

      /* ----- Dark mode ----- */
  html[data-theme="dark"] body.gs-page-kits{
    color-scheme: dark;
    background:var(--gs-bg); color:var(--gs-text-2);
}

/* ============================================================
   LONE WORKING PAGE - page-scoped chrome + tables; self-contained
   --gs-* palette. Editing this block never touches recordings2/analytics/aum.
   ============================================================ */
  body.gs-page-loneworking{
    font-family: 'Inter';
    color: var(--gs-ink); background: var(--gs-bg); min-height: 100%;
}
  /* ----- Page frame + full-bleed chrome strips (content sits in a 24px-padded container) ----- */
      /* ----- Table chrome ----- */
        /* Sort indicators: faint arrows instead of the legacy background images */
      /* ----- Dark mode ----- */
  html[data-theme="dark"] body.gs-page-loneworking{
    color-scheme: dark;
    background:var(--gs-bg); color:var(--gs-text-2);
}

  /* ----- 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; 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; 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) ----- */
  /* status pills */
  /* 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); }
  /* "Reason for lone working" - a blue info chip (blue == informational in this
     palette); the actual reason text is revealed on hover/tap via the shared
     gs-tip tooltip, which reads the host's aria-label. */
  body.gs-page-loneworking .lw-reason{ display:inline-flex; align-items:center; gap:5px; max-width:100%; margin-top:1px; padding:3px 9px 3px 7px; border-radius:999px; background:var(--gs-blue-bg); color:var(--gs-blue-tx); font-size:10.5px; font-weight:600; line-height:1.4; white-space:nowrap; cursor:help; }
  body.gs-page-loneworking .lw-reason .ic{ width:12px; height:12px; flex:none; }
  /* centered table headers (cells already centered via fnCreatedRow) + switch centering */
    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-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).
   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 */

  .gs-dp{ position:absolute; z-index:10000; background:#fff; border:0.5px solid rgba(0,0,0,0.10);
          border-radius:14px; 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; 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;
              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; 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; 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; 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;
              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; 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; 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; }

/* ==========================================================================
   GSColorPicker - GoodSAM's own HSV colour picker (master.js window.GSColorPicker),
   replaces the jQuery-UI vanderlee colorpicker. Same popup language as .gs-dp:
   hardcoded light values + a .gscp-dark override (NOT --gs-* tokens) so it works
   on any page - including the gsModalOnly legacy admin pages that never bootstrap
   the dark theme. The swatch (.gscp-swatch) is the trigger AND the value store:
   its background-color IS the saved colour.
   ========================================================================== */
  /* the swatch trigger - clickable colour chip, its background-color = the value */
  .gscp-swatch{ display:block; box-sizing:border-box; width:100%; height:36px; border-radius:8px !important; cursor:pointer;
                border:0.5px solid var(--gs-border,#D7DBE0); transition:border-color .12s, box-shadow .12s; }
  .gscp-swatch:hover{ border-color:var(--gs-red,#D00000); }
  .gscp-swatch:focus-visible{ outline:none; border-color:var(--gs-red,#D00000); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }

  /* the popup (position:fixed - JS sets left/top from the swatch's viewport rect,
     z-index above the showMessage modal chrome; reuses the datepicker entrance) */
  .gscp{ position:fixed; z-index:10000; width:220px; box-sizing:border-box; background:#fff;
         border:0.5px solid rgba(0,0,0,0.10); border-radius:14px; box-shadow:0 14px 46px rgba(15,17,23,0.18);
         padding:12px; font-family:inherit; font-size:13px; color:#0F1117; user-select:none;
         display:flex; flex-direction:column; gap:12px; animation:gs-dp-in .13s ease; }
  .gscp-map{ position:relative; width:100%; height:150px; border-radius:10px; cursor:crosshair; touch-action:none;
             background-image:linear-gradient(to top, #000 0%, rgba(0,0,0,0) 100%),
                              linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 100%);
             box-shadow:inset 0 0 0 0.5px rgba(0,0,0,0.12); }
  .gscp-hue{ position:relative; width:100%; height:14px; border-radius:7px; cursor:ew-resize;
             touch-action:none; box-shadow:inset 0 0 0 0.5px rgba(0,0,0,0.12);
             background:linear-gradient(to right,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%); }
  .gscp-map-thumb, .gscp-hue-thumb{ position:absolute; border-radius:50%; border:2px solid #fff; pointer-events:none;
             transform:translate(-50%,-50%); box-shadow:0 0 0 1px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.40); }
  .gscp-map-thumb{ width:14px; height:14px; }
  .gscp-hue-thumb{ width:16px; height:16px; top:50%; }
  /* the hex field is just a STANDARD site input - same 36px height + full width + --gs-* tokens
     as .ais-input / every other control (border-radius !important only, matching .ais-input, to
     beat bootstrap's input radius on these pages). No wrapper, no custom sizing. */
  .gscp-hex{ display:block; box-sizing:border-box; width:100%; height:36px; padding:0 11px;
             border:0.5px solid var(--gs-border,#D7DBE0); border-radius:8px !important; background:var(--gs-card,#fff);
             color:var(--gs-ink,#0F1117); font-family:inherit; font-size:13px; text-transform:uppercase; letter-spacing:0.03em;
             outline:none; transition:border-color .12s, box-shadow .12s; }
  .gscp-hex:focus{ border-color:var(--gs-red,#D00000); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  .gscp-foot{ display:flex; justify-content:flex-end; padding-top:12px; border-top:0.5px solid rgba(0,0,0,0.08); }
  .gscp-done{ height:36px; border:none; background:#D00000; color:#fff; font-size:12.5px; font-weight:600; cursor:pointer;
              padding:0 18px; border-radius:8px; transition:background .12s; }
  .gscp-done:hover{ background:#A80000; }
  /* dark theme (shell mirrors .gs-dp-dark; the hex input themes itself via --gs-* tokens) */
  .gscp-dark{ background:#1E293B; border-color:rgba(255,255,255,0.10); color:#F1F5F9; box-shadow:0 14px 46px rgba(0,0,0,0.55); }
  .gscp-dark .gscp-map, .gscp-dark .gscp-hue{ box-shadow:inset 0 0 0 0.5px rgba(255,255,255,0.12); }
  .gscp-dark .gscp-foot{ border-color:rgba(255,255,255,0.10); }

/* ==========================================================================
   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.
   ========================================================================== */
  body.gs-page-aiscribe{ background:var(--gs-bg); color:var(--gs-ink); font-family:'Inter'; min-height:100%; }

  /* ----- 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; } }
  /* the card is the SHARED body.gs-app .gs-optcard - in web AND embedded (.gs-embedded) alike;
     the embedded webview is a gs-app page too, so it inherits the exact same card. */
  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-input-bg); 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; }
  /* aiScribe's picker is now the shared GSMultiSelect component (.gsms) - see the block below. */
  /* ================================================================== *
   * GSMultiSelect - GoodSAM's own multi-select control (master.js).     *
   * Replaces bootstrap-select. GLOBAL + themed on --gs-* tokens (hex     *
   * fallbacks) so it works on every page and in light/dark. Public copy *
   * lives in gsPublicSide.jspf - keep the two visually in sync.         *
   * ================================================================== */
  .gsms{ position:relative; display:block; width:100%; }
  select.gsms-native{ display:none !important; }
  .gsms-toggle{ display:flex; align-items:center; gap:8px; width:100%; box-sizing:border-box; height:36px; padding:0 11px; margin:0; font-family:inherit; font-size:13px; text-align:left; color:var(--gs-ink,#0F1117); background:var(--gs-input-bg,#FBFBFD); border:0.5px solid var(--gs-border,#D7DBE0); border-radius:8px; cursor:pointer; touch-action:manipulation; transition:border-color .12s, box-shadow .12s; }
  .gsms-toggle:focus{ outline:none; border-color:var(--gs-red,#D00000); box-shadow:0 0 0 2px rgba(208,0,0,0.12); }
  .gsms-label{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .gsms:not(.gsms-has-value) .gsms-label{ color:var(--gs-muted,#6B7280); }
  .gsms-caret{ flex:none; width:16px; height:16px; fill:none; stroke:var(--gs-muted,#6B7280); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s; }
  .gsms-open .gsms-caret{ transform:rotate(180deg); }
  .gsms-disabled{ opacity:.55; }
  .gsms-disabled .gsms-toggle{ cursor:not-allowed; }

  /* position:fixed (JS sets left/top/width from the toggle rect) so the menu escapes
     any ancestor overflow - modals (showMessage), the fixed-height tier panel, cards.
     High z-index to sit above modal chrome. Master.js repositions on scroll/resize. */
  .gsms-menu{ position:fixed; z-index:100000; display:none; flex-direction:column; box-sizing:border-box; padding:4px; background:var(--gs-card,#fff); border:0.5px solid var(--gs-border,#D7DBE0); border-radius:8px; box-shadow:0 10px 30px rgba(0,0,0,0.18); }
  .gsms-open .gsms-menu{ display:flex; }
  html[data-theme="dark"] .gsms-menu{ box-shadow:0 12px 34px rgba(0,0,0,0.55); }

  .gsms-search{ padding:2px 2px 5px; }
  .gsms-search-input{ width:100%; box-sizing:border-box; height:32px; padding:0 9px; font-family:inherit; font-size:13px; color:var(--gs-ink,#0F1117); background:var(--gs-input-bg,#FBFBFD); border:0.5px solid var(--gs-border,#D7DBE0); border-radius:6px; outline:none; touch-action:manipulation; }
  .gsms-search-input:focus{ border-color:var(--gs-red,#D00000); }

  .gsms-list{ list-style:none; margin:0; padding:0; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; scrollbar-width:thin; scrollbar-color:var(--gs-border,#D7DBE0) transparent; }
  .gsms-list::-webkit-scrollbar{ width:10px; }
  .gsms-list::-webkit-scrollbar-track{ background:transparent; }
  .gsms-list::-webkit-scrollbar-thumb{ background:var(--gs-border,#D7DBE0); border-radius:6px; border:2px solid var(--gs-card,#fff); }
  .gsms-list::-webkit-scrollbar-thumb:hover{ background:var(--gs-muted,#6B7280); }
  .gsms-opt{ display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:6px; cursor:pointer; color:var(--gs-ink,#0F1117); font-size:13px; touch-action:manipulation; }
  .gsms-opt:hover{ background:rgba(0,0,0,0.05); }
  html[data-theme="dark"] .gsms-opt:hover{ background:rgba(255,255,255,0.07); }
  .gsms-opt.gsms-active{ background:rgba(0,0,0,0.05); }
  html[data-theme="dark"] .gsms-opt.gsms-active{ background:rgba(255,255,255,0.07); }
  .gsms-opt.gsms-selected{ background:rgba(208,0,0,0.10); }
  html[data-theme="dark"] .gsms-opt.gsms-selected{ background:rgba(208,0,0,0.22); }
  .gsms-opt-text{ flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
  .gsms-check{ flex:none; width:16px; height:16px; opacity:0; }
  .gsms-opt.gsms-selected .gsms-check{ opacity:1; }
  .gsms-check svg{ display:block; width:16px; height:16px; fill:none; stroke:var(--gs-red,#D00000); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
  .gsms-opt-disabled{ opacity:.5; cursor:not-allowed; }
  /* the [hidden] attr (used by live-search) must beat .gsms-opt's display:flex */
  .gsms-opt[hidden], .gsms-noresults[hidden]{ display:none !important; }
  .gsms-noresults{ padding:8px 10px; color:var(--gs-muted,#6B7280); font-size:12.5px; }

  .gsms-footer{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:4px; padding:8px 10px 3px; border-top:1px solid var(--gs-border,#D7DBE0); }
  .gsms-single .gsms-footer{ display:none; }
  .gsms-count{ font-size:12px; font-weight:500; color:var(--gs-muted,#6B7280); white-space:nowrap; }
  .gsms-done{ display:inline-flex; align-items:center; justify-content:center; height:30px; padding:0 16px; flex:none; font-family:inherit; font-size:12px; font-weight:600; line-height:1; color:#fff; background:var(--gs-red,#D00000); border:0; border-radius:6px; cursor:pointer; transition:background .15s ease; }
  .gsms-done:hover{ background:var(--gs-red-dark,#A80000); }
  .gsms-done:active{ transform:translateY(1px); }
  .gsms-done:focus{ outline:none; box-shadow:0 0 0 2px rgba(208,0,0,.28); }

  /* ==========================================================================
   GSAutocomplete - type-ahead for a free-text <input> (JS: master.js GSAutocomplete).
   Menu is position:fixed, appended to <body>, so it floats above modals, never clipped.
   ========================================================================== */
  .gsac-menu{ position:fixed; z-index:100000; display:none; box-sizing:border-box; margin:0; padding:4px; list-style:none; max-height:280px; overflow-x:hidden; overflow-y:auto; background:var(--gs-card,#fff); border:0.5px solid var(--gs-border,#D7DBE0); border-radius:10px; box-shadow:0 10px 28px rgba(15,17,23,0.14); font-family:inherit; font-size:13px; scrollbar-width:thin; scrollbar-color:var(--gs-border,#D7DBE0) transparent; }
  .gsac-menu.gsac-open{ display:block; }
  html[data-theme="dark"] .gsac-menu{ box-shadow:0 12px 34px rgba(0,0,0,0.55); }
  .gsac-menu::-webkit-scrollbar{ width:10px; }
  .gsac-menu::-webkit-scrollbar-track{ background:transparent; }
  .gsac-menu::-webkit-scrollbar-thumb{ background:var(--gs-border,#D7DBE0); border-radius:6px; border:2px solid var(--gs-card,#fff); }
  .gsac-opt{ margin:0; padding:8px 12px; border:1px solid transparent; border-radius:7px; color:var(--gs-text-2,#3D434F); background:transparent; font-weight:500; line-height:1.4; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:background-color .12s ease, color .12s ease; }
  .gsac-opt:hover{ background:var(--gs-grey-bg,#EEF0F3); color:var(--gs-ink,#0F1117); }
  .gsac-opt.gsac-active{ background:var(--gs-red-tint,#FBEAEA); border-color:transparent; color:var(--gs-red,#D00000); }
  body.gs-page-aiscribe .record-btn{ background:var(--gs-red); color:#fff; border:none; border-radius:8px; 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:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; }
  body.gs-page-aiscribe .ais-btn-row .record-btn{ width:100%; justify-content:center; }
  body.gs-page-aiscribe .ais-or{ color:var(--gs-faint); font-size:13px; }
  /* Narrow / mobile (incl. the in-app webview, which is always phone-width): stack the record
     buttons full-width, equal size, with a centred OR between them. The inline grid row looks messy
     at that width (the "OR" clings to "Start Recording" and "Select File" drops onto its own line).
     Plain @media so mobile web gets it too, not only the embedded app. */
  @media (max-width:480px){
    body.gs-page-aiscribe .ais-btn-row{ display:flex; flex-direction:column; align-items:stretch; gap:10px; }
    body.gs-page-aiscribe .ais-btn-row .record-btn{ width:100%; justify-content:center; height:46px; font-size:15px; }
    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; }
  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; }
  /* Recording bar: broadcast-style REC pill (real DOM - canvas text looks cheap)
     + the shared segmented level meter on a slim canvas strip. The pill's black
     matches the Stop Recording button; the dot pulses with a sonar ring. */
  body.gs-page-aiscribe .ais-recbar{ display:flex; align-items:center; gap:14px; margin-top:16px; padding:10px 14px; border:0.5px solid var(--gs-border); background:var(--gs-card); border-radius:10px; }
  body.gs-page-aiscribe .ais-rec-pill{ display:inline-flex; align-items:center; gap:7px; height:28px; padding:0 12px; background:#12151B; border-radius:999px; flex-shrink:0; }
  body.gs-page-aiscribe .ais-rec-pill i{ width:6px; height:6px; border-radius:50%; background:#FF4D4D; animation:aisRecPulse 1.8s ease-in-out infinite; }
  body.gs-page-aiscribe .ais-rec-label{ font-size:10px; font-weight:700; letter-spacing:1.4px; color:#9AA1AC; }
  body.gs-page-aiscribe #recTimer{ font-size:12.5px; font-weight:600; color:#fff; font-variant-numeric:tabular-nums; letter-spacing:0.4px; }
  @keyframes aisRecPulse{ 0%,100%{ opacity:1; box-shadow:0 0 0 0 rgba(255,77,77,0.45); } 50%{ opacity:0.55; box-shadow:0 0 0 6px rgba(255,77,77,0); } }
  body.gs-page-aiscribe .ais-visualizer{ display:block; flex:1; min-width:0; width:auto; height:16px; margin:0; border:none; background:transparent; border-radius:0; }
  html[data-theme="dark"] body.gs-page-aiscribe .ais-recbar{ background:var(--gs-card); }
  html[data-theme="dark"] body.gs-page-aiscribe .ais-rec-pill{ background:#0B0E14; border:0.5px solid #2A3548; }
  /* ----- 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; 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; 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%; 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: standard running-man (runningMap.gif on legacy `.modal`, shown via
     `body.loading .modal`); kills the inline margin-top:30px, lifts above all, blocks pointer events ----- */
  /* (shared with gs-portal legacy pages below — same inline margin-top:30px bug on both) */
  body.gs-page-aiscribe.loading, body.gs-portal.loading{ overflow:hidden; pointer-events:none; }
  body.gs-page-aiscribe.loading .modal, body.gs-portal.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; }
  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; }
  /* Embedded in-app view (body.gs-embedded, added when userIsOnTheApp). The GoodSAM app draws its
     own native header around this webview, so hide the page's duplicate card title. Everything else
     is deliberately left alone: the page renders as the responsive website (same card, same grid,
     same padding) - that IS the one-look goal. Narrow-screen adaptations live in @media below. */
  body.gs-page-aiscribe.gs-embedded .ais-card-title{ display:none; }
  /* iOS auto-zooms a focused field with font-size < 16px - bump the form fields to 16px on narrow/
     mobile so tapping an input no longer zooms the page in. Plain @media (not embedded-only) so
     mobile web gets it too; the embedded webview additionally locks zoom via its viewport meta. */
  @media (max-width:480px){
    body.gs-page-aiscribe input,
    body.gs-page-aiscribe textarea,
    body.gs-page-aiscribe 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; }

/* =========================================================================
   Modern marketing SITE footer - .gs-mfooter (reusable: gsMarketingFooter.jspf;
   distinct from .gs-footer = dashboard fixed bottom mini-bar). Progressive
   enhancement: JS adds .js-accordion, no-JS = every panel open; @container gsftr.
   ========================================================================= */
.gs-mfooter{ background:#0f1117; color:#fff; container:gsftr / inline-size; font-family:'Inter'; -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; 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; 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; }
.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; }
}

/* GLOBAL FORM CONTROLS + BUTTONS: scope :where(body.gs-portal, body.gs-app) unions every UI page (zero specificity; master.css loads last so it wins over bootstrap/Unify).
   36px inputs + .btn-u align via local bootstrap's NON-important height - a CDN bootstrap forcing 40px !important would break input-vs-button alignment. */

:where(body.gs-portal, body.gs-app) .btn-u,
:where(body.gs-portal, body.gs-app) a.btn-u,
:where(body.gs-portal, body.gs-app) button.btn-u,
:where(body.gs-portal, body.gs-app) input.btn-u{
    display:inline-flex; align-items:center; justify-content:center; gap:7px;
    height:auto; min-height:36px; padding:8px 16px; border:1px solid var(--gs-red);
    border-radius:8px; background:var(--gs-red); color:#fff !important; font-size:13px;
    font-weight:600; line-height:1.2; text-decoration:none !important; cursor:pointer;
    box-shadow:none; transition:background .15s, border-color .15s, box-shadow .15s, transform .05s; box-sizing:border-box;
}
:where(body.gs-portal, body.gs-app) .btn-u:hover,
:where(body.gs-portal, body.gs-app) a.btn-u:hover,
:where(body.gs-portal, body.gs-app) button.btn-u:hover{ background:var(--gs-red-dark); border-color:var(--gs-red-dark); color:#fff !important; box-shadow:0 2px 8px rgba(208,0,0,0.18); text-decoration:none !important; transform:none; }
:where(body.gs-portal, body.gs-app) .btn-u:active{ transform:translateY(0.5px); }
:where(body.gs-portal, body.gs-app) .btn-u[disabled], :where(body.gs-portal, body.gs-app) .btn-u:disabled{ opacity:.5; cursor:not-allowed; }
:where(body.gs-portal, body.gs-app) .btn-u.gs-ghost{ background:var(--gs-card); color:var(--gs-text-2) !important; border-color:var(--gs-border); }
:where(body.gs-portal, body.gs-app) .btn-u.gs-ghost:hover{ background:var(--gs-grey-bg); color:var(--gs-ink) !important; border-color:var(--gs-muted); box-shadow:none; }
:where(body.gs-portal, body.gs-app) .btn-u.gs-big{ min-height:44px; padding:0 22px; font-size:14px; }

/* Inputs / selects / textareas: modern, token-based, dark-aware (height 36px comes
   from our local bootstrap.min.css now; this block owns colour/border/padding/radius) */
:where(body.gs-portal, body.gs-app) input[type="text"],
:where(body.gs-portal, body.gs-app) input[type="email"],
:where(body.gs-portal, body.gs-app) input[type="number"],
:where(body.gs-portal, body.gs-app) input[type="password"],
:where(body.gs-portal, body.gs-app) input[type="search"],
:where(body.gs-portal, body.gs-app) input[type="tel"],
:where(body.gs-portal, body.gs-app) input[type="url"],
:where(body.gs-portal, body.gs-app) input[type="date"],
:where(body.gs-portal, body.gs-app) input[type="datetime-local"],
:where(body.gs-portal, body.gs-app) select,
:where(body.gs-portal, body.gs-app) textarea,
:where(body.gs-portal, body.gs-app) .terms{
    background:var(--gs-input-bg); color:var(--gs-ink); border:1px solid var(--gs-border);
    border-radius:8px !important; padding:8px 11px; font-size:13px; font-family:inherit;
    box-shadow:none; box-sizing:border-box; transition:border-color .15s, box-shadow .15s, background .15s;
}
/* Fixed 36px height so text inputs/selects line up with the 36px .btn-u button
   (e.g. the search-bar input+Search pairs). Without an explicit height the input
   floats to its line-height and sits ~3px taller than the button. */
:where(body.gs-portal, body.gs-app) input[type="text"],
:where(body.gs-portal, body.gs-app) input[type="email"],
:where(body.gs-portal, body.gs-app) input[type="number"],
:where(body.gs-portal, body.gs-app) input[type="password"],
:where(body.gs-portal, body.gs-app) input[type="search"],
:where(body.gs-portal, body.gs-app) input[type="tel"],
:where(body.gs-portal, body.gs-app) input[type="url"],
:where(body.gs-portal, body.gs-app) input[type="date"],
:where(body.gs-portal, body.gs-app) input[type="datetime-local"],
:where(body.gs-portal, body.gs-app) select{ height:36px; line-height:1.2; }
:where(body.gs-portal, body.gs-app) textarea, :where(body.gs-portal, body.gs-app) .terms{ min-height:80px; line-height:1.5; }
/* Big-form pages: any page whose form uses the taller 44px hero button (.btn-u.gs-big -
   login, newPassword, regResponder, demoRequest) grows its text inputs + selects to 40px
   to match. Scoped via :has() so ONLY those pages are hit, never the 36px console UI. */
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="text"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="email"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="number"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="password"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="search"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="tel"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="url"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="date"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) input[type="datetime-local"],
:where(body.gs-portal, body.gs-app):has(.btn-u.gs-big) select{ height:40px; }
/* Focus ring on typed inputs only (NOT bare input:focus - that would glow every
   checkbox/radio now that this covers the whole UI). */
:where(body.gs-portal, body.gs-app) input[type="text"]:focus, :where(body.gs-portal, body.gs-app) input[type="email"]:focus, :where(body.gs-portal, body.gs-app) input[type="number"]:focus,
:where(body.gs-portal, body.gs-app) input[type="password"]:focus, :where(body.gs-portal, body.gs-app) input[type="search"]:focus, :where(body.gs-portal, body.gs-app) input[type="tel"]:focus,
:where(body.gs-portal, body.gs-app) input[type="url"]:focus, :where(body.gs-portal, body.gs-app) input[type="date"]:focus, :where(body.gs-portal, body.gs-app) input[type="datetime-local"]:focus,
:where(body.gs-portal, body.gs-app) select:focus, :where(body.gs-portal, body.gs-app) textarea:focus,
:where(body.gs-portal, body.gs-app) .terms:focus{ outline:none; border-color:var(--gs-red); background:var(--gs-card); box-shadow:0 0 0 3px var(--gs-red-tint); }
:where(body.gs-portal, body.gs-app) input::placeholder, :where(body.gs-portal, body.gs-app) textarea::placeholder{ color:var(--gs-faint); }
:where(body.gs-portal, body.gs-app) .red-border{ border:2px solid var(--gs-red) !important; box-shadow:0 0 0 3px var(--gs-red-tint) !important; }
:where(body.gs-portal, body.gs-app) input[type="checkbox"],
:where(body.gs-portal, body.gs-app) input[type="radio"]{
    -webkit-appearance:none; appearance:none;
    width:17px; height:17px; margin:0; flex:0 0 auto; box-sizing:border-box;
    vertical-align:middle; cursor:pointer; position:relative;
    background:var(--gs-input-bg); border:1px solid var(--gs-border);
    border-radius:5px; transition:background .12s, border-color .12s, box-shadow .12s;
}
:where(body.gs-portal, body.gs-app) input[type="radio"]{ border-radius:50%; }
:where(body.gs-portal, body.gs-app) input[type="checkbox"]:checked,
:where(body.gs-portal, body.gs-app) input[type="radio"]:checked{
    background-color:var(--gs-red); border-color:var(--gs-red);
}
:where(body.gs-portal, body.gs-app) input[type="checkbox"]:checked{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:center; background-size:12px 12px;
}
:where(body.gs-portal, body.gs-app) input[type="radio"]:checked{
    background-image:radial-gradient(circle at center, #fff 0 3px, transparent 3.5px);
}
:where(body.gs-portal, body.gs-app) input[type="checkbox"]:focus-visible,
:where(body.gs-portal, body.gs-app) input[type="radio"]:focus-visible{
    outline:none; border-color:var(--gs-red); box-shadow:0 0 0 3px var(--gs-red-tint);
}
:where(body.gs-portal, body.gs-app) input[type="checkbox"]:disabled,
:where(body.gs-portal, body.gs-app) input[type="radio"]:disabled{ opacity:.5; cursor:not-allowed; }
:where(body.gs-portal, body.gs-app) .gs-switch input[type="checkbox"]{
    -webkit-appearance:none; appearance:none;
    position:absolute; opacity:0; width:0; height:0; margin:0; border:0; background:none;
}

/* manageOrganisation2 page-specific rules. Shared table/pill/action styling = the recordings2 rules twinned with body.gs-page-manageorganisation2;
   the .btn-u + form-control restyles are now in the GLOBAL section above. */

/* Page canvas + container */
body.gs-page-manageorganisation2{ background:var(--gs-bg); color:var(--gs-ink); font-size:13px; line-height:1.6; }
body.gs-page-manageorganisation2 #mainContainer{ max-width:100%; width:100% !important; margin:0 auto !important; padding:8px 24px 48px !important; text-align:left; box-sizing:border-box; }  /* padding-top:8px so content clears the fixed topnav by 64px total (56px body + 8px), matching recordings2's .gs-page padding-top:64px - keeps the feedback banner at the same offset on both pages */
body.gs-page-manageorganisation2 #mainTab{ text-align:left; padding-top:18px; }
body.gs-page-manageorganisation2 #mainTab > .tab-pane[align="center"]{ text-align:left; }
body.gs-page-manageorganisation2 .gs-pagehead,
body.gs-page-manageorganisation2 #functionSelector{ margin-left:-24px; margin-right:-24px; }
body.gs-page-manageorganisation2 #functionSelector{ position:sticky; top:48px; z-index:80; border-bottom:1px solid var(--gs-border-light); }
/* Org picker: caption floats ABOVE the select so the select, BETA badge and theme toggle are a
   single centre-aligned row (a stacked caption made the whole picker a tall column that threw
   the select ~9px below the BETA/moon centre line). */
body.gs-page-manageorganisation2 .gs-ph-orgpick{ position:relative; display:inline-flex; align-items:center; }
body.gs-page-manageorganisation2 .gs-ph-orglabel{ position:absolute; left:2px; bottom:calc(100% + 4px); line-height:1; white-space:nowrap; font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--gs-faint); }
body.gs-page-manageorganisation2 .gs-ph-orgpick select{ height:34px !important; min-height:34px !important; padding-top:0 !important; padding-bottom:0 !important; min-width:190px; max-width:280px; margin:0; }
body.gs-page-manageorganisation2 hr{ border:0; border-top:1px solid var(--gs-border-light); margin:18px 0; }
body.gs-page-manageorganisation2 h1, body.gs-page-manageorganisation2 h2,
body.gs-page-manageorganisation2 h3, body.gs-page-manageorganisation2 h4,
body.gs-page-manageorganisation2 h5{ color:var(--gs-ink); }
body.gs-page-manageorganisation2 .tab-content{ border:0 !important; padding:0 !important; margin:0; }

/* Bootstrap-2 horizontal form scaffolding */
body.gs-page-manageorganisation2 .control-group{ margin-bottom:16px; }
body.gs-page-manageorganisation2 .control-label{ color:var(--gs-text-2); font-weight:600; font-size:12.5px; }
body.gs-page-manageorganisation2 .controls{ color:var(--gs-text-2); }
body.gs-page-manageorganisation2 .help-block, body.gs-page-manageorganisation2 .help-inline{ color:var(--gs-muted); font-size:12px; }

/* Tables: the full dataTable skin (chrome/thead/sort/rows/hover/pills/actions) is
   shared with the other console pages via the grouped rules above; the dataTables
   control chrome below is body.gs-app-scoped (shared with every console page). */

/* Legacy spacing utilities from style.css */
body.gs-page-manageorganisation2 .margin-bottom-20,
body.gs-page-manageorganisation2 .margin-bottom-30,
body.gs-page-manageorganisation2 .margin-bottom-40{ clear:both; }
body.gs-page-manageorganisation2 .margin-bottom-20{ margin-bottom:20px; }
body.gs-page-manageorganisation2 .margin-bottom-30{ margin-bottom:30px; }
body.gs-page-manageorganisation2 .margin-bottom-40{ margin-bottom:40px; }

/* GoodSAM running-man loader (portal pages that load master.css; shown while body.loading is set,
   toggled by manage.js). NO page-special-casing and NO Bootstrap-.modal clash: the markup is a
   plain veil <div id="gsmLoading"><span class="gsrm"></span></div>, and the coin is the canonical
   .gsrm - a 36px white coin with the animated run-cycle sprite.
   >>> KEEP IN SYNC with gsPublicSide.jspf's .gsrm (the public /v /m /l /a pages). The two blocks
   must stay byte-for-byte identical, with ONE allowed difference: gsPublicSide adds !important to
   border-radius for its embedded-webview context. Edit BOTH whenever you touch either. <<< */
#gsmLoading{ display:none; position:fixed; inset:0; z-index:100000; background:rgba(255,255,255,.72);
    align-items:center; justify-content:center; }
body.loading{ overflow:hidden; }
body.loading #gsmLoading{ display:flex; }
html[data-theme="dark"] body.loading #gsmLoading{ background:rgba(15,17,23,.66); }
.gsrm{ position:relative; box-sizing:border-box; display:block; flex:none; width:36px; height:36px;
    border-radius:50%; background:#fff; border:2px solid #e79a9a;
    box-shadow:0 4px 12px -4px rgba(15,17,23,.28), 0 0 0 1px rgba(15,17,23,.05); }
.gsrm::before{ content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
    width:26px; height:26px; background:url(/assets/img/gsRunner.png) 0 50%/calc(28 * 26px) 26px no-repeat;
    animation:gsRun 1.15s steps(28) infinite; }
.gsrm::after{ content:""; position:absolute; inset:-2px; border-radius:50%;
    background:conic-gradient(from 0deg,#D00000,rgba(208,0,0,0) 60%);
    -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 calc(100% - 1px));
    mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 calc(100% - 1px));
    animation:gsCoinSpin 1s linear infinite; }
@keyframes gsRun{ to{ background-position-x:calc(-28 * 26px); } }
@keyframes gsCoinSpin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .gsrm::before{ animation:none; background-position-x:calc(-14 * 26px); } .gsrm::after{ animation:none; } }

/* Dark-mode neutralisation of the few hard-coded inline colours in the JSP markup */
html[data-theme="dark"] body.gs-page-manageorganisation2 [style*="#f6f6f6"]{ background:var(--gs-card) !important; border:1px solid var(--gs-border-light); }
html[data-theme="dark"] body.gs-page-manageorganisation2 [style*="color: #333"],
html[data-theme="dark"] body.gs-page-manageorganisation2 [style*="color:#333"]{ color:var(--gs-red-dark) !important; }

/* c3 charts (Reporting): SVG text/axis default to dark ink -> retint for dark */
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3 text,
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3 .c3-axis .tick text{ fill:var(--gs-muted) !important; }
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3 path.domain,
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3 .c3-axis line,
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3 .tick line{ stroke:var(--gs-border) !important; }
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3-grid line{ stroke:var(--gs-border-light) !important; }
html[data-theme="dark"] body.gs-page-manageorganisation2 .c3-legend-item text{ fill:var(--gs-text-2) !important; }

/* ============================================================================
   Settings search ("jump to any setting"). A type-ahead injected by manage2.js
   right under the pagehead: user types free text, sees matching sections /
   sub-tabs / individual settings with a breadcrumb, and clicking one activates
   the right tabs and scrolls+flashes the control. Token-driven, dark-aware.
   ============================================================================ */
body.gs-page-manageorganisation2 .gs-mngsearch{ position:relative; z-index:90; max-width:560px; margin:16px 0 4px; }
body.gs-page-manageorganisation2 .gs-mngsearch-box{ display:flex; align-items:center; gap:10px; height:46px; padding:0 14px; background:var(--gs-card); border:1px solid var(--gs-border); border-radius:12px; box-shadow:0 1px 2px rgba(15,17,23,0.04); transition:border-color .15s, box-shadow .15s; }
body.gs-page-manageorganisation2 .gs-mngsearch-box.is-focus{ border-color:var(--gs-red); box-shadow:0 0 0 3px var(--gs-red-tint); }
body.gs-page-manageorganisation2 .gs-mngsearch-ic{ width:18px; height:18px; flex:none; color:var(--gs-faint); fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
body.gs-page-manageorganisation2 .gs-mngsearch-box.is-focus .gs-mngsearch-ic{ color:var(--gs-red); }
/* the input sits bare inside the box - override the page's bootstrap input skin */
body.gs-page-manageorganisation2 input#gsMngSearch,
body.gs-page-manageorganisation2 input#gsMngSearch:focus{ flex:1 1 auto; height:100%; min-width:0; border:0 !important; background:transparent !important; padding:0 !important; margin:0; font-size:14px; font-family:inherit; color:var(--gs-ink); border-radius:0 !important; box-shadow:none !important; outline:none !important; }
body.gs-page-manageorganisation2 input#gsMngSearch::placeholder{ color:var(--gs-faint); }
body.gs-page-manageorganisation2 .gs-mngsearch-kbd{ flex:none; display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 5px; border:1px solid var(--gs-border); border-radius:6px; background:var(--gs-grey-bg); color:var(--gs-faint); font-size:11px; font-weight:600; font-family:inherit; line-height:1; }
body.gs-page-manageorganisation2 .gs-mngsearch-clear{ flex:none; display:none; width:22px; height:22px; padding:0; border:0; border-radius:6px; background:transparent; color:var(--gs-muted); font-size:18px; line-height:1; cursor:pointer; }
body.gs-page-manageorganisation2 .gs-mngsearch-clear:hover{ background:var(--gs-grey-bg); color:var(--gs-ink); }
body.gs-page-manageorganisation2 .gs-mngsearch.has-text .gs-mngsearch-kbd{ display:none; }
body.gs-page-manageorganisation2 .gs-mngsearch.has-text .gs-mngsearch-clear{ display:inline-flex; }

body.gs-page-manageorganisation2 .gs-mngsearch-drop{ display:none; position:absolute; top:calc(100% + 7px); left:0; right:0; z-index:200; background:var(--gs-card); border:1px solid var(--gs-border); border-radius:12px; box-shadow:0 14px 38px -12px rgba(15,17,23,0.30), 0 2px 8px rgba(15,17,23,0.06); padding:6px; max-height:min(64vh,460px); overflow-y:auto; overscroll-behavior:contain; }
body.gs-page-manageorganisation2 .gs-mngsearch.open .gs-mngsearch-drop{ display:block; }
html[data-theme="dark"] body.gs-page-manageorganisation2 .gs-mngsearch-drop{ box-shadow:0 14px 40px -12px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4); }
body.gs-page-manageorganisation2 .gs-ms-item{ padding:9px 11px; border-radius:8px; cursor:pointer; }
body.gs-page-manageorganisation2 .gs-ms-item.active,
body.gs-page-manageorganisation2 .gs-ms-item:hover{ background:var(--gs-grey-bg); }
body.gs-page-manageorganisation2 .gs-ms-crumb{ display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-bottom:3px; font-size:11px; font-weight:600; letter-spacing:.01em; color:var(--gs-faint); }
body.gs-page-manageorganisation2 .gs-ms-sep{ opacity:.55; }
body.gs-page-manageorganisation2 .gs-ms-title{ font-size:13.5px; font-weight:600; color:var(--gs-ink); line-height:1.35; }
body.gs-page-manageorganisation2 .gs-ms-title mark{ background:var(--gs-red-tint); color:var(--gs-red-dark); border-radius:3px; padding:0 1px; font-weight:700; }
body.gs-page-manageorganisation2 .gs-ms-tag{ flex:none; margin-left:auto; padding:1px 7px; border-radius:999px; background:var(--gs-grey-bg); color:var(--gs-muted); font-size:9.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
body.gs-page-manageorganisation2 .gs-ms-empty{ padding:18px 12px; color:var(--gs-muted); font-size:13px; text-align:center; }
body.gs-page-manageorganisation2 .gs-ms-empty b{ color:var(--gs-text-2); }

/* target flash when the search jumps to a control (non-destructive ring) */
body.gs-page-manageorganisation2 .gs-ms-flash{ border-radius:8px; animation:gsMsFlash 2.3s ease; }
@keyframes gsMsFlash{ 0%,12%{ box-shadow:0 0 0 2px var(--gs-red), 0 0 0 6px var(--gs-red-tint); } 100%{ box-shadow:0 0 0 2px rgba(208,0,0,0), 0 0 0 6px rgba(208,0,0,0); } }
@media (prefers-reduced-motion:reduce){ body.gs-page-manageorganisation2 .gs-ms-flash{ animation:none; } }

@media (max-width:720px){
    body.gs-page-manageorganisation2 .gs-mngsearch{ max-width:100%; }
    body.gs-page-manageorganisation2 .gs-mngsearch-kbd{ display:none; }
}

/* ============================================================================
   Shared option cards (body.gs-app - use on ANY modern page: aiscribe, recordings2,
   kits, manageorganisation2). Primitives:
     .gs-optcard    - a settings card (chrome only; drop any label/control inside)
     .gs-toggleform - flex row: label on the left, a toggle on the right
     .gs-optrow     - turns a row of cards into a responsive equal-gap grid
   The on/off TOGGLE is the canonical shared .gs-switch component defined above
   (~L2738: <label class="gs-switch"><input type="checkbox"><span
   class="gs-switch-track"></span></label>) - do NOT redefine .gs-switch here.
   On manageOrganisation2, manage2.js is the ADAPTER: it wraps each legacy setting
   in a .gs-optcard and, for each "ON/OFF text input + Turn ON button", injects a
   canonical .gs-switch whose checkbox PROXIES the hidden button (click -> the real
   AJAX handler; a MutationObserver re-reads the value so it lands on the
   server-confirmed state). Other pages use the classes in their own markup.
   ============================================================================ */

/* ============================================================================
   MARKETING COMPONENTS (body.gs-mkt pages only)
   Shared rules hoisted verbatim from the marketing JSPs' inline <style>
   blocks (2026-07) - the pages' inline copies were deleted in the same
   change; a rule here must NOT also exist inline (master.css is the LAST
   stylesheet on these pages, so it would silently win every tie).
   Conventions:
     - Every selector is prefixed :where(body.gs-mkt) so it contributes zero
       extra specificity: a page-level rule of equal specificity loses only
       by source order, and any higher-specificity page rule still wins.
     - The !important flags are load-bearing against inline style=""
       ATTRIBUTES on the same elements (the pages inline their base styles
       and use rules only for :hover/@media states) - keep them.
     - Per-page density differences come in through --mkt-* custom
       properties (defaults in the var() fallbacks; overriding pages set
       them on body in their own <style> block): --mkt-section-pad-m,
       --mkt-hero-pad-m, --mkt-hero-h1-m.
     - @media order matters: the 900px block must stay ABOVE the 640px block
       (equal specificity + !important on both; at <=640 the later wins).
   ============================================================================ */

/* scroll-reveal (pages attach an IntersectionObserver that adds .visible) */
:where(body.gs-mkt) .fade-up{opacity:0;transform:translateY(30px);transition:all .6s cubic-bezier(.25,.46,.45,.94)}
:where(body.gs-mkt) .fade-up.visible{opacity:1;transform:translateY(0)}

/* dark product hero: CTA hovers + the pulsing badge dot */
:where(body.gs-mkt) .hero-btn:hover{transform:translateY(-2px)}
:where(body.gs-mkt) .hero-btn-red:hover{background:#a00000!important;box-shadow:0 8px 32px rgba(208,0,0,.4)!important}
:where(body.gs-mkt) .hero-btn-outline:hover{border-color:#fff!important;background:rgba(255,255,255,.08)!important}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}

/* "Integration & Administration" cards + dark feature list */
:where(body.gs-mkt) .int-card:hover{transform:translateY(-4px);box-shadow:0 4px 12px rgba(0,0,0,.08),0 16px 40px rgba(0,0,0,.1)}
:where(body.gs-mkt) .use-item:hover{background:rgba(255,255,255,.08)!important}

/* partner-logo marquee + video-thumbnail grid (oz/ukAndEu/usaAndCanada;
   pills and thumbs are built by the pages' own scripts, not static markup) */
:where(body.gs-mkt) .logo-track{display:flex;gap:48px;animation:scroll-left 60s linear infinite;width:max-content}
:where(body.gs-mkt) .logo-track:hover{animation-play-state:paused}
:where(body.gs-mkt) .logo-pill{display:flex;align-items:center;justify-content:center;height:52px;padding:0 20px;background:#fff;border-radius:8px;border:1px solid #e2e3ea;white-space:nowrap;font-size:12px;font-weight:600;color:#3a3d52;font-family:'Inter';flex-shrink:0;min-width:120px;gap:8px}
:where(body.gs-mkt) .vid-thumb{position:relative;border-radius:10px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.08);transition:all .35s cubic-bezier(.25,.46,.45,.94)}
:where(body.gs-mkt) .vid-thumb:hover{transform:translateY(-4px);box-shadow:0 4px 20px rgba(0,0,0,.15)}
:where(body.gs-mkt) .vid-thumb:hover img{transform:scale(1.04)}
:where(body.gs-mkt) .vid-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.2)}
:where(body.gs-mkt) .vid-play-btn{width:44px;height:44px;border-radius:50%;background:rgba(208,0,0,.9);display:flex;align-items:center;justify-content:center}
@keyframes scroll-left{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* responsive grid collapses - 900px block BEFORE 640px block (see header) */
@media(max-width:900px){
    :where(body.gs-mkt) .grid-3,
    :where(body.gs-mkt) .int-grid,
    :where(body.gs-mkt) .vid-grid{grid-template-columns:1fr 1fr!important}
}
@media(max-width:640px){
    :where(body.gs-mkt) .grid-3,
    :where(body.gs-mkt) .int-grid,
    :where(body.gs-mkt) .use-grid,
    :where(body.gs-mkt) .vid-grid{grid-template-columns:1fr!important}
    :where(body.gs-mkt) .section-wrap{padding:var(--mkt-section-pad-m,56px 20px)!important}
    :where(body.gs-mkt) .hero-wrap{padding:var(--mkt-hero-pad-m,60px 24px 72px)!important}
    :where(body.gs-mkt) .hero-h1{font-size:var(--mkt-hero-h1-m,32px)!important}
}

/* ==========================================================================
   GSPreview - image/PDF lightbox (master.js GSPreview). Replaces jQuery fancyBox.
   Deliberately dark in both themes (a lightbox is conventionally dark); only the
   accent (--gs-red) is tokenised, with a hex fallback so it works on any page.
   ========================================================================== */
html.gsp-lock{overflow:hidden!important;}
.gsp-overlay{position:fixed;inset:0;z-index:10060;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:60px 24px 24px;background:rgba(10,12,18,0.9);opacity:0;transition:opacity .18s ease;overscroll-behavior:contain;}
.gsp-overlay.gsp-visible{opacity:1;}
.gsp-toolbar{position:absolute;top:14px;right:16px;display:flex;gap:8px;z-index:2;}
.gsp-btn{width:38px;height:38px;display:flex;align-items:center;justify-content:center;padding:0;border:1px solid rgba(255,255,255,0.16);border-radius:9px;cursor:pointer;color:#fff;background:rgba(255,255,255,0.13);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition:background .15s;font-family:inherit;line-height:1;}
.gsp-btn:hover{background:var(--gs-red,#D00000);}
.gsp-btn:focus-visible{outline:2px solid #fff;outline-offset:2px;}
.gsp-close{font-size:26px;font-weight:300;}
.gsp-stage{position:relative;flex:1 1 auto;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.gsp-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;box-shadow:0 12px 40px rgba(0,0,0,0.55);transform-origin:center center;transition:transform .12s ease;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;touch-action:none;}
.gsp-overlay.gsp-loading .gsp-img{visibility:hidden;}
.gsp-frame{width:min(1100px,100%);height:100%;border:0;border-radius:6px;background:#fff;box-shadow:0 12px 40px rgba(0,0,0,0.55);}
.gsp-caption{flex:0 0 auto;max-width:min(900px,94%);text-align:center;color:#fff;font-size:13px;line-height:1.5;background:rgba(0,0,0,0.4);border-radius:8px;padding:8px 14px;}
.gsp-caption b{font-weight:600;}
.gsp-spinner{position:absolute;width:38px;height:38px;border-radius:50%;border:3px solid rgba(255,255,255,0.25);border-top-color:#fff;animation:gsp-spin .8s linear infinite;}
.gsp-overlay:not(.gsp-loading) .gsp-spinner{display:none;}
@keyframes gsp-spin{to{transform:rotate(360deg);}}
@media (max-width:640px){.gsp-overlay{padding:52px 10px 14px;}.gsp-btn{width:34px;height:34px;}.gsp-frame{width:100%;}}

/* ==========================================================================
   GS CURTAIN - the ONE collapsible-section ("curtain") component, platform-wide.
   Card-stack design: each section is a rounded card; the chevron sits in a round
   disc that fills GoodSAM red while the section is open. Replaces every bootstrap
   accordion (.accordion / .collapse / data-toggle) and the interim .gsm-fold.

   Markup (header is a real button - focusable, Enter/Space for free; type='button'
   so it never submits a surrounding form):

       <div class="gs-curtain">
           <button type='button' class="gs-curtain-h" aria-expanded="false">Title
               <span class="gs-curtain-chip" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M6 9l6 6 6-6"/></svg></span>
           </button>
           <div class="gs-curtain-b"><div class="gs-curtain-bi"><div class="gs-curtain-c">
               ...content...
           </div></div></div>
       </div>

   Open state = .gs-open on .gs-curtain (ship it in the markup + aria-expanded='true'
   for open-by-default sections). Toggling is a delegated listener in master.js -
   works for curtains injected into showMessage modals via innerHTML with zero init,
   and on data-gs-modal-only pages. Height animation is the grid-rows 0fr->1fr
   technique (same as .gs-mfooter); vertical padding lives on the INNER .gs-curtain-c
   so the clipped row really is 0px when closed. Child combinators (>) keep nested
   curtains independent. Tokens carry hex fallbacks so cards render correctly on
   legacy pages without a gs-app/gs-portal body class (e.g. manageOrganisation). */
.gs-curtain{ border:0.5px solid var(--gs-border,#D7DBE0); border-radius:12px; background:var(--gs-card,#FFFFFF); margin:8px 0; }
.gs-curtain-h{ display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; box-sizing:border-box; margin:0; padding:11px 14px; background:none; border:0; border-radius:12px; font-family:inherit; font-size:14px; font-weight:600; line-height:1.35; color:var(--gs-ink,#0F1117); text-align:left; cursor:pointer; user-select:none; -webkit-user-select:none; }
.gs-curtain-h:focus-visible{ outline:2px solid var(--gs-red,#D00000); outline-offset:-2px; }
.gs-curtain-chip{ flex:none; display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; background:var(--gs-grey-bg,#EEF0F3); transition:background .2s ease; }
.gs-curtain-chip svg{ width:15px; height:15px; fill:none; stroke:var(--gs-muted,#6B7280); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .25s ease, stroke .2s ease; }
.gs-curtain-h:hover .gs-curtain-chip{ background:var(--gs-border-light,#E8EAEE); }
.gs-curtain.gs-open > .gs-curtain-h .gs-curtain-chip,
.gs-curtain.gs-open > .gs-curtain-h:hover .gs-curtain-chip{ background:var(--gs-red,#D00000); }
.gs-curtain.gs-open > .gs-curtain-h .gs-curtain-chip svg{ stroke:#fff; transform:rotate(180deg); }
.gs-curtain-b{ display:grid; grid-template-rows:0fr; transition:grid-template-rows .25s ease; }
.gs-curtain.gs-open > .gs-curtain-b{ grid-template-rows:1fr; }
.gs-curtain-bi{ overflow:hidden; min-height:0; }
.gs-curtain-c{ padding:2px 14px 13px; font-size:13.5px; line-height:1.6; color:var(--gs-text,#3D434F); }
.gs-curtain-c a{ color:var(--gs-red,#D00000); font-weight:600; text-decoration:none; }
.gs-curtain-c a:hover{ text-decoration:underline; }
.gs-curtain-c p{ margin:0 0 10px; }
.gs-curtain-c p:last-child{ margin:0; }
.gs-curtain-c ul{ margin:8px 0; padding-left:20px; }
.gs-curtain-c li{ margin-bottom:4px; }
@media (prefers-reduced-motion: reduce){
    .gs-curtain-b, .gs-curtain-chip, .gs-curtain-chip svg{ transition:none !important; }
}
