/* ------------------------------------------------------------------
   My Loading Queue and Live Workshop Status — the stage-board design (demo:
   public/demo/my-loading-queue-app.html and live-workshop-status-app.html, plus their -light twins).

   EVERYTHING here is written under `.lv`, the wrapper templates/time/my_queue.html.twig and
   templates/jobs/job/index.html.twig put round the page. The vehicle card, the mq-tile columns, the
   badges and the buttons are shared with other screens (Due Out, the Workshop board, equipment, stock),
   so a rule against those classes on their own would restyle all of them; scoped under `.lv` they cannot
   be reached. Do not "simplify" a selector here by dropping the `.lv`.

   Theme: light is the default; `[data-bs-theme="dark"]` swaps the tokens for the black palette.
   Specificity: app.css (loaded first) styles .vehicle-card, .mq-tile and the badges with selectors up to
   (0,3,0) in dark. The rules below carry the extra `.lv` (and, where a dark rule exists, a second
   structural class) so they sit above those without !important or source-order luck.

   Column colours are NOT set here: each tile carries its own `--c` inline (stage_colour(), which reads
   the same TradeColours the Workshop Loading page draws its trades in).
   ------------------------------------------------------------------ */

.lv {
    --lv-page: #eef1f6;
    --lv-panel: #ffffff;
    --lv-col: #f8f9fc;
    --lv-card: #ffffff;
    --lv-card-2: #ffffff;
    --lv-line: #a9b3c2;
    --lv-card-edge: #8c9bb8;
    --lv-line-2: #cfd7e6;
    --lv-ink: #1d2126;
    --lv-muted: #5d6a85;
    --lv-hover: #3f5fa8;
    --lv-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    --lv-green: #12c98d;
    --lv-green-ink: #0a8f63;
    --lv-blue: #0b6cf0;
    --lv-red: #c4271d;
    --lv-amber: #a56a00;
    --lv-violet: #6d4fe0;
    --lv-track: #dfe5f0;
    --lv-head-mix: #fff;     /* what a column header's tint is mixed toward */
    --lv-head-ink: #000;     /* what its text is mixed toward for contrast */

    color: var(--lv-ink);
    background: var(--lv-page);
    padding: 22px 24px 28px;
    /* Fills the space below the ticker and any banner (the rule after this block), not a whole window height on top of
       them: that made a short board scroll by their height, onto nothing. */
    flex: 1 0 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* The board's own background reaches the bottom of the window without pushing past it: the main column becomes a
   flex column and the board takes whatever height is left under the ticker and banners. */
.shell__main:has(> .app__main > .lv) { display: flex; flex-direction: column; }
.shell__main:has(> .app__main > .lv) > .app__main { flex: 1 0 auto; display: flex; flex-direction: column; }
[data-bs-theme="dark"] .lv {
    --lv-page: #000000;
    --lv-panel: #0a0a0a;
    --lv-col: #050505;
    --lv-card: #121212;
    --lv-card-2: #0a0a0a;
    --lv-line: #4a4a4a;
    --lv-card-edge: #6e6e6e;
    --lv-line-2: #2a2a2a;
    --lv-ink: #eaf0fb;
    --lv-muted: #8b9ac0;
    --lv-hover: #b5b5b5;
    --lv-shadow: none;
    --lv-green: #19e3a0;
    --lv-green-ink: #19e3a0;
    --lv-blue: #0b7cff;
    --lv-red: #ff8b82;
    --lv-amber: #f6b93b;
    --lv-violet: #8f74f4;
    --lv-track: #222222;
    --lv-head-mix: #000;
    --lv-head-ink: #fff;
}

/* A loading screen owns the whole main area: no inset, no 1600px cap (eleven to thirteen columns want the
   width), and the backdrop runs to the edges. Not the in-page board (.lv--board: Completion, Reception), which sits
   under an ordinary title and intro and keeps the page's padding. */
.app__main:has(> .lv:not(.lv--board)) { padding: 0; max-width: none; margin: 0; }
/* The in-page board keeps the padding but, like a loading screen, takes the full width; min-width: 0 lets its column rail
   scroll inside the page instead of stretching the main area past the window. */
.app__main:has(> .lv.lv--board) { min-width: 0; max-width: none; margin: 0; }
.lv > * { min-width: 0; }

/* ---- Header ---------------------------------------------------- */
.lv-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lv-title { margin-inline-end: auto; min-width: 230px; }
.lv .eyebrow { color: var(--lv-violet); }
.lv .page-title { margin: 2px 0; font-family: inherit; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em; text-transform: none; color: var(--lv-ink); }
.lv-sub { margin: 0; color: var(--lv-muted); font-size: 0.9rem; }
.lv-live { display: inline-flex; align-items: center; gap: 7px; margin-inline-end: 0.5rem; color: var(--lv-green-ink); font-size: 0.8rem; font-weight: 700; }
.lv-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lv-green); animation: lvLive 1.8s infinite; }
@keyframes lvLive { 0% { box-shadow: 0 0 0 0 rgba(25, 227, 160, 0.7); } 70%, 100% { box-shadow: 0 0 0 8px rgba(25, 227, 160, 0); } }

.lv-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.lv-stat {
    display: flex; align-items: center; gap: 12px; min-width: 150px; padding: 12px 18px;
    background: var(--lv-panel); border: 1px solid var(--lv-line); border-radius: calc(12px * var(--rs-radius-scale)); box-shadow: var(--lv-shadow);
}
.lv-stat b { display: block; font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.lv-stat span { color: var(--lv-muted); font-size: 0.8rem; }
.lv-stat__icon { flex: none; }

.lv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-actions > .tech-action-bar,
.lv-actions #technician-action-bar { display: contents; }

/* The search box: the app's own input, drawn as the design's field with the magnifier inside it. */
.lv .table-tools { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; flex: 0 1 auto; min-width: 0; }
.lv .table-tools__search {
    height: 42px; min-width: 300px; padding: 0 14px 0 40px; border-radius: calc(10px * var(--rs-radius-scale));
    background: var(--lv-panel); border: 1px solid var(--lv-line); color: var(--lv-ink); font: inherit; box-shadow: var(--lv-shadow);
}
.lv .table-tools__search::placeholder { color: var(--lv-muted); }
.lv .table-tools__search:focus { outline: none; border-color: var(--lv-green); box-shadow: 0 0 0 3px rgba(25, 227, 160, 0.2); }
.lv .lv-search__icon { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--lv-muted); pointer-events: none; }
/* My Loading Queue: the search box sits in the action row beside the Table / T-Card switch, so it takes that row's
   small button size (32px, as .btn--sm: Clock In, Start Work) rather than the page-level search's 42px. border-box:
   an input counts its border outside its height (a button does not), which made a "36px" box 38px. */
