/* SHS's own styles: the brand, from shshandlingsolutions.com (Andy, 2026-10-15) - red #E30613 for what you press,
   black, white, and their light greys. The controls themselves (buttons, pills, dialogs, the avatar) are the platform's
   (platform/account.css), coloured by the variables set here. */

:root {
    --shs-red: #E30613;
    --shs-red-dark: #b8050f;
    --shs-black: #1d1d1b;
    --shs-grey-dark: #333333;   /* their site's dark band */
    --shs-grey: #DEDEDE;
    --shs-grey-light: #F3F2F2;
    --shs-text: #212529;

    --sp-primary: var(--shs-red);
    --sp-primary-hover: var(--shs-red-dark);
    --sp-ink: var(--shs-black);
    --sp-line: var(--shs-grey);
    --sp-soft: var(--shs-grey-light);
    --sp-tab-off: #e4e4e4;      /* a closed tab: a step darker than the page */
    --sp-focus: var(--shs-red);

    --bs-link-color-rgb: 184, 5, 15;
    --bs-link-hover-color-rgb: 140, 4, 12;
}

html, body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
body { margin: 0; background: #fff; color: var(--shs-text); }

h1:focus { outline: none; }

/* Bootstrap's buttons, on the screens that still use them, look like the platform's command buttons in SHS colours. */
.btn { border-radius: 4px; }
.btn-primary {
    --bs-btn-bg: var(--shs-red); --bs-btn-border-color: var(--shs-red);
    --bs-btn-hover-bg: var(--shs-red-dark); --bs-btn-hover-border-color: var(--shs-red-dark);
    --bs-btn-active-bg: #9c040d; --bs-btn-active-border-color: #9c040d;
    --bs-btn-disabled-bg: var(--shs-red); --bs-btn-disabled-border-color: var(--shs-red);
    --bs-btn-focus-shadow-rgb: 227, 6, 19;
    font-weight: 600;
}
.btn-outline-primary {
    --bs-btn-color: var(--shs-red); --bs-btn-border-color: var(--shs-red);
    --bs-btn-hover-bg: var(--shs-red); --bs-btn-hover-border-color: var(--shs-red); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--shs-red-dark); --bs-btn-active-border-color: var(--shs-red-dark);
}
.btn-outline-secondary {
    --bs-btn-color: #222; --bs-btn-border-color: #c8c8c8; --bs-btn-bg: #fff;
    --bs-btn-hover-bg: #f0f0f0; --bs-btn-hover-color: #222; --bs-btn-hover-border-color: #c8c8c8;
    --bs-btn-active-bg: #e6e6e6; --bs-btn-active-color: #222; --bs-btn-active-border-color: #bdbdbd;
}
.form-control:focus, .form-select:focus { border-color: var(--shs-red); box-shadow: 0 0 0 .2rem rgba(227, 6, 19, .15); }
/* An unticked radio or box stands out against white (Andy, 2026-11-04: Bootstrap's pale grey was hard to see). */
.form-check-input { border-color: #8a9099; }
.form-check-input:checked { background-color: var(--shs-red); border-color: var(--shs-red); }
.form-check-input:focus { border-color: var(--shs-red); box-shadow: 0 0 0 .2rem rgba(227, 6, 19, .15); }

/* ---- SHS's Sales data tabs (Sales teams, Sales years, Sales targets; Steven's layout, 2026-10-17) ---- */
/* The bar above a tab's table: filters on the left, the main action on the right. */
.tab-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px; }
.tab-bar > .cmd-btn-primary:last-child { margin-left: auto; }
.tab-bar-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; margin: 0; }
.tab-bar-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--sp-ink); margin: 0; }
.tab-bar-field .edit-input { width: auto; min-width: 100px; }
.sp-grid .num, .edit-input.num { text-align: right; font-variant-numeric: tabular-nums; }
.sp-grid tfoot th { background: var(--sp-soft); border-top: 1px solid #ced4da; padding: 9px 12px; }
.sw { display: inline-flex; align-items: center; gap: 8px; padding-left: 2.5em; }
/* Sales targets: twelve months across - scrolls sideways on a narrow screen rather than squashing. */
.table-scroll { overflow-x: auto; }
.targets-grid td, .targets-grid th { white-space: nowrap; }
.target-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.target-total { text-align: right; font-size: 14px; margin: 4px 0 8px; }
/* Sales years: a header - the year, then Add and Delete beside it (Andy, 2026-10-17) - over the months beside the
   non-working days. */
.year-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding-bottom: 14px; margin-bottom: 16px;
    border-bottom: 1px solid var(--sp-line); }
