/* =====================================================================
   App-wide redesign (RSPH-301)
   The look approved on the Workflow tab mockup (public/mockups/phases-tab.html), applied to the
   whole staff app: every page, menu and submenu, and the sidebar.

   Loaded LAST (see assets/app.js), so these rules win on order rather than by out-shouting
   app.css with specificity. Everything is scoped to `.shell`, the staff app's frame, so the
   customer portal, insurer portal, marketing and legal pages are untouched.

   The rules of the look:
     - Dark theme surfaces are true black (already set in app.css).
     - Anything that already carries a colour glows in that colour — DARK THEME ONLY. Light keeps
       the coloured outlines, icons and pills with no glow (glows go muddy on a pale page).
     - Neutral buttons keep neutral words; their icons are coloured by meaning.
     - A hover brightens a glow; nothing new appears on hover.
     - Pulsing is switched off under prefers-reduced-motion.

   TO REVERSE: remove the import from assets/app.js. Nothing else depends on this file except the
   classes it introduces (see the "New components" section), which fall back to plain buttons.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
.shell {
    /* Glow colours: the app's own accent hues. */
    --gl-hi: var(--rs-accent);          /* hi-vis green: primary, back, live, running */
    --gl-blue: var(--rs-blue);        /* secondary-button blue */
    --gl-cyan: var(--rs-cyan);        /* claim cyan / hero */
    --gl-red: #e5341f;         /* danger / alert fill */
    --gl-amber: #f6b93b;       /* waiting amber */
    --gl-orange: #f5892a;      /* reset orange */
    --gl-gold: #ffd166;        /* Priority Vehicle gold */
    --gl-violet: #9b6dff;      /* violet flag */
    --gl-pink: #f27ac0;        /* specialist pink */

    /* Icon colours by meaning (neutral buttons keep neutral words, their icons carry the colour). */
    --ic-flag: #b07d00;
    --ic-team: #0a84c6;
    --ic-pin: var(--rs-accent-ink);
    --ic-doc: #1d6fa5;
    --ic-bars: #6d28d9;
    --ic-calendar: var(--rs-amber-ink);
    --ic-clipboard: var(--rs-accent-ink);
    --ic-car: #1d6fa5;
    --ic-undo: #6b7280;

    /* Outline buttons introduced by the redesign. */
    --ol-split: var(--rs-blue-action);
    --ol-complete: var(--rs-green-deep);

    /* The slim thickness of the header progress bars (Workflow strip and card heads). */
    --bar-h: 3px;
}
[data-bs-theme="dark"] .shell {
    --ic-flag: #ffd166;
    --ic-team: #19b6ff;
    --ic-pin: var(--rs-accent);
    --ic-doc: #4aa3ff;
    --ic-bars: #b266ff;
    --ic-calendar: #f6b93b;
    --ic-clipboard: #19e3a0;
    --ic-car: #4aa3ff;
    --ic-undo: #c4cdda;

    --ol-split: #4dc3ff;
    --ol-complete: #2bffa4;
}

/* The glows are written out in each rule (a custom property holding var(--g) would be resolved on .shell,
   where --g is unset, and come out empty). Each rule sets --g, its own colour, on the element itself. */

/* ---------------------------------------------------------------------
   2. Buttons
   Filled coloured buttons glow in their fill; outlined coloured buttons glow on the line and
   the words. Ghost (neutral) buttons stay flat. Buttons inside dialogs follow the same rules.
   --------------------------------------------------------------------- */
[data-bs-theme="dark"] .shell .btn { transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.2s ease, transform 0.04s ease; }
[data-bs-theme="dark"] .shell .btn--primary { --g: var(--gl-hi); }
[data-bs-theme="dark"] .shell .btn--secondary { --g: var(--gl-blue); }
[data-bs-theme="dark"] .shell :is(.btn--claim, .btn--import) { --g: var(--gl-blue); }
[data-bs-theme="dark"] .shell .btn--alert { --g: var(--gl-amber); }
[data-bs-theme="dark"] .shell :is(.btn--primary, .btn--secondary, .btn--claim, .btn--import, .btn--alert):not(:disabled):not(.btn--waiting) {
    box-shadow: 0 0 14px -2px color-mix(in srgb, var(--g) 75%, transparent), 0 0 30px -8px var(--g);
}
[data-bs-theme="dark"] .shell :is(.btn--primary, .btn--secondary, .btn--claim, .btn--import, .btn--alert):not(:disabled):not(.btn--waiting):hover {
    box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), 0 0 40px -6px var(--g);
}
/* Danger is an outlined red on dark (app.css); Outline is the drawn blue. Both glow on the line. */
[data-bs-theme="dark"] .shell .btn--danger { --g: #ff5a4c; }
[data-bs-theme="dark"] .shell :is(.btn--outline, .btn--road) { --g: var(--gl-blue); }
[data-bs-theme="dark"] .btn--yes { --g: var(--gl-hi); }
[data-bs-theme="dark"] .shell :is(.btn--danger, .btn--outline, .btn--road, .btn--yes):not(:disabled) {
    box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g);
    text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent);
}
[data-bs-theme="dark"] .shell :is(.btn--danger, .btn--outline, .btn--road, .btn--yes):not(:disabled):hover { box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 12px -4px var(--g); }
/* The day card's Customer Confirmed split control glows once, round the whole control, not round its button half. */
[data-bs-theme="dark"] .shell .bk-daycard__confirm { --g: var(--gl-blue); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g); }
[data-bs-theme="dark"] .shell .bk-daycard__confirm:hover { box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 12px -4px var(--g); }
[data-bs-theme="dark"] .shell .bk-daycard__confirm .btn--outline:not(:disabled),
[data-bs-theme="dark"] .shell .bk-daycard__confirm .btn--outline:not(:disabled):hover { box-shadow: none; }
/* Back and Reset are neutral buttons now (they were green and orange) and keep the glow they had, in white: soft, so they stay quieter than
   the coloured buttons beside them. Other ghost buttons stay flat; only their icons take colour (section 4). */
[data-bs-theme="dark"] .shell :is(.btn--back, .btn--reset):not(:disabled) { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 9px 0 rgba(255, 255, 255, 0.2); }
[data-bs-theme="dark"] .shell :is(.btn--back, .btn--reset):not(:disabled):hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 14px 1px rgba(255, 255, 255, 0.32); }

/* ---------------------------------------------------------------------
   3. Pills, flags and badges
   --------------------------------------------------------------------- */
/* Flags already glow faintly on dark (app.css); lift them to the job-header recipe. */
[data-bs-theme="dark"] .shell .badge-flag:is(.badge-flag--green, .badge-flag--ok, .badge-flag--authorised, .badge-flag--active) { --g: var(--pill-good); }
[data-bs-theme="dark"] .shell .badge-flag:is(.badge-flag--amber, .badge-flag--credit, .badge-flag--pending, .badge-flag--warning, .badge-flag--orange) { --g: var(--pill-wait); }
[data-bs-theme="dark"] .shell .badge-flag:is(.badge-flag--red, .badge-flag--stop, .badge-flag--declined, .badge-flag--danger) { --g: var(--pill-bad); }
[data-bs-theme="dark"] .shell .badge-flag--blue { --g: var(--pill-info); }
[data-bs-theme="dark"] .shell .badge-flag--violet { --g: var(--pill-violet); }
[data-bs-theme="dark"] .shell .badge-flag--specialist { --g: var(--pill-pink); }
/* Parts cockpit statuses: the glow follows the colour the status now wears, not its old RAG class. */
[data-bs-theme="dark"] .shell .badge-flag.badge-flag--ordered { --g: var(--pill-info); }
[data-bs-theme="dark"] .shell .badge-flag.badge-flag--received { --g: var(--pill-good); }
[data-bs-theme="dark"] .shell .badge-flag.badge-flag--to-order, [data-bs-theme="dark"] .shell .badge-flag.badge-flag--back-order { --g: var(--pill-bad); }
[data-bs-theme="dark"] .shell .badge-flag:is(.badge-flag--green, .badge-flag--ok, .badge-flag--authorised, .badge-flag--active, .badge-flag--amber, .badge-flag--credit, .badge-flag--pending, .badge-flag--warning, .badge-flag--red, .badge-flag--stop, .badge-flag--declined, .badge-flag--danger, .badge-flag--orange, .badge-flag--blue, .badge-flag--violet, .badge-flag--specialist) {
    box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g);
    text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent);
}

/* Status pills on dark: the job header's tinted chip (tone fill, tone line, tone words) with the
   glow, instead of a solid block. Neutral stays quiet. */
[data-bs-theme="dark"] .shell .status-pill--green { --g: var(--pill-good); }
[data-bs-theme="dark"] .shell .status-pill--amber { --g: var(--pill-wait); }
[data-bs-theme="dark"] .shell .status-pill--red { --g: var(--pill-bad); }
[data-bs-theme="dark"] .shell .status-pill--blue { --g: var(--pill-info); }
[data-bs-theme="dark"] .shell .status-pill:is(.status-pill--green, .status-pill--amber, .status-pill--red, .status-pill--blue) {
    background: color-mix(in srgb, var(--g) 14%, #000);
    color: var(--g);
    box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g);
    text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent);
}
/* In the job header the pill already draws its own border; keep one line, not two. */
[data-bs-theme="dark"] .shell .job-head .detail-head .status-pill:is(.status-pill--green, .status-pill--amber, .status-pill--red, .status-pill--blue) {
    box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g);
    border-color: color-mix(in srgb, var(--c) 70%, transparent);
}
[data-bs-theme="dark"] .shell .job-head .job-status-block .status-pill::before { box-shadow: 0 0 6px currentColor, 0 0 12px currentColor; }

/* Priority Vehicle: gold. */
[data-bs-theme="dark"] .shell .priority-vehicle-badge {
    --g: var(--gl-gold);
    box-shadow: 0 0 0 1.5px var(--g), 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g);
    text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent);
}
[data-bs-theme="dark"] .shell .priority-vehicle-badge svg { filter: drop-shadow(0 0 3px var(--gl-gold)); }

/* ---------------------------------------------------------------------
   4. Icons
   The job glyphs carry their name (hico--NAME, from jobs/job/_icon.html.twig). On a neutral button
   the glyph takes its meaning colour; on a coloured button it keeps the button's own colour.
   --------------------------------------------------------------------- */
.shell .hico--flag { color: var(--ic-flag); }
.shell .hico--team { color: var(--ic-team); }
.shell .hico--pin { color: var(--ic-pin); }
.shell .hico--doc { color: var(--ic-doc); }
.shell .hico--bars { color: var(--ic-bars); }
.shell .hico--calendar { color: var(--ic-calendar); }
.shell .hico--clipboard { color: var(--ic-clipboard); }
.shell .hico--car { color: var(--ic-car); }
.shell .hico--undo { color: var(--ic-undo); }
/* A coloured button keeps one colour: its glyph follows the button's words. */
.shell :is(.btn--primary, .btn--back, .btn--secondary, .btn--claim, .btn--import, .btn--alert, .btn--reset, .btn--danger, .btn--outline, .status-pill) .hico { color: inherit; }
[data-bs-theme="dark"] .shell .hico:is(.hico--flag, .hico--team, .hico--pin, .hico--doc, .hico--calendar, .hico--clipboard, .hico--car) { --g: currentColor; filter: drop-shadow(0 0 3px var(--g)) drop-shadow(0 0 7px color-mix(in srgb, var(--g) 55%, transparent)); }
/* Purple carries a stronger halo so it reads as bright as the others on black. */
[data-bs-theme="dark"] .shell .hico.hico--bars { filter: drop-shadow(0 0 3px var(--ic-bars)) drop-shadow(0 0 9px var(--ic-bars)); }
[data-bs-theme="dark"] .shell :is(.btn--primary, .btn--back, .btn--secondary, .btn--claim, .btn--import, .btn--alert, .btn--reset, .btn--danger, .btn--outline, .status-pill) .hico { filter: none; }

/* The arrowed split glyph (_partials/_split_icon.html.twig). */
.split-icon {
    width: 1.05em;
    height: 1.05em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: butt;
    stroke-linejoin: miter;
    vertical-align: -0.12em;
}

/* ---------------------------------------------------------------------
   5. Sidebar and submenus
   The sidebar keeps its original green look (app.css): icons in the text colour, the open /
   current section lit as the green pill. Only the submenu's current page gets a stronger glow.
   --------------------------------------------------------------------- */
/* The current submenu page: a stronger lit pill and dot. */
.shell .sidebar__submenu a.is-active {
    text-shadow: 0 0 8px rgba(var(--rs-sidebar-accent-rgb), 0.5);
    box-shadow: inset 0 0 0 1px rgba(var(--rs-sidebar-accent-rgb), 0.45), 0 0 22px -2px rgba(var(--rs-sidebar-accent-rgb), 0.3);
}
.shell .sidebar__submenu a.is-active::before {
    box-shadow: 0 0 0 3px rgba(var(--rs-sidebar-accent-rgb), 0.25), 0 0 8px var(--sb-green), 0 0 16px var(--sb-green);
}
.shell .sidebar__submenu a:hover::before { background: var(--sb-green); box-shadow: 0 0 0 3px var(--sb-bg), 0 0 8px var(--sb-green); }
/* Count badges in the sidebar glow in their own fill (not currentColor: the CAPS pill's words are near-black). */
.shell .sidebar__badge { box-shadow: 0 0 10px -1px var(--sb-green); }
.shell .sidebar__badge--alerts { box-shadow: 0 0 10px -1px #f0524a; }
.shell .sidebar__badge--messages { box-shadow: 0 0 10px -1px #2f8cff; }

/* ---------------------------------------------------------------------
   6. Tabs, panels, tables and bars
   --------------------------------------------------------------------- */
/* The open tab: a hi-vis underline that glows on dark. */
[data-bs-theme="dark"] .shell .nav-tabs .nav-link.active {
    text-shadow: 0 0 10px color-mix(in srgb, var(--gl-hi) 55%, transparent);
    box-shadow: 0 8px 12px -10px var(--gl-hi);
}
[data-bs-theme="dark"] .shell .nav-tabs .nav-link--results.active { text-shadow: 0 0 10px color-mix(in srgb, var(--gl-hi) 70%, transparent); }

/* Progress bars across the app glow in their fill on dark. */
[data-bs-theme="dark"] .shell .share-progress > i { box-shadow: 0 0 8px var(--bs-hi-vis); }
[data-bs-theme="dark"] .shell .share-progress > i.is-over { box-shadow: 0 0 8px var(--rag-red); }

/* ---------------------------------------------------------------------
   7. Job header
   --------------------------------------------------------------------- */
/* The action row's coloured buttons take their own border colour as the glow. */
[data-bs-theme="dark"] .shell .job-head :is(.job-actions, .job-head__top) .btn:is(.btn--primary, .btn--secondary, .btn--danger, .btn--alert):not(dialog .btn) {
    --g: var(--jb-bd);
    box-shadow: 0 0 14px -2px color-mix(in srgb, var(--g) 75%, transparent), 0 0 30px -8px var(--g);
    text-shadow: 0 0 6px color-mix(in srgb, #fff 35%, transparent);
}
[data-bs-theme="dark"] .shell .job-head :is(.job-actions, .job-head__top) .btn:is(.btn--primary, .btn--secondary, .btn--danger, .btn--alert):not(dialog .btn):hover { box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), 0 0 40px -6px var(--g); }
[data-bs-theme="dark"] .shell .job-head .job-head__top .btn--alert:not(dialog .btn) { text-shadow: 0 0 8px color-mix(in srgb, var(--jh-amber) 70%, transparent); }
/* Cancel job: the red outline and its words glow. */
[data-bs-theme="dark"] .shell .job-head .job-actions .btn:is([data-testid="cancel-job"], .btn--danger):not(dialog .btn) {
    --g: var(--jh-red);
    box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g);
    text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent);
}
[data-bs-theme="dark"] .shell .job-head .job-actions .btn:is([data-testid="cancel-job"], .btn--danger):not(dialog .btn):hover { box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 12px -4px var(--g); }
/* Status chips in the header glow in their own --c. */
[data-bs-theme="dark"] .shell .job-head .detail-head :is(.status-pill, .badge-flag):not(.status-pill--neutral) {
    --g: var(--c);
    box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g);
    text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent);
    border-color: color-mix(in srgb, var(--c) 70%, transparent);
}
/* The header's coloured icons are part of the look, so they stay. app.css drops the glyphs when the panel narrows
   (under 1040px) or a busy job has nine or more controls, to keep the row on one line; the row wraps instead now.
   Only on a phone-width header (the 760px grid) do they go. */