.lv .lv-actions .table-tools__search { box-sizing: border-box; height: 32px; min-width: 240px; padding: 0 12px 0 34px; border-radius: calc(8px * var(--rs-radius-scale)); font-size: 0.82rem; }
.lv .lv-actions .lv-search__icon { inset-inline-start: 11px; width: 15px; height: 15px; }
/* My Loading Queue: the four stat boxes (Live Workshop Status size) sit in the My Clock row, at the right of the
   screen, their tops level with the clock card, laid side by side in one line. Every
   control in the header's action row is one 32px height so tops and bottoms line up; the action buttons' forms wrap
   the button exactly (a block form keeps a text line's descender room under an inline button), and the Table /
   T-Card switch drops from the regular 36px button to the row's 32px. */
.lv--queue .lv-top { align-items: center; }
/* One row: clock card, Working Now (an empty wrapper when nothing is running, which still stretches and so pushes the
   figures right), then the four figures side by side. A grid would give that empty wrapper a column of its own and
   wrap the figures onto a second row under the clock. */
.lv--queue .lv-hero, .lv--queue .lv-hero:not(:has(.lv-working)) { display: flex; align-items: flex-start; gap: 16px; }
.lv--queue .lv-hero > #my-clock { flex: 0 1 460px; min-width: 300px; }
.lv--queue .lv-hero > #my-working-now { flex: 1 1 0; min-width: 0; }
.lv--queue .lv-hero > .lv-stats { flex: none; flex-wrap: nowrap; margin-inline-start: auto; }
.lv--queue .lv-hero .lv-panel { height: auto; }
.lv--queue .lv-actions form { display: flex; margin: 0; }
.lv--queue .lv-actions .view-toggle .btn { height: 32px; padding: 0 12px; font-size: 0.82rem; }
/* The search box: its wrapper is the row's 32px and centred like the rest, and the field drops the browser's own
   search-field look (Safari and others keep their native box, ignoring part of the height and padding set above,
   which sat this one higher than the badges beside it), with no default margin. */
.lv--queue .lv-actions .table-tools { height: 32px; align-self: center; }
.lv--queue .lv-actions .table-tools__search { appearance: none; -webkit-appearance: none; display: block; margin: 0; line-height: normal; }
.lv--queue .lv-actions .table-tools__search::-webkit-search-decoration { -webkit-appearance: none; }
.lv .table-tools__count { color: var(--lv-muted); font-size: 0.8rem; }
/* Vehicles Due Out: only its cards pane wears this design, inside the page's own panel — so none of the
   page-level backdrop, inset or full height, which belong to a screen that IS an .lv page. */
.lv.lv--due-out { padding: 0; min-height: 0; background: transparent; gap: 12px; }
.lv--due-out .mq-board { display: flex; flex-direction: column; gap: 12px; }
/* Reception & Estimating Procedures and Vehicle & Invoicing Completion: their boards wear the same columns and card face
   (photo, number plate, foot) inside the page, like Due Out. Their own lines sit in the card's foot, which already gives the
   inset their app.css rules added for a card without one. */
.lv.lv--board { padding: 0; min-height: 0; background: transparent; gap: 12px; }
.lv--board .reception-card__meta, .lv--board .completion-card__money { padding-inline: 0; margin-top: 4px; }
.lv--board .completion-card__age { padding: 0; margin-top: 4px; }
.lv--board .reception-card__customer, .lv--board .completion-card__customer, .lv--board .reception-card__age, .lv--board .completion-card__age { color: var(--lv-muted); }
.lv--board .reception-card__move { margin: 0; padding: 0 10px 9px; }
/* The stale cue (app.css) survives the design: the amber edge on the card and the amber age. */
.lv--board .vehicle-card-wrap.reception-card--stale { box-shadow: inset 3px 0 0 #c98a00; }
.lv--board .reception-card--stale .reception-card__age { color: var(--lv-amber); font-weight: 600; }
/* The due-out date: the size of the location line above it, not the card's body text. */
.lv .vehicle-card__due { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--lv-ink); font-variant-numeric: tabular-nums; }