.year-head-label { font-size: 1.1rem; font-weight: 600; color: var(--sp-ink); }
.year-head-pick { width: auto; min-width: 110px; font-size: 1.1rem; font-weight: 600; padding: 4px 10px; }
.year-head .cmd-btn:first-of-type { margin-left: 6px; }
/* The two columns are the same height - the months' - and both headings take the same room, so the tables line up. */
.wd-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: stretch; }
.wd-cols > section > .acct-h, .wd-head { display: flex; align-items: center; gap: 12px; height: 34px; margin: 0 0 6px; }
.wd-head .acct-h { margin: 0; }
/* THE NON-WORKING DAYS END WHERE THE MONTHS END (Andy, 2026-10-17): the list sits in a box laid over the column's free
   space (absolutely, so its own length never makes the row taller) and scrolls inside it, headings kept in view. */
.wd-days { display: flex; flex-direction: column; min-height: 0; }
.wd-scroll-wrap { position: relative; flex: 1; min-height: 240px; }
.wd-scroll { position: absolute; inset: 0; overflow-y: auto; border: 1px solid #ced4da; background: #fff; }
.wd-scroll .sp-grid { border: 0; }
.wd-scroll thead th { position: sticky; top: 0; z-index: 1; }
.wd-type { width: auto; min-width: 140px; padding: 3px 8px; }
.wd-fixed { display: inline-block; padding: 3px 8px; color: #555; }
/* ---- Orders: Order enquiry, Credit enquiry, Sales by team ---- */
/* The dates (or year and month), Refresh and a note; Export at the right. */
.tab-bar > .cmd-btn-primary.enq-refresh { margin-left: 0; }
.tab-bar-field > label { margin: 0; }
.date-box { width: 150px; }
.wd-date { width: 180px; }
.enq-note { font-size: 12.5px; }
/* Export to Excel: the spreadsheet icon and the words (ExcelButton); at the right of a bar. */
.excel-btn { display: inline-flex; align-items: center; gap: 6px; }
.tab-bar > .excel-btn { margin-left: auto; }
.export-only { display: none; }
.enq-grid { font-size: 13px; }
/* ONE BAR ABOVE THE GRID (Andy, 2026-10-18): the search on the left - DevExpress puts it on the right - and Export to
   Excel (the grid's toolbar, which DevExpress puts on a row of its own) laid over the same bar at the right. A grid
   without a search keeps the toolbar as its own bar. */
.enq-grid { position: relative; }
.enq-grid > .dxbl-grid-top-panel { align-self: stretch; }
.enq-grid > .dxbl-grid-top-panel > .dxbl-grid-search-box-container { margin-left: 0; }
.enq-grid > .dxbl-grid-toolbar-container { display: flex; justify-content: flex-end; }
.enq-grid:has(> .dxbl-grid-top-panel) > .dxbl-grid-toolbar-container { position: absolute; top: 0; right: 0; width: auto; border: 0; z-index: 1; }
/* THE GRID SCROLLS ITSELF (Andy, 2026-10-17): the tab fills the pane, and the grid fills what the bar above leaves -
   its own rows scroll, so the headings, the totals footer and the pager are always in view. */
.sp-settings > .sp-tab-body > .enq { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.enq > * { flex: none; }
.enq > .enq-grid { flex: 1 1 auto; min-height: 240px; }
/* A count to press, for a team's orders or credits. */
.enq-link { border: 0; background: none; padding: 0; color: var(--shs-red-dark); font-weight: 600; text-decoration: underline; cursor: pointer; }
.enq-link:hover { color: var(--shs-red); }
/* The team's orders or credits in a dialog: a fixed height, the grid scrolling inside it. */
.enq-dlg { height: 62vh; display: flex; flex-direction: column; }
.enq-dlg > .enq-grid { flex: 1 1 auto; min-height: 0; }
/* System settings → Odoo: what to pull, from when, and the button, on one line. */
.od-pull { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 14px; }
.od-pull .form-field { margin-bottom: 0; }
.od-pull .edit-input { width: auto; min-width: 170px; }
/* One column on a narrow window: the list gets a height of its own. */
@media (max-width: 1100px) { .wd-cols { grid-template-columns: 1fr; } .wd-scroll-wrap { height: 420px; flex: none; } }
/* ---- TV dashboards (Today, Month and Year Sales; Steven's Hoopla replica spec, 2026-10-19) ---- */
/* The page fills the content area: the dashboard buttons, when the figures are from and Full screen, over the stage. */
.dash-page { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-bar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.dash-error { font-size: 13px; color: var(--shs-red-dark); font-weight: 600; }
.dash-fs { margin-left: auto; }
.dash-screen { flex: 1; min-height: 0; border-radius: 4px; overflow: hidden; }
/* Today / Month / Year: one set of joined buttons, the chosen one filled. */
.dash-pick { display: inline-flex; border: 1px solid #c8c8c8; border-radius: 4px; overflow: hidden; background: #fff; }
.dash-pick a { padding: 5px 14px; font-size: 13.5px; font-weight: 600; color: #333; text-decoration: none; border-left: 1px solid #c8c8c8; }
.dash-pick a:first-child { border-left: 0; }
.dash-pick a:hover { background: #f0f0f0; color: #222; }
.dash-pick a.active { background: var(--shs-red); color: #fff; }
/* TV → Broadcasts: fields in pairs; the merge-field chips under the message; the history's heading; the preview
   at 16:9. */
.nf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: end; }
.nf-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; align-items: end; }
.nf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; }
.nf-on { margin-bottom: 12px; }
.nf-help { margin: -6px 0 12px; }
.nf-chosen { margin: 6px 0 0 24px; }
.nf-preview { aspect-ratio: 16 / 9; width: 100%; background: #000; }
/* A rule's transitions and backgrounds (ClipPicker): what's ticked as chips, and Choose... */
.ep { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ep-chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; align-items: center; }
.ep-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 12px; background: #eef1f6; border: 1px solid #d6dce6; font-size: 12.5px; }
.ep-chip-x { border: 0; background: transparent; color: #8a8f9a; font-size: 11px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.ep-chip-x:hover { color: #222; }
/* ...and its dialog: filters, the library as tiles, the stage. */
.epd { display: grid; grid-template-columns: 190px 1fr 380px; gap: 16px; height: min(66vh, 640px); }
.epd-side { display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.epd-side .edit-input { margin-bottom: 8px; }
.epd-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8a8f9a; margin: 10px 0 4px; }
.epd-filter { display: flex; justify-content: space-between; border: 0; background: transparent; text-align: left; padding: 4px 8px; border-radius: 5px; font-size: 13px; color: inherit; }
.epd-filter:hover { background: #f4f6f9; }
.epd-filter.on { background: #e3e9f3; font-weight: 600; }
.epd-n { color: #8a8f9a; font-weight: 400; }
/* Rows at the tiles' own height: left to auto, a list long enough to scroll squashed them to fit, cutting off the selection boxes. */
.epd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: max-content; gap: 12px; align-content: start; overflow: auto; padding: 2px; }
.epd-tile { border: 1px solid #d6dce6; border-radius: 8px; overflow: hidden; background: #fff; }
.epd-tile.ticked { border-color: #2f6fd0; box-shadow: 0 0 0 1px #2f6fd0; }
.epd-tile.focus .epd-thumb { outline: 3px solid #f2b705; outline-offset: -3px; }
.epd-thumb { position: relative; aspect-ratio: 16 / 9; background: #141a24; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.epd-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Under the mouse, a play button: a click plays it on the stage. */
.epd-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.epd-thumb:hover .epd-play { opacity: 1; }
.epd-thumb-extra { background: #3b4658; color: #fff; font-size: 13px; padding: 8px; text-align: center; }
.epd-drawn { color: #f2d36b; font-weight: 600; font-size: 14px; padding: 8px; text-align: center; }
.epd-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.epd-cap { display: flex; gap: 6px; align-items: center; padding: 6px 8px 2px; margin: 0; cursor: pointer; font-size: 13px; }
.epd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epd-cats { padding: 0 8px 6px 28px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epd-tile:not(:has(.epd-cats)) .epd-cap { padding-bottom: 6px; }
.epd-preview { display: flex; flex-direction: column; gap: 8px; }
.epd-now { display: flex; flex-direction: column; gap: 2px; }
.epd-now-row { display: flex; align-items: center; gap: 8px; }
.epd-now-cap { flex: 1; min-width: 0; padding: 0; font-size: 14px; }
.epd-now-sub { padding-left: 22px; }
/* TV → Clips: the library. A hidden clip is greyed. */
.fx-search { max-width: 200px; }
.fx-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fx-hidden td:not(.u-actions):not(:first-child) { opacity: .55; }
/* TV → Channels: the edit dialog's headings, the slides table's boxes, and Add slide under it. */
.ch-h { font-size: 15px; font-weight: 700; color: var(--sp-ink); margin: 14px 0 8px; }
.ch-slides .edit-input { padding: 3px 8px; }
.ch-add { margin: 8px 0 4px; }
/* A leaderboard's insights (on the dashboard since 2026-11-04): one line each - name, Icon tick, Panel tick (2026-11-03). */
.ch-insights-ticks { display: grid; grid-template-columns: auto 44px 44px; justify-content: start; align-items: center; gap: 2px 6px; white-space: nowrap; font-size: 13px; }
.ch-insights-ticks input { margin: 0; }
.ch-ins-h { font-size: 11px; color: var(--muted, #6c757d); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.ch-ins-c { text-align: center; }
/* A slide's insights on or off; the info button opens what its dashboard plays (Andy, 2026-11-04). */
.ch-ins-on { position: relative; display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.ch-info-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0;
    border-radius: 50%; background: none; color: #6b7585; cursor: pointer; }
.ch-info-btn:hover, .ch-info-btn.on { background: #eef1f6; color: var(--sp-ink); }
.ch-info-btn:focus-visible { outline: 2px solid var(--sp-focus); outline-offset: 1px; }
.ch-info-shade { position: fixed; inset: 0; z-index: 20; }
/* max-width: none - .cp-pop's 100% (later in the file, so this is .cp-pop.ch-info-pop to win) would squeeze it to the cell. */
.cp-pop.ch-info-pop { position: absolute; top: 100%; right: -8px; z-index: 21; width: 300px; max-width: none; white-space: normal; text-align: left; }
.ch-info-body { padding: 10px 14px 12px; font-size: 13px; }
.ch-info-grid { display: grid; grid-template-columns: 1fr 52px 52px; align-items: center; row-gap: 4px; margin-bottom: 10px; }
.ch-info-mark { text-align: center; }
.ch-info-yes { color: #1a8a3a; font-weight: 700; }
.ch-info-no { color: #a0a7b2; }
.ch-info-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; padding-top: 10px; border-top: 1px solid #e3e7ee; }
.ch-info-dl:empty { display: none; }
.ch-info-dl dt { font-weight: 600; color: var(--sp-ink); }
.ch-info-dl dd { margin: 0; }
.ch-pause { font-size: 13px; margin-top: 10px; }
.ch-pause .form-check { margin-bottom: 6px; }
.ch-pause-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ch-pause-row .edit-input { width: 64px; padding: 3px 8px; }
.ch-which { margin: 0 0 8px; padding: 0; border: 0; }
.ch-which .form-check { margin-bottom: 4px; }
.ch-rules { margin: 4px 0 6px 26px; }
.ch-legend { font-size: 13px; font-weight: 600; color: var(--sp-ink); margin-bottom: 4px; }

/* A TV nobody is watching over (js/tv-watchdog.js): no "reconnecting" box, it keeps showing what it has and recovers itself. */
html.tv-unattended #components-reconnect-modal { display: none !important; }

/* Sales data → Sales teams: the team's photo beside its name, and choosing one in Edit. */
.team-name-cell { display: inline-flex; align-items: center; gap: 10px; }
.team-photo-pick { display: flex; align-items: center; gap: 16px; padding: 4px 2px; }
.team-photo-cmds { display: flex; flex-wrap: wrap; gap: 8px; }

/* Money typed into a DevExpress spin edit: right-aligned, as figures are everywhere else. */
.money-edit input { text-align: right; font-variant-numeric: tabular-nums; }
/* A clip's categories (CategoryPicker), as Standpoint CRM's card labels: pills, + for a list to tick, and create. The list
   opens in place, under the pills, not floating: in a dialog a floating one is cut off by the dialog's edge. */
.cp { position: relative; margin-bottom: 14px; }
.cp-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; }
.cp-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; padding: 5px 8px 5px 10px; border-radius: 5px; background: #e8eefb; color: #1d3a7a; }
.cp-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 14px; line-height: 1; opacity: .7; }
.cp-x:hover { opacity: 1; }
.cp-plus { width: 30px; height: 30px; border-radius: 6px; border: 0; background: #eef1f6; color: #44506a; cursor: pointer; padding: 0; font-size: 18px; line-height: 1; }
.cp-plus:hover, .cp-plus.on { background: #e2e7ef; }
.cp-pop { margin-top: 6px; width: 320px; max-width: 100%; background: #fff; border: 1px solid #d5dbe5; border-radius: 10px;
    box-shadow: 0 4px 12px rgba(1, 29, 83, .10); }
.cp-pop-h { display: flex; align-items: center; padding: 6px 6px 6px 14px; border-bottom: 1px solid #e3e7ee; font-size: 13.5px; }
.cp-pop-h b { flex: 1; }
.cp-close { width: 28px; height: 28px; border: 0; background: none; font-size: 18px; color: #555; cursor: pointer; border-radius: 6px; }
.cp-close:hover { background: #f4f6fa; }
.cp-pop-body { padding: 8px; max-height: 220px; overflow-y: auto; }
.cp-find { width: 100%; margin-bottom: 6px; }
.cp-opt { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font: inherit; text-align: left; }
.cp-opt:hover { background: #f4f6fa; }
.cp-opt-name { flex: 1; font-size: 14px; }
.cp-tick { width: 18px; color: #1d3a7a; font-weight: 700; text-align: center; }
.cp-new { color: #1d3a7a; font-weight: 600; }
.cp-none { padding: 6px 8px; }

/* A channel's accent colour (TV → Channels, Dark and Light): the swatches, and one of your own. */
.ch-accents { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ch-swatch.on { border-color: var(--sp-ink); box-shadow: inset 0 0 0 2px #fff; }
.ch-swatch-own { width: 34px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }

/* THE TV THEMES' COLOURS (Core.Channels.ChannelThemes; Andy, 2026-11-04). Dark and Light share their shapes (th-soft, in each
   slide's styles) and differ only here; the player sets --accent and --panel-a from the channel. Panels are r, g, b so a
   slide can give them the channel's opacity: rgba(var(--panel), var(--panel-a)). */
.th-soft { --accent: #E30613; --panel-a: .9;
    --panel: 29, 29, 27; --card: 51, 51, 51; --band: #4a4a4a; --row: #333; --line: #555; --track: #555; --track-edge: #777;
    --ink: #fff; --ink-2: rgba(255, 255, 255, .85); --ink-3: rgba(255, 255, 255, .65);
    --gold: #f2c230; --lit-bg: #fff; --lit-fade: rgba(255, 255, 255, .75); --lit-ink: #333; }
.th-light {
    --panel: 250, 250, 248; --card: 255, 255, 255; --band: #dddcd8; --row: #ebebe8; --line: #c8c8c4; --track: #d6d6d2; --track-edge: #b4b4b0;
    --ink: #1d1d1b; --ink-2: #3d3d3a; --ink-3: #5f5e5a;
    --gold: #a87b00; --lit-bg: #1d1d1b; --lit-fade: rgba(29, 29, 27, .8); --lit-ink: #fff; }