.shell .job-head .job-actions .btn:not(dialog .btn) > .hico,
.shell .job-head .job-head__top .btn:not(dialog .btn):not(.btn--back) > .hico { display: inline-block; }
@container (max-width: 760px) {
    .shell .job-head .job-actions .btn:not(dialog .btn) > .hico { display: none; }
}
/* Header chips: the mockup's tint — the chip's own --c at a low fill, not the app-wide status pill's darker block. */
[data-bs-theme="dark"] .shell .job-head .detail-head .status-pill:is(.status-pill--green, .status-pill--amber, .status-pill--red, .status-pill--blue) {
    background: color-mix(in srgb, var(--c) 14%, transparent);
    color: var(--c);
}
/* Badges and pills in the header read in Title Case, at the status pill's size and face, not as small capitals. */
.shell .job-head :is(.detail-head, .job-actions) :is(.badge-flag, .status-pill, .priority-vehicle-badge) {
    letter-spacing: normal;
    font-family: var(--bs-font-ui);
}
:root:lang(en) .shell .job-head :is(.detail-head, .job-actions) :is(.badge-flag, .status-pill, .priority-vehicle-badge) {
    text-transform: capitalize;
}
.shell .job-head .detail-head .badge-flag { font-size: 0.92rem; }
/* "Team leader:" in blue; the name stays in the text colour. */
.shell .job-head__leader-name { border-color: color-mix(in srgb, var(--ic-team) 45%, transparent); }
.shell .job-head__leader-label { color: var(--ic-team); }
/* The header pills' labels carry an icon each: Team Leader the team icon (as on its Change button), Service
   Advisor the telephone, Estimator the clipboard. The icon takes the label's colour. */
.shell .job-head__leader-label:has(> .hico) { display: inline-flex; align-items: center; gap: 0.35rem; }
.shell .job-head__leader-label > .hico { flex: none; color: inherit; }
[data-bs-theme="dark"] .shell .job-head__leader-label { text-shadow: 0 0 8px color-mix(in srgb, var(--ic-team) 60%, transparent); }

/* ---------------------------------------------------------------------
   New components
   --------------------------------------------------------------------- */