/* ---- Buttons --------------------------------------------------- */
.lv .btn, .lv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
    border-radius: calc(8px * var(--rs-radius-scale)); border: 1px solid var(--lv-line-2); background: var(--lv-panel); color: var(--lv-ink);
    font: inherit; font-size: 0.86rem; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer;
    box-shadow: none;
}
.lv .btn:hover, .lv-btn:hover { border-color: var(--lv-hover); background: var(--lv-panel); color: var(--lv-ink); }
.lv .btn--sm { height: 32px; padding: 0 12px; font-size: 0.82rem; }
.lv .btn--secondary { background: var(--lv-blue); border-color: var(--lv-blue); color: #fff; }
.lv .btn--secondary:hover { background: var(--lv-blue); border-color: var(--lv-blue); color: #fff; filter: brightness(1.1); }
/* Primary is the app's green here too (it was this screen's blue), so the main action reads the same on every screen. */
.lv .btn--primary, .lv-btn--primary { background: var(--bs-hi-vis); border-color: var(--bs-hi-vis); color: var(--rs-accent-contrast, var(--bs-ink-2)); }
.lv .btn--primary:hover, .lv-btn--primary:hover { background: var(--bs-hi-vis); border-color: var(--bs-hi-vis); color: var(--rs-accent-contrast, var(--bs-ink-2)); filter: brightness(1.08); }
/* Clock In / Clock Out are the plain buttons beside the blue Start Work, as designed. */
.lv .tech-action-bar .btn--primary, .lv .tech-action-bar .btn--danger { background: var(--lv-panel); border-color: var(--lv-line-2); color: var(--lv-ink); }
.lv .tech-action-bar .btn--primary:hover, .lv .tech-action-bar .btn--danger:hover { background: var(--lv-panel); border-color: var(--lv-hover); color: var(--lv-ink); filter: none; }
.lv .tech-action-bar .btn--secondary { background: var(--lv-blue); border-color: var(--lv-blue); color: #fff; }
.lv .tech-action-bar .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.lv-btn--lg { height: 46px; padding: 0 20px; font-size: 0.95rem; }
.lv .view-toggle { gap: 8px; }
.lv .view-toggle .btn { height: 36px; padding: 0 14px; font-size: 0.86rem; }
.lv .view-toggle .btn[aria-pressed="true"] { background: var(--lv-green); border-color: var(--lv-green); color: #03281c; font-weight: 700; }
.lv .view-toggle .btn[aria-pressed="true"]:hover { background: var(--lv-green); border-color: var(--lv-green); }
.lv :focus-visible { outline: 2px solid var(--lv-green); outline-offset: 2px; }

/* ---- Panels: My Clock and Working Now -------------------------- */
.lv-panel { background: var(--lv-panel); border: 1px solid var(--lv-line); border-radius: calc(14px * var(--rs-radius-scale)); padding: 16px 18px; box-shadow: var(--lv-shadow); }
.lv-ph { margin: 0 0 12px; font-family: inherit; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lv-muted); }
.lv-hero { display: grid; grid-template-columns: minmax(300px, 0.9fr) 1.6fr; gap: 16px; }
.lv-hero:not(:has(.lv-working)) { grid-template-columns: minmax(300px, 640px); }
.lv-hero > div { min-width: 0; }
.lv-hero .lv-panel { height: 100%; }
/* The clock card shares .clock-card with nothing else on this page, but app.css gives it a left accent
   rail and a card background of its own; the design has neither. */
.lv .clock-card { border: 1px solid var(--lv-line); border-inline-start-width: 1px; box-shadow: var(--lv-shadow); display: block; margin-bottom: 0; padding: 10px 14px; }
.lv .clock-card .lv-ph { margin-bottom: 8px; }
.lv-clock__row { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; }
.lv-clock__state { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: calc(10px * var(--rs-radius-scale)); background: rgba(18, 201, 141, 0.1); border: 1px solid rgba(18, 201, 141, 0.3); }
.lv-clock__state b { display: block; font-size: 1.05rem; }
.lv-clock__state small, .lv-clock__fig small { color: var(--lv-muted); font-size: 0.8rem; }
.lv-clock__dot { width: 16px; height: 16px; border-radius: 50%; background: var(--lv-green); box-shadow: 0 0 12px var(--lv-green); flex: none; }
.lv-clock__state--idle { background: rgba(255, 90, 79, 0.1); border-color: rgba(255, 90, 79, 0.35); }
.lv-clock__state--idle .lv-clock__dot { background: #ff5a4f; box-shadow: 0 0 12px #ff5a4f; }
.lv-clock__state--off { background: transparent; border-color: var(--lv-line); }
.lv-clock__state--off .lv-clock__dot { background: var(--lv-muted); box-shadow: none; }
.lv-clock__fig b { display: block; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; font-family: inherit; color: var(--lv-ink); }
.lv-clock__row form { margin: 0; }

.lv-working__body { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.lv-thumb { width: 104px; height: 68px; border-radius: calc(10px * var(--rs-radius-scale)); background: var(--lv-col); border: 1px solid var(--lv-line); display: grid; place-items: center; flex: none; overflow: hidden; color: var(--lv-muted); font-weight: 800; font-size: 1.4rem; text-decoration: none; }
.lv-thumb img { width: 100%; height: 100%; object-fit: contain; }
/* A make emblem sits inside the box with room around it. It is placed by its edges, not sized in percent: a percent height
   inside the grid above resolved to the image's own height, so a roughly square logo came out taller than the 68px box and was cut off. */
.lv-thumb { position: relative; }
.lv-thumb .lv-thumb__emblem { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); object-fit: contain; }
.lv-working__car { display: flex; flex-direction: column; color: var(--lv-muted); font-size: 0.84rem; text-decoration: none; }
.lv-working__car:hover { color: var(--lv-ink); }
.lv-working__reg { color: var(--lv-ink); font-size: 1.25rem; font-weight: 800; letter-spacing: 0.01em; }
.lv-working__progress { flex: 1; min-width: 220px; }
.lv-working__stage { font-weight: 600; }
.lv-working__bar { display: flex; align-items: center; gap: 10px; }
.lv-working__bar .lv-bar { flex: 1; }
.lv-working__bar b { color: var(--lv-green-ink); font-size: 0.85rem; }
.lv-working__times { color: var(--lv-muted); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.lv-working__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-working__actions form { margin: 0; }
.lv-bar { height: 8px; border-radius: calc(99px * var(--rs-radius-scale)); background: var(--lv-track); overflow: hidden; margin: 7px 0; }
.lv-bar > i { display: block; height: 100%; border-radius: calc(99px * var(--rs-radius-scale)); background: linear-gradient(90deg, var(--lv-green), #10c78a); }

/* ---- Board: the rail, the stage columns ------------------------ */
.lv .mq-board__hint { margin: 0; color: var(--lv-muted); font-size: 0.85rem; }
.lv .mq-rail { gap: 8px; }
.lv .mq-rail__arrow { background: var(--lv-panel); border-color: var(--lv-line); box-shadow: var(--lv-shadow); }
.lv .mq-rail__chevron { border-inline-start-color: var(--lv-muted); }
.lv .mq-tiles { gap: 10px; padding: 2px 2px 8px; scrollbar-color: var(--lv-line-2) transparent; }

/* A column: coloured by its own --c (the trade). `color-mix` keeps the border, the header wash and the
   header text all one hue at different strengths, on either background. */
.lv .mq-tile {
    --c: #64748b;
    flex: 0 0 200px; max-width: 200px; padding: 0; gap: 0; border-radius: calc(12px * var(--rs-radius-scale));
    background: var(--lv-col); border: 1px solid color-mix(in srgb, var(--c) 50%, var(--lv-head-mix));
}
.lv .mq-tile.is-drop { border-color: var(--lv-green); box-shadow: 0 0 0 2px rgba(25, 227, 160, 0.3); }
.lv .mq-tile > .mq-tile__head {
    margin: 0; padding: 9px 10px; gap: 8px; border-radius: calc(11px * var(--rs-radius-scale)) calc(11px * var(--rs-radius-scale)) 0 0;
    background-color: var(--lv-col);
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--c) 26%, transparent), color-mix(in srgb, var(--c) 8%, transparent));
    border-bottom: 1px solid color-mix(in srgb, var(--c) 40%, var(--lv-head-mix));
    color: color-mix(in srgb, var(--c) 66%, var(--lv-head-ink));
}
.lv .mq-tile > .mq-tile__head.is-pinned { background-color: var(--lv-col); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
/* Aligned columns (Reception & Estimating, Vehicle & Invoicing Completion): the rail is one grid of two rows, headings then cards, and
   every column spans both rows through subgrid. A heading that wraps to two or three lines (a longer name, a longer language) then
   makes every heading that tall, so the first card and the empty-state box start on one line across the board. `min-width: 0` lets a
   number plate, which never wraps, shrink to its card instead of stretching its column. */
.lv .mq-tiles--aligned { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; grid-template-rows: auto 1fr; align-items: stretch; }
.lv .mq-tiles--aligned > .mq-tile { display: grid; grid-row: span 2; grid-template-rows: subgrid; width: auto; min-width: 0; }
.lv .mq-tiles--aligned .mq-tile__cards, .lv .mq-tiles--aligned .vehicle-card { min-width: 0; }
/* The same plate room as My Loading Queue and Live Workshop Status. There the right-hand column is as wide as the priority badge
   (64px + its 10px margin) and that fixes the width the number plate is drawn in; a card with no badge (Completion, Reception) would
   get a 62px column from the photo alone and so a plate about 12px wider, crowding the photo. Reserving the badge's width keeps the
   plate one size on every board. */
.lv .mq-tiles--aligned .vehicle-card { grid-template-columns: minmax(0, 1fr) 74px; }
.lv .mq-tile__dot { display: none; }
/* German only: a column name is one long compound ("Fahrzeugaufbereitung", "Auftragskartenprüfung") that cannot wrap, so the heading grew
   wider than its 200px column and ran its last letters and the count under the next column. The name may now shrink and break at a
   syllable, and the count keeps its size. */
:lang(de) .lv .mq-tiles--aligned .mq-tile__name { flex: 1 1 0; min-width: 0; letter-spacing: 0.02em; overflow-wrap: anywhere; hyphens: auto; }
:lang(de) .lv .mq-tiles--aligned .mq-tile__count { flex: none; }
.lv .stage-icon { width: 24px; height: 24px; flex: none; color: var(--c); }
/* The Awaiting clock badge: a disc in the column's own background, so it reads over the icon beneath it. */
.lv .stage-icon__badge { fill: var(--lv-col); }
.lv .mq-tile__name { font-family: inherit; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: inherit; line-height: 1.15; }
.lv .mq-tile__count { margin-inline-start: auto; min-width: 24px; padding: 1px 7px; border-radius: calc(99px * var(--rs-radius-scale)); text-align: center; font-family: inherit; font-size: 0.78rem; font-weight: 700; background: rgba(0, 0, 0, 0.08); color: var(--lv-ink); }
[data-bs-theme="dark"] .lv .mq-tile__count { background: rgba(0, 0, 0, 0.45); color: #fff; }
.lv .mq-tile__cards { padding: 8px; gap: 8px; flex: 1; }
.lv .mq-tile__cards:has(> .mq-tile__empty) { margin: 10px; padding: 20px 14px; border: 1.5px dashed var(--lv-line-2); border-radius: calc(10px * var(--rs-radius-scale)); justify-content: center; align-items: center; }
.lv .mq-tile__empty { color: var(--lv-muted); font-size: 0.8rem; padding: 0; }
.lv .mq-tile__cards .vehicle-card-wrap { width: 100%; }

/* ---- Cards ----------------------------------------------------- */
/* The wrapper IS the card where there is one (the action row lives inside it); the anchor is then the
   card's face. Without a wrapper the anchor is the card itself. */
.lv .vehicle-card-wrap {
    flex-direction: column; height: auto; border-radius: calc(10px * var(--rs-radius-scale)); overflow: hidden;
    background: linear-gradient(180deg, var(--lv-card), var(--lv-card-2)); border: 1px solid var(--lv-card-edge); box-shadow: var(--lv-shadow);
}
.lv .vehicle-card-wrap:hover { border-color: var(--lv-hover); }
.lv .vehicle-card-wrap > .vehicle-card { flex: 0 0 auto; border: 0; border-radius: 0; background: none; box-shadow: none; }
.lv .vehicle-card-wrap:has(> .vehicle-card--due-amber) { border-color: color-mix(in srgb, #f6b93b 65%, transparent); }
.lv .vehicle-card-wrap:has(> .vehicle-card--due-red) { border-color: rgba(255, 90, 79, 0.6); background: linear-gradient(180deg, rgba(255, 90, 79, 0.1), var(--lv-card-2)); }
.lv .vehicle-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; grid-template-areas: "body photo" "body priority" "foot foot"; align-items: start;
    border-radius: calc(10px * var(--rs-radius-scale)); border: 1px solid var(--lv-card-edge); background: linear-gradient(180deg, var(--lv-card), var(--lv-card-2)); box-shadow: var(--lv-shadow); color: var(--lv-ink);
}
.lv .vehicle-card:hover { border-color: var(--lv-hover); }
.lv .vehicle-card.vehicle-card--due-amber { border-color: color-mix(in srgb, #f6b93b 65%, transparent); }
.lv .vehicle-card.vehicle-card--due-red { border-color: rgba(255, 90, 79, 0.6); }
.lv .vehicle-card-wrap > .vehicle-card.vehicle-card--due-amber, .lv .vehicle-card-wrap > .vehicle-card.vehicle-card--due-red { border: 0; }
/* The urgency ring is drawn around the whole wrapper instead: the anchor's ::after would stop short of
   the action row. */
.lv .vehicle-card-wrap > .vehicle-card--due-amber::after, .lv .vehicle-card-wrap > .vehicle-card--due-red::after { display: none; }
.lv .vehicle-card-wrap:has(> .vehicle-card--due-red) { animation: lvDuePulse 1.3s ease-in-out infinite; }
@keyframes lvDuePulse { 0%, 100% { border-color: rgba(255, 90, 79, 0.9); } 50% { border-color: var(--lv-card-edge); } }
@media (prefers-reduced-motion: reduce) { .lv .vehicle-card-wrap:has(> .vehicle-card--due-red) { animation: none; } }

.lv .vehicle-card__photo {
    grid-area: photo; width: 52px; height: 30px; aspect-ratio: auto; margin: 10px 10px 0 0; border-radius: calc(6px * var(--rs-radius-scale)); background: none; overflow: hidden;
}
/* The priority band under the photo / emblem (_vehicle_card.html.twig, loading views only). The column is
   as wide as the wider of the two, the photo kept to its right edge so the gallery button over it still
   lands on it. Slightly smaller than the badge row's chips; a long label ("Nicht eingestuft") wraps
   rather than taking width from the reg and badges beside it. */
.lv .vehicle-card__photo { justify-self: end; }
.lv .badge-flag.vehicle-card__priority {
    grid-area: priority; justify-self: end; align-self: start; margin: 5px 10px 0 0;
    box-sizing: border-box; width: 64px; padding: calc(2px * var(--rs-pill-pad)) calc(4px * var(--rs-pill-pad)); font-size: 0.62rem; white-space: normal; text-align: center; border-radius: var(--rs-pill-radius);
}
/* A set width, not just a cap: the badge sets the width of the column beside the reg, and the card's number plate is sized by the
   room that leaves (app.css, .vehicle-card__plate). A label of its own width ("Not ranked" wider than "Overdue") made the plates down
   a column different sizes; a fixed width keeps every card's plate the same, a longer label wrapping onto two lines. */
.lv .vehicle-card__photo--cover { background: var(--lv-col); }
/* The photo slot's gallery button (_vehicle_card.html.twig): laid exactly over the photo from outside
   the card's link — the wrapper is the positioned box, and the slot sits 10px in from its top and right
   (the photo's own margin). A green ring and a magnifier on hover/focus say it opens something other
   than the job; the count in the corner always shows, so a car with photos reads as one at a glance. */
.lv .vehicle-card__gallery {
    position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1; width: 52px; height: 30px; padding: 0;
    border: 0; border-radius: calc(6px * var(--rs-radius-scale)); background: transparent; cursor: zoom-in;
}
.lv .vehicle-card__gallery::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.12s ease; }
.lv .vehicle-card__gallery:hover::after, .lv .vehicle-card__gallery:focus-visible::after { box-shadow: inset 0 0 0 2px var(--lv-green); }
.lv .vehicle-card__gallery:focus-visible { outline: none; }
.lv .vehicle-card__gallery-zoom { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.12s ease; }
.lv .vehicle-card__gallery-zoom svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.4; }
.lv .vehicle-card__gallery:hover .vehicle-card__gallery-zoom, .lv .vehicle-card__gallery:focus-visible .vehicle-card__gallery-zoom { opacity: 1; }
.lv .vehicle-card__gallery-count {
    position: absolute; inset-inline-end: 2px; bottom: 2px; display: flex; align-items: center; gap: 2px; padding: 2px 3px;
    border-radius: calc(4px * var(--rs-radius-scale)); background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 0.58rem; font-weight: 800; line-height: 1;
}
.lv .vehicle-card__gallery-count svg { width: 8px; height: 8px; fill: currentColor; }
.lv .vehicle-card__photo--empty { background: var(--lv-col); }
/* app.css paints the dark theme's photo slot charcoal (--surface-3); here the emblem sits straight on the card,
   so the slot is transparent (the empty-initial slot keeps its own tint). */
[data-bs-theme="dark"] .lv .vehicle-card__photo { background: none; }
[data-bs-theme="dark"] .lv .vehicle-card__photo--cover,
[data-bs-theme="dark"] .lv .vehicle-card__photo--empty { background: var(--lv-col); }
.lv .vehicle-card__initial { font-family: inherit; font-size: 1rem; font-weight: 800; color: var(--lv-muted); }
.lv .vehicle-card__body { grid-area: body; padding: 9px 0 0 10px; gap: 2px; min-width: 0; display: flex; flex-direction: column; }
/* The lower lines (_vehicle_card.html.twig): full card width, under the photo and priority badge. */
.lv .vehicle-card__foot { grid-area: foot; padding: 2px 10px 9px; gap: 2px; min-width: 0; display: flex; flex-direction: column; }
.lv .vehicle-card__reg { font-family: inherit; font-size: 0.95rem; font-weight: 800; letter-spacing: 0; color: var(--lv-ink); white-space: nowrap; }
.lv .vehicle-card__wip, .lv .vehicle-card__model { font-size: 0.84rem; font-weight: 400; color: var(--lv-muted); }
/* "WIP 1234" reads in the card's ink (white on the dark theme, near-black on the light), not the muted grey. */
.lv .vehicle-card__wip { color: var(--lv-ink); }
/* The make and model, a step smaller than the WIP: it can be long, and it now runs the full card width. */
.lv .vehicle-card__model { font-size: 0.74rem; }
/* Beside the photo: the reg, then the WIP under it; anything else left in the body (the Priority Vehicle
   badge) after them. The model leads the full-width foot below. */
.lv .vehicle-card__reg { order: 1; }
.lv .vehicle-card__wip { order: 2; }
.lv .vehicle-card__body > :not(.vehicle-card__reg):not(.vehicle-card__wip) { order: 3; }
.lv .vehicle-card__loc, .lv .veh__loc { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--lv-green-ink); }
.lv .vehicle-card__pin, .lv .veh__pin { fill: currentColor; width: 13px; height: 13px; }
.lv .vehicle-card__badges { gap: 5px; margin-top: 4px; }
.lv .vehicle-card__tech { margin-top: 4px; padding-top: 0; border-top: 0; font-size: 0.82rem; color: var(--lv-ink); }
.lv .vehicle-card__tech.is-awaiting { color: var(--lv-amber); }
.lv .vehicle-card__time { font-size: 0.8rem; color: var(--lv-muted); font-variant-numeric: tabular-nums; }
.lv .vehicle-card__time--left { color: var(--lv-amber); }
/* Green while the target is more than 2 working days off; amber / red as it nears or passes (deadlineBands). */
.lv .vehicle-card__target { font-size: 0.82rem; color: var(--lv-green-ink); }
.lv .vehicle-card__target--red { color: var(--lv-red); }
.lv .vehicle-card__target--amber { color: var(--lv-amber); }

/* Badges: the design's outlined pills, tinted by meaning. app.css draws them as filled chips for the
   light theme only; here one rule set serves both themes through the tokens. */
.lv .badge-flag { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 0.68rem; font-weight: 700; padding: calc(2px * var(--rs-pill-pad)) calc(8px * var(--rs-pill-pad)); border-radius: var(--rs-pill-radius); border: 1px solid var(--lv-line-2); background: transparent; color: var(--lv-muted); white-space: nowrap; }
/* The waiting badge carries a label AND a live counter ("Assigned, awaiting start — 1h 2m 3s"), longer
   than a narrow column; nowrap pushed the tail past the card's clipped edge. It wraps at one chosen
   point: _work_state_badge splits it into two inline-block halves ("Assigned, awaiting" / "start — 1h
   2m 3s"), so the line breaks between them, and a half wraps inside itself only if the column is too
   narrow for it whole. The counter never splits. Softer radius so a two-line chip isn't a lozenge. */
.lv .badge-flag.vehicle-card__wait { white-space: normal; max-width: 100%; border-radius: var(--rs-pill-radius); }
.lv .vehicle-card__wait-part { display: inline-block; max-width: 100%; }
.lv .vehicle-card__wait-part > span { white-space: nowrap; }
.lv .badge-flag--red, .lv .badge-flag--danger, .lv .badge-flag--stop, .lv .badge-flag--declined { color: var(--lv-red); border-color: rgba(255, 90, 79, 0.55); background: rgba(255, 90, 79, 0.12); }
.lv .badge-flag--amber, .lv .badge-flag--warning, .lv .badge-flag--credit, .lv .badge-flag--pending { color: var(--lv-amber); border-color: rgba(246, 185, 59, 0.6); background: rgba(246, 185, 59, 0.1); }
.lv .badge-flag--green, .lv .badge-flag--ok, .lv .badge-flag--authorised, .lv .badge-flag--active { color: var(--lv-green-ink); border-color: rgba(25, 227, 160, 0.5); background: rgba(25, 227, 160, 0.1); }
.lv .badge-flag--orange { color: #d9580d; border-color: rgba(255, 128, 32, 0.6); background: rgba(255, 128, 32, 0.12); }
[data-bs-theme="dark"] .lv .badge-flag--orange { color: #ffa45c; }
.lv .badge-flag--blue { color: var(--lv-blue); border-color: rgba(11, 124, 255, 0.6); background: rgba(11, 124, 255, 0.12); }
[data-bs-theme="dark"] .lv .badge-flag--blue { color: #6db1ff; }
.lv .badge-flag--violet { color: var(--lv-violet); border-color: rgba(143, 116, 244, 0.55); background: rgba(143, 116, 244, 0.12); }
.lv .badge-flag--neutral, .lv .badge-flag--cancelled { color: var(--lv-muted); }

/* The action row: Start job / Pause on the queue, and Move on every card that can move. Always
   showing — the app's own hover-revealed Move pill is for the other boards. */
.lv .vehicle-card__actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.lv .vehicle-card__start, .lv .vehicle-card-wrap .vehicle-card__move {
    flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; padding: 0 8px; white-space: nowrap;
    border-radius: calc(8px * var(--rs-radius-scale)); border: 1px solid var(--lv-line-2); background: var(--lv-panel); color: var(--lv-ink);
    font: inherit; font-size: 0.82rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.lv .vehicle-card__start { background: var(--lv-blue); border-color: var(--lv-blue); color: #fff; }
.lv .vehicle-card-wrap .vehicle-card__move {
    position: static; max-width: none; opacity: 1; pointer-events: auto; overflow: visible; text-overflow: clip;
}
.lv .vehicle-card-wrap .vehicle-card__move::after { content: "→"; }
[dir="rtl"] .lv .vehicle-card-wrap .vehicle-card__move::after { content: "←"; }
.lv .vehicle-card__start:hover, .lv .vehicle-card-wrap .vehicle-card__move:hover { border-color: var(--lv-hover); }
.lv .vehicle-card__start:hover { border-color: var(--lv-blue); filter: brightness(1.1); }
.lv .vehicle-card-wrap > .vehicle-card__move:not(:only-child) { margin: 0 12px 11px; }

/* ---- Live Workshop Status: the rework counter, park strip, panel ---- */
.lv .lv-board-panel { background: transparent; border: 0; box-shadow: none; padding: 0 !important; }
.lv .table-tools--board { flex-wrap: wrap; gap: 8px; }
.lv .rework-flag, .lv .park-strip__chip {
    height: 32px; padding: 0 calc(12px * var(--rs-pill-pad)); border-radius: var(--rs-pill-radius); border: 1px solid var(--lv-line-2); background: var(--lv-panel);
    color: var(--lv-ink); font-size: 0.82rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px;
}
.lv .park-strip { margin-inline-start: 0; gap: 8px; }
.lv .park-strip__label { font-family: inherit; font-size: 0.82rem; letter-spacing: 0; text-transform: none; color: var(--lv-muted); }
.lv .park-strip__chip { border-style: solid; }
.lv .park-strip__chip.is-drop { border-color: var(--lv-green); background: rgba(25, 227, 160, 0.16); box-shadow: 0 0 0 2px rgba(25, 227, 160, 0.28); }
.lv .rework-flag__count { font-family: inherit; }
.lv .rework-flag--active { color: var(--lv-red); }
.lv .empty-state { color: var(--lv-muted); }

/* ---- The Table view keeps its own markup; it only picks up the page's colours ---- */
.lv .panel.form-card, .lv .lv-board-panel .panel { background: var(--lv-panel); border-color: var(--lv-line); }

@media (max-width: 1100px) {
    .lv-hero { grid-template-columns: 1fr; }
    .lv--queue .lv-hero, .lv--queue .lv-hero:not(:has(.lv-working)) { flex-direction: column; align-items: stretch; }
    .lv--queue .lv-hero > #my-clock { flex: none; }
    .lv--queue .lv-hero > .lv-stats { flex-wrap: wrap; margin-inline-start: 0; }
}
@media (max-width: 860px) {
    .lv { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .lv-live::before { animation: none; }
}

/* ---- Refreshed vehicle card (`.vehicle-card--v2`) ----------------------------------------------------------------------------
   The face every loading-views board with the full card wears (My Loading Queue, Live Job Status, Vehicles Due Out), drawn from
   _vehicle_card.html.twig: the plate, WIP and model beside a square photo; a chip row that LEADS with the critical-ratio word (On Track /
   Warning / Overdue, Not Ranked with no due date); then, on My Loading Queue, the time block; then the action row. One colour, --rag,
   comes from that same band and tints the card's top edge, the status chip, the time figure and the bar, so the word and the colour can
   never disagree. Green means on track only, amber needs attention, red is late — the location and other chips stay neutral. */
.lv .vehicle-card--rag-green { --rag: var(--lv-green); }
.lv .vehicle-card--rag-amber { --rag: var(--lv-amber); }
.lv .vehicle-card--rag-red { --rag: var(--lv-red); }
.lv .vehicle-card--rag-neutral { --rag: var(--lv-muted); }
.lv { --lv-task: var(--lv-blue); }
[data-bs-theme="dark"] .lv { --lv-task: #6db1ff; }

.lv .vehicle-card-wrap:has(> .vehicle-card--v2) {
    --rag: var(--lv-muted);
    background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--rag) 14%, transparent), transparent 62%), linear-gradient(180deg, var(--lv-card), var(--lv-card-2));
    border-color: color-mix(in srgb, var(--rag) 26%, var(--lv-card-edge));
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lv .vehicle-card-wrap:has(> .vehicle-card--rag-green) { --rag: var(--lv-green); }
.lv .vehicle-card-wrap:has(> .vehicle-card--rag-amber) { --rag: var(--lv-amber); }
.lv .vehicle-card-wrap:has(> .vehicle-card--rag-red) { --rag: var(--lv-red); }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2)::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, var(--rag), color-mix(in srgb, var(--rag) 10%, transparent));
}
.lv .vehicle-card-wrap:has(> .vehicle-card--v2):hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--rag) 70%, var(--lv-card-edge)); box-shadow: var(--lv-shadow), 0 12px 26px -12px color-mix(in srgb, var(--rag) 65%, transparent); }
/* The deadline urgency rings (due within 2 working days / today or overdue) stay the card's border, over the band tint. */
.lv .vehicle-card-wrap:has(> .vehicle-card--v2.vehicle-card--due-amber) { border-color: color-mix(in srgb, #f6b93b 65%, transparent); }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2.vehicle-card--due-red) { border-color: rgba(255, 90, 79, 0.6); }
@media (prefers-reduced-motion: reduce) { .lv .vehicle-card-wrap:has(> .vehicle-card--v2):hover { transform: none; } }

.lv .vehicle-card.vehicle-card--v2 {
    grid-template-columns: minmax(0, 1fr) 56px; grid-template-rows: auto auto auto; grid-template-areas: "plate plate" "body photo" "foot foot"; column-gap: 8px;
}
.lv .vehicle-card--v2 .vehicle-card__photo {
    width: 56px; height: 56px; margin: 7px 8px 0 0; border-radius: calc(11px * var(--rs-radius-scale));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rag) 55%, transparent), 0 6px 14px -8px #000;
}
.lv .vehicle-card--v2 .vehicle-card__initial { font-size: 1.3rem; }
/* A car with no photo shows its make's emblem in the slot (neither a cover photo nor the empty initial): no ring round it. A real photo keeps its ring. */
.lv .vehicle-card--v2 .vehicle-card__photo:not(.vehicle-card__photo--cover):not(.vehicle-card__photo--empty) { box-shadow: none; }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2) > .vehicle-card__gallery { top: 51px; inset-inline-end: 8px; width: 56px; height: 56px; border-radius: calc(11px * var(--rs-radius-scale)); }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2) .vehicle-card__gallery-count { font-size: 0.64rem; padding: 2px 5px; inset-inline-end: 3px; bottom: 3px; gap: 3px; }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2) .vehicle-card__gallery-count svg { width: 10px; height: 10px; }
/* The plate's own row, filled edge to edge: the plate is sized by the room it has (app.css, .vehicle-card__plate, width over its ratio), the
   cap raised so a card 160-180px wide gets a plate as wide as the card's padding allows. The row is a fixed 2rem however tall the plate
   comes out, so the photo and its gallery button start at the same place on every card. */
.lv .vehicle-card--v2 .vehicle-card__reg--plate { --card-plate-max: 2rem; grid-area: plate; order: 0; padding: 12px 10px 0 11px; height: 2rem; box-sizing: content-box; }
.lv .vehicle-card--v2 .vehicle-card__reg--plate .vehicle-card__plate.mofa { --plate-h: min(2rem, 100cqi / 2.25) !important; }
.lv .vehicle-card--v2 .vehicle-card__body { padding: 7px 0 0 11px; gap: 0; }
.lv .vehicle-card--v2 .vehicle-card__wip { margin-top: 6px; font-size: 0.92rem; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv .vehicle-card--v2 .vehicle-card__wip-prefix { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; color: var(--lv-muted); }
.lv .vehicle-card--v2 .vehicle-card__model { order: 4; margin-top: 1px; font-size: 0.72rem; color: var(--lv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The chip row: the status word first, then what is holding the car up, then where it is. */
.lv .vehicle-card--v2 .vehicle-card__foot { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 9px 10px 0 11px; }
.lv .vehicle-card--v2 .vehicle-card__foot > * { min-width: 0; max-width: 100%; }
.lv .vehicle-card--v2 .vehicle-card__badges { display: contents; }
.lv .vehicle-card--v2 .vehicle-card__badges > * { order: 2; }
.lv .vehicle-card--v2 .badge-flag { font-size: 0.64rem; padding: 2px 7px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.lv .vehicle-card--v2 .badge-flag.vehicle-card__priority {
    order: 1; grid-area: auto; justify-self: auto; align-self: auto; margin: 0; width: auto; box-sizing: border-box;
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; font-size: 0.72rem; text-align: start; white-space: nowrap;
    color: var(--rag); border-color: color-mix(in srgb, var(--rag) 60%, transparent); background: color-mix(in srgb, var(--rag) 16%, transparent);
    box-shadow: 0 0 12px -2px color-mix(in srgb, var(--rag) 50%, transparent);
}
.lv .vehicle-card--v2 .badge-flag.vehicle-card__priority::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--rag); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rag) 25%, transparent); }
.lv .vehicle-card--v2 .vehicle-card__loc {
    order: 5; align-self: flex-start; margin-top: 5px; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0;
    border: 0; background: none; font-size: 0.7rem; font-weight: 700; color: var(--lv-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lv .vehicle-card--v2 .vehicle-card__pin { width: 10px; height: 10px; color: var(--lv-green); flex: none; }
.lv .vehicle-card--v2 .vehicle-card__tech { order: 5; flex: 1 1 100%; margin-top: 5px; font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv .vehicle-card--v2 .vehicle-card__consumed { margin-inline-end: 0; font-size: 0.68rem; font-weight: 700; color: var(--lv-muted); white-space: nowrap; }
.lv .vehicle-card--v2 .vehicle-card__due { order: 4; flex: 1 1 100%; }

/* The time block (My Loading Queue): one or two views, THIS TASK and WHOLE JOB, stacked in one cell and crossfaded. */
.lv .vehicle-card__timeblock { --tone: var(--rag); order: 4; flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 7px; }
.lv .vehicle-card__pane { grid-area: 1 / 1; min-width: 0; }
.lv .vehicle-card__timeblock[data-controller] .vehicle-card__pane { opacity: 0; transform: translateY(5px); pointer-events: none; transition: opacity 0.4s ease, transform 0.4s ease; }
.lv .vehicle-card__timeblock[data-controller] .vehicle-card__pane.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .lv .vehicle-card__timeblock[data-controller] .vehicle-card__pane { transition: none; } }
.lv .vehicle-card__pane--task { --tone: var(--lv-task); }
.lv .vehicle-card__pane-label { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: 0.56rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lv-ink); }
.lv .vehicle-card__pane--task .vehicle-card__pane-label { color: var(--lv-task); }
.lv .vehicle-card__pager { margin-inline-start: auto; display: flex; gap: 4px; }
.lv .vehicle-card__pager i { position: relative; overflow: hidden; width: 14px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--lv-ink) 18%, transparent); cursor: pointer; }
.lv .vehicle-card__pager i.is-on::after { content: ""; position: absolute; inset: 0; background: var(--lv-ink); transform-origin: left; animation: lvCardTick var(--card-time-interval, 4000ms) linear forwards; }
.lv .vehicle-card__timeblock.is-held .vehicle-card__pager i.is-on::after { animation-play-state: paused; }
@keyframes lvCardTick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lv .vehicle-card__pane-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 4px; white-space: nowrap; }
.lv .vehicle-card__left { flex: 0 0 auto; font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--tone); }
.lv .vehicle-card__left.is-none { font-size: 0.74rem; font-weight: 600; color: var(--lv-muted); }
.lv .vehicle-card__left.is-over { color: var(--lv-red); }
.lv .vehicle-card__duedate { font-size: 0.64rem; color: var(--lv-muted); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lv .vehicle-card__timeblock--due-amber .vehicle-card__pane--job .vehicle-card__duedate { color: var(--lv-amber); }
.lv .vehicle-card__timeblock--due-red .vehicle-card__pane--job .vehicle-card__duedate { color: var(--lv-red); font-weight: 700; }
.lv .vehicle-card__bar { position: relative; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--lv-ink) 9%, transparent); overflow: hidden; }
.lv .vehicle-card__bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 55%, transparent), var(--tone)); box-shadow: 0 0 10px color-mix(in srgb, var(--tone) 65%, transparent); }
.lv .vehicle-card__bar.is-over > span { background: var(--lv-red); box-shadow: 0 0 10px color-mix(in srgb, var(--lv-red) 65%, transparent); }
.lv .vehicle-card__bar.is-none > span { display: none; }
/* Whole job: ten separate segments, so the two views are told apart by shape as well as by label and colour. */
.lv .vehicle-card__bar--segments {
    height: 6px; border-radius: 3px;
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
    mask: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
}
.lv .vehicle-card__bar--segments > span { border-radius: 0; background: var(--tone); box-shadow: none; }
.lv .vehicle-card__bar--segments.is-over > span { background: var(--lv-red); }

/* The action row: Start job is the one filled button; Move is quiet. */
.lv .vehicle-card-wrap:has(> .vehicle-card--v2) .vehicle-card__actions { display: flex; flex-wrap: nowrap; gap: 6px; padding: 11px 10px 10px 11px; }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2) .vehicle-card__start { flex: 1 1 auto; background: linear-gradient(180deg, #2b8bff, var(--lv-blue)); border-color: transparent; box-shadow: 0 6px 14px -8px var(--lv-blue); }
.lv .vehicle-card-wrap:has(> .vehicle-card--v2) .vehicle-card__move { flex: 0 0 auto; }

/* The status boards' T-Card View (/boards/…) wear the same card face, read-only: a grid of the 200px cards the tile columns use. */
.lv--board .vehicle-card-grid--face { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; align-items: start; }
@media (max-width: 480px) { .lv--board .vehicle-card-grid--face { grid-template-columns: 1fr; } }

/* Reception & Estimating and Vehicle & Invoicing Completion keep their own footers — customer, age, stage move, money — under the
   refreshed face. There is no critical-ratio word here: the accent is neutral, and amber on a reception car left too long in its stage. */
.lv .vehicle-card--v2 :is(.reception-card__customer, .completion-card__customer, .reception-card__meta, .completion-card__money, .completion-card__age) { flex: 1 1 100%; }
.lv .vehicle-card--v2 :is(.reception-card__customer, .completion-card__customer) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.lv .vehicle-card--v2 .reception-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
/* The completion card is the anchor itself (it is the drag handle), so it carries the box the wrapper carries on the other boards. */
.lv .vehicle-card.vehicle-card--v2.completion-card {
    position: relative; overflow: hidden; padding-bottom: 10px;
    background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--rag) 14%, transparent), transparent 62%), linear-gradient(180deg, var(--lv-card), var(--lv-card-2));
    border-color: color-mix(in srgb, var(--rag) 26%, var(--lv-card-edge)); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lv .vehicle-card.vehicle-card--v2.completion-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 1; pointer-events: none; background: linear-gradient(90deg, var(--rag), color-mix(in srgb, var(--rag) 10%, transparent)); }