/* Split (blue) and Complete-trade (green): drawn outline buttons that glow on dark. */
.shell .btn--split { --g: var(--ol-split); }
.shell .btn--complete { --g: var(--ol-complete); }
.shell .btn:is(.btn--split, .btn--complete) {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border-color: var(--g);
    color: var(--g);
    font-weight: 700;
}
.shell .btn:is(.btn--split, .btn--complete):hover:not(:disabled) { background: color-mix(in srgb, var(--g) 10%, transparent); }
.shell .btn:is(.btn--split, .btn--complete):disabled { opacity: 0.45; cursor: not-allowed; }
[data-bs-theme="dark"] .shell .btn:is(.btn--split, .btn--complete) { background: #000; }
[data-bs-theme="dark"] .shell .btn:is(.btn--split, .btn--complete):not(:disabled) { box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .btn:is(.btn--split, .btn--complete):not(:disabled):hover { box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 12px -4px var(--g); background: color-mix(in srgb, var(--g) 10%, #000); }
[data-bs-theme="dark"] .shell .btn:is(.btn--split, .btn--complete) .split-icon { filter: drop-shadow(0 0 3px currentColor); }
/* Photos (any button that opens a photo gallery): a blue outline with blue words and a camera, no fill. The same blue
   and dark-theme glow as Split. Approved on the customer record (Current WIPs, Vehicles, History). */
.shell .btn.btn--photos { --g: var(--ol-split); display: inline-flex; align-items: center; gap: 0.35rem; background: transparent; border-color: var(--g); color: var(--g); font-weight: 700; }
.shell .btn.btn--photos:hover { background: color-mix(in srgb, var(--g) 10%, transparent); color: var(--g); }
.shell .btn.btn--photos .btn--photos__icon { width: 1.05em; height: 1.05em; flex: none; color: inherit; }
[data-bs-theme="dark"] .shell .btn.btn--photos { background: #000; box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .btn.btn--photos:hover { background: color-mix(in srgb, var(--g) 10%, #000); box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 12px -4px var(--g); }
[data-bs-theme="dark"] .shell .btn.btn--photos .btn--photos__icon { filter: drop-shadow(0 0 3px currentColor); }

/* ---------------------------------------------------------------------
   8. The job page's Workflow tab (templates/jobs/job/_workflow_tab.html.twig)
   One card per trade; every card is a fixed-layout table with the same column widths, so the
   times line up down the whole tab.
   --------------------------------------------------------------------- */
.shell .workflow {
    --wf-hi: var(--rs-accent-press); --wf-green: var(--rs-green-deep); --wf-amber: var(--rs-amber-ink); --wf-red: var(--rs-red); --wf-blue: #1d6fa5;
    --wf-track: rgba(0, 0, 0, 0.07);
    --wf-line: color-mix(in srgb, var(--bs-text) 22%, transparent);
    --wf-row: color-mix(in srgb, var(--bs-text) 10%, transparent);
}
[data-bs-theme="dark"] .shell .workflow {
    --wf-hi: #00ff9c; --wf-green: #2bffa4; --wf-amber: #ffc23d; --wf-red: #ff4d5e; --wf-blue: #4dc3ff;
    --wf-track: #14171b; --wf-line: #3a4048; --wf-row: #1c2025;
}
.shell .workflow .is-over { color: var(--wf-red); }

/* Summary row */
.shell .workflow__sum { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.shell .workflow__hero > * { height: 100%; margin: 0; }
.shell .workflow__tile { display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; padding: 0.9rem 1.1rem; margin: 0; border-radius: calc(14px * var(--rs-radius-scale)); }
.shell .workflow__tile-v { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.shell .workflow__tile-v small { font-size: 0.9rem; font-weight: 500; color: var(--bs-muted); }
/* The countdown as the dark hero tile, in both themes (the always-dark hero KPI card's blue). */
.shell .countdown--hero { background: var(--rs-ink); border-color: var(--rs-ink); color: #eef3f1; border-radius: calc(14px * var(--rs-radius-scale)); }
.shell .countdown--hero .eyebrow { color: #8a959f; }
.shell .countdown--hero .countdown__time { color: var(--hero-accent); font-size: 1.65rem; font-weight: 800; font-variant-numeric: tabular-nums; }
[data-bs-theme="dark"] .shell .countdown--hero { background: #000; border-color: color-mix(in srgb, var(--rs-cyan) 55%, #000); box-shadow: 0 0 18px -4px color-mix(in srgb, var(--rs-cyan) 55%, transparent), inset 0 0 22px -12px var(--rs-cyan); }
[data-bs-theme="dark"] .shell .countdown--hero .countdown__time { color: #3ccbff; text-shadow: 0 0 10px var(--rs-cyan), 0 0 26px color-mix(in srgb, var(--rs-cyan) 60%, transparent); }

/* Progress strip */
.shell .workflow__strip { display: flex; padding: 0.4rem; margin-bottom: 1rem; overflow-x: auto; border-radius: calc(14px * var(--rs-radius-scale)); }
.shell .workflow__step { flex: 1 0 auto; min-width: 118px; max-width: 13rem; display: flex; flex-direction: column; justify-content: space-between; gap: 0.35rem; padding: 0.55rem 0.75rem; border-radius: calc(10px * var(--rs-radius-scale)); color: var(--bs-text); text-decoration: none; }
.shell .workflow__step:hover { background: color-mix(in srgb, var(--bs-text) 5%, transparent); }
.shell .workflow__step.is-on { background: color-mix(in srgb, var(--wf-hi) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--wf-hi); }
.shell .workflow__step-nm { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.4rem; font-size: 0.82rem; font-weight: 700; line-height: 1.2; }
.shell .workflow__step-nm > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.shell .workflow__step-nm i { flex: none; font-style: normal; font-weight: 500; font-size: 0.78rem; color: var(--bs-muted); }
/* The figure takes its bar's colour; nothing logged yet (0%) is blue — in the strip only. */
.shell .workflow__step-nm i:is(.is-done, .is-over, .is-run, .is-zero) { font-weight: 700; font-variant-numeric: tabular-nums; }
.shell .workflow__step-nm i.is-done { color: var(--wf-green); }
.shell .workflow__step-nm i.is-over { color: var(--wf-red); }
.shell .workflow__step-nm i.is-run { color: var(--wf-hi); }
.shell .workflow__step-nm i.is-zero { color: var(--wf-blue); }
[data-bs-theme="dark"] .shell .workflow__step.is-on { background: #000; box-shadow: inset 0 0 0 1.5px var(--wf-hi), 0 0 14px -2px color-mix(in srgb, var(--wf-hi) 60%, transparent); }
[data-bs-theme="dark"] .shell .workflow__step-nm i:is(.is-done, .is-over, .is-run, .is-zero) { text-shadow: 0 0 6px currentColor, 0 0 14px color-mix(in srgb, currentColor 55%, transparent); }

/* Bars */
.shell .workflow__bar { position: relative; display: block; height: var(--bar-h); border-radius: calc(99px * var(--rs-radius-scale)); background: var(--wf-track); min-width: 3rem; }
/* In the strip the bar sits under the name in a column: it must not stretch (that grew it tall), only span the width. */
.shell .workflow__step .workflow__bar { flex: none; width: 100%; }
/* The clocking lines (and split parts) keep their original 6px bar; the slim bar is for the header rows:
   the progress strip and each card's head. */
.shell .workflow__table tbody .workflow__bar { height: 6px; }
.shell .workflow__bar > i { position: absolute; inset: 0 auto 0 0; border-radius: calc(99px * var(--rs-radius-scale)); background: var(--wf-hi); }
.shell .workflow__bar > i.is-over { background: var(--wf-red); }
.shell .workflow__bar > i.is-done { background: var(--wf-green); }
[data-bs-theme="dark"] .shell .workflow__bar > i { box-shadow: 0 0 6px var(--wf-hi), 0 0 12px color-mix(in srgb, var(--wf-hi) 50%, transparent); }
[data-bs-theme="dark"] .shell .workflow__bar > i.is-over { box-shadow: 0 0 6px var(--wf-red), 0 0 12px color-mix(in srgb, var(--wf-red) 50%, transparent); }
[data-bs-theme="dark"] .shell .workflow__bar > i.is-done { box-shadow: 0 0 6px var(--wf-green); }

/* Toolbar */
.shell .workflow__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.shell .workflow__hint { color: var(--bs-muted); font-size: 0.88rem; }
.shell .workflow__toolbar-actions { display: flex; gap: 0.5rem; }

/* Pills inside the tab */
.shell .workflow__pill { --c: var(--bs-muted); display: inline-flex; align-items: center; gap: 0.4rem; height: 1.75rem; padding: 0 0.6rem; border-radius: calc(8px * var(--rs-radius-scale)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--c); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.shell .workflow__pill--green { --c: var(--wf-green); }
.shell .workflow__pill--live { --c: var(--wf-green); }
.shell .workflow__pill--amber { --c: var(--wf-amber); }
.shell .workflow__pill--red { --c: var(--wf-red); }
.shell .workflow__pill--blue { --c: var(--wf-blue); }
.shell .workflow__pill--live::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; animation: wf-pulse 1.6s ease-in-out infinite; }
@keyframes wf-pulse { 50% { opacity: 0.25; } }
[data-bs-theme="dark"] .shell .workflow__pill:is(.workflow__pill--green, .workflow__pill--live, .workflow__pill--amber, .workflow__pill--red, .workflow__pill--blue) {
    background: #000; border-color: var(--c);
    box-shadow: 0 0 14px -4px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 10px -4px color-mix(in srgb, var(--c) 60%, transparent);
    text-shadow: 0 0 6px color-mix(in srgb, var(--c) 70%, transparent);
}
[data-bs-theme="dark"] .shell .workflow__pill--live::before { box-shadow: 0 0 6px currentColor, 0 0 12px currentColor; }
[data-bs-theme="dark"] .shell .workflow__pill .split-icon { filter: drop-shadow(0 0 3px currentColor); }

/* Cards */
.shell .workflow__card { padding: 0; margin: 0 0 0.9rem; overflow: hidden; border-radius: calc(14px * var(--rs-radius-scale)); }
.shell .workflow__card.is-active { border-color: var(--wf-hi); box-shadow: 0 0 0 1px var(--wf-hi); }
[data-bs-theme="dark"] .shell .workflow__card.is-active { box-shadow: 0 0 0 1px var(--wf-hi), 0 0 22px -4px color-mix(in srgb, var(--wf-hi) 65%, transparent); }
.shell .workflow__card.is-collapsed tbody,
.shell .workflow__card.is-collapsed .workflow__cols { display: none; }

/* The table: one fixed column set for every card. */
.shell .workflow__table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0; }
.shell .workflow__col-pick { width: 2.25rem; }
.shell .workflow__col-time { width: 5.75rem; }
.shell .workflow__col-consumed { width: 8.5rem; }
.shell .workflow__col-actions { width: 20.5rem; }
.shell .workflow__table :is(th, td) { padding: 0.65rem 0.6rem; vertical-align: middle; border-bottom: 1px solid var(--wf-row); }
.shell .workflow__table tbody tr:last-child td { border-bottom: 0; }
.shell .workflow__n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The time columns (Planned, Logged, Left) centre their titles over the times, and the times under them. */
@media (min-width: 901px) {
    .shell .workflow__table .workflow__n { text-align: center; }
}
.shell .workflow__lbl { display: none; }
.shell .workflow__actions { text-align: end; }
.shell .workflow__actions > * { display: inline-flex; vertical-align: middle; margin-inline-start: 0.35rem; }
.shell .workflow__actions form { display: inline-flex; }
.shell .workflow__consumed { white-space: nowrap; }
.shell .workflow__consumed > * { vertical-align: middle; }
.shell .workflow__consumed .workflow__bar { display: inline-block; width: calc(100% - 3.4rem); }
.shell .workflow__pct { display: inline-block; min-width: 2.8rem; text-align: end; font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* The app's table style sets every header cell in small grey spaced capitals (.data-table thead th). The Workflow
   table's header cells are its card heads and column titles, in Title Case and the text colour. */
.shell .workflow__table thead :is(th, td) {
    text-transform: none;
    letter-spacing: normal;
    font-family: var(--bs-font-ui);
    color: var(--bs-text);
}
.shell .workflow__table thead .workflow__count { color: var(--bs-muted); }
/* The table's titles (the column headings and the head's Planned / Logged / Left labels) are blue. */
.shell .workflow__table thead .workflow__cols th,
.shell .workflow__table thead .workflow__lbl { color: var(--wf-blue); }
.shell .workflow__table thead .workflow__pill { color: var(--c); }
.shell .workflow__table thead .workflow__n.is-over,
.shell .workflow__table thead .workflow__pct.is-over { color: var(--wf-red); }
/* Card head row: the trade's icon, name, line count and state, then its totals in the line columns. */
.shell .workflow__head > :is(th, td) { padding-top: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--wf-line); }
.shell .workflow__card.is-collapsed .workflow__head > :is(th, td) { border-bottom: 0; }
.shell .workflow__card.is-active .workflow__head { background: color-mix(in srgb, var(--wf-hi) 8%, transparent); }
[data-bs-theme="dark"] .shell .workflow__card.is-active .workflow__head { background: #000; }
.shell .workflow__name { text-align: start; font-weight: 400; white-space: normal; padding-inline-start: 1.1rem; }
.shell .workflow__name > * { vertical-align: middle; }
.shell .workflow__name .workflow__icon,
.shell .workflow__name .workflow__title,
.shell .workflow__name .workflow__pill { display: inline-flex; }
.shell .workflow__icon {
    width: 2.5rem; height: 2.5rem; border-radius: calc(10px * var(--rs-radius-scale)); align-items: center; justify-content: center; margin-inline-end: 0.75rem;
    color: var(--sk); background: color-mix(in srgb, var(--sk) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sk) 55%, transparent);
}
.shell .workflow__icon .stage-icon { width: 22px; height: 22px; }
[data-bs-theme="dark"] .shell .workflow__icon { color: color-mix(in srgb, var(--sk) 80%, #fff); background: #000; border-color: var(--sk); box-shadow: 0 0 12px -2px var(--sk), inset 0 0 8px -3px var(--sk); }
[data-bs-theme="dark"] .shell .workflow__icon .stage-icon { filter: drop-shadow(0 0 3px var(--sk)); }
.shell .workflow__title { flex-direction: column; margin-inline-end: 0.9rem; }
.shell .workflow__trade { font-size: 0.95rem; font-weight: 800; line-height: 1.2; }
.shell .workflow__count { font-size: 0.8rem; color: var(--bs-muted); }
.shell .workflow__head .workflow__n { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.shell .workflow__head .workflow__lbl { display: block; font-size: 0.74rem; font-weight: 600; color: var(--bs-muted); }
.shell .workflow__toggle { width: 1.9rem; height: 1.9rem; border: 0; background: none; color: var(--bs-muted); cursor: pointer; border-radius: calc(8px * var(--rs-radius-scale)); transition: transform 0.15s; }
.shell .workflow__toggle:focus-visible { outline: 2px solid var(--bs-hi-vis); outline-offset: 2px; }
.shell .workflow__card.is-collapsed .workflow__toggle { transform: rotate(-90deg); }

/* Column headings */
.shell .workflow__cols th { padding-top: 0.45rem; padding-bottom: 0.45rem; font-size: 0.8rem; font-weight: 600; color: var(--bs-muted); background: color-mix(in srgb, var(--bs-text) 4%, transparent); }
[data-bs-theme="dark"] .shell .workflow__cols th { background: #000; }

/* Lines */
.shell .workflow__op { white-space: normal; }
.shell .workflow__op > * { vertical-align: middle; margin-inline-end: 0.4rem; }
.shell .workflow__op-name { font-weight: 600; }
.shell .workflow__table .phase-line-row--complete { color: var(--bs-muted); }
.shell .workflow__table .phase-line-row--complete .workflow__op-name { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bs-muted) 60%, transparent); }
.shell .workflow__table .phase-line-row--split > td { background: none; font-weight: inherit; }
.shell .workflow__table tr:has(.phase-split-pick:checked) > td { background: color-mix(in srgb, var(--wf-hi) 9%, transparent); }
[data-bs-theme="dark"] .shell .workflow__table tr:has(.phase-split-pick:checked) > td { background: #000; }
[data-bs-theme="dark"] .shell .workflow__table tr:has(.phase-split-pick:checked) > td:first-child { box-shadow: inset 3px 0 0 var(--wf-hi), inset 14px 0 18px -14px var(--wf-hi); }
.shell .workflow__table .phase-split-pick { margin: 0; accent-color: var(--wf-hi); }
.shell .workflow__table .phase-share-row > td { background: color-mix(in srgb, var(--bs-text) 2.5%, transparent); }
[data-bs-theme="dark"] .shell .workflow__table .phase-share-row > td { background: #000; }
.shell .workflow__table .phase-share-row > td:first-child { padding-inline-start: 0.6rem; }
.shell .workflow__table .phase-share-row__part { padding-inline-start: 1.6rem; position: relative; }
.shell .workflow__table .phase-share-row__part::before { content: ""; position: absolute; inset-inline-start: 0.6rem; top: 0; bottom: 50%; width: 0.6rem; border-inline-start: 1.5px solid var(--wf-line); border-bottom: 1.5px solid var(--wf-line); border-end-start-radius: calc(6px * var(--rs-radius-scale)); }
.shell .workflow__table .share-badge { margin-inline-start: 0; }
.shell .workflow__mass td { color: var(--bs-muted); font-style: italic; }
.shell .workflow__empty td { padding: 2rem; text-align: center; color: var(--bs-muted); }
.shell .workflow__table .phase-line-signoff { flex-direction: column; align-items: flex-end; margin: 0; }

/* One height for every card head, whatever its name or button: nothing in it wraps. A long name is cut short
   with an ellipsis (the strip and the card's own title text keep it whole for screen readers). */
.shell .workflow__head > :is(th, td) { height: 4.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; white-space: nowrap; }
.shell .workflow__head .workflow__name { overflow: hidden; text-overflow: ellipsis; }
.shell .workflow__head .workflow__title { max-width: 16rem; min-width: 0; vertical-align: middle; }
.shell .workflow__head .workflow__trade,
.shell .workflow__head .workflow__count { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell .workflow__head .workflow__actions form { display: inline-flex; }

/* One row height for every line in every card (lines, split parts, unallocated time), whatever the row holds:
   buttons, a sign-off, share badges or nothing. The sign-off sits on one line (badge, who and when, Reopen);
   who-and-when is cut short with an ellipsis rather than wrapping (the full text is in its title). */
.shell .workflow__table tbody tr:not(.workflow__empty) > td { height: 3.25rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.shell .workflow__table tbody .workflow__actions { white-space: nowrap; }
.shell .workflow__table tbody .workflow__actions > * { margin-block: 0; }
.shell .workflow__table tbody .phase-line-signoff { display: inline-flex; flex-direction: row; align-items: center; gap: 0.4rem; max-width: 100%; vertical-align: middle; }
.shell .workflow__table tbody .phase-line-signoff .text-secondary { max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.76rem; }
.shell .workflow__table tbody .btn--sm { height: 1.9rem; padding-block: 0; display: inline-flex; align-items: center; }
.shell .workflow__table tbody .badge-flag { margin: 0; }
.shell .workflow__table tbody .share-badge__initials { width: 1.5rem; height: 1.5rem; }
.shell .workflow__table tbody .workflow__op { line-height: 1.3; }
.shell .workflow__table tbody .workflow__op .workflow__pill { height: 1.5rem; }

/* The lines read a step smaller than the card heads, and every box in them shrinks with the text: row height,
   buttons, pills, technician discs and the stack's overlap. */
.shell .workflow__table tbody { font-size: 0.84rem; }
.shell .workflow__table tbody tr:not(.workflow__empty) > td { height: 2.75rem; padding-top: 0.2rem; padding-bottom: 0.2rem; }
.shell .workflow__table tbody .btn--sm { height: 1.65rem; font-size: 0.76rem; padding-inline: 0.6rem; }
.shell .workflow__table tbody .workflow__op .workflow__pill { height: 1.3rem; padding: 0 0.45rem; gap: 0.3rem; font-size: 0.7rem; border-radius: 6px; }
.shell .workflow__table tbody .workflow__pct { font-size: 0.74rem; }
.shell .workflow__table tbody .phase-line-signoff .text-secondary { font-size: 0.7rem; }
.shell .workflow__table tbody .share-badge__initials { width: 1.3rem; height: 1.3rem; font-size: 0.6rem; }
.shell .workflow__table tbody .share-stack .share-badge__initials { width: 1.3rem; height: 1.3rem; margin-inline-start: -0.3rem; }
.shell .workflow__table tbody .share-stack .share-badge__initials:first-child { margin-inline-start: 0; }

/* The fixed columns add up to about 48rem, so on a mid-width screen (sidebar open, German labels) the line name would be
   squeezed to nothing and the columns would run into each other: the card scrolls sideways instead. */
@media (min-width: 901px) and (max-width: 1320px) {
    .shell .workflow__card { overflow-x: auto; }
    .shell .workflow__table { min-width: 66rem; }
}
/* Narrow screens: each line stacks into labelled figures, no sideways scroll. */
@media (max-width: 900px) {
    .shell .workflow__sum { grid-template-columns: 1fr 1fr; }
    .shell .workflow__hero { grid-column: 1 / -1; }
    .shell .workflow__table, .shell .workflow__table thead, .shell .workflow__table tbody { display: block; }
    .shell .workflow__table colgroup, .shell .workflow__cols { display: none; }
    .shell .workflow__table tr { display: grid; grid-template-columns: 2rem 1fr 1fr 1fr; row-gap: 0.4rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--wf-row); }
    .shell .workflow__table :is(th, td) { border: 0; padding: 0; }
    .shell .workflow__table tbody tr:not(.workflow__empty) > td, .shell .workflow__head > :is(th, td) { height: auto; padding: 0; white-space: normal; }
    .shell .workflow__table .workflow__op, .shell .workflow__table .workflow__consumed, .shell .workflow__table .workflow__actions { grid-column: 2 / -1; text-align: start; }
    .shell .workflow__head { grid-template-columns: 1fr 1fr 1fr; }
    .shell .workflow__head .workflow__name, .shell .workflow__head .workflow__consumed, .shell .workflow__head .workflow__actions { grid-column: 1 / -1; }
    .shell .workflow__n { text-align: start; }
    .shell .workflow__lbl { display: block; font-size: 0.74rem; font-weight: 600; color: var(--wf-blue); }
    .shell .workflow__actions > * { margin-inline: 0 0.35rem; }
    .shell .workflow__empty td { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .shell .workflow__pill--live::before { animation: none; }
    .shell .workflow__toggle { transition: none; }
}
/* The hero's "Running · (face) Dan Whitlock and (face) Priya Shah Clocked On": small faces sitting on the text line,
   each with a thin ring in its skill colour (public/mockups/workflow-tab-photos.html, .pt-av--sm in the hero). */
.shell .countdown__who { white-space: nowrap; }
.shell .countdown__sub--faces .share-badge__initials { width: 1.35rem; height: 1.35rem; font-size: 0.55rem; font-weight: 800; vertical-align: -0.4em; margin-inline-end: 0.15rem; overflow: hidden; box-shadow: 0 0 0 1.5px var(--g); }
[data-bs-theme="dark"] .shell .countdown__sub--faces .share-badge__initials { box-shadow: 0 0 0 1.5px var(--g), 0 0 10px -1px var(--g); }

/* ---------------------------------------------------------------------
   Reduced motion: glows stay, movement goes.
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .shell .btn, .shell .sidebar__icon { transition: none; }
}

/* ---------------------------------------------------------------------
   9. Page sweep: bespoke coloured controls the shared rules do not reach
   (found by auditing every staff stylesheet). Same recipe: dark theme only, each glows in its own
   colour. Kept in one place, grouped by page, so a page's look can be checked against this list.
   --------------------------------------------------------------------- */

/* Corrections to the shared button rule where a page restyles its buttons. */
[data-bs-theme="dark"] .shell .lv :is(.btn--primary, .btn--secondary) { --g: var(--lv-blue); }   /* the boards' blue buttons glow blue */
[data-bs-theme="dark"] .shell .lv .tech-action-bar :is(.btn--primary, .btn--danger),
[data-bs-theme="dark"] .shell .es--tech :is(.btn--primary, .btn--danger, .btn--secondary) { box-shadow: none; text-shadow: none; }   /* restyled as plain buttons there */
[data-bs-theme="dark"] .shell .lv .tech-action-bar .btn--secondary { --g: var(--lv-blue); }
[data-bs-theme="dark"] .shell .es--people .view-toggle .btn.btn--secondary { --g: var(--es-focus); }

/* Selected segments, view toggles, pagers and filter tabs: the lit one glows in its fill. */
[data-bs-theme="dark"] .shell :is(.view-toggle .btn[aria-pressed="true"], .view-toggle .btn[aria-current="page"], .view-switch__btn.is-active, .pager__btn.is-active, .dt-paging-button.current, .wp-tabs button[aria-selected="true"], .kpi-period__btn[aria-current="true"], .wizard-steps__step.is-current .wizard-steps__index) { --g: var(--bs-hi-vis); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .lv .view-toggle .btn[aria-pressed="true"] { --g: var(--lv-green); }
[data-bs-theme="dark"] .shell :is(.es--tech .view-toggle .btn[aria-pressed="true"], .es--assets .view-switch__btn.is-active, .es--people .records-tabs__tab.is-current, .cx .view-switch__btn.is-active, .cx-bar__views .is-active, .cx .pager__btn.is-active) { --g: var(--es-focus, #2ddf94); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
/* Underlined tabs outside Bootstrap's .nav-tabs. */
[data-bs-theme="dark"] .shell :is(.kpi-tab[aria-selected="true"], .tl-rota__period.is-on) { text-shadow: 0 0 10px color-mix(in srgb, var(--bs-hi-vis) 55%, transparent); box-shadow: 0 8px 12px -10px var(--bs-hi-vis); }

/* Status dots and live dots. */
[data-bs-theme="dark"] .shell .pill__dot--green { --g: var(--rs-success); background: var(--g); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .pill__dot--amber { --g: var(--rs-warning); background: var(--g); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .pill__dot--red { --g: var(--rs-danger); background: var(--g); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .kpi-pipeline__rag--green { --g: var(--rs-success); }
[data-bs-theme="dark"] .shell .kpi-pipeline__rag--amber { --g: var(--rs-warning); }
[data-bs-theme="dark"] .shell .kpi-pipeline__rag--red { --g: var(--rs-danger); }
[data-bs-theme="dark"] .shell :is(.kpi-pipeline__rag--green, .kpi-pipeline__rag--amber, .kpi-pipeline__rag--red) { background: var(--g); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell :is(.clock-dot, .blk__pulse) { --g: var(--bs-hi-vis); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .queue-live { text-shadow: 0 0 8px color-mix(in srgb, var(--bs-hi-vis) 60%, transparent); }
[data-bs-theme="dark"] .shell .queue-live::before { --g: var(--bs-hi-vis); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .lv-live::before { --g: var(--lv-green); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .tech-badge { --g: var(--tech-accent); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .tech-badge::before { box-shadow: 0 0 6px currentColor; }
[data-bs-theme="dark"] .shell .es-stat::before { --g: var(--tone); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .estimate-bucket__heading::before { --g: var(--tone); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }

/* Counts. */
[data-bs-theme="dark"] .shell .panel-count--badge { --g: #2f8cff; box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .receiving-alarm__count { --g: var(--rag-amber); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .tl__match { --g: var(--rs-blue); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell :is(.wp-count, .wp-badge) { --g: #b05cff; box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }

/* Chips that carry a colour. */
[data-bs-theme="dark"] .shell .ticker__badge--green { --g: #3ddc97; }
[data-bs-theme="dark"] .shell .ticker__badge--amber { --g: #ffb02e; }
[data-bs-theme="dark"] .shell .ticker__badge--red { --g: #ff6b63; }
[data-bs-theme="dark"] .shell .ticker__badge--blue { --g: #5fb4f0; }
[data-bs-theme="dark"] .shell :is(.ticker__badge--green, .ticker__badge--amber, .ticker__badge--red, .ticker__badge--blue) { box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .situation-filter__bucket--green { --g: var(--rs-success); }
[data-bs-theme="dark"] .shell .situation-filter__bucket--amber { --g: var(--rs-warning); }
[data-bs-theme="dark"] .shell .situation-filter__bucket--red { --g: var(--rs-danger); }
[data-bs-theme="dark"] .shell :is(.situation-filter__bucket--green, .situation-filter__bucket--amber, .situation-filter__bucket--red) { color: var(--g); border-color: color-mix(in srgb, var(--g) 60%, transparent); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell :is(.rework-flag--active, .lv .rework-flag--active) { --g: #ff6b63; box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell :is(.wp-chip, .wp-alert) { --g: var(--r, #f2685f); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .claim-decision--approve { --g: #3ff5b8; box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .claim-decision--decline { --g: var(--rs-due-red); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }

/* Workshop Loading (.tl-page): trade filter chips, flags, tags and load bars. */
[data-bs-theme="dark"] .shell .tl-page .skill[aria-pressed="true"] { --g: var(--t, var(--bs-hi-vis)); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); }
[data-bs-theme="dark"] .shell .tl-page :is(.skill__dot, .tl__trades i, .tl-rota__skill:has(input:checked) i) { --g: var(--t, var(--bs-hi-vis)); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .tl-rota__skill:has(input:checked) { --g: var(--t, var(--bs-hi-vis)); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); }
[data-bs-theme="dark"] .shell .tl-page .tl__group .stage-icon { filter: drop-shadow(0 0 3px var(--t, currentColor)); }
[data-bs-theme="dark"] .shell .tl-page .blk__flag--late,
[data-bs-theme="dark"] .shell .tl-page .blk__flag--over { --g: #ff6b63; box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .blk__flag--warn { --g: var(--rs-warning); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .tag--trade { --g: var(--t, var(--bs-hi-vis)); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); }
[data-bs-theme="dark"] .shell .tl-page .tag--today { --g: var(--rs-due-red); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .tl-page :is(.tag--soon, .tag--parts) { --g: #f0c060; box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .tl__bar i { --g: #5fd08a; box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .tl__bar i.is-high { --g: var(--rs-amber); }
[data-bs-theme="dark"] .shell .tl-page .tl__bar i.is-over { --g: var(--rs-due-red); }
[data-bs-theme="dark"] .shell .tl-page :is(.now-flag, .now-line) { --g: #e5484d; box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .tl-auto input:checked + .tl-auto__track { --g: var(--bs-hi-vis); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .tl-page .aw__badge { --g: #c4a8ff; box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }

/* My Loading Queue / Live boards (.lv). */
[data-bs-theme="dark"] .shell .lv .vehicle-card__start { --g: var(--lv-blue); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--g) 75%, transparent), 0 0 30px -8px var(--g); }
[data-bs-theme="dark"] .shell .lv .vehicle-card__start:hover { box-shadow: 0 0 18px 0 color-mix(in srgb, var(--g) 85%, transparent), 0 0 40px -6px var(--g); }
[data-bs-theme="dark"] .shell .lv-bar > i { --g: var(--lv-green); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .lv .stage-icon { filter: drop-shadow(0 0 3px var(--c, currentColor)); }

/* Job page: QC result and QC sheet. */
[data-bs-theme="dark"] .shell .qc-indicator__cell--pass.is-on { --g: var(--rs-success); background: var(--rs-green); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .qc-indicator__cell--fail.is-on { --g: var(--rs-danger); background: var(--rs-red); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .qc-sheet__btn--pass[aria-pressed="true"] { --g: var(--rag-green); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--g) 75%, transparent), 0 0 30px -8px var(--g); }
[data-bs-theme="dark"] .shell .qc-sheet__btn--fail[aria-pressed="true"] { --g: var(--rag-red); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--g) 75%, transparent), 0 0 30px -8px var(--g); }
[data-bs-theme="dark"] .shell .qc-tick:has(input:checked) { --g: var(--rag-red); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); }

/* Booking calendar, trade capacity and Work Planning. */
[data-bs-theme="dark"] .shell .bk-day__flag { --g: var(--rs-danger); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .bk-bar__fill--green { --g: var(--rs-success); background: var(--g); }
[data-bs-theme="dark"] .shell .bk-bar__fill--amber { --g: var(--rs-warning); background: var(--g); }
[data-bs-theme="dark"] .shell .bk-bar__fill--red { --g: var(--rs-danger); background: var(--g); }
[data-bs-theme="dark"] .shell :is(.bk-bar__fill--green, .bk-bar__fill--amber, .bk-bar__fill--red) { box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell :is(.bk-day--today .bk-day__num, .tc-day__today) { --g: #4cc3ff; box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
[data-bs-theme="dark"] .shell .tc-mark--over { --g: var(--rs-danger); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .tc-mark--tight { --g: var(--rs-warning); box-shadow: 0 0 6px var(--g), 0 0 12px color-mix(in srgb, var(--g) 55%, transparent); }
[data-bs-theme="dark"] .shell .tc-seg--booked { --g: var(--rs-blue); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }

/* Estimating, staff and KPI status discs. */
[data-bs-theme="dark"] .shell .kpi-status--good { --g: var(--rs-accent); }
[data-bs-theme="dark"] .shell .kpi-status--near { --g: #ffb81c; }
[data-bs-theme="dark"] .shell .kpi-status--off { --g: #f0625a; }
[data-bs-theme="dark"] .shell :is(.kpi-status--good, .kpi-status--near, .kpi-status--off) { box-shadow: 0 0 14px -3px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 10px -5px var(--g); text-shadow: 0 0 8px color-mix(in srgb, var(--g) 65%, transparent); }
[data-bs-theme="dark"] .shell .customer-card__avatar:not(.customer-card__avatar--company) { --g: #2ddf94; box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g) 75%, transparent); }
/* A work line share's technician: a solid glowing disc in one of their skill colours (the loading board's trade colours),
   chosen so the people sharing a line differ where their skills allow (ShareSkillColours). Initials in true black, or
   white where black would not read on that colour. */
.shell .share-badge__initials { --g: #ffd60a; background: var(--g); color: var(--ink, #000); box-shadow: 0 0 8px -1px color-mix(in srgb, var(--g) 70%, transparent); }
[data-bs-theme="dark"] .shell .share-badge__initials { box-shadow: 0 0 10px 0 color-mix(in srgb, var(--g) 75%, transparent), 0 0 22px -4px var(--g); }
[data-bs-theme="dark"] .shell .learn__practice { --g: var(--bs-hi-vis); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--g) 75%, transparent), 0 0 30px -8px var(--g); }

@media (prefers-reduced-motion: reduce) {
    .shell .workflow__toggle { transition: none; }
}

/* ---------------------------------------------------------------------
   10. Input boxes (approved on public/mockups/input-boxes-required.html) — on EVERY screen: the staff app, login,
       the portals and the workstation kiosk alike, not only inside .shell
   Dark theme: every box is "Level 2" (#141619): two steps up from the true-black page, so it reads as a place to
   type, with a brighter edge. No glow of its own while in use: the box keeps the app's own focus style. background-color, not the background shorthand:
   a dropdown's arrow is its background-image.
   --------------------------------------------------------------------- */
[data-bs-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]), select, textarea),
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #141619;
    border-color: #4a525c;
}

/* Required boxes (assets/support/required_marks.js): a yellow star on the label, a yellow "Required" pill inside the
   box until it has a value, and red when a form was sent with it empty. */
:root { --req: #b07400; --req-missing: var(--rs-red); }
[data-bs-theme="dark"] { --req: #ffb02e; --req-missing: #ff5a4c; }
.req-label::after {
    content: "*";
    color: var(--req);
    margin-inline-start: 3px;
    font-weight: 700;
}
[data-bs-theme="dark"] .req-label::after { text-shadow: 0 0 6px color-mix(in srgb, var(--req) 70%, transparent); }
.req-pill {
    position: absolute;
    z-index: 2;
    transform: translateY(-50%);
    pointer-events: none;
    font-family: var(--bs-font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    color: var(--req);
    border: 1px solid var(--req);
    border-radius: calc(5px * var(--rs-radius-scale));
    padding: 0.05rem 0.35rem;
    background: var(--bs-paper);
    transition: opacity 0.2s;
}
[data-bs-theme="dark"] .req-pill {
    background: #000;
    box-shadow: 0 0 8px -2px color-mix(in srgb, var(--req) 65%, transparent);
    text-shadow: 0 0 6px color-mix(in srgb, var(--req) 55%, transparent);
}
.req-pill.is-gone { opacity: 0; }
.req-pill[hidden] { display: none; }
/* Room on the right of a required box so typing never runs under the pill. */
input.has-req-pill { padding-inline-end: 5.4rem; }
textarea.has-req-pill { padding-inline-end: 5.4rem; }
select.has-req-pill { padding-inline-end: 7.2rem; }
.select2-hidden-accessible.has-req-pill + .select2 .select2-selection__rendered { padding-inline-end: 6rem; }
/* Sent with it empty. */
.req-pill.is-missing { color: var(--req-missing); border-color: var(--req-missing); }
:is(input, select, textarea).is-missing { border-color: var(--req-missing); }
[data-bs-theme="dark"] :is(input, select, textarea).is-missing { box-shadow: 0 0 0 1px var(--req-missing), 0 0 12px -3px color-mix(in srgb, var(--req-missing) 60%, transparent); }
[data-bs-theme="dark"] .req-pill.is-missing { box-shadow: 0 0 8px -2px color-mix(in srgb, var(--req-missing) 70%, transparent); text-shadow: 0 0 6px color-mix(in srgb, var(--req-missing) 60%, transparent); }

/* ---------------------------------------------------------------------
   11. Job page technicians section (the crew panel on the Overview tab)
   --------------------------------------------------------------------- */
/* Technician pills on true black (dark theme); a finished technician keeps its own finished look. */
[data-bs-theme="dark"] .shell .job-crew .pill:not(.job-crew__member--finished) { background-color: #000; }
/* Play and Complete: one green, the app's hi-vis — glowing on dark. Pause keeps its amber. */
.shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete) {
    --g: var(--rs-accent-ink);
    color: var(--g);
    border-color: color-mix(in srgb, var(--g) 50%, transparent);
    background: color-mix(in srgb, var(--g) 12%, transparent);
}
[data-bs-theme="dark"] .shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete) {
    --g: var(--rs-accent);
    background: #000;
    border-color: var(--g);
}
[data-bs-theme="dark"] .shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete):not(:disabled) {
    box-shadow: 0 0 8px -1px color-mix(in srgb, var(--g) 80%, transparent), inset 0 0 6px -3px var(--g);
    text-shadow: 0 0 6px var(--g);
}
[data-bs-theme="dark"] .shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete):not(:disabled):hover {
    filter: none;
    box-shadow: 0 0 12px 0 color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 6px -2px var(--g);
}
[data-bs-theme="dark"] .shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete) svg { filter: drop-shadow(0 0 2px var(--g)); }
/* The clock buttons' glyphs are drawn (they were ▶ ⏸ ✓ characters, which browsers drew from an emoji font that
   ignores the button's colour); they follow the button's colour like every other icon. */
.shell .crew-clock__icon { width: 0.7rem; height: 0.7rem; display: block; }
/* Inert Play / Complete (nobody clocked on yet) keep the same green and a softer glow, rather than fading to 40%
   and losing it, so the panel reads in one colour whether or not the buttons can be pressed right now. */
.shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete):disabled { opacity: 0.7; }
[data-bs-theme="dark"] .shell .crew-clock__btn:is(.crew-clock__btn--play, .crew-clock__btn--complete):disabled {
    box-shadow: 0 0 6px -2px color-mix(in srgb, var(--g) 70%, transparent);
    text-shadow: 0 0 4px var(--g);
}
/* Pause: a bright orange that glows on dark (light theme: a deeper orange, no glow). */
.shell .crew-clock__btn--pause {
    --g: #d97706;
    color: var(--g);
    border-color: color-mix(in srgb, var(--g) 55%, transparent);
    background: color-mix(in srgb, var(--g) 12%, transparent);
}
[data-bs-theme="dark"] .shell .crew-clock__btn--pause {
    --g: #ff9f1c;
    background: #000;
    border-color: var(--g);
}
[data-bs-theme="dark"] .shell .crew-clock__btn--pause:not(:disabled) {
    box-shadow: 0 0 9px -1px color-mix(in srgb, var(--g) 85%, transparent), inset 0 0 6px -3px var(--g);
}
[data-bs-theme="dark"] .shell .crew-clock__btn--pause:not(:disabled):hover {
    filter: none;
    box-shadow: 0 0 13px 0 color-mix(in srgb, var(--g) 90%, transparent), inset 0 0 6px -2px var(--g);
}
[data-bs-theme="dark"] .shell .crew-clock__btn--pause svg { filter: drop-shadow(0 0 2px var(--g)); }

/* Off-Site Work panel (job page): breathing room between the work table and the form that adds to it. */
.shell .offsite-add { margin-top: 1.5rem; }
.shell .offsite-add > .btn { margin-top: 1rem; }

/* ---------------------------------------------------------------------
   12. Title Case on every button, pill and badge
   One rule rather than rewording hundreds of strings: the words are written in sentence case ("Move site") and
   several badges were set in small spaced capitals; both now read in Title Case ("Move Site", "Due Soon").
   English only — German, Tagalog and the other languages write their own case in the catalog (German nouns
   already carry their capitals; Tagalog uses sentence case), so capitalising every word would be wrong there.
   The badges on the vehicle cards keep their capitals (WARNING, ON TARGET), as they were designed.
   --------------------------------------------------------------------- */
:root:lang(en) .shell :is(
    .btn, .badge-flag, .status-pill, .pill, .priority-vehicle-badge, .tech-badge, .ticker__badge, .workflow__pill,
    .photo-tile__flag, .bk-day__flag, .bk-daycard__tag, .bk-chip, .bk-chip__site, .rc-tag, .wp-chip, .wp-badge, .wp-alert,
    .es-stat, .kpi-status, .tag, .view-switch__btn, .pager__btn, .kpi-period__btn, .kpi-tab, .qc-sheet__btn,
    .claim-decision, .situation-filter__bucket, .cc-pill, .aw__badge, .blk__flag, .now-flag, .rework-flag,
    .share-badge, .records-tabs__tab, .wp-tabs button, .tl-page .skill, .nav-tabs .nav-link, .refinity-tabs a,
    .details-chip, .dc-pill, .dc-chip, .wprov-pill, .phase-chip__label
):not(.vehicle-card *) {
    text-transform: capitalize;
}
/* The ones that were small capitals: plain letter spacing and the UI face (each keeps its own size). */
:root:not(:lang(de)) .shell :is(.badge-flag, .ticker__badge, .photo-tile__flag, .bk-day__flag, .bk-daycard__tag, .bk-chip__site, .rc-tag):not(.vehicle-card *) {
    letter-spacing: normal;
    font-family: var(--bs-font-ui);
}
/* The vehicle cards' badges are the same pill family, in the card's smaller size (they used to be small capitals). */
.shell .vehicle-card .badge-flag { text-transform: none; }

/* The split icon wherever splitting is shown: the split dialog's heading and its Apply split button. */
.shell .split-dialog__mark { display: inline-flex; vertical-align: -0.1em; margin-inline-end: 0.45rem; color: var(--ol-split); }
.shell .split-dialog__mark .split-icon { width: 1.15em; height: 1.15em; }
.shell [data-line-split-target="apply"] { display: inline-flex; align-items: center; gap: 0.4rem; }
[data-bs-theme="dark"] .shell .split-dialog__mark .split-icon { filter: drop-shadow(0 0 3px currentColor); }
/* Dark theme: the header's paper-on-ink text and the share bar's ink segment are both near-black there. */
[data-bs-theme="dark"] .split-dialog__header { color: var(--bs-text); }
[data-bs-theme="dark"] .split-dialog__header small { color: var(--bs-text-secondary, #9aa4af); }
[data-bs-theme="dark"] .split-dialog__stack > i:nth-child(2n) { background: color-mix(in srgb, var(--bs-text) 75%, transparent); }

/* Close / remove: every dialog's close button and the split dialog's remove-share button draw a cross inside a
   circle (_partials/_close_icon.html.twig). The button is round too, so its focus ring is a circle round the icon
   rather than a tall box round a text ×. Not scoped to .shell: dialogs on the portals and the kiosk use it too. */
:is(.modal__close, .split-dialog__remove) {
    display: inline-grid; place-items: center; flex: none;
    width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%;
    background: none; color: var(--bs-text-secondary, #667085); font-size: 0; line-height: 0; cursor: pointer;
    transition: color 0.12s ease, background-color 0.12s ease;
}
:is(.modal__close, .split-dialog__remove):hover { color: var(--bs-text); background: color-mix(in srgb, currentColor 10%, transparent); }
:is(.modal__close, .split-dialog__remove):focus-visible { outline: 2px solid var(--bs-hi-vis, #00bd7b); outline-offset: 2px; }
.close-icon { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
[data-bs-theme="dark"] :is(.modal__close, .split-dialog__remove):hover .close-icon { filter: drop-shadow(0 0 3px currentColor); }

/* Workflow tab: every trade name and every work line reads in Title Case ("Electrical Repair", "Paint N/S Front
   Wing"), whatever case the workshop's status names and the estimate's lines were typed in. English only. */
:root:lang(en) .shell :is(.workflow__trade, .workflow__step-nm > span, .workflow__op-name, .phase-share-row__part > span:not([class])) {
    text-transform: capitalize;
}

/* The job header's status pill in its trade's colour (status_trade_colour(), set inline as --c): its words, ring,
   dot and glow are all exactly the trade's colour. */
.shell .job-head .detail-head .status-pill--trade { color: var(--c); border-color: var(--c); }
[data-bs-theme="dark"] .shell .job-head .detail-head .status-pill--trade { color: var(--c); border-color: var(--c); text-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }
[data-bs-theme="dark"] .shell .job-head .job-status-block .status-pill--trade::before { background: var(--c); box-shadow: 0 0 6px var(--c), 0 0 12px var(--c); }

/* ---------------------------------------------------------------------
   13. Workshop TV "Live View" (jobs/job/live.html.twig, full-screen, outside .shell)
   Approved on public/mockups/tv-board.html. True black and glows in the dark theme; the titles' 450 weight in both.
   --------------------------------------------------------------------- */
.workshop-tv .tile__name { font-weight: 450; }
[data-bs-theme="dark"] body:has(.workshop-tv),
[data-bs-theme="dark"] .workshop-tv { background: #000; }
[data-bs-theme="dark"] .workshop-tv .tile { background: #000; border-color: #8fa3b5; box-shadow: 0 0 12px rgba(190, 215, 240, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
[data-bs-theme="dark"] .workshop-tv .tile__head { border-bottom-color: #8fa3b5; background: linear-gradient(#141a20, #000); }
/* Tile titles: their blue, brighter, glowing (a little room so the clipped title box does not cut the halo). */
[data-bs-theme="dark"] .workshop-tv .tile__name { color: #3cc4ff; text-shadow: 0 0 8px rgba(var(--rs-blue-rgb), 0.85), 0 0 18px rgba(var(--rs-blue-rgb), 0.45); padding-block: 2px; }
/* Stage counts: a green glowing pill. */
[data-bs-theme="dark"] .workshop-tv .tile__count {
    color: var(--rs-accent); border: 1px solid var(--rs-accent); border-radius: var(--rs-pill-radius); background: #000;
    box-shadow: 0 0 12px -2px rgba(var(--rs-accent-rgb), 0.75), inset 0 0 8px -4px var(--rs-accent);
    text-shadow: 0 0 8px rgba(var(--rs-accent-rgb), 0.7);
}
[data-bs-theme="dark"] .workshop-tv .tv-live { text-shadow: 0 0 10px rgba(var(--rs-accent-rgb), 0.6); }
[data-bs-theme="dark"] .workshop-tv .tv-live__dot { box-shadow: 0 0 6px var(--rs-accent), 0 0 14px var(--rs-accent); }
[data-bs-theme="dark"] .workshop-tv .tv-clock { text-shadow: 0 0 14px rgba(var(--rs-cyan-rgb), 0.45); }
/* Vehicle rows: black, their coloured edge glowing in its own colour (green, amber when due, red when overdue, QC blue). */
[data-bs-theme="dark"] .workshop-tv .veh { background: #07090b; --vg: var(--rag, var(--rag-neutral)); border-block-color: #5d6e7e; border-inline-end-color: #5d6e7e; box-shadow: none; }
[data-bs-theme="dark"] .workshop-tv .tile .veh.veh--due-amber { --vg: var(--rag-amber); }
[data-bs-theme="dark"] .workshop-tv .tile .veh.veh--due-red { --vg: var(--rag-red); }
[data-bs-theme="dark"] .workshop-tv .tile[data-code="quality_control"] .veh { --vg: #4169e1; }
[data-bs-theme="dark"] .workshop-tv .veh__progress-bar { background: #14171b; overflow: visible; }
[data-bs-theme="dark"] .workshop-tv .veh__progress-fill { background: #3db4ff; box-shadow: 0 0 6px #3db4ff, 0 0 12px rgba(61, 180, 255, 0.55); }
[data-bs-theme="dark"] .workshop-tv .veh__progress-time--over { text-shadow: 0 0 8px rgba(242, 104, 95, 0.75); }
[data-bs-theme="dark"] .workshop-tv .veh__progress-time--near { text-shadow: 0 0 8px rgba(240, 180, 41, 0.7); }
[data-bs-theme="dark"] .workshop-tv .veh__parts { text-shadow: 0 0 8px color-mix(in srgb, currentColor 70%, transparent); }
[data-bs-theme="dark"] .workshop-tv .veh__pin { filter: drop-shadow(0 0 3px currentColor); }
[data-bs-theme="dark"] .workshop-tv .veh__tech { text-shadow: 0 0 6px rgba(var(--rs-accent-rgb), 0.35); }
[data-bs-theme="dark"] .workshop-tv .tile__empty { color: #59627a; }

/* A box whose hint is shrunk to fit (fit_placeholder_controller.js): only the hint takes the fitted size. */
[data-controller~="fit-placeholder"]::placeholder { font-size: var(--fit-placeholder-size, inherit); }

/* A consent tick box under the box it belongs to (Edit Customer): a little room between them. */
.shell .field > input + .checkbox-field { margin-top: 0.55rem; }

/* Sidebar "Learning" link: its words and graduation-cap icon in the Required pill's yellow (no border, same look
   otherwise). The sidebar is dark in both themes, so the dark-theme yellow is used in both, with the same soft glow
   the other sidebar icons have; hover and the current page brighten it rather than turning it white. */
.shell .sidebar__learning,
.shell .sidebar__learning .sidebar__learning-icon { color: #ffb02e; }
.shell .sidebar__learning .sidebar__learning-icon { filter: drop-shadow(0 0 2px rgba(255, 176, 46, 0.6)); }
.shell .sidebar__learning:hover,
.shell .sidebar__learning.is-active { color: #ffc65c; text-shadow: 0 0 8px rgba(255, 176, 46, 0.55); }
.shell .sidebar__learning:hover .sidebar__learning-icon,
.shell .sidebar__learning.is-active .sidebar__learning-icon { color: #ffc65c; filter: drop-shadow(0 0 4px #ffb02e); }

/* The onboarding form writes its own star on a required label; it takes the same yellow as every other required star. */
.onb__req { color: var(--req); font-weight: 700; }
[data-bs-theme="dark"] .onb__req { text-shadow: 0 0 6px color-mix(in srgb, var(--req) 70%, transparent); }

/* ---------------------------------------------------------------------
   14. Customer record (templates/reference/customer/show.html.twig)
   Approved mockup: public/mockups/customer-record.html. Contact, addresses and notes in a sticky left rail,
   a totals row across the top, the work boxes on the right, and one History box with a section switch.
   Scoped to `.crec`, NOT `.cx`: customers.css already owns `.cx` for the Customer Information list page.
   The vehicles and documents partials are shared with the Edit Customer page, which has no `.crec`
   wrapper, so nothing here reaches it.
   --------------------------------------------------------------------- */
.shell .crec {
    --crec-line: color-mix(in srgb, var(--bs-text) 22%, transparent);
    --crec-fill: color-mix(in srgb, var(--bs-text) 5%, transparent);
    --crec-row: color-mix(in srgb, var(--bs-text) 9%, transparent);
    --crec-hi: var(--rs-accent-press); --crec-green: var(--rs-green-deep); --crec-amber: var(--rs-amber-ink); --crec-blue: #1d6fa5; --crec-hero: var(--rs-cyan); --crec-purple: #6d28d9;
}
[data-bs-theme="dark"] .shell .crec {
    --crec-line: #3a4048; --crec-fill: #000; --crec-row: #1c2025;
    --crec-hi: #00ff9c; --crec-green: #2bffa4; --crec-amber: #ffc23d; --crec-blue: #4dc3ff; --crec-hero: #3ccbff; --crec-purple: #b266ff;
}

/* Header: name with its type and on-site pills; actions on the right. */
.shell .crec-head { align-items: flex-end; margin-bottom: 1rem; }
.shell .crec-head .page-title { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.shell .crec-head .page-title .badge-flag,
.shell .crec-head .page-title .status-pill { font-size: 0.75rem; letter-spacing: normal; }
.shell .crec-head__acts { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.shell .crec-head__acts .btn { display: inline-flex; align-items: center; gap: 0.45rem; }
.shell .crec .crec-ico { width: 1.05em; height: 1.05em; flex: none; }
.shell .crec .crec-ico--blue { color: var(--crec-blue); }
.shell .crec .crec-ico--green { color: var(--crec-green); }
.shell .crec .crec-ico--amber { color: var(--crec-amber); }
.shell .crec .crec-ico--purple { color: var(--crec-purple); }
.shell .crec :is(.btn--primary, .btn--back, .btn--secondary, .btn--claim, .btn--danger) .crec-ico { color: inherit; }
[data-bs-theme="dark"] .shell .crec :is(.crec-ico--blue, .crec-ico--green, .crec-ico--amber, .crec-ico--purple) { filter: drop-shadow(0 0 3px currentColor); }
[data-bs-theme="dark"] .shell .crec :is(.btn--primary, .btn--back, .btn--secondary, .btn--claim, .btn--danger) .crec-ico { filter: none; }
/* The job header's glyphs keep the job header's colours here: the edit document blue, the pin green. */
.shell .crec .hico--doc { color: var(--crec-blue); }
.shell .crec .hico--pin { color: var(--crec-green); }
.shell .crec :is(.btn--primary, .btn--back, .btn--secondary, .btn--claim, .btn--danger) .hico { color: inherit; }
[data-bs-theme="dark"] .shell .crec :is(.hico--doc, .hico--pin) { filter: drop-shadow(0 0 3px currentColor); }

/* Totals row: the dark hero tile first, then one equal column per tile the viewer may see. */
.shell .crec-sum { display: grid; grid-template-columns: repeat(var(--crec-tiles, 4), minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.shell .crec-sum--hero { grid-template-columns: 1.4fr repeat(var(--crec-tiles, 4), minmax(0, 1fr)); }
.shell .crec-tile { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.85rem 1.1rem; margin: 0; border-radius: calc(14px * var(--rs-radius-scale)); color: inherit; text-decoration: none; min-width: 0; }
.shell a.crec-tile:hover { border-color: var(--crec-line); color: inherit; }
.shell .crec-tile__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-muted); }
.shell .crec-tile__v { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.shell .crec-tile__v small { font-size: 0.85rem; font-weight: 500; color: var(--bs-muted); }
.shell .crec-tile__sub { font-size: 0.82rem; color: #b8c1c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell .crec-tile--hero { background: var(--rs-ink); border-color: var(--rs-ink); color: #eef3f1; }
.shell .crec-tile--hero .crec-tile__label { color: #8a959f; }
.shell .crec-tile--hero .crec-tile__v { color: var(--crec-hero); }
.shell a.crec-tile--hero:hover { color: #eef3f1; border-color: #3a4048; }
[data-bs-theme="dark"] .shell .crec-tile--hero { background: #000; border-color: #26303a; }
[data-bs-theme="dark"] .shell .crec-tile--hero .crec-tile__v { text-shadow: 0 0 12px color-mix(in srgb, var(--crec-hero) 60%, transparent); }

/* Body: a sticky info rail beside the work column. */
.shell .crec-body { display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1.1rem; }
.shell .crec-rail { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; min-width: 0; max-height: calc(100vh - 2rem); overflow-y: auto; scrollbar-width: thin; }
.shell .crec-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.shell .crec-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.shell .crec-pair:has(> :only-child) { grid-template-columns: 1fr; }
.shell .crec-pair > .panel { min-width: 0; display: flex; flex-direction: column; }

/* Every box: a header row (title, count, one button), then its table flush to the edges. The partials'
   own spacing (form-card padding, the 1.25rem top margins, the 720px form width) is undone here. */
.shell .crec-body .panel { margin: 0 !important; padding: 0; max-width: none; overflow: hidden; }
.shell .crec .crec-box__head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--crec-row); }
.shell .crec .crec-box__head > h2 { margin: 0; font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 0.55rem; font-family: var(--bs-font-ui); text-transform: none; letter-spacing: normal; color: var(--bs-text); }
.shell .crec .crec-box__count { font-size: 0.78rem; font-weight: 600; color: var(--bs-muted); }
.shell .crec .crec-box__head > .btn,
.shell .crec .crec-box__head > [data-controller="modal"] > .btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.shell .crec .crec-box__body { padding: 0.9rem 1.1rem; }
.shell .crec-body .table-scroll { margin: 0; border-radius: 0; }
.shell .crec-body .data-table thead th { padding: 0.5rem 1.1rem; background: var(--crec-fill); border-bottom: 1px solid var(--crec-row); font-family: var(--bs-font-ui); font-size: 0.76rem; font-weight: 600; letter-spacing: normal; text-transform: none; white-space: nowrap; }
.shell .crec-body .data-table tbody :is(td, th) { padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--crec-row); font-size: 0.88rem; }
.shell .crec-body .data-table tbody tr:last-child :is(td, th) { border-bottom: 0; }
.shell .crec-body .data-table__actions { white-space: nowrap; text-align: end; }
.shell .crec-body .data-table__actions > * { vertical-align: middle; }
.shell .crec-body .data-table__actions form { display: inline; }
.shell .crec-body .data-table__actions .btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.shell .crec-body .data-table__actions .status-pill { vertical-align: middle; }
.shell .crec .crec-mm { color: var(--bs-muted); }
/* An empty box is one line under its header, not a tall centred block. */
.shell .crec-body .empty-state { padding: 0.9rem 1.1rem; text-align: start; font-size: 0.88rem; margin: 0; }

/* Registrations in the tables: the app's number plate, shrunk to a table row. */
:is(.shell, .pt, .book-in) .crec-plate.crec-plate { vertical-align: middle; }
:is(.shell, .pt, .book-in) .crec-plate.crec-plate.reg-plate--uk { --strip: calc(0.85rem + 2px); height: 1.45rem; font-size: 1.12rem; padding: 0 0.4rem 0 calc(0.85rem + 0.35rem); border-width: 1.5px; border-radius: calc(4px * var(--rs-radius-scale)); }
:is(.shell, .pt, .book-in) .crec-plate.crec-plate.plate { --plate-h: 1.45rem !important; }
/* Every plate is the width of the longest a registration can be (7 characters plus the space, e.g. AA12 ABC,
   sized for the widest letters, WW12 WWW), so the plates line up down a column whatever the registration. */
:is(.shell, .pt, .book-in) .crec-plate.crec-plate { box-sizing: border-box; width: 6.9rem; justify-content: center; }
/* UK plates only: a registration of 8+ characters (dummy data; real ones stop at 7) keeps the same plate and shrinks its
   lettering in step with its length, so it still fits. 7 or fewer keep the size above. */
:is(.shell, .pt, .book-in) .crec-plate.crec-plate.reg-plate--uk.reg-plate--long { font-size: calc(1.12rem * 7 / var(--plate-chars, 8)); letter-spacing: 0.02em; }
/* The side-by-side boxes are half width: tighter cells so Claims' four columns fit without scrolling. */
.shell .crec-pair .data-table thead th,
.shell .crec-pair .data-table tbody :is(td, th) { padding-inline: 0.75rem; }
.shell .crec-pair .data-table :is(th, td):first-child { padding-inline-start: 1.1rem; }
:is(.shell, .pt, .book-in) a.crec-plate.crec-plate:hover { transform: none; }

/* Rail cards: an icon, the label and value, then the row's own action. */
.shell .crec-dl { margin: 0; }
.shell .crec-dl > div { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: start; padding: 0.6rem 0; border-bottom: 1px solid var(--crec-row); }
.shell .crec-dl > div:first-child { padding-top: 0; }
.shell .crec-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.shell .crec-dl dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bs-muted); margin: 0; font-family: var(--bs-font-ui); }
.shell .crec-dl dd { margin: 0.1rem 0 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.shell .crec-dl__ico { padding-top: 0.1rem; font-size: 1.05rem; display: inline-flex; }
.shell .crec-dl__ico svg { width: 1.1rem; height: 1.1rem; }
.shell .crec-dl__act { display: flex; gap: 0.35rem; padding-top: 0.1rem; }
.shell .crec-dl__act .message-actions { display: inline-flex; }
.shell .crec-optins { display: flex; flex-wrap: nowrap; gap: 0.3rem; margin-top: 0.7rem; }
/* One even row however many channels are opted in: the pills share the card's width, each as wide as its own words. */
.shell .crec-optins .badge-flag { flex: 1 1 auto; justify-content: center; text-align: center; font-size: 0.62rem; padding-inline: calc(0.3rem * var(--rs-pill-pad)); letter-spacing: 0; white-space: nowrap; }
.shell .crec-optins .badge-flag::before { content: "✓"; margin-inline-end: 0.2em; font-weight: 800; }
/* The plate and the model beside it in a table cell (Current WIPs): room between them. */
.shell .crec-box td .crec-plate { margin-inline-end: 0.85rem; }
.shell .crec-same { color: var(--bs-muted); font-style: italic; }
.shell .crec-notes { font-size: 0.9rem; line-height: 1.5; white-space: pre-line; }
.shell .crec .crec-icon-btn { width: 1.85rem; padding: 0; justify-content: center; }

/* Documents: the slim one-row dropzone at the foot of the box. */
.shell .crec .dropzone.dropzone--slim { margin: auto 1.1rem 1rem; padding: 0.65rem 0.9rem; border: 1.5px dashed var(--crec-line); border-radius: calc(10px * var(--rs-radius-scale)); display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; text-align: start; font-size: 0.84rem; color: var(--bs-muted); }
.shell .crec-body .table-scroll + .empty-state + .dropzone--slim,
.shell .crec-body .table-scroll + .dropzone--slim { margin-top: 0.9rem; }
.shell .crec .dropzone--slim .dropzone__prompt { margin: 0; color: inherit; }
.shell .crec .dropzone--slim .dropzone__browse { color: var(--crec-blue); text-decoration: underline; cursor: pointer; }
.shell .crec .dropzone--slim:focus-within { outline: 2px solid var(--crec-blue); outline-offset: 2px; }
.shell .crec .dropzone--slim input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.shell .crec .dropzone--slim .dropzone__fallback { margin: 0 0 0 auto; }
.shell .crec .dropzone--slim :is(.dropzone__list, .dropzone__error) { flex-basis: 100%; }

/* History: one box, a segmented switch in its header. */
.shell .crec-seg { display: inline-flex; padding: 0.2rem; border-radius: calc(10px * var(--rs-radius-scale)); background: var(--crec-fill); border: 1px solid var(--crec-line); gap: 0.2rem; flex-wrap: wrap; }
.shell .crec-seg button { font: inherit; font-size: 0.8rem; font-weight: 600; border: 0; background: transparent; color: var(--bs-muted); padding: 0.3rem 0.7rem; border-radius: calc(7px * var(--rs-radius-scale)); cursor: pointer; }
.shell .crec-seg button:hover { color: var(--bs-text); }
.shell .crec-seg button.active { background: var(--bs-paper); color: var(--bs-text); box-shadow: inset 0 0 0 1.5px var(--crec-hi); }
[data-bs-theme="dark"] .shell .crec-seg button.active { box-shadow: inset 0 0 0 1.5px var(--crec-hi), 0 0 12px -4px var(--crec-hi); }
.shell .crec-seg__count { opacity: 0.7; margin-inline-start: 0.25rem; }
.shell .crec-history .tab-pane > .empty-state { border: 0; }

@media (max-width: 1100px) {
    .shell .crec-body { grid-template-columns: 1fr; }
    .shell .crec-rail { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
    .shell .crec-pair { grid-template-columns: 1fr; }
    .shell .crec-sum, .shell .crec-sum--hero { grid-template-columns: 1fr 1fr; }
    .shell .crec-tile--hero { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------
   15. Job page Overview tab (templates/jobs/job/show.html.twig, #pane-overview)
   Approved on public/mockups/overview-tab.html (2026-11-07). Key figures across the top, the things you DO
   on the left (Time On This Job, Key-To-Key), the things you READ on the right (Vehicle & Job, Key Dates,
   Notes, Additional Findings, Customer). Same tokens as the Workflow tab so the two tabs read as one system.
   --------------------------------------------------------------------- */
.shell .overview {
    --ov-line: color-mix(in srgb, var(--bs-text) 22%, transparent);
    --ov-fill: color-mix(in srgb, var(--bs-text) 5%, transparent);
    --ov-row: color-mix(in srgb, var(--bs-text) 9%, transparent);
    --ov-hi: #00bd7b; --ov-green: #146c37; --ov-amber: #9a6700; --ov-red: #b3261e; --ov-blue: #1d6fa5;
    --ov-hero: #00b3ff;
}
[data-bs-theme="dark"] .shell .overview {
    --ov-line: #3a4048; --ov-fill: #000; --ov-row: #1c2025;
    --ov-hi: #00ff9c; --ov-green: #2bffa4; --ov-amber: #ffc23d; --ov-red: #ff4d5e; --ov-blue: #4dc3ff;
    --ov-hero: #3ccbff;
}

/* Title Case on the tab's labels (English only; buttons and pills already get it from section 12). */
:root:lang(en) .shell .overview :is(
    h2, h3, dt, summary, .overview__eyebrow, .overview__tile-k, .overview__tile-sub, .overview__chip,
    span.clock-panel__label, .check-row, .overview__crew-trade
) { text-transform: capitalize; }
/* Hint sentences stay in sentence case, whatever class they borrow. */
.shell .overview p.clock-panel__label { text-transform: none; }

/* Key figures row */
.shell .overview__sum { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.shell .overview__sum > * { flex: 1 1 0; min-width: 0; }
.shell .overview__sum > .overview__hero { flex-grow: 1.6; }
.shell .overview__tile { display: flex; flex-direction: column; justify-content: center; padding: 0.8rem 1rem; margin: 0; border-radius: 14px; }
.shell .overview__tile-k, .shell .overview__eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-muted); }
:root:not(:lang(de)) .shell .overview :is(.overview__tile-k, .overview__eyebrow) { text-transform: uppercase; }
.shell .overview__tile-v { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 0.1rem; line-height: 1.15; }
.shell .overview__tile-sub { font-size: 0.78rem; color: var(--bs-muted); margin-top: 0.15rem; }
.shell .overview__tile-sub .overview__chip { margin-top: 0.1rem; }
.shell .overview__hero > .countdown, .shell .overview__hero > .kpi-empty { height: 100%; margin: 0; max-width: none; padding: 0.8rem 1rem; border-radius: 14px; display: flex; flex-direction: column; justify-content: center; }
.shell .overview__hero > .kpi-empty { background: #15171a; color: #b8c1c9; border: 1px solid #15171a; }
[data-bs-theme="dark"] .shell .overview__hero > .kpi-empty { background: #000; border-color: color-mix(in srgb, #00b3ff 55%, #000); box-shadow: 0 0 18px -4px color-mix(in srgb, #00b3ff 55%, transparent), inset 0 0 22px -12px #00b3ff; }
.shell .overview__hero .countdown__time { font-size: 1.75rem; }
.shell .countdown__sub { display: block; font-size: 0.78rem; color: #b8c1c9; margin-top: 0.15rem; }
@media (max-width: 1000px) {
    .shell .overview__sum { flex-wrap: wrap; }
    .shell .overview__sum > * { flex-basis: calc(50% - 0.375rem); }
    .shell .overview__sum > .overview__hero { flex-basis: 100%; }
}

/* Two columns */
.shell .overview__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1rem; align-items: start; }
.shell .overview__main, .shell .overview__side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.shell .overview__main > *, .shell .overview__side > * { margin: 0 !important; max-width: none; }
@media (max-width: 1100px) { .shell .overview__grid { grid-template-columns: 1fr; } }

/* Cards */
.shell .overview .overview__card { padding: 0; max-width: none; border-radius: 14px; }
.shell .overview__card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--ov-row); }
.shell .overview__card-head :is(h2, .section-heading) { margin: 0; font-size: 1rem; font-weight: 800; }
.shell .overview__card-body { padding: 0.9rem 1.1rem; }
.shell .overview__card-foot { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem 1.1rem; border-top: 1px solid var(--ov-row); background: color-mix(in srgb, var(--bs-text) 2%, transparent); border-radius: 0 0 14px 14px; }
.shell .overview__card-foot > form { margin: 0 !important; }
[data-bs-theme="dark"] .shell .overview__card-foot { background: #000; }

/* Chips */
.shell .overview__chip { --c: var(--bs-text); display: inline-flex; align-items: center; gap: 0.4rem; height: 1.6rem; padding: 0 0.55rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--c); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.shell .overview__chip--green, .shell .overview__chip--live { --c: var(--ov-green); }
.shell .overview__chip--amber { --c: var(--ov-amber); }
.shell .overview__chip--red { --c: var(--ov-red); }
.shell .overview__chip--blue { --c: var(--ov-blue); }
.shell .overview__chip--dot::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.shell .overview__chip--live::before { animation: ov-pulse 1.6s ease-in-out infinite; }
@keyframes ov-pulse { 50% { opacity: 0.25; } }
[data-bs-theme="dark"] .shell .overview__chip { background: #000; border-color: var(--c); box-shadow: 0 0 14px -4px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 10px -4px color-mix(in srgb, var(--c) 60%, transparent); text-shadow: 0 0 6px color-mix(in srgb, var(--c) 70%, transparent); }
[data-bs-theme="dark"] .shell .overview__chip:not(.overview__chip--green, .overview__chip--amber, .overview__chip--red, .overview__chip--blue, .overview__chip--live) { --c: #9aa6b8; box-shadow: none; text-shadow: none; border-color: var(--ov-line); }

/* Time On This Job: status row */
.shell .overview .status-form__row.overview__status { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 0.6rem; align-items: end; }
.shell .overview .overview__status > * { min-width: 0; }
@media (max-width: 700px) { .shell .overview .status-form__row.overview__status { grid-template-columns: 1fr; } }

/* "On the car now" chips */
.shell .overview .clock-panel__on-job { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; }
.shell .overview .clock-panel__on-job-item { gap: 0.55rem; padding: 0.3rem 0.35rem 0.3rem 0.45rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ov-hi) 45%, transparent); background: color-mix(in srgb, var(--ov-hi) 7%, transparent); font-size: 0.82rem; }
[data-bs-theme="dark"] .shell .overview .clock-panel__on-job-item { background: #000; box-shadow: 0 0 12px -5px var(--ov-hi); }

/* Technicians: one row per trade */
.shell .overview .job-crew { gap: 0; margin: 0.9rem -1.1rem 0; padding-top: 0; border-top: 0; }
.shell .overview .job-crew__head { padding: 0.8rem 1.1rem; border-top: 1px solid var(--ov-row); border-bottom: 1px solid var(--ov-row); }
.shell .overview .job-crew__head .section-heading { font-size: 0.9rem; font-weight: 800; }
.shell .overview .job-crew__role.overview__crew-row { display: grid; grid-template-columns: 2.1rem 9.5rem minmax(0, 1fr); gap: 0.7rem; align-items: center; padding: 0.5rem 1.1rem; border-bottom: 1px solid var(--ov-row); }
.shell .overview .job-crew__role.overview__crew-row[data-phase-row="1"] { background: color-mix(in srgb, var(--ov-hi) 7%, transparent); box-shadow: inset 3px 0 0 var(--ov-hi); }
[data-bs-theme="dark"] .shell .overview .job-crew__role.overview__crew-row[data-phase-row="1"] { background: #000; box-shadow: inset 3px 0 0 var(--ov-hi), inset 14px 0 18px -14px var(--ov-hi); }
.shell .overview__crew-trade { font-size: 0.85rem; font-weight: 700; line-height: 1.15; color: var(--bs-text); }
.shell .overview__crew-trade small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--bs-muted); }
.shell .overview__crew-members { display: flex; flex-wrap: wrap; gap: 0.4rem; min-width: 0; }
.shell .overview__crew-icon { width: 2.1rem; height: 2.1rem; border-radius: 9px; display: grid; place-items: center; color: var(--sk); background: color-mix(in srgb, var(--sk) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sk) 55%, transparent); }
.shell .overview__crew-icon svg { width: 18px; height: 18px; }
[data-bs-theme="dark"] .shell .overview__crew-icon { color: color-mix(in srgb, var(--sk) 80%, #fff); background: #000; border-color: var(--sk); box-shadow: 0 0 12px -2px var(--sk), inset 0 0 8px -3px var(--sk); }
[data-bs-theme="dark"] .shell .overview__crew-icon svg { filter: drop-shadow(0 0 3px var(--sk)); }
.shell .overview .job-crew__member { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2rem; padding: 0 0.3rem 0 0.25rem; border-radius: 99px; font-size: 0.82rem; font-weight: 600; }
.shell .overview .job-crew__member.is-on { border-color: var(--ov-hi); }
[data-bs-theme="dark"] .shell .overview .job-crew__member.is-on { box-shadow: 0 0 10px -3px var(--ov-hi); }
.shell .overview__av { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 0.62rem; font-weight: 800; background: var(--av); color: var(--ink, #fff); }
[data-bs-theme="dark"] .shell .overview__av { box-shadow: 0 0 10px -1px var(--av); }
/* With a photo the trade colour becomes a ring round it, as on the Workflow tab's share badges. */
.shell .overview__av--photo { overflow: hidden; background: var(--bs-paper); box-shadow: 0 0 0 2.5px var(--av); }
[data-bs-theme="dark"] .shell .overview__av--photo { box-shadow: 0 0 0 2.5px var(--av), 0 0 10px -1px var(--av); }
.shell .overview__av--photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }

/* The technician's own clock */
.shell .overview .clock-panel__mine.overview__mine { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.7rem 0.85rem; border-radius: 10px; border: 1.5px solid var(--ov-hi); background: color-mix(in srgb, var(--ov-hi) 8%, transparent); margin-bottom: 0.9rem !important; }
.shell .overview__mine .clock-panel__mine-lines { list-style: none; margin: 0; padding: 0; flex: 1 1 14rem; }
.shell .overview__mine .clock-panel__mine-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; }
.shell .overview__mine-time { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.1rem; color: var(--ov-hi); }
.shell .overview__mine > form:last-child { margin-inline-start: auto; }
[data-bs-theme="dark"] .shell .overview .clock-panel__mine.overview__mine { background: #000; box-shadow: 0 0 16px -6px var(--ov-hi); }
[data-bs-theme="dark"] .shell .overview__mine-time { text-shadow: 0 0 8px var(--ov-hi); }

/* Clock-on form: one row, work lines as tick-chips */
.shell .overview .overview__clockon { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.shell .overview .overview__clockon .clock-panel__field--lines { flex: 1 1 18rem; }
.shell .overview .overview__clockon .clock-panel__lines { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
.shell .overview .overview__clockon .clock-panel__check { height: 2rem; padding: 0 0.6rem; border-radius: 8px; border: 1px solid var(--ov-line); background: var(--ov-fill); font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.shell .overview .overview__clockon .clock-panel__check:has(:checked) { border-color: var(--ov-hi); background: color-mix(in srgb, var(--ov-hi) 10%, transparent); }

/* Clocking on the Workflow tab (2026-11-14; mockup public/mockups/workflow-tab-clocking.html).
   The Time On This Job panel wraps the tab: its strip (status, location, own clock) sits under the summary tiles and each
   trade's technicians sit under that trade card's header. The pills and clock buttons are the Overview's own. */
.shell .overview--time .workflow__ctl { margin: 0 0 1rem; }
.shell .overview .job-crew.job-crew--wf { display: block; margin: 0; padding: 0; border: 0; gap: 0; }
.shell .workflow__table .workflow__crew > td { padding: 0.55rem 1.1rem 0.7rem; border-top: 1px dashed var(--wf-line); }
.shell .workflow__crew-row { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.shell .workflow__crew-lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-muted); }
.shell .workflow__crew-members { flex: 1 1 auto; align-items: center; }
.shell .workflow__crew-empty { color: var(--bs-muted); font-size: 0.85rem; }
.shell .workflow__crew-add { margin-inline-start: auto; }
.shell .workflow__crew-extra:empty { display: none; }
.shell .workflow__crew-row--extra { padding: 0.6rem 1.1rem; margin: 0 0 0.9rem; border-radius: 14px; }
.shell .job-crew__since { font-size: 0.72rem; font-weight: 500; color: var(--ov-hi, var(--wf-hi)); white-space: nowrap; }

/* Fold-outs (Strip For Estimate, Rectification History) */
.shell details.overview__more { flex: 1 1 100%; }
.shell details.overview__more summary { cursor: pointer; list-style: none; font-size: 0.82rem; font-weight: 600; color: var(--bs-muted); display: inline-flex; align-items: center; gap: 0.35rem; }
.shell details.overview__more summary::-webkit-details-marker { display: none; }
.shell details.overview__more summary::before { content: "▸"; transition: transform 0.15s; }
.shell details.overview__more[open] summary::before { transform: rotate(90deg); }
.shell .overview .overview__strip { margin: 0.6rem 0 0 !important; padding: 0.7rem; border-radius: 10px; background: var(--ov-fill); border: 1px dashed var(--ov-line); }

/* Rectification card */
.shell .overview .overview__alert { border-color: color-mix(in srgb, var(--ov-red) 50%, transparent); }
.shell .overview .overview__alert .overview__card-head h2 { color: var(--ov-red); }
.shell .overview__alert #rectification-points { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; max-width: none; }
.shell .overview__alert .rectification-history { margin-top: 0.6rem; }
[data-bs-theme="dark"] .shell .overview .overview__alert { box-shadow: 0 0 18px -8px var(--ov-red); }

/* Key-To-Key: the figures as one sum. Each heading and figure is centred in its column; the headings fit on one
   line, so no room is held for a second. Only the delivery date is boxed, its heading above and the working days
   below, like the other columns. */
.shell .overview dl.detail-grid.overview__k2k { display: grid; grid-template-columns: repeat(var(--k2k-n, 5), minmax(0, 1fr)) auto minmax(10rem, 1.3fr); gap: 0; align-items: stretch; }
.shell .overview__k2k > div { padding: 0.2rem 0.7rem; border-inline-start: 1px solid var(--ov-row); min-width: 0; text-align: center; }
.shell .overview__k2k > div:first-child { border-inline-start: 0; }
.shell .overview__k2k dt { font-family: inherit; letter-spacing: normal; text-transform: none; font-size: 0.7rem; font-weight: 600; color: var(--bs-muted); line-height: 1.2; }
.shell .overview__k2k dd { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 0.1rem 0 0; }
.shell .overview__k2k > .overview__k2k-eq { border: 0; align-self: center; padding: 0 0.35rem; font-size: 1.2rem; color: var(--bs-muted); }
.shell .overview__k2k > .overview__k2k-total { border-inline-start: 0; padding-inline-end: 0; }
.shell .overview__k2k-total .overview__k2k-date { display: flex; align-items: center; justify-content: center; height: 1.5rem; margin-top: 0.1rem; padding: 0 0.8rem; line-height: 1; border-radius: 10px; color: var(--ov-blue); font-size: 1.25rem; background: color-mix(in srgb, var(--ov-blue) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ov-blue) 45%, transparent); }
.shell .overview__k2k-total .overview__k2k-date.is-pending { height: auto; min-height: 1.5rem; padding: 0.2rem 0.8rem; font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.shell .overview__k2k-total .overview__k2k-days { margin-top: 0.15rem; font-size: 0.7rem; font-weight: 600; color: var(--bs-muted); }
[data-bs-theme="dark"] .shell .overview__k2k-total .overview__k2k-date { background: #000; box-shadow: inset 0 0 0 1px var(--ov-blue), 0 0 14px -5px var(--ov-blue); text-shadow: 0 0 8px color-mix(in srgb, var(--ov-blue) 70%, transparent); }
@media (max-width: 900px) {
    .shell .overview dl.detail-grid.overview__k2k { grid-template-columns: repeat(3, 1fr); row-gap: 0.8rem; }
    .shell .overview__k2k > .overview__k2k-eq { display: none; }
    .shell .overview__k2k > .overview__k2k-total { grid-column: 1 / -1; padding-inline-end: 0.7rem; }
    .shell .overview__k2k > div { border-inline-start: 0; }
}
.shell .overview__card-body--k2k { padding-block: 0.6rem 0.7rem; }
.shell .overview__k2k-delay { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--ov-row); }
/* The parts holding the date: a quiet list under the figures (no bullets, a hairline above, small muted text with a dot per row); the first
   five show and the rest fold into a plain "N more". */
.shell .overview__k2k-parts { list-style: none; margin: 0.75rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid var(--ov-row, var(--es-line, rgba(255, 255, 255, 0.08))); display: grid; gap: 0.3rem; font-size: 0.8125rem; line-height: 1.35; color: var(--bs-muted, #aab2bd); }
.shell .overview__k2k-parts li { position: relative; padding-inline-start: 0.9rem; }
.shell .overview__k2k-parts li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.5em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: currentColor; opacity: 0.6; }
.shell .overview__k2k-more { margin-top: 0.3rem; font-size: 0.8125rem; color: var(--bs-muted, #aab2bd); }
.shell .overview__k2k-more > summary { cursor: pointer; padding-inline-start: 0.9rem; font-weight: 600; }
.shell .overview__k2k-more > .overview__k2k-parts { margin-top: 0.3rem; padding-top: 0; border-top: 0; }
/* A part needed for the repair with Delivery Date Not Known: no date is projected for it, so it is flagged at risk rather than left quiet. */
.shell .overview__k2k-parts .is-at-risk { color: var(--pill-bad); font-weight: 600; }
.shell .overview .overview__delay { display: grid !important; grid-template-columns: 8rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: end; margin: 0 !important; }
.shell .overview .overview__delay > * { flex: none !important; min-width: 0; }
.shell .overview .overview__delay input:not(.date-dmy__native) { width: 100% !important; }
@media (max-width: 600px) { .shell .overview .overview__delay { grid-template-columns: 1fr; } }

/* Vehicle & Job */
.shell .overview dl.detail-grid.overview__facts { grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; }
.shell .overview__facts dt, .shell .overview__dates dt { font-family: inherit; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; color: var(--bs-muted); }
.shell .overview__facts dt { text-transform: uppercase !important; }
.shell .overview__facts dd { font-size: 0.9rem; font-weight: 500; overflow-wrap: anywhere; }
.shell .overview__facts dd[data-test="job-vin"] { color: #0071bc; }
.shell .overview__facts .is-wide { grid-column: 1 / -1; }

/* Key Dates timeline */
.shell .overview dl.detail-grid.overview__dates { display: block; }
.shell .overview__date { display: grid; grid-template-columns: 1.1rem 1fr auto; gap: 0.7rem; align-items: center; padding: 0.38rem 0; position: relative; }
.shell .overview__date::before { content: ""; position: absolute; inset-inline-start: calc(0.55rem - 1px); top: 50%; height: 100%; border-inline-start: 2px solid var(--ov-row); }
.shell .overview__date:last-child::before { display: none; }
.shell .overview__dates dt { font-size: 0.88rem; font-weight: 500; letter-spacing: normal; text-transform: none; color: var(--bs-text); }
.shell .overview__dates dd { margin: 0; font-size: 0.88rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.shell .overview__dates dd small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--bs-muted); }
.shell .overview__date.is-pending dd { color: var(--bs-muted); font-weight: 500; }
.shell .overview__date:has(dd form, dd .text-secondary) { grid-template-columns: 1.1rem 1fr; }
.shell .overview__date:has(dd form, dd .text-secondary) dd { grid-column: 2; text-align: start; font-weight: 500; }
.shell .overview__pin { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--ov-line); background: var(--bs-paper); position: relative; z-index: 1; align-self: center; }
.shell .overview__date:has(dd form, dd .text-secondary) .overview__pin { align-self: start; margin-top: 0.15rem; }
.shell .overview__date.is-done .overview__pin { background: var(--ov-green); border-color: var(--ov-green); }
.shell .overview__date.is-next .overview__pin { border-color: var(--ov-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ov-blue) 22%, transparent); }
[data-bs-theme="dark"] .shell .overview__date.is-done .overview__pin { box-shadow: 0 0 8px -1px var(--ov-green); }

/* Short lists (findings, WhatsApp) */
.shell .overview__list { list-style: none; margin: 0; padding: 0; }
.shell .overview__list li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--ov-row); font-size: 0.85rem; }
.shell .overview__list li:last-child { border-bottom: 0; }
.shell .overview__list .overview__muted { color: var(--bs-muted); font-size: 0.78rem; }
.shell .overview__list-end { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.shell .overview__row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.shell .overview__notes textarea { width: 100%; }

@media (prefers-reduced-motion: reduce) {
    .shell .overview .overview__chip--live::before, .shell .overview .clock-dot { animation: none; }
}

/* ---------------------------------------------------------------------
   16. Job page Details tab (templates/jobs/job/show.html.twig #pane-details, _details_*.html.twig)
   Approved mockup: public/mockups/details-tab.html. A status strip across the top, people on the left
   (one row per person, a message button each, unheld roles folded into one line), dates and customer
   links on the right. Scoped to `.details`. (Section 15 is the Overview tab's.)
   --------------------------------------------------------------------- */
.shell .details {
    --dt-line: color-mix(in srgb, var(--bs-text) 22%, transparent);
    --dt-fill: color-mix(in srgb, var(--bs-text) 5%, transparent);
    --dt-row: color-mix(in srgb, var(--bs-text) 9%, transparent);
    /* The highlight and the blue follow the theme's accent and blue (a blue-accent theme recolours the team leader's
       star). The status colours are the shared status inks: no theme sets them, and done must stay green. */
    --dt-hi: var(--rs-accent-press); --dt-blue: color-mix(in srgb, var(--rs-blue) 62%, #000);
    --dt-green: var(--rs-green-deep); --dt-amber: var(--rs-amber-ink); --dt-red: var(--rs-red);
}
[data-bs-theme="dark"] .shell .details {
    --dt-line: #3a4048; --dt-fill: #000; --dt-row: #1c2025;
    --dt-hi: var(--gl-hi); --dt-blue: var(--gl-blue);
    /* Neon status colours on black: no theme sets status colours, so these stay fixed. */
    --dt-green: #2bffa4; --dt-amber: #ffc23d; --dt-red: #ff4d5e;
}

/* The details boxes now sit in the Overview's own columns; the strip of four status tiles spans the page. */
.shell .overview .details__sum { margin-bottom: 1rem; }

/* Two columns: the people and conversations, then a 400px column of dates and links. */
.shell .details__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1rem; align-items: start; }
.shell .details__main,
.shell .details__side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

/* Every card: a header row (title, one action), then its body. */
.shell .details-card { background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: 14px; min-width: 0; }
.shell .details-card__head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--dt-row); }
.shell .details-card__head h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.shell .details-card__head .btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.shell .details-card__body { padding: 0.9rem 1.1rem; }
.shell .details-card__foot { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem 1.1rem; border-top: 1px solid var(--dt-row); }
.shell .details-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-muted); }

/* Crew: two columns of person rows. */
.shell .details-crew { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.shell .details-crew__group { grid-column: 1 / -1; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-muted); padding: 0.75rem 0 0.2rem; }
.shell .details-crew__group:first-child { padding-top: 0; }
.shell .details-person { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.65rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--dt-row); min-width: 0; }
.shell .details-person__role { font-size: 0.7rem; font-weight: 600; color: var(--bs-muted); line-height: 1.15; }
.shell .details-person__name { font-size: 0.9rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.shell .details-person__name small { font-weight: 500; font-size: 0.75rem; color: var(--bs-muted); }
.shell .details-person__av { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.7rem; font-weight: 800; color: #fff; background: #475569; }
.shell .details-person__icon { --sk: var(--dt-hi); width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; color: var(--sk); background: color-mix(in srgb, var(--sk) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sk) 55%, transparent); }
.shell .details-person__icon svg { width: 18px; height: 18px; }
.shell .details-person__icon .hico { color: inherit; filter: none; }
.shell .details-person__icon .skill__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; }
.shell .details-person__you { font-size: 0.72rem; font-weight: 700; color: var(--bs-muted); padding: 0 0.3rem; }
.shell .details-msg { width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; border: 1.5px solid var(--dt-line); background: var(--dt-fill); color: var(--bs-text); }
.shell .details-msg:hover { border-color: var(--dt-blue); color: var(--dt-blue); }
.shell .details-crew__unassigned { grid-column: 1 / -1; margin: 0; padding-top: 0.6rem; font-size: 0.8rem; color: var(--bs-muted); }
.shell .details-crew__unassigned b { color: var(--bs-text); font-weight: 600; }

[data-bs-theme="dark"] .shell .details-person__icon { color: color-mix(in srgb, var(--sk) 80%, #fff); background: #000; border-color: var(--sk); box-shadow: 0 0 12px -2px var(--sk), inset 0 0 8px -3px var(--sk); }
[data-bs-theme="dark"] .shell .details-person__icon svg { filter: drop-shadow(0 0 3px var(--sk)); }
[data-bs-theme="dark"] .shell .details-msg { background: #000; }
[data-bs-theme="dark"] .shell .details-msg:hover { box-shadow: 0 0 10px -3px var(--dt-blue); }

@media (max-width: 1100px) { .shell .details__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) { .shell .details-crew { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .shell .details * { animation: none !important; } }

/* Details tab: status strip (four tiles) and the schedule timeline. */
.shell .details__sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.shell .details-tile { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.8rem 1rem; }
.shell .details-tile__v { font-size: 1.05rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.shell .details-tile__sub { font-size: 0.76rem; color: var(--bs-muted); }
.shell .details-chip { --c: var(--bs-muted); display: inline-flex; align-items: center; gap: 0.4rem; height: 1.6rem; padding: 0 0.55rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--c); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.shell .details-chip:is(.details-chip--amber, .details-chip--blue, .details-chip--green, .details-chip--red)::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.shell .details-chip--amber { --c: var(--dt-amber); }
.shell .details-chip--blue { --c: var(--dt-blue); }
.shell .details-chip--green { --c: var(--dt-green); }
.shell .details-chip--red { --c: var(--dt-red); }
.shell .details-chip--neutral { --c: var(--bs-text); }
[data-bs-theme="dark"] .shell .details-chip:is(.details-chip--amber, .details-chip--blue, .details-chip--green, .details-chip--red) { background: #000; border-color: var(--c); box-shadow: 0 0 14px -4px color-mix(in srgb, var(--c) 70%, transparent); text-shadow: 0 0 6px color-mix(in srgb, var(--c) 70%, transparent); }

.shell .details-tl { list-style: none; margin: 0; padding: 0; }
.shell .details-tl li { display: grid; grid-template-columns: 1.1rem 1fr auto; gap: 0.7rem; align-items: center; padding: 0.38rem 0; position: relative; font-size: 0.88rem; }
.shell .details-tl li::before { content: ""; position: absolute; inset-inline-start: calc(0.55rem - 1px); top: 50%; height: 100%; border-inline-start: 2px solid var(--dt-row); }
.shell .details-tl li:last-child::before { display: none; }
.shell .details-tl__pin { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--dt-line); background: var(--bs-paper); position: relative; z-index: 1; }
.shell .details-tl .is-done .details-tl__pin { background: var(--dt-green); border-color: var(--dt-green); }
.shell .details-tl .is-next .details-tl__pin { border-color: var(--dt-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dt-blue) 22%, transparent); }
.shell .details-tl .is-target .details-tl__pin { border-color: var(--dt-amber); background: color-mix(in srgb, var(--dt-amber) 25%, transparent); }
.shell .details-tl__label { font-weight: 500; }
.shell .details-tl__when { font-variant-numeric: tabular-nums; font-weight: 700; text-align: end; }
.shell .details-tl__when small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--bs-muted); }
.shell .details-tl :is(.is-pending, .is-next) .details-tl__when { color: var(--bs-muted); font-weight: 500; }
[data-bs-theme="dark"] .shell .details-tl .is-done .details-tl__pin { box-shadow: 0 0 8px -1px var(--dt-green); }
@media (max-width: 900px) { .shell .details__sum { grid-template-columns: 1fr 1fr; } }

/* Details tab: customer links (tracking + survey rows, withdraw in the footer). */
.shell .details-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--dt-row); }
.shell .details-link:first-child { padding-top: 0; }
.shell .details-link:last-child { border-bottom: 0; padding-bottom: 0; }
.shell .details-link__title { font-weight: 700; font-size: 0.9rem; grid-column: 1; }
.shell .details-link__hint { font-size: 0.78rem; color: var(--bs-muted); grid-column: 1; }
.shell .details-link__action { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.shell .details-copy { grid-column: 1 / -1; display: flex; gap: 0.4rem; align-items: center; margin-top: 0.35rem; }
.shell .details-copy__url { flex: 1; min-width: 0; font-size: 0.78rem; padding: 0.35rem 0.6rem; border-radius: 8px; border: 1.5px solid var(--dt-line); background: var(--dt-fill); color: var(--bs-text); overflow-wrap: anywhere; user-select: all; }
.shell .details-withdraw { font: inherit; font-size: 0.8rem; font-weight: 600; border: 0; background: transparent; color: var(--dt-red); padding: 0.25rem 0; cursor: pointer; }
.shell .details-withdraw:hover { text-decoration: underline; }
[data-bs-theme="dark"] .shell .details-withdraw { text-shadow: 0 0 8px color-mix(in srgb, var(--dt-red) 55%, transparent); }

/* Details tab: paint mixed (Refinity, read-only). The swatch is neutral: Refinity sends no RGB. */
/* Paint table: one row per field, one column per Refinity mix; scrolls sideways if a job has many mixes. */
.shell .details-paint__scroll { overflow-x: auto; }
.shell .details-paint__table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.shell .details-paint__table :is(th, td) { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--dt-row); text-align: start; vertical-align: top; white-space: nowrap; }
.shell .details-paint__table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.shell .details-paint__table thead th { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--bs-muted); }
.shell .details-paint__table tbody th { font-weight: 600; color: var(--bs-muted); width: 1%; }
.shell .details-paint__num { font-variant-numeric: tabular-nums; }
.shell .details-paint__strong { font-weight: 700; }
.shell .details-paint__layer { display: block; margin-top: 0.1rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--bs-body-color); }
.shell .details-paint__more summary { cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--dt-blue); }
.shell .details-ing { border-collapse: collapse; font-size: 0.8rem; margin-top: 0.4rem; }
.shell .details-ing th { text-align: start; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--bs-muted); padding: 0.25rem 0.4rem; border-bottom: 1px solid var(--dt-row); }
.shell .details-ing td { padding: 0.25rem 0.4rem; border-bottom: 1px solid var(--dt-row); font-variant-numeric: tabular-nums; }
.shell .details-ing :is(th, td):nth-child(2) { text-align: end; }

/* Details tab: insurer messages as chat bubbles (staff on the right); the reply is one row.
   portal.css keeps the base .portal-thread rules for anywhere else the panel appears. */
.shell .details .portal-thread { max-height: 20rem; overflow: auto; gap: 0.55rem; }
.shell .details .portal-thread__msg { max-width: 80%; align-self: flex-start; padding: 0.5rem 0.75rem; border-radius: 12px; font-size: 0.86rem; line-height: 1.4; border: 1px solid var(--dt-row); background: var(--dt-fill); }
.shell .details .portal-thread__msg--staff { align-self: flex-end; border-color: color-mix(in srgb, var(--dt-blue) 40%, transparent); background: color-mix(in srgb, var(--dt-blue) 8%, transparent); }
.shell .details .portal-thread__meta { font-size: 0.7rem; color: var(--bs-muted); margin-bottom: 0.15rem; }
.shell .details .portal-thread__meta strong { color: var(--bs-text); }
.shell .details .portal-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: end; }
.shell .details .portal-reply textarea { min-height: 2.25rem; max-height: 12rem; resize: none; overflow-y: auto; border: 1.5px solid var(--dt-line); border-radius: 8px; background: var(--dt-fill); color: var(--bs-text); }
[data-bs-theme="dark"] .shell .details .portal-thread__msg { background: #000; }
[data-bs-theme="dark"] .shell .details .portal-thread__msg--staff { box-shadow: 0 0 12px -6px var(--dt-blue); }

/* Details tab crew card: the person's face, as on Time on this job — inline before a workshop name, and as
   the office row's leading circle when they have a photo. */
/* The face sits on the name's line, a little below the role so the circle and its ring do not touch it. */
.shell .details-person__name:has(.details-person__face) { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.3rem; }
/* That gap pushes the text down, so the trade icon and the message button take the same offset to stay central on the row. */
.shell .details-person:has(.details-person__face) > :is(.details-person__icon, .details-msg, .details-person__you) { margin-top: 0.3rem; }
.shell .details-person__av--photo { overflow: hidden; background: var(--bs-paper); box-shadow: 0 0 0 2px #475569; }
.shell .details-person__av--photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }

/* An Office slot nobody holds (the estimator opposite the advisor, always shown): a dashed empty circle, the words muted. */
.shell .details-person__av--empty { background: transparent; border: 1.5px dashed var(--dt-line); }
.shell .details-person--empty .details-person__name { color: var(--bs-muted); font-weight: 500; }

/* The VIN wears the Time Remaining clock's colour: the hero blue, with the same glow in the dark theme. */
[data-bs-theme="dark"] .shell .overview__vin-svg { fill: #3ccbff; filter: drop-shadow(0 0 6px var(--rs-cyan)); }

/* Customer record: when a customer search was found by a VIN, that VIN pulses a blue light (the Time Remaining clock's
   colour) for a few turns, then keeps a steady edge; found by plate, the plate pulses the same way. */
@keyframes match-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hero-accent) 55%, transparent), 0 0 8px 0 color-mix(in srgb, var(--hero-accent) 35%, transparent); }
    50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--hero-accent) 0%, transparent), 0 0 18px 3px color-mix(in srgb, var(--hero-accent) 60%, transparent); }
}
.shell .crec-box .crec-vin { font-family: var(--bs-font-mono); font-size: 0.82rem; color: var(--bs-muted); white-space: nowrap; }
.shell .crec-box .crec-vin__text { display: inline-block; padding: 0.15rem 0.45rem; margin-inline-start: -0.45rem; border-radius: 6px; }
.shell .crec-box .crec-vin__text.is-match { color: var(--hero-accent); font-weight: 700; outline: 1.5px solid var(--hero-accent); outline-offset: -1.5px; animation: match-pulse 1.8s ease-in-out 5; }
.shell .crec-box .crec-plate.is-match { animation: match-pulse 1.8s ease-in-out 5; }
.shell .crec-box .crec-vin__text.is-match--done, .shell .crec-box .crec-plate.is-match--done { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .shell .crec-box .crec-plate.is-match { animation: none; box-shadow: 0 0 12px 2px color-mix(in srgb, var(--hero-accent) 45%, transparent); }
    .shell .crec-box .crec-vin__text.is-match { animation: none; box-shadow: 0 0 12px 2px color-mix(in srgb, var(--hero-accent) 45%, transparent); }
}

/* On the Workflow tab the strip's head carries only the live "logged on this job" figure, at the right. */
.shell .workflow__ctl .overview__card-head { justify-content: flex-end; padding-block: 0.5rem; }

/* Parts Only and Strip For Estimate (in the Overview's vehicle facts): the agreed pill tones, green for Parts Only and blue for Strip For
   Estimate, as lettering. Dark theme adds the text glow the other tones have. */
.shell :is(#job-parts-card, #job-parts-only) .check-row { color: var(--pill-good); font-weight: 700; }
.shell #job-parts-card details.overview__more summary { color: var(--pill-info); font-weight: 700; }
[data-bs-theme="dark"] .shell :is(#job-parts-card, #job-parts-only) .check-row { text-shadow: 0 0 10px color-mix(in srgb, var(--pill-good) 70%, transparent); }
[data-bs-theme="dark"] .shell #job-parts-card details.overview__more summary { text-shadow: 0 0 10px color-mix(in srgb, var(--pill-info) 70%, transparent); }

/* Overview: the nine boxes under the tab headings, tighter. The five key figures keep their big numbers but lose padding and a size step;
   the four status tiles become one line each (label, value) instead of a stacked box, so the second row is about half as tall. */
.shell .overview .overview__sum { gap: 0.5rem; margin-bottom: 0.5rem; }
.shell .overview .overview__tile { padding: 0.45rem 0.8rem; border-radius: 12px; }
.shell .overview .overview__tile-v { font-size: 1.3rem; margin-top: 0; line-height: 1.1; }
.shell .overview .overview__tile-sub { font-size: 0.72rem; margin-top: 0.05rem; }
.shell .overview .overview__hero > .countdown, .shell .overview .overview__hero > .kpi-empty { padding: 0.45rem 0.8rem; border-radius: 12px; }
.shell .overview .overview__hero .countdown__time { font-size: 1.5rem; }
.shell .overview .countdown__sub { font-size: 0.72rem; margin-top: 0.05rem; }
.shell .overview .details__sum { gap: 0.5rem; margin-bottom: 0.75rem; }
.shell .overview .details-tile { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.45rem; padding: 0.35rem 0.7rem; border-radius: 12px; }
.shell .overview .details-tile__v { font-size: 0.95rem; }
.shell .overview .details-tile__sub { font-size: 0.72rem; flex-basis: 100%; margin-top: -0.1rem; }
.shell .overview .details-chip { height: 1.45rem; padding: 0 0.45rem; }

/* The status tiles line up under the key figures: the same flex row, so the first (Location) sits under the wide countdown and the other
   four under Logged, Needed, Projected and Requested. */
.shell .overview .details__sum { display: flex; }
.shell .overview .details__sum > * { flex: 1 1 0; min-width: 0; }
.shell .overview:has(.overview__sum > .overview__hero) .details__sum > :first-child { flex-grow: 1.6; }
@media (max-width: 1000px) {
    .shell .overview .details__sum { flex-wrap: wrap; }
    .shell .overview .details__sum > * { flex-basis: calc(50% - 0.25rem); }
}

/* Both rows share one grid, so their columns agree to the pixel (flex widths include each box's padding and the two rows pad differently):
   a wide first column under/over the countdown, then equal columns. With no countdown, every column is equal. */
@media (min-width: 1001px) {
    .shell .overview .overview__sum,
    .shell .overview .details__sum { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
    .shell .overview:has(.overview__sum > .overview__hero) :is(.overview__sum, .details__sum) { grid-template-columns: minmax(0, 1.6fr); }
    .shell .overview .overview__sum > *, .shell .overview .details__sum > * { flex: none; }
}

/* A plate beside a title or an eyebrow: one row that wraps as a whole, never mid-plate. */
.page-title--plate, .eyebrow--plate { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; }
.eyebrow--plate { gap: 0.2rem 0.5rem; }
:is(.shell, .pt, .book-in) .crec-plate.crec-plate { flex: none; }
/* Courtesy Car Calendar: the car column is narrow, so the plate there is a little smaller and never wider than the column. */
.cc .cc-car__reg .crec-plate.crec-plate { max-width: 100%; width: 5.4rem; }
.cc .cc-car__reg .crec-plate.crec-plate.plate { --plate-h: 1.15rem !important; }
.cc .cc-car__reg .crec-plate.crec-plate.reg-plate--uk { --strip: calc(0.7rem + 2px); height: 1.15rem; font-size: 0.9rem; padding: 0 0.3rem 0 calc(0.7rem + 0.25rem); }
.crec-vehicle-name { display: block; margin-top: 0.25rem; }

/* ---- "Not booked in yet": the capacity view (book_in_capacity.js) ---------------------------------------------------------
   Best places to book the car, the workshop's load for two weeks by trade, and whether the chosen start fits. */
.book-in[data-step="book"] { max-width: 720px; }
.book-in[data-step="ask"] { max-width: 460px; }
.book-in .bi-msg-extra { margin: 0; font-weight: 700; }
.book-in .bi-capacity { display: flex; flex-direction: column; gap: 0.7rem; }
.book-in .bi-capacity[hidden], .book-in .bi-msg-extra[hidden], .book-in .bi-notbefore[hidden], .book-in .bi-nothing[hidden], .book-in .bi-verdict[hidden], .book-in .bi-link[hidden] { display: none; }
.book-in .bi-need { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.book-in .bi-chip { font-size: 0.74rem; padding: 0.1rem 0.55rem; border: 1px solid var(--bs-line); border-radius: 6px; color: var(--bs-text-secondary, #667085); }
.book-in .bi-sec { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bs-text-secondary, #667085); margin: 0.1rem 0 -0.2rem; }
.book-in .bi-opts { display: flex; flex-direction: column; gap: 0.4rem; }
.book-in .bi-opt { display: flex; align-items: center; gap: 0.75rem; border: 1px solid var(--bs-line); border-radius: 10px; padding: 0.55rem 0.8rem; cursor: pointer; margin: 0; }
.book-in .bi-opt input { position: absolute; opacity: 0; }
.book-in .bi-opt__dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--bs-text-secondary, #667085); flex: none; position: relative; }
.book-in .bi-opt.is-sel { border-color: rgba(var(--rs-accent-rgb, 0, 222, 145), 0.7); background: rgba(var(--rs-accent-rgb, 0, 222, 145), 0.07); }
.book-in .bi-opt.is-sel .bi-opt__dot { border-color: rgb(var(--rs-accent-rgb, 0, 222, 145)); }
.book-in .bi-opt.is-sel .bi-opt__dot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: rgb(var(--rs-accent-rgb, 0, 222, 145)); }
.book-in .bi-opt input:focus-visible + .bi-opt__dot { outline: 2px solid var(--tile-hover, #00b3ff); outline-offset: 2px; }
.book-in .bi-opt__main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.book-in .bi-opt__title { font-weight: 700; font-size: 0.95rem; }
.book-in .bi-opt__sub { font-size: 0.78rem; color: var(--bs-text-secondary, #667085); }
.book-in .bi-tag { font-size: 0.7rem; font-weight: 700; padding: 0.12rem 0.55rem; border-radius: 6px; border: 1px solid; white-space: nowrap; }
.book-in .bi-tag--green { color: #1f9d68; border-color: rgba(31, 157, 104, 0.5); background: rgba(31, 157, 104, 0.08); }
.book-in .bi-tag--amber { color: #b97800; border-color: rgba(185, 120, 0, 0.55); background: rgba(255, 184, 28, 0.1); }
.book-in .bi-tag--blue { color: #2f6fd6; border-color: rgba(47, 111, 214, 0.5); background: rgba(47, 111, 214, 0.08); }
[data-bs-theme="dark"] .book-in .bi-tag--green { color: #3ddc97; border-color: rgba(61, 220, 151, 0.5); background: rgba(61, 220, 151, 0.08); }
[data-bs-theme="dark"] .book-in .bi-tag--amber { color: #ffb81c; border-color: rgba(255, 184, 28, 0.55); background: rgba(255, 184, 28, 0.09); }
[data-bs-theme="dark"] .book-in .bi-tag--blue { color: #6aa3ff; border-color: rgba(106, 163, 255, 0.5); background: rgba(106, 163, 255, 0.08); }
.book-in .bi-quiet { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--bs-text-secondary, #667085); margin: -0.15rem 0 0; }
.book-in .bi-link { background: none; border: 0; padding: 0; font: inherit; color: var(--tile-hover, #00b3ff); cursor: pointer; }
.book-in .bi-link[aria-expanded="true"] { color: var(--bs-text); font-weight: 600; }
.book-in .bi-dot { opacity: 0.5; }
.book-in .bi-notbefore { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; border: 1px solid var(--bs-line); border-radius: 10px; padding: 0.55rem 0.8rem; }
.book-in .bi-notbefore label { display: flex; align-items: center; gap: 0.6rem; font-size: 0.86rem; margin: 0; white-space: nowrap; }
.book-in .bi-in { padding: 0.3rem 0.6rem; font-size: 0.9rem; border-radius: 8px; border: 1px solid var(--bs-line); background: var(--surface, transparent); color: var(--bs-text); }
.book-in .bi-notbefore small { color: var(--bs-text-secondary, #667085); font-size: 0.76rem; }
.book-in .bi-clear { margin-inline-start: auto; font-size: 0.78rem; }
.book-in .bi-nothing { margin: 0; font-size: 0.86rem; color: var(--bs-text-secondary, #667085); }
.book-in .bi-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.book-in .bi-nav .bi-sec { margin: 0; }
.book-in .bi-pager { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--bs-text-secondary, #667085); }
.book-in .bi-pager button { background: transparent; border: 1px solid var(--bs-line); border-radius: 7px; color: var(--bs-text); padding: 0.15rem 0.6rem; font-size: 0.78rem; }
.book-in .bi-pager button:disabled { opacity: 0.4; }
.book-in .bi-pager b { color: var(--bs-text); font-weight: 600; min-width: 7.2rem; text-align: center; }
.book-in .bi-strip { display: flex; flex-direction: column; gap: 3px; }
.book-in .bi-row { display: grid; grid-template-columns: 7.4rem repeat(14, 1fr); gap: 3px; align-items: stretch; }
.book-in .bi-lab { font-size: 0.72rem; color: var(--bs-text-secondary, #667085); display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-in .bi-row--main .bi-lab { color: var(--bs-text); font-weight: 700; }
.book-in .bi-dh { font-size: 0.62rem; text-align: center; line-height: 1.15; color: var(--bs-text-secondary, #667085); padding-bottom: 2px; }
.book-in .bi-dh b { display: block; font-weight: 600; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.book-in .bi-dh.is-closed { opacity: 0.4; }
.book-in .bi-dh.is-span { color: rgb(var(--rs-accent-rgb, 0, 222, 145)); }
.book-in .bi-c { border: 1px solid transparent; border-radius: 4px; height: 14px; padding: 0; font-size: 0.62rem; font-weight: 700; color: var(--bs-text); line-height: 1; cursor: pointer; }
.book-in .bi-row--main .bi-c { height: 28px; border-radius: 5px; }
.book-in .bi-c--green { background: rgba(31, 157, 104, 0.16); border-color: rgba(31, 157, 104, 0.35); }
.book-in .bi-c--amber { background: rgba(255, 184, 28, 0.22); border-color: rgba(255, 184, 28, 0.55); }
.book-in .bi-c--red { background: rgba(255, 76, 62, 0.26); border-color: rgba(255, 90, 76, 0.65); }
.book-in .bi-c.is-closed { cursor: default; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(128, 128, 128, 0.12) 4px 8px); border: 1px dashed var(--bs-line); }
.book-in .bi-c.is-span { box-shadow: 0 0 0 1.5px rgb(var(--rs-accent-rgb, 0, 222, 145)) inset; }
.book-in .bi-c:focus-visible { outline: 2px solid var(--tile-hover, #00b3ff); outline-offset: 1px; }
.book-in .bi-legend { display: flex; gap: 1rem; font-size: 0.7rem; color: var(--bs-text-secondary, #667085); align-items: center; flex-wrap: wrap; }
.book-in .bi-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 0.35rem; vertical-align: -1px; }
.book-in .bi-sw--green { background: rgba(31, 157, 104, 0.45); }
.book-in .bi-sw--amber { background: rgba(255, 184, 28, 0.6); }
.book-in .bi-sw--red { background: rgba(255, 76, 62, 0.65); }
.book-in .bi-sw--closed { border: 1px dashed var(--bs-line); }
.book-in .bi-verdict { display: flex; flex-direction: column; border: 1px solid; border-radius: 10px; padding: 0.55rem 0.8rem; font-size: 0.86rem; }
.book-in .bi-verdict small { color: var(--bs-text-secondary, #667085); font-size: 0.78rem; }
.book-in .bi-verdict--ok { border-color: rgba(31, 157, 104, 0.4); background: rgba(31, 157, 104, 0.07); }
.book-in .bi-verdict--tight { border-color: rgba(255, 184, 28, 0.55); background: rgba(255, 184, 28, 0.08); }
.book-in .bi-verdict--warn { border-color: rgba(255, 90, 76, 0.55); background: rgba(255, 76, 62, 0.09); }
.book-in .bi-cal { margin-inline-end: auto; align-self: center; font-size: 0.82rem; color: var(--tile-hover, #00b3ff); text-decoration: none; }
.book-in .bi-msg-plate .reg-plate, .book-in [data-book-in-message] .reg-plate { vertical-align: middle; margin-inline-end: 0.5rem; }

/* ---------------------------------------------------------------------
   Clock on now: the "Which work lines?" pop-out (templates/_partials/_work_lines_dialog.html.twig, assets/support/work_lines.js).
   The Workflow tab's card for ONE trade, so its rules above carry the table; these only shape the dialog around it.
   --------------------------------------------------------------------- */
.shell .work-lines-dialog { max-width: 62rem; width: calc(100% - 2rem); padding: 0; overflow: hidden; }
.shell .work-lines-dialog[open] { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); }
.shell .work-lines-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.3rem 0.8rem; }
.shell .work-lines-dialog__head .section-heading { margin: 0 0 0.2rem; }
.shell .work-lines-dialog__head .form-hint { margin: 0; }
.shell .work-lines-dialog__body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 1.3rem 1rem; }
.shell .work-lines-dialog__status { margin: 0 1.3rem 0.6rem; padding: 0.45rem 0.7rem; border-radius: 8px; font-size: 0.88rem; background: color-mix(in srgb, var(--bs-success, #1f9d55) 14%, transparent); }
.shell .work-lines-dialog__status.is-bad { background: color-mix(in srgb, var(--bs-danger, #d33) 14%, transparent); }
.shell .work-lines-dialog__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 1.3rem; border-top: 1px solid color-mix(in srgb, var(--bs-text) 14%, transparent); }
.shell .work-lines-dialog__acts { display: flex; gap: 0.5rem; }
.shell .clock-lines__bar { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.shell .clock-lines__hint { color: var(--bs-muted); font-size: 0.88rem; }
.shell .clock-lines__acts { display: flex; gap: 0.5rem; }
.shell .clock-lines__empty { color: var(--bs-muted); margin: 1rem 0; }
.shell .clock-lines .workflow__card { margin: 0; }
.shell .clock-lines .workflow__col-actions { width: 14rem; }
.shell .clock-lines__off { opacity: 0.55; }
.shell .clock-lines__why { display: block; margin-top: 0.1rem; font-size: 0.78rem; font-weight: 400; color: var(--bs-muted); }