.lv .vehicle-card.vehicle-card--v2.completion-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--rag) 70%, var(--lv-card-edge)); }
@media (prefers-reduced-motion: reduce) { .lv .vehicle-card.vehicle-card--v2.completion-card:hover { transform: none; } }

/* Dark theme: the card is true black — no band wash behind it — so the location and every other plain line sit on the same black as the
   card. The band colour stays on the top edge, the border and the chips. */
[data-bs-theme="dark"] .lv .vehicle-card-wrap:has(> .vehicle-card--v2),
[data-bs-theme="dark"] .lv .vehicle-card.vehicle-card--v2.completion-card {
    background: #000; border-color: color-mix(in srgb, var(--rag) 38%, var(--lv-card-edge));
}
[data-bs-theme="dark"] .lv .vehicle-card-wrap > .vehicle-card--v2 { background: none; }

/* ---- Paused clocking (Live Job Status) ------------------------------------------------------------------------------------------------
   Work was started and nobody is clocked on now. Three quiet signs rather than a badge among the chips:
   the card goes quiet (a grey photo; its border and top edge stay as on any card); the time block freezes (a PAUSED label and a hatched bar);
   and the crew line carries a pause mark in place of the live dot. Bright yellow is --lv-pause, the pause colour only. */
.lv { --lv-pause: #e0a800; }
[data-bs-theme="dark"] .lv { --lv-pause: #ffe600; }
.lv .vehicle-card__pause-ico { display: inline-flex; flex: none; gap: 2px; align-items: center; vertical-align: -1px; margin-inline-end: 4px; }
.lv .vehicle-card__tech .vehicle-card__pause-ico { margin-inline-end: 0; }
.lv .vehicle-card__pause-ico i { display: block; width: 3px; height: 9px; border-radius: 1px; background: currentColor; }
.lv .vehicle-card--paused .vehicle-card__photo img { filter: grayscale(1) brightness(0.6); }
.lv .vehicle-card__timeblock--paused .vehicle-card__pane-label { color: var(--lv-pause); }
.lv .vehicle-card__timeblock--paused .vehicle-card__left { color: var(--lv-pause); opacity: 0.9; }
.lv .vehicle-card__timeblock--paused .vehicle-card__bar { background: color-mix(in srgb, var(--lv-pause) 14%, transparent); }
.lv .vehicle-card__timeblock--paused .vehicle-card__bar > span {
    background: repeating-linear-gradient(135deg, var(--lv-pause) 0 4px, color-mix(in srgb, var(--lv-pause) 35%, transparent) 4px 8px); box-shadow: none;
}
.lv .vehicle-card__tech.is-paused { color: var(--lv-pause); }

/* The crew line: a dot or pause mark, then the name, which takes the rest of the line and is cut with an ellipsis rather than lost off the card's edge. */
.lv .vehicle-card--v2 .vehicle-card__tech { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lv .vehicle-card--v2 .vehicle-card__tech > * { flex: none; }
.lv .vehicle-card--v2 .vehicle-card__tech .vehicle-card__tech-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A paused card's two views both carry the pause mark in front of their name ("⏸ PAUSED · THIS TASK"), a touch tighter so the longer label
   and the pager still fit a 160px card. */
.lv .vehicle-card__timeblock--paused .vehicle-card__pane-label { letter-spacing: 0.06em; gap: 4px; white-space: nowrap; }
.lv .vehicle-card__timeblock--paused .vehicle-card__pane-label > span:not(.vehicle-card__pager):not(.vehicle-card__wait):not(.vehicle-card__pause-sep) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lv .vehicle-card__timeblock--paused .vehicle-card__pane--task .vehicle-card__pane-label > span:not(.vehicle-card__pager):not(.vehicle-card__wait):not(.vehicle-card__pause-sep) { color: var(--lv-task); }
.lv .vehicle-card__pause-sep { color: var(--lv-pause); }
.lv .vehicle-card__pause-sep:last-child { display: none; }
.lv .vehicle-card__timeblock--paused .vehicle-card__pane--task .vehicle-card__left { color: var(--lv-pause); }
.lv .vehicle-card__timeblock--paused .vehicle-card__pane--task .vehicle-card__bar > span { background: repeating-linear-gradient(135deg, var(--lv-pause) 0 4px, color-mix(in srgb, var(--lv-pause) 35%, transparent) 4px 8px); box-shadow: none; }
