/* Servics design system v3 (brand kit v1, 2026-10-29): Carbon + Volt from the Servics brand, Readex Pro. Dark mode that
   follows the device until the user chooses (D3), logical properties only (RTL needs no overrides).
   No inline styles anywhere: the CSP allows styles only from our own files. Reference: docs/ServiceCenter_Mockups_UIUX_2026-10-23_v1/design.html */

/* local font (static/sc/fonts, OFL 1.1): Readex Pro variable, weights 300-700 */
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/ReadexPro-VF.bc351624648d.woff2") format("woff2"); }
/* Arabic text in Cairo (owner request 2026-11-03); Latin in Readex Pro, or Cairo on Arabic pages. */
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("fonts/Cairo-arabic-VF.74320d417bba.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("fonts/Cairo-latin-VF.3c9597566d23.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cairo Arabic"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("fonts/Cairo-arabic-VF.74320d417bba.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
/* ============================================================ tokens */
:root {
  --bg: #f4f5f2; --surface: #ffffff; --surface-2: #f8f9f6; --surface-3: #eef0ea;
  --line: #e3e6e0; --line-2: #cdd2ca;
  --text: #14171c; --text-2: #474d55; --text-3: #5c636c;
  --brand: #14171c; --brand-hover: #2a2f37; --brand-soft: #eef6d8; --brand-ink: #c6f432; --link: #4d6600;
  --mark-disc: #14171c; --mark-s: #c6f432;
  --side: #14171c; --side-2: #22262d; --side-text: #d9dde3; --side-muted: #8e959e;
  --accent: #c6f432; --accent-ink: #14171c;
  --ok: #137a3f; --ok-soft: #e3f4ea; --warn: #9a5a00; --warn-soft: #fdf1d8;
  --bad: #b3261e; --bad-soft: #fde8e6; --info: #0b62a4; --info-soft: #e4f0fb;
  --violet: #5b3fb0; --violet-soft: #eee9fb; --mute-soft: var(--surface-3);
  --on-strong: #ffffff;  /* text on ok / warn / bad buttons */
  --radius: 14px; --radius-s: 10px; --radius-xs: 7px;
  --shadow: 0 1px 2px rgba(20, 23, 28, .06), 0 3px 10px rgba(20, 23, 28, .05);
  --shadow-lg: 0 20px 48px rgba(20, 23, 28, .18);
  --ring: 0 0 0 2px var(--surface), 0 0 0 5px var(--brand);
  --ease: cubic-bezier(.2, .7, .2, 1); --t-fast: 140ms; --t: 220ms;
  --side-w: 248px; --top: 60px; --touch: 44px;
  --font: "Cairo Arabic", "Readex Pro", "Segoe UI", "Noto Sans Arabic", "Noto Sans", Tahoma, system-ui, sans-serif;
  --mono-font: "IBM Plex Mono", Consolas, "Courier New", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #171a1f; --surface-2: #1c2026; --surface-3: #23282f; --line: #2a2f37; --line-2: #363c45;
    --text: #e8eaed; --text-2: #bcc1c8; --text-3: #9ba1a9;
    --brand: #c6f432; --brand-hover: #d4f865; --brand-soft: rgba(198, 244, 50, .16); --brand-ink: #14171c; --side: #0b0d10; --side-2: #1a1e24;
    --link: #c6f432; --mark-disc: #c6f432; --mark-s: transparent;
    --ok: #5fd394; --ok-soft: rgba(95, 211, 148, .14); --warn: #f2b54a; --warn-soft: rgba(242, 181, 74, .14);
    --bad: #ff8a80; --bad-soft: rgba(255, 138, 128, .14); --info: #7cc0ff; --info-soft: rgba(124, 192, 255, .14);
    --violet: #b9a0ff; --violet-soft: rgba(185, 160, 255, .16); --on-strong: #14171c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root:lang(ar) { --font: "Cairo", "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; }
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #171a1f; --surface-2: #1c2026; --surface-3: #23282f; --line: #2a2f37; --line-2: #363c45;
  --text: #e8eaed; --text-2: #bcc1c8; --text-3: #9ba1a9;
  --brand: #c6f432; --brand-hover: #d4f865; --brand-soft: rgba(198, 244, 50, .16); --brand-ink: #14171c; --side: #0b0d10; --side-2: #1a1e24;
    --link: #c6f432; --mark-disc: #c6f432; --mark-s: transparent;
  --ok: #5fd394; --ok-soft: rgba(95, 211, 148, .14); --warn: #f2b54a; --warn-soft: rgba(242, 181, 74, .14);
  --bad: #ff8a80; --bad-soft: rgba(255, 138, 128, .14); --info: #7cc0ff; --info-soft: rgba(124, 192, 255, .14);
  --violet: #b9a0ff; --violet-soft: rgba(185, 160, 255, .16); --on-strong: #14171c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }  /* components with their own display (e.g. .banner) must still hide */
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 22px; margin: 0; line-height: 1.3; } h2 { font-size: 17px; margin: 0 0 12px; line-height: 1.3; } h3 { font-size: 15px; margin: 0 0 8px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }
.muted { color: var(--text-3); } .small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.mono { font-family: var(--mono-font); letter-spacing: .02em; unicode-bidi: isolate; }
.ltr { direction: ltr; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico.s { width: 16px; height: 16px; } .ico.l { width: 26px; height: 26px; } .ico.xl { width: 44px; height: 44px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
/* the Servics wheel: a carbon disc with a volt S on light surfaces; a volt disc with the S cut out on dark ones */
.brand-mark .l-d { fill: var(--mark-disc); } .brand-mark .l-s { fill: var(--mark-s); }
.side-brand .brand-mark .l-d, .brand-dark .brand-mark .l-d { fill: #c6f432; } .side-brand .brand-mark .l-s, .brand-dark .brand-mark .l-s { fill: transparent; }
/* wordmark: always lowercase Latin "servics", isolated so it never flips in RTL */
.wm { font-weight: 600; letter-spacing: -.015em; direction: ltr; unicode-bidi: isolate; }

/* plain controls get the same look; :where() keeps specificity at zero so components can override */
:where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]), select, textarea) {
  min-height: 40px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); color: var(--text); padding: 7px 11px; max-width: 100%;
}
:where(input, select, textarea):hover { border-color: var(--text-3); }
:where(input, select, textarea):focus-visible { border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); }
select[multiple] { padding: 4px; }

/* ============================================================ app shell (step 2 brings the new shell) */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); padding: 12px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; font-weight: 700; font-size: 16px; }
.side a { position: relative; display: flex; align-items: center; gap: 12px; color: var(--side-text); min-height: 40px; padding: 0 12px; border-radius: 11px; font-weight: 500; transition: background var(--t-fast); }
.side a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side a.on { background: var(--side-2); color: #fff; }
.side a.on::before { content: ""; position: absolute; inset-block: 9px; inset-inline-start: -10px; width: 4px; border-radius: 4px; background: var(--accent); }
.side a.on .ic { color: var(--accent); }
.side a .ic { display: inline-grid; place-items: center; width: 20px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: var(--top); background: var(--surface); border-block-end: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding-inline: 18px; position: sticky; top: 0; z-index: 5; }
.top .search { flex: 1; max-width: 520px; position: relative; display: flex; align-items: center; }
.top .search input { width: 100%; min-height: 40px; border-radius: 12px; background: var(--surface-2); padding-inline-start: 38px; }
.top .search .ico { position: absolute; inset-inline-start: 11px; color: var(--text-3); pointer-events: none; }
.top .sp { flex: 1; }
.chipbtn { min-height: var(--touch); min-width: var(--touch); padding-inline: 10px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: inherit; font-weight: 600; }
.chipbtn:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.chipbtn b { min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 99px; background: var(--bad); color: var(--on-strong); font-size: 11px; display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.burger { display: none; }
.content { padding: 20px 22px 40px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.crumbs { font-size: 12.5px; color: var(--text-3); }
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagehead .sp { flex: 1; }

/* ============================================================ cards, grid, layout helpers */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-32 { grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); }
.g-auto { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.sb { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.hr { height: 1px; background: var(--line); margin-block: 8px; }
.grow { flex: 1; min-width: 0; } .ms-auto { margin-inline-start: auto; }
.m-0 { margin: 0; } .my-1 { margin-block: 4px; } .mt-0 { margin-block-start: 0; } .mt-2 { margin-block-start: 8px; } .mt-3 { margin-block-start: 12px; } .mt-4 { margin-block-start: 16px; }
.mb-2 { margin-block-end: 8px; } .mb-3 { margin-block-end: 12px; }
.w-xs { width: 60px; } .w-sm { width: 90px; } .w-md { width: 115px; } .w-lg { width: 140px; } .w-full { width: 100%; }
.w-22p { width: 22%; } .w-28p { width: 28%; } .w-40p { width: 40%; } .w-50p { width: 50%; } .w-70p { width: 70%; }
.mw-640 { max-width: 640px; } .mw-760 { max-width: 760px; } .page-narrow { max-width: 820px; margin: 24px auto; width: 100%; }
.ta-c { text-align: center; } .pad-l { padding: 32px; } .pre-wrap { white-space: pre-wrap; } .break-all { word-break: break-all; }
.scroll-x { overflow-x: auto; } .list-plain { list-style: none; padding: 0; margin: 0; }
.fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-up { font-size: 1.3em; } .strong { font-weight: 700; }
.text-bad { color: var(--bad); } .accent-ok { border-inline-start: 4px solid var(--ok); }
.touch { min-height: var(--touch); } .touch-l { min-height: 48px; }
.hp { position: absolute; inset-inline-start: -5000px; }  /* honeypot field, off-screen */
.code-input { min-height: var(--touch); font-size: 20px; text-align: center; letter-spacing: .3em; }
.qr-box { background: #fff; padding: 12px; border-radius: var(--radius-s); width: max-content; margin: 0 auto; }
.big-ico { color: var(--brand); } .big-ico.bad { color: var(--bad); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.01em; } .kpi .l { color: var(--text-3); font-size: 12.5px; font-weight: 600; } .kpi .d { font-size: 12.5px; margin-block-start: 4px; }
a.card.kpi { color: var(--text); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast); }
a.card.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.up { color: var(--ok); } .down { color: var(--bad); }

/* ============================================================ fields */
.form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.form.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.fld label.row { font-weight: 500; color: var(--text); }
label.req::after, .req::after { content: " *"; color: var(--bad); }
.fld .val, .fld input:not([type=checkbox]):not([type=radio]), .fld select, .fld textarea { min-height: var(--touch); width: 100%; }
.fld .val { display: flex; align-items: center; padding: 8px 2px; border-block-end: 1px dashed var(--line-2); color: var(--text); min-width: 0; overflow-wrap: anywhere; }  /* read-only value: no input look */
.fld .val.ro { color: var(--text-2); }
.fld .hint, .hint { font-size: 12px; color: var(--text-3); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }

/* ============================================================ buttons */
.btn { min-height: var(--touch); padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); } .btn.pri:hover { background: var(--brand-hover); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--on-strong); }
.btn.bad { background: var(--bad); border-color: var(--bad); color: var(--on-strong); }
.btn.warn { background: var(--warn); border-color: var(--warn); color: var(--on-strong); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-3); }
.btn.lg { min-height: 56px; font-size: 17px; padding: 0 22px; border-radius: 16px; }
/* a button never grows wider than its box: a full-width button wraps its text instead of spilling out of the screen */
.btn { max-width: 100%; } .btn.w-full, summary.btn { white-space: normal; text-align: center; line-height: 1.3; padding-block: 8px; }
.btn.start-next { flex-direction: column; gap: 2px; padding-block: 12px; }
.btn.start-next small { font-size: 14px; font-weight: 500; opacity: .9; overflow-wrap: anywhere; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .5; cursor: not-allowed; }
summary.btn { list-style: none; width: max-content; } summary.btn::-webkit-details-marker { display: none; }
details > summary.small { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }

/* ============================================================ chips, tags, badges */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--mute-soft); color: var(--text-2); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); } .chip.info { background: var(--info-soft); color: var(--info); }
.chip.brand { background: var(--brand-soft); color: var(--brand); } .chip.violet { background: var(--violet-soft); color: var(--violet); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 7px; font-size: 12px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); }
.badge { min-width: 22px; height: 20px; padding-inline: 6px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

/* ============================================================ banners, counters */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid transparent; font-size: 13.5px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); } .banner.info { background: var(--info-soft); color: var(--info); }
.banner.bad { background: var(--bad-soft); color: var(--bad); } .banner.ok { background: var(--ok-soft); color: var(--ok); }
.counters { display: flex; gap: 8px; flex-wrap: wrap; }
.counter { display: inline-flex; gap: 6px; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.counter b { font-size: 15px; } .counter.bad { color: var(--bad); border-color: var(--bad); }
/* part photos and documents (batch P-B) */
.part-photo img { display: block; max-width: 160px; max-height: 120px; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; background: var(--surface); }
.part-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.part-files figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.part-files img { width: 100%; height: 140px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
form.inline { display: inline; }
label.qc { display: flex; flex-direction: column; gap: 2px; margin-block-start: 4px; }
/* smart buttons (Odoo-style stat buttons): a row of counts / amounts under a record header, each opens the related list */
.sbar { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.sbtn { flex: 1 1 150px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 58px; color: var(--text); text-decoration: none;
        border-inline-end: 1px solid var(--line); border-block-end: 1px solid var(--line); margin-block-end: -1px; margin-inline-end: -1px; }
a.sbtn:hover, a.sbtn:focus-visible { background: var(--surface-2); }
.sbtn .ico { width: 22px; height: 22px; flex: none; color: var(--text-3); }
.sbtn > span { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; color: var(--text-2); min-width: 0; }
.sbtn b { font-size: 17px; color: var(--text); }
.sbtn small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbtn.bad .ico, .sbtn.bad b { color: var(--bad); }
.sbtn.warn .ico, .sbtn.warn b { color: var(--warn); }
.sbtn.ok .ico { color: var(--ok); }
@media (max-width: 640px) {
  .sbar { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; }
  .sbtn { flex: 0 0 140px; scroll-snap-align: start; }
}

/* ============================================================ tables (.tbl-cards: one card per row on phones) */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.tbl th { text-align: start; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface-2); padding: 10px 12px; border-block-end: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-block-end: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tr:last-child td { border-block-end: 0; }
.tbl tr.grey td { color: var(--text-3); background: var(--surface-2); }
.tbl td.r, .tbl th.r { text-align: end; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); }
.section-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); border-block-end: 1px solid var(--line); font-weight: 700; }
.section-h .letter { width: 24px; height: 24px; border-radius: 6px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 12px; }

/* ============================================================ tabs (role=tablist, keyboard in app.js) */
.tabs { display: flex; gap: 2px; border-block-end: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tabs button { min-height: var(--touch); background: none; border: 0; border-block-end: 3px solid transparent; padding: 0 14px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs a { min-height: var(--touch); border-block-end: 3px solid transparent; padding: 0 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; text-decoration: none; }  /* tabs that are links (CRM queues) */
.tabs a:hover { color: var(--text); } .tabs a[aria-current="true"] { color: var(--brand); border-block-end-color: var(--brand); }
.tabs button.on, .tabs button[aria-selected="true"] { color: var(--brand); border-block-end-color: var(--brand); }
[data-panel] { display: none; padding-block-start: 16px; } [data-panel].on { display: block; }

/* ============================================================ kanban / planning board */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-block-end: 4px; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kcol h3 { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin: 0 0 4px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: border-color var(--t-fast), transform var(--t-fast); }
a.kcard:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.kcard .t { font-weight: 700; font-size: 13.5px; }
.board { display: grid; grid-template-columns: 180px repeat(10, minmax(56px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); min-width: 900px; }
.board > div { border-block-end: 1px solid var(--line); border-inline-end: 1px solid var(--line); min-height: 48px; padding: 6px; font-size: 12px; position: relative; }
.board .hd { background: var(--surface-2); font-weight: 600; color: var(--text-3); min-height: 34px; }
.board .tech { display: flex; flex-direction: column; justify-content: center; }
.board .lane { grid-column: 2 / -1; position: relative; }
.bar { position: absolute; top: 8px; bottom: 8px; inset-inline-start: 0; border-radius: 7px; padding: 4px 8px; font-size: 11.5px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; z-index: 1; }
.bar:hover { text-decoration: none; filter: brightness(1.1); }
.bar.b1 { background: #14171c; } .bar.b2 { background: #3a5f9e; } .bar.b3 { background: #8a5a00; } .bar.b4 { background: #5b3fb0; } .bar.late { background: #b3261e; }

/* ============================================================ timeline (job card progress) */
.timeline { display: flex; overflow-x: auto; }
.tl { flex: 1; min-width: 104px; position: relative; padding-block-start: 24px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.tl::before { content: ""; position: absolute; top: 9px; inset-inline: 0; height: 4px; background: var(--surface-3); }
.tl::after { content: ""; position: absolute; top: 3px; inset-inline-start: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); }
.tl.done { color: var(--text-2); } .tl.done::before { background: var(--ok); } .tl.done::after { background: var(--ok); border-color: var(--ok); }
.tl.now { color: var(--brand); } .tl.now::after { border-color: var(--brand); background: var(--brand-soft); }

/* ============================================================ pop-up (job card actions; <dialog> arrives in step 5) and toast */
.modal { position: fixed; inset: 0; background: rgba(8, 9, 11, .5); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal.on { display: flex; animation: sc-fade var(--t) var(--ease); }
.modal .box { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: sc-pop var(--t) var(--ease); }
.modal .box > header { padding: 14px 16px 14px 20px; border-block-end: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.modal .box > .bd { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal .box > footer { padding: 12px 20px 16px; border-block-start: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
#toast { position: fixed; inset-block-end: 24px; inset-inline-start: 50%; translate: -50% 0; background: #10201f; color: #f1f7f6; padding: 12px 18px; border-radius: 14px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity var(--t); pointer-events: none; z-index: 60; max-width: min(520px, calc(100vw - 24px)); }
[dir="rtl"] #toast { translate: 50% 0; }
#toast.on { opacity: 1; animation: sc-toast var(--t) var(--ease); }

/* ============================================================ empty state, skeleton */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 32px 16px; color: var(--text-2); }
.empty .ico { width: 44px; height: 44px; color: var(--brand); }
.empty h3 { color: var(--text); margin: 0; }
.skel { border-radius: 8px; min-height: 14px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: sc-shimmer 1.2s linear infinite; }

/* ============================================================ phone-first screens (technician, gate) */
.phone { width: 400px; max-width: 100%; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.phone .ph-top { background: var(--side); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.phone .ph-top .chipbtn { color: #fff; } .phone .ph-top .chipbtn:hover { background: rgba(255, 255, 255, .08); }
.phone .ph-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 640px; background: var(--bg); }
.timer { font-size: 44px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; padding: 10px; border-radius: 16px; background: var(--brand-soft); }

/* car diagram, signature, steps, meters, plans */
.car { width: 100%; max-width: 520px; display: block; margin-inline: auto; }
.car .zone { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 2; cursor: pointer; } .car .zone:hover { fill: var(--brand-soft); } .car .dmg { fill: #ef4444; }
.sig { height: 120px; border: 2px dashed var(--line-2); border-radius: var(--radius-s); display: grid; place-items: center; color: var(--text-3); }
.steps { display: flex; gap: 8px; flex-wrap: wrap; } .step { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.step b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); }
.step.done b { background: var(--ok); color: var(--on-strong); } .step.now b { background: var(--brand); color: var(--brand-ink); } .step.now { color: var(--text); font-weight: 600; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: block; width: 100%; }  /* <svg class="meter"><rect width="N%"/></svg>: no style attribute needed */
.meter rect { height: 100%; fill: var(--brand); } .meter.ok rect { fill: var(--ok); } .meter.warn rect { fill: var(--warn); } .meter.bad rect { fill: var(--bad); }
.plan { display: flex; flex-direction: column; gap: 10px; } .plan.best { border: 2px solid var(--brand); } .price { font-size: 30px; font-weight: 800; }
.feat li { margin: 4px 0; }

/* ============================================================ motion (short, purposeful; off under reduced motion) */
@keyframes sc-fade { from { opacity: 0; } }
@keyframes sc-rise { from { transform: translateY(8px); } }  /* no opacity: a paused background page still shows everything */
@keyframes sc-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes sc-drop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes sc-toast { from { transform: translateY(14px) scale(.96); } }
@keyframes sc-bump { 40% { transform: scale(1.08); } }
@keyframes sc-flash { 0% { background: color-mix(in srgb, var(--ok) 28%, transparent); } 100% { background: transparent; } }
@keyframes sc-shimmer { to { background-position: -200% 0; } }
.content > .card, .content > .grid { animation: sc-rise 320ms var(--ease) backwards; }  /* backwards: no transform left once it ends */
/* owner, 25 Nov 2026: the rise animation keeps each card on its own layer, so the next card covered a menu dropping out of
   this one (the columns menu on the fleet page): the card whose menu is open comes to the front */
.content > .card:has(details[open]), .content > .grid:has(details[open]) { position: relative; z-index: 20; }
.bump { animation: sc-bump 420ms var(--ease); } .flash { animation: sc-flash 900ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ============================================================ responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-32 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 30; transform: translateX(-105%); transition: transform var(--t) var(--ease); box-shadow: var(--shadow-lg); }
  [dir="rtl"] .side { transform: translateX(105%); }
  body.nav-open .side { transform: none; }
  .burger { display: inline-flex; }
  .top { padding-inline: 8px; gap: 4px; } .top .hide-m { display: none; }
  .content { padding: 14px; }
  .g2, .g3, .g4, .g-21, .g-32, .g-auto, .form, .form.f3, .form.f2 { grid-template-columns: minmax(0, 1fr); }
  .span2, .span3 { grid-column: auto; }
  .phone { border-radius: 0; border: 0; width: 100%; box-shadow: none; }
  .w-22p, .w-28p, .w-40p, .w-50p, .w-70p { width: auto; }
  /* tables marked .tbl-cards show one card per row (each td needs data-label) */
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; }
  .tbl-cards tr { padding: 10px 12px; border-block-end: 1px solid var(--line); }
  .tbl-cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; }
  .tbl-cards td[data-label]::before { content: attr(data-label); color: var(--text-3); font-size: 12.5px; }
}
@media (pointer: coarse) { .tabs button, .side a { min-height: var(--touch); } }
/* Owner, 8 Nov 2026 (iPhone: the bottom bar showed in the middle of the screen): Safari zooms the page in when a field
   with text under 16 px is tapped and stays zoomed, so the fixed bars no longer sit at the screen's edges. Fields on
   touch screens are 16 px, which stops that zoom; people can still pinch to zoom. */
@media (pointer: coarse), (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em); }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ============================================================ standalone layouts: sign-in, customer portal, public site */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: min(420px, 100%); }
.portal { max-width: 640px; margin: 0 auto; padding: 16px; }
.site { max-width: 1100px; margin: 0 auto; padding: 16px; }
.site .hero { padding: 48px 0 32px; } .site .hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.site .hero p { font-size: 18px; color: var(--text-2); max-width: 720px; }
.site .nav { display: flex; align-items: center; gap: 16px; padding: 8px 0; flex-wrap: wrap; } .site .nav .sp { flex: 1; }
.site .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.site .plan.best { outline: 2px solid var(--brand); border: 0; }
.site footer { margin-top: 48px; padding: 24px 0; color: var(--text-3); font-size: 13px; }
.brand-row { display: flex; align-items: center; gap: 10px; } .brand-row b { font-size: 18px; }
[dir="rtl"] .ico.flip { transform: scaleX(-1); }

/* ============================================================ app shell v2 (UI/UX step 2) */
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.skip:focus { inset-block-start: 12px; }
.side { display: flex; flex-direction: column; padding: 0; transition: width var(--t) var(--ease), transform var(--t) var(--ease); }
.side-brand { height: var(--top); display: flex; align-items: center; gap: 10px; padding-inline: 16px; border-block-end: 1px solid rgba(255, 255, 255, .06); color: #fff; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; flex: none; }
.side-brand small { display: block; font-size: 11.5px; font-weight: 500; color: var(--side-muted); overflow: hidden; text-overflow: ellipsis; }
.side-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.side-nav a { margin-block: 2px; white-space: nowrap; }
.side-foot { padding: 10px; border-block-start: 1px solid rgba(255, 255, 255, .06); flex: none; }
.side-collapse { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 11px; background: none; color: var(--side-muted); cursor: pointer; font: inherit; white-space: nowrap; }
.side-collapse:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side .lbl { overflow: hidden; text-overflow: ellipsis; }
/* collapsed rail: icons only, name shown as a tooltip on hover and keyboard focus */
.shell.is-mini { grid-template-columns: 72px 1fr; }
.shell.is-mini .side .lbl, .shell.is-mini .side-brand small { display: none; }
.shell.is-mini .side-nav a, .shell.is-mini .side-collapse { justify-content: center; padding: 0; }
.shell.is-mini .side-brand { justify-content: center; padding: 0; }
.shell.is-mini .side-collapse .ico { transform: scaleX(-1); } [dir="rtl"] .shell.is-mini .side-collapse .ico { transform: none; }
/* owner, 8 Nov: the folded menu scrolls like the open one, so its last links and the unfold button stay on a short
   screen; the hover labels float over the page (app.js), not inside the menu */
.shell.is-mini .side-nav { overflow-y: auto; min-height: 0; scrollbar-width: none; } .shell.is-mini .side-nav::-webkit-scrollbar { display: none; }
.shell.is-mini .side { overflow: hidden; z-index: 40; }
.side-tip { position: fixed; z-index: 80; padding: 5px 10px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: 12.5px; font-weight: 600;
  white-space: nowrap; pointer-events: none; transform: translateY(-50%); }
.side-collapse { position: relative; }
/* header menus */
.btn.sm { min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; }
.has-menu { position: relative; }
.menu { position: absolute; z-index: 60; inset-block-start: calc(100% + 6px); inset-inline-end: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; animation: sc-pop var(--t) var(--ease); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--touch); padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text); text-align: start; cursor: pointer; font: inherit; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface-3); text-decoration: none; }
.menu hr { border: 0; border-block-start: 1px solid var(--line); margin: 6px 4px; }
.menu form { margin: 0; }
.menu-label { font-size: 12px; color: var(--text-3); padding: 8px 10px 4px; overflow-wrap: anywhere; }
.seg { display: flex; padding: 3px; gap: 2px; margin: 0 6px 4px; border-radius: 11px; background: var(--surface-3); }
.menu .seg a, .menu .seg button { flex: 1; justify-content: center; min-height: 36px; padding: 0 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.user-btn { padding-inline: 4px 10px; }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline-flex; } :root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .when-dark { display: inline-flex; } :root:not([data-theme="light"]) .when-light { display: none; } }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .crumbs .sep { color: var(--line-2); }
.crumbs a[aria-current="page"] { color: var(--text-2); }
.content:focus { outline: none; }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(8, 9, 11, .5); animation: sc-fade var(--t) var(--ease); }
.bottombar { display: none; }
@media (max-width: 760px) {
  .shell.is-mini { grid-template-columns: 1fr; }
  .shell.is-mini .side .lbl, .shell.is-mini .side-brand small { display: initial; }
  .shell.is-mini .side-nav a, .shell.is-mini .side-collapse { justify-content: flex-start; padding: 0 12px; }
  .shell.is-mini [data-tip]:hover::after { display: none; }
  .side-foot { display: none; }
  .content { padding-block-end: 96px; }
  .bottombar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 20; inset-inline: 0; inset-block-end: 0; background: var(--surface); border-block-start: 1px solid var(--line); padding-block-end: env(safe-area-inset-bottom); }
  .bottombar a, .bottombar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text-3); cursor: pointer; }
  .bottombar a:hover { text-decoration: none; } .bottombar [aria-current="page"] { color: var(--brand); }
  .bottombar .fab { width: 50px; height: 50px; margin-block-start: -16px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
  .top .has-menu:has(> [data-menu="m-new"]) > button { display: none; }  /* "+ New" lives in the bottom bar on phones */
  /* owner, 8 Nov 2026: a menu opens where it was tapped. The header's menus (account, notifications) drop down under
     the header; menus inside the page stay under their button; only "+ New", opened from the bottom bar, rises from it. */
  .menu { max-width: calc(100vw - 20px); min-width: min(240px, calc(100vw - 20px)); }
  .top .menu { position: fixed; inset-inline: 10px; inset-block-start: calc(var(--top) + 6px); inset-block-end: auto; min-width: 0; max-width: none;
    max-height: calc(100dvh - var(--top) - 90px); overflow-y: auto; transform-origin: top; animation: sc-drop var(--t) var(--ease); }
  .top #m-new { inset-block-start: auto; inset-block-end: 76px; max-height: calc(100dvh - 160px); transform-origin: bottom; animation: sc-pop var(--t) var(--ease); }
}
.tech-view { width: 100%; max-width: 520px; margin-inline: auto; }

/* ============================================================ job card workspace (UI/UX step 5) */
.jc-head { display: flex; flex-direction: column; gap: 16px; container-type: inline-size; }
.jc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 18px; align-items: start; }
.make { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 18px; background: var(--brand-soft); color: var(--brand); letter-spacing: .03em; }
.facts { display: flex; gap: 6px 20px; flex-wrap: wrap; color: var(--text-2); font-size: 13.5px; }
.facts > span { display: inline-flex; align-items: center; gap: 6px; } .facts .ico { width: 17px; height: 17px; color: var(--text-3); }
.jc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
/* the header stacks when the card itself is narrow (tablet, side menu open), not only on small screens */
@container (max-width: 860px) { .jc-top { grid-template-columns: auto minmax(0, 1fr); } .jc-side { grid-column: 1 / -1; align-items: stretch; } .jc-side > .row { flex-wrap: wrap; } }
.jc-total { font-size: 26px; font-weight: 700; }
.jc-progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.jc-progress li { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-3); min-width: 0; }
.jc-progress li::before { content: ""; height: 6px; border-radius: 99px; background: var(--surface-3); }
.jc-progress li.done { color: var(--text-2); } .jc-progress li.done::before { background: var(--ok); }
.jc-progress small { font-weight: 500; color: var(--text-3); }
.row-actions { white-space: nowrap; } .row-actions .btn + .btn { margin-inline-start: 6px; }
/* searchable list */
.combo { position: relative; min-width: 0; }
.combo-input { width: 100%; }
.combo-clear { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 16px; line-height: 1; cursor: pointer; }
.combo-clear:hover { background: var(--line-2); color: var(--text); }
.combo:has(.combo-clear:not([hidden])) .combo-input { padding-inline-end: 38px; }
.combo-list { position: absolute; z-index: 55; inset-inline: 0; inset-block-start: calc(100% + 4px); min-width: 240px; max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-lg); animation: sc-pop var(--t-fast) var(--ease); }
.combo-list [role=option] { min-height: 40px; display: flex; align-items: center; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.combo-list [role=option][aria-selected="true"] { background: var(--brand-soft); color: var(--text); }
.combo-none { padding: 10px; color: var(--text-3); font-size: 13px; }
/* fast line entry */
.tbl-wrap:has(> table.lines) { overflow: visible; }
table.lines { width: 100%; border-collapse: collapse; background: var(--surface); }
.lines th { text-align: start; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 8px; border-block-end: 1px solid var(--line); background: var(--surface-2); }
.lines td { padding: 6px; border-block-end: 1px solid var(--line); vertical-align: top; }
.lines td select, .lines td input { width: 100%; min-height: 40px; }
.lines tr.is-new td { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.lines tr.is-in { animation: sc-rise var(--t) var(--ease); }
.lines tr.has-error td { background: var(--bad-soft); }
.lines .bin { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.lines .bin:hover { background: var(--bad-soft); color: var(--bad); }
.err { font-size: 12.5px; color: var(--bad); font-weight: 600; margin-block-start: 4px; }
.add-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--touch); padding: 0 12px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-s); background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.add-line:hover { border-color: var(--brand); background: var(--brand-soft); }
.unsaved { position: sticky; inset-block-end: 12px; z-index: 15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--warn); box-shadow: var(--shadow-lg); animation: sc-rise var(--t) var(--ease); }
.unsaved > .ico { color: var(--warn); }
/* a cancelled job card is read-only: the tabs other modules add show their data but no forms (the server refuses them too); the gate pass stays, so the car can leave (owner, 16 Nov 2026) */
.is-locked [data-panel]:not([data-panel="conversation"]):not([data-panel="invoice"]):not([data-panel="gatepass"]) form, .is-locked .add-line, .is-locked [data-lines-box] { display: none !important; }
/* rows being typed scroll clear of the sticky bar, also when moving between fields with Tab / Enter */
table[data-lines] tr.is-new, table[data-lines] tr.is-new :is(input, select, textarea, button) { scroll-margin-block: 80px 110px; }
.kbd { font-family: var(--mono-font); font-size: 11px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 6px; opacity: .8; direction: ltr; }
/* pop-up */
dialog.dlg { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.dlg[open] { animation: sc-pop var(--t) var(--ease); }
dialog.dlg::backdrop { background: rgba(8, 9, 11, .5); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 20px; border-block-end: 1px solid var(--line); }
.dlg-head h2 { flex: 1; margin: 0; font-size: 17px; } .dlg-head small { font-weight: 500; font-size: 13px; }
.dlg-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-block-start: 1px solid var(--line); }
.checks { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.checks legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-block-end: 6px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: var(--touch); cursor: pointer; }
#toast { display: flex; align-items: center; gap: 12px; }
#toast.bad { background: var(--bad); color: #fff; }
#toast button { pointer-events: auto; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .16); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
#toast.on { pointer-events: auto; }
@media (max-width: 760px) {
  .jc-top { grid-template-columns: auto minmax(0, 1fr); } .jc-side { grid-column: 1 / -1; align-items: stretch; }
  .jc-progress span, .jc-progress small { display: none; }
  .lines thead { display: none; } .lines, .lines tbody, .lines tr, .lines td { display: block; }
  .lines tr { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px 8px; padding: 10px; border-block-end: 1px solid var(--line); }
  .lines td { border: 0; padding: 0; grid-column: 1; } .lines td:last-child { grid-column: 2; grid-row: 1; }
  .lines td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--text-3); margin-block-end: 2px; }
  .unsaved { inset-block-end: 72px; }
  table[data-lines] tr.is-new, table[data-lines] tr.is-new :is(input, select, textarea, button) { scroll-margin-block-end: 170px; }
  dialog.dlg { width: 100vw; max-width: 100vw; height: 100%; max-height: 100vh; margin: 0; border-radius: 0; }
  .row-actions { white-space: normal; }
}

/* technician: pause reasons as large buttons (radio inputs, keyboard and offline queue unchanged) */
.reasons { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reasons legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-block-end: 6px; }
.reasons label { position: relative; min-height: 56px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); font-weight: 600; cursor: pointer; }
.reasons input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.reasons label:has(input:checked) { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.reasons label:has(input:focus-visible) { box-shadow: var(--ring); }

/* line cells and their fields may shrink: a <select> otherwise sizes itself to its longest option and widens the phone page */
.lines td, .lines td select, .lines td input, .lines .combo { min-width: 0; max-width: 100%; }
/* the native <select> behind a searchable field stays in the form but takes no space */
select.combo-native { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; }

/* ============================================================ command palette (UI/UX step 3) */
.kbd-btn { position: absolute; inset-inline-end: 6px; border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 8px; }
.kbd-btn:hover { color: var(--text); background: var(--surface-3); }
.top .search input { padding-inline-end: 70px; }
dialog.pal { border: 0; padding: 0; margin: 10vh auto auto; width: min(640px, calc(100vw - 24px)); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.pal[open] { animation: sc-pop var(--t) var(--ease); display: flex; flex-direction: column; }
dialog.pal::backdrop { background: rgba(8, 9, 11, .5); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-block-end: 1px solid var(--line); color: var(--text-3); }
.pal-in input { flex: 1; min-height: 56px; border: 0; background: none; font-size: 16px; color: var(--text); padding: 0; }
.pal-in input:focus-visible { box-shadow: none; }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: 55vh; overflow-y: auto; }
.pal-group { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 12px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 12px; cursor: pointer; }
.pal-item b { display: block; font-weight: 600; } .pal-item small { color: var(--text-3); font-size: 12.5px; }
.pal-item[aria-selected="true"] { background: var(--brand-soft); }
.pal-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.pal-item[aria-selected="true"] .pal-ic { background: var(--brand); color: var(--brand-ink); }
.pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px; border-block-start: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
@media (max-width: 760px) { dialog.pal { margin: 0; width: 100vw; max-width: 100vw; height: 100%; max-height: 100vh; border-radius: 0; } .pal-list { max-height: none; flex: 1; } }

/* ============================================================ dashboard (UI/UX step 4) */
.welcome { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(120deg, #14171c 0%, #2a2f37 100%); }
.welcome h1 { color: #fff; } .welcome p { margin: 4px 0 0; color: #c9ced6; }
.welcome-stat { display: flex; flex-direction: column; padding-inline: 16px; border-inline-start: 1px solid rgba(255, 255, 255, .16); color: #fff; min-width: 110px; }
.welcome-stat:hover { text-decoration: none; } .welcome-stat b { font-size: 24px; } .welcome-stat span { font-size: 12.5px; color: #c9ced6; }
.quick { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--text); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast); }
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.kpi-ic, .att-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.kpi-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.kpi-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.kpi-top { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-2); }
.kpi-v { font-size: 28px; font-weight: 700; } .kpi-v small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px; border-radius: 99px; font-weight: 700; }
.delta.up { color: var(--ok); background: var(--ok-soft); } .delta.down { color: var(--bad); background: var(--bad-soft); }
.spark { width: 100%; height: 44px; display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--brand-soft); } .spark-dot { fill: var(--brand); }
.att { list-style: none; margin: 0; padding: 0; }
.att li { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 2px; border-block-end: 1px solid var(--line); }
.att li:last-child { border-block-end: 0; }
.att-ic { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) { .welcome-stat { border: 0; padding-inline: 0; } .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .welcome { flex-direction: column; align-items: stretch; gap: 10px; } .welcome .grow { flex: none; } .welcome-stat { flex-direction: row; align-items: baseline; gap: 8px; } }

/* ============================================================ step 6: vehicle 360, gate, lists */
.plate { display: inline-flex; align-items: stretch; border: 2px solid #111; border-radius: 7px; overflow: hidden; font-weight: 700; font-size: 13px; background: #fff; color: #111; direction: ltr; line-height: 1; unicode-bidi: isolate; }
.plate span { padding: 5px 8px; } .plate span + span { border-inline-start: 1.5px solid #111; }
.gate-result { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius); font-size: 18px; }
.gate-result b { display: block; font-size: 22px; } .gate-result .ico.xl { width: 56px; height: 56px; }
.gate-result.ok { background: var(--ok-soft); color: var(--ok); } .gate-result.info { background: var(--info-soft); color: var(--info); } .gate-result.bad { background: var(--bad-soft); color: var(--bad); }
.plate-big { font-size: 28px; letter-spacing: .06em; color: var(--text); }
.code-scan { font-size: 18px; }
td .meter { margin-block-start: 6px; max-width: 140px; }
dl.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 20px; }
dl.facts dt { font-size: 12px; color: var(--text-3); } dl.facts dd { margin: 0; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* ============================================================ step 7: error pages, customer portal, public site */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.error-box { width: min(520px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: start; }
.error-code { font-size: 64px; font-weight: 800; color: var(--brand); line-height: 1; }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 12px; }
.portal-head .seg a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; }
.portal-car { display: flex; gap: 14px; align-items: center; }
.ms-dot { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; border: 2px solid var(--line-2); color: var(--surface); flex: none; }
.ms-dot.done { background: var(--ok); border-color: var(--ok); }
.score { border: 0; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.score label { position: relative; min-height: 56px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 14px; font-size: 20px; font-weight: 700; cursor: pointer; background: var(--surface); }
.score input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.score label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.score label:has(input:focus-visible) { box-shadow: var(--ring); }
.hero-panel { padding: 40px 28px; border-radius: 20px; margin-block: 16px 24px; background: linear-gradient(120deg, #14171c 0%, #2a2f37 100%); color: #fff; }
.site .hero-panel h1 { color: #fff; } .site .hero-panel p { color: #c9ced6; }
.hero-panel .btn:not(.pri) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.feature { display: flex; flex-direction: column; gap: 10px; }
.kpi-top .l { font-size: 13px; }
.site .hero.hero-panel { padding: 40px 28px; } @media (max-width: 760px) { .site .hero.hero-panel { padding: 28px 18px; } }
.feat { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; } .feat li { display: flex; align-items: center; gap: 6px; margin: 0; }
.crumbs .sep { color: var(--text-3); }  /* step 8: decorative, but legible in both themes */
/* step 8: larger touch targets for small controls (WCAG 2.2 target size) */
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; padding-inline: 2px; }
.att a, .att .btn { min-height: var(--touch); display: inline-flex; align-items: center; padding-inline: 10px; }

/* Servics slogan under the logo on the sign-in card */
.auth-slogan { margin: -4px 0 0; }

/* ============================================================ camera scan (scan.js) */
.scan-btn { display: inline-grid; place-items: center; flex: none; width: var(--touch, 40px); min-height: var(--touch, 40px); padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.scan-btn:hover, .scan-btn:focus-visible { color: var(--text); border-color: var(--text-3); }
.scan-btn svg { width: 20px; height: 20px; }
.scan-wrap { display: flex; gap: 6px; align-items: center; min-width: 0; } .scan-wrap > input { flex: 1; min-width: 0; }
.top .search .scan-btn { position: absolute; inset-inline-end: 62px; width: 34px; min-height: 32px; border: 0; background: none; }
.top .search input[data-scan] { padding-inline-end: 104px; }
@media (max-width: 760px) { .top .search .scan-btn { inset-inline-end: 4px; } .top .search input[data-scan] { padding-inline-end: 42px; } }
.scan-dlg .dlg-body { position: relative; }
.scan-dlg video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #000; }
.scan-frame { position: absolute; inset: 22% 18%; border: 2px solid var(--brand-ink); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); pointer-events: none; }

/* ============================================================ planning board (planning.js) */
.g-plan { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); align-items: start; }
.plan-tools select, .plan-tools input { min-height: 40px; }
.plan-days { margin: 0; } .plan-days a { display: inline-grid; place-items: center; min-width: 40px; min-height: 34px; padding: 0 10px; border-radius: 8px; font-weight: 600; color: var(--text-2); }
.plan-days a:hover { text-decoration: none; background: var(--surface); }
.wl-filters { flex-wrap: wrap; } .wl-filters select, .wl-filters input[type="search"] { min-height: 40px; } .wl-filters input[type="search"] { flex: 1; min-width: 200px; }
.plan-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.plan-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-inline-start: 4px solid var(--line-2); }
.plan-kpi span { font-size: 12.5px; color: var(--text-3); font-weight: 600; } .plan-kpi b { font-size: 24px; line-height: 1.2; } .plan-kpi small { color: var(--text-3); font-size: 12px; }
.plan-kpi.warn { border-inline-start-color: var(--warn); } .plan-kpi.bad { border-inline-start-color: var(--bad); } .plan-kpi.bad b { color: var(--bad); }
.plan-legend { gap: 6px 14px; justify-content: flex-start; margin-block-end: 10px; font-size: 12px; color: var(--text-2); }
.plan-legend .lg { display: inline-flex; align-items: center; gap: 6px; } .plan-legend .lg::before { content: ""; width: 14px; height: 10px; border-radius: 3px; background: var(--c, var(--line-2)); }
.plan-legend .lg.clash::before { background: transparent; border: 2px dashed var(--bad); }
.plan-board { min-width: 980px; }
.plan-board .hd { position: sticky; top: 0; z-index: 2; font-variant-numeric: tabular-nums; }
.plan-board .hd-tech, .plan-board .tech { position: sticky; inset-inline-start: 0; z-index: 3; background: var(--surface); }
.plan-board .tech { gap: 2px; min-height: 64px; }
.plan-board .lane { background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--cols, 13)) 100%; }
:root:lang(ar) .plan-board .lane { background-image: linear-gradient(to left, var(--line) 1px, transparent 1px); }
.plan-board .lane.drop-here { background-color: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -3px; }
.plan-board .lane.drop-here::after { content: attr(data-drop-time); position: absolute; inset-block-start: 4px; inset-inline-end: 6px; font-size: 11px; font-weight: 700; color: var(--brand); }
.plan-board .bar { background: var(--c, var(--info)); display: flex; align-items: center; gap: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); color: var(--on-strong); }
.plan-board .bar span { opacity: .85; }
.plan-board .bar { cursor: pointer; }
#plan-peek { width: min(440px, calc(100vw - 32px)); }
.row.wrap { flex-wrap: wrap; }
.rq-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding-inline-start: 18px; color: var(--text-3); } .rq-steps li.done { color: var(--ok); font-weight: 600; }
.rq-short { background: var(--surface-2); }
.peek { margin-top: 4px; } .peek .ok { color: var(--ok); font-weight: 600; } .peek .bad { color: var(--bad); font-weight: 600; }
.pick-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pick-lines li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-block-end: 1px solid var(--line); }
.pick-bin { min-width: 74px; padding: 6px 8px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 15px; text-align: center; }
.pick-qty { font-weight: 800; font-size: 16px; white-space: nowrap; text-align: end; }
#dlg-share { width: min(460px, calc(100vw - 32px)); } .share-list { gap: 10px; } .share-list .btn { justify-content: flex-start; } .share-text { width: 100%; font: inherit; font-size: 13px; resize: vertical; }
.btn.ghost.bad { background: transparent; border-color: transparent; color: var(--bad); } .btn.ghost.bad:hover { background: var(--bad-soft); }
/* wide view: the board takes the whole width (the queue goes under it) with bigger hours and rows */
html.plan-wide .g-plan { grid-template-columns: minmax(0, 1fr); }
html.plan-wide .plan-queue { position: static; max-height: none; }
html.plan-wide .plan-board { min-width: 1500px; }
html.plan-wide .plan-board .tech { min-height: 84px; }
html.plan-wide .plan-board .bar { font-size: 13px; top: 10px; bottom: 10px; }
[data-plan-wide][aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
dl.peek { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.peek > div { display: contents; } dl.peek dt { color: var(--text-2); font-size: 13px; } dl.peek dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.st-assigned, .st-new { --c: #3a5f9e; } .st-in_progress { --c: var(--ok); } .st-paused, .st-waiting_parts, .st-waiting_approval, .st-reopened { --c: var(--warn); }
.st-completed { --c: #7d858f; } .st-late { --c: var(--bad); }
.plan-board .bar.clash { outline: 2px dashed var(--bad); outline-offset: 1px; }
.plan-board .bar.overdue { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 12px); }
.now-line { position: absolute; inset-block: 0; width: 2px; margin-inline-start: -1px; background: var(--bad); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; inset-block-start: -3px; inset-inline-start: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--line-2); }
.dot.st-working { background: var(--ok); } .dot.st-waiting { background: var(--warn); } .dot.st-free { background: var(--info); }
.plan-queue { position: sticky; inset-block-start: calc(var(--top) + 12px); max-height: calc(100vh - var(--top) - 32px); overflow: auto; }
.plan-op { cursor: grab; gap: 6px; } .plan-op.dragging { opacity: .5; cursor: grabbing; }
.plan-op select { flex: 1; min-width: 0; } .plan-op input[type="datetime-local"] { flex: 1; min-width: 0; }
@media (max-width: 1100px) { .g-plan { grid-template-columns: minmax(0, 1fr); } .plan-queue { position: static; max-height: none; } }

/* ============================================================ health check (aftercare) */
.hc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; background: var(--line-2); }
.hc-dot.r-ok { background: var(--ok); } .hc-dot.r-advise { background: var(--warn); } .hc-dot.r-urgent { background: var(--bad); } .hc-dot.r-na { background: var(--surface-3); border: 1px solid var(--line-2); }
.hc-row.r-urgent td:first-child { box-shadow: inset 4px 0 0 var(--bad); } .hc-row.r-advise td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
:root:lang(ar) .hc-row.r-urgent td:first-child { box-shadow: inset -4px 0 0 var(--bad); } :root:lang(ar) .hc-row.r-advise td:first-child { box-shadow: inset -4px 0 0 var(--warn); }
.hc-seg { margin: 0; flex-wrap: wrap; }
.hc-opt { position: relative; display: inline-flex; } .hc-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.hc-opt span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hc-opt input:focus-visible + span { box-shadow: var(--ring); }
.hc-opt.r-ok input:checked + span { background: var(--ok); color: var(--on-strong); } .hc-opt.r-advise input:checked + span { background: var(--warn); color: var(--on-strong); }
.hc-opt.r-urgent input:checked + span { background: var(--bad); color: var(--on-strong); } .hc-opt.r-na input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.hc-rate input[name="note"] { flex: 1; min-width: 160px; }

/* ============================================================ signature pad (signature.js) */
.sig-pad { position: relative; border: 2px dashed var(--line-2); border-radius: 12px; background: #fff; height: 200px; touch-action: none; }
.sig-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.sig-pad .sig-hint { position: absolute; inset-inline-start: 16px; inset-block-end: 12px; color: #9aa1a9; font-size: 13px; pointer-events: none; }
.sig-pad .sig-hint::before { content: "✕ "; } .sig-pad.signed .sig-hint { display: none; } .sig-pad.signed { border-style: solid; border-color: var(--ok); }
@media (max-width: 760px) {
  .hc-table td[data-label]::before { display: none; }  /* the item, rating and decision read on their own */
  .hc-table td { display: block; padding: 6px 0; }
  .hc-table .hc-rate { width: 100%; } .hc-table .hc-rate .seg { width: 100%; } .hc-table .hc-rate input[name="note"] { flex: 1 1 100%; }
  .hc-row td:first-child, :root:lang(ar) .hc-row td:first-child { box-shadow: none; }
  .hc-row.r-urgent { border-inline-start: 4px solid var(--bad); } .hc-row.r-advise { border-inline-start: 4px solid var(--warn); }
}

/* ============================================================ job conversation */
.chat-log { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); justify-self: start; }
.msg b { font-size: 12px; } .msg p { margin: 2px 0; } .msg small { color: var(--text-3); font-size: 11px; }
.msg.me { justify-self: end; background: var(--brand-soft); border-color: transparent; }
.msg.sys { justify-self: center; background: var(--surface-3); font-size: 12.5px; border: 0; }
.chat-form { display: flex; gap: 8px; } .chat-form input { flex: 1; min-width: 0; }
.chat-log .msg p { overflow-wrap: anywhere; }  /* long links in customer messages wrap instead of scrolling sideways */
.crm-big { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }  /* CRM measures */
.tl-list { display: flex; flex-direction: column; gap: 2px; }  /* CRM customer timeline */
.tl-day { margin: 14px 0 4px; font-size: 13px; color: var(--text-3); font-weight: 700; } .tl-day:first-child { margin-top: 0; }
.tl-item { display: flex; gap: 12px; padding: 8px 10px; border-inline-start: 3px solid var(--line); border-radius: 6px; }
.tl-item.t-ok { border-inline-start-color: var(--ok); } .tl-item.t-warn { border-inline-start-color: var(--warn); } .tl-item.t-bad { border-inline-start-color: var(--bad); background: var(--bad-soft); }
.tl-ico { color: var(--text-3); flex: none; padding-top: 2px; }
.msg.crm-note { background: var(--warn-soft); justify-self: stretch; max-width: none; text-align: start; }  /* CRM internal note */

/* ============================================================ due dates, key tags */
.due-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.due { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.due b { font-size: 17px; } .due.bad { border-color: var(--bad); background: var(--bad-soft); } .due.warn { border-color: var(--warn); background: var(--warn-soft); }
.tagno { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 6px; background: #ffd60a; color: #1a1a1a; font-weight: 800; font-size: 12px; border: 1px solid #c9a800; }

/* ============================================================ Bolt mascot (2026-11-04)
   Friendly moments only: sign-in, dashboard greeting, empty states, reminders, offline, gate exit, error pages.
   Never on invoices, documents or busy work screens; one Bolt per screen. */
.bolt { display: block; width: auto; max-width: 100%; height: auto; flex: none; user-select: none; pointer-events: none; }
:root[data-theme="dark"] .bolt { filter: drop-shadow(0 0 14px rgba(198, 244, 50, .22)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bolt { filter: drop-shadow(0 0 14px rgba(198, 244, 50, .22)); } }
.bolt-empty { height: 128px; }
.empty .bolt-empty + h3 { margin-top: 2px; }
.bolt-error { height: 170px; align-self: center; }
.error-box:has(.bolt-error) { text-align: center; } .error-box:has(.bolt-error) .row { justify-content: center; } .error-box:has(.bolt-error) .brand-row { justify-content: center; }
.bolt-welcome { height: 96px; margin-block: -14px -20px; filter: drop-shadow(0 0 14px rgba(198, 244, 50, .25)); }
.bolt-gate { height: 96px; }
.bolt-note { display: flex; align-items: center; gap: 14px; padding: 6px 16px 0; border-radius: var(--radius); background: var(--brand-soft); }
.bolt-note .bolt { height: 84px; align-self: flex-end; } .bolt-note p { margin: 10px 0; }
.bolt-banner { align-items: center; padding-block: 4px 0; } .bolt-banner .bolt { height: 56px; align-self: flex-end; }
.bolt-banner[hidden] { display: none; }

/* sign-in: card + Bolt panel */
.auth-split { display: flex; align-items: stretch; width: min(860px, 100%); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-split .auth-card { width: auto; flex: 1 1 420px; border-radius: 0; box-shadow: none; border: 0; padding: 32px 30px; justify-content: center; }
.auth-art { position: relative; flex: 1 1 380px; display: grid; place-items: center; padding: 48px 24px 24px; background: linear-gradient(160deg, #1c2026, #0b0d10); overflow: hidden; }
.auth-art::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(198, 244, 50, .26), transparent 65%); }
.auth-art .bolt { position: relative; height: 280px; filter: none; }
.auth-bubble { position: absolute; z-index: 1; inset-block-start: 20px; inset-inline-end: 20px; background: #c6f432; color: #14171c; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 16px 16px 16px 4px; }
@media (max-width: 760px) { .auth-split { flex-direction: column; box-shadow: none; } .auth-art { display: none; } .auth-split .auth-card { border-radius: var(--radius); box-shadow: var(--shadow); } .bolt-welcome { display: none; } }

/* Logo links to the website (side menu, sign-in, error pages) */
a.side-brand, a.side-brand:hover, a.brand-link, a.brand-link:hover { color: inherit; text-decoration: none; }
a.brand-link { display: inline-flex; align-items: center; gap: 10px; }
a.side-brand:focus-visible, a.brand-link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* Technician My jobs (2026-11-05 mock-up): job card, time against standard, tool grid, sticky Pause / Complete, bottom sheets */
.tj-job { display: grid; gap: 6px; }
.tj-job .plate span { font-size: 17px; padding: 6px 10px; }
.tj-time { display: grid; gap: 8px; }
.tj-prog { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tj-prog > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ok); transition: width var(--t) var(--ease); }
.tj-prog.warn > i { background: var(--warn); } .tj-prog.bad > i { background: var(--bad); }
.tj-legend { display: flex; justify-content: space-between; color: var(--text-2); }
.tj-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tj-tool { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 80px; padding: 10px 4px; border: 1px solid var(--line-2);
  border-radius: 14px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--text); text-align: center; cursor: pointer; }
.tj-tool:hover { text-decoration: none; border-color: var(--brand); } .tj-tool[disabled] { opacity: .45; cursor: default; }
.tj-tool .ico { width: 26px; height: 26px; }
.tj-tool .badge { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; }
.tj-tool.alert { border-color: var(--warn); }
.tj-bar { position: sticky; inset-block-end: 8px; z-index: 5; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 8px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-lg); }
.tj-bar .btn { min-height: 58px; font-size: 17px; justify-content: center; }
.tj-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .tj-line > input:first-child, .tj-line .grow { flex: 1 1 160px; min-width: 0; }
.tj-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .tj-checks li { display: flex; gap: 8px; align-items: center; }
.tj-ask { padding: 12px; }
dialog.dlg.sheet { margin-block: auto 0; inset-block-start: auto; inset-block-end: 0; height: auto; max-height: 88dvh; overflow: hidden; }
dialog.dlg.sheet[open], dialog.dlg.sheet > form { display: flex; flex-direction: column; min-height: 0; }
dialog.dlg.sheet > form { flex: 0 1 auto; max-height: 88dvh; }
dialog.dlg.sheet .dlg-body { overflow-y: auto; min-height: 0; flex: 0 1 auto; }
dialog.dlg.sheet .dlg-head, dialog.dlg.sheet .dlg-foot { flex: none; }
.tj-more { margin-block-start: 8px; } .tj-more > summary { cursor: pointer; font-weight: 600; color: var(--link); padding-block: 6px; }
@media (max-width: 760px) {
  .tj-bar { inset-block-end: calc(68px + env(safe-area-inset-bottom)); }
  dialog.dlg.sheet { width: 100vw; max-width: 100vw; height: auto; max-height: 88dvh; border-radius: 20px 20px 0 0; margin: auto 0 0; }
  dialog.dlg.sheet[open] { animation: tj-up var(--t) var(--ease); }
}
@keyframes tj-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.dlg.sheet[open] { animation: none; } .tj-prog > i { transition: none; } }

/* ---------- Workspace branding (Setup > Branding) ---------- */
/* logos in the shell: the side menu is dark in both themes */
.side-logo { display: block; max-height: 34px; max-width: 150px; width: auto; object-fit: contain; }
.side-tile { display: inline-grid; place-items: center; height: 38px; min-width: 38px; max-width: 160px; padding: 4px 8px; border-radius: 9px; background: #fff; flex: none; }
.side-tile img { max-height: 30px; max-width: 144px; object-fit: contain; display: block; }
.side-mark { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; flex: none; display: none; }
.brand-mono { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; flex: none; letter-spacing: .02em; }
.shell.is-mini .side-brand .side-logo, .shell.is-mini .side-brand .side-tile.has-mark { display: none; }
.shell.is-mini .side-brand .side-mark { display: block; }
@media (max-width: 1100px) { .shell.is-mini .side-brand .side-logo, .shell.is-mini .side-brand .side-tile.has-mark { display: inline-grid; } .shell.is-mini .side-brand .side-mark { display: none; } }
.side-brand.branded .lbl small { margin-top: 1px; }
.auth-logo { display: block; max-height: 56px; max-width: 240px; object-fit: contain; }
.auth-logo.on-dark { display: none; }
:root[data-theme="dark"] .auth-logo.has-dark.on-light { display: none; } :root[data-theme="dark"] .auth-logo.on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-logo.has-dark.on-light { display: none; } :root:not([data-theme="light"]) .auth-logo.on-dark { display: block; } }
.auth-brand-name { font-size: 20px; font-weight: 700; line-height: 1.25; }
.auth-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--text-3); padding-top: 6px; border-top: 1px solid var(--line); }
.auth-foot a { color: var(--text-2); }
.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); text-decoration: none; }
.powered .brand-mark { width: 16px; height: 16px; }
.auth-art.branded { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 55%, #0b0d10), #0b0d10); }
.auth-art .auth-art-logo { position: relative; max-width: 70%; max-height: 120px; object-fit: contain; }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.portal-brand img { max-height: 40px; max-width: 180px; object-fit: contain; }
.portal-brand img.on-dark { display: none; } /* the dark-background logo in dark theme, the normal one in light theme */
:root[data-theme="dark"] .portal-brand img.has-dark.on-light { display: none; } :root[data-theme="dark"] .portal-brand img.on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .portal-brand img.has-dark.on-light { display: none; } :root:not([data-theme="light"]) .portal-brand img.on-dark { display: block; } }

/* the set-up screen */
.brand-intro { margin: 0 0 14px; max-width: 72ch; }
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.brand-preview-col { position: sticky; top: calc(var(--top) + 14px); display: flex; flex-direction: column; gap: 10px; }
.brand-save { position: sticky; bottom: 12px; z-index: 5; box-shadow: var(--shadow-lg); }
@media (max-width: 1100px) { .brand-layout { grid-template-columns: 1fr; } .brand-preview-col { position: static; order: -1; } }
@media (max-width: 760px) { .brand-save { bottom: calc(68px + env(safe-area-inset-bottom)); } }
.brand-uploads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .brand-uploads { grid-template-columns: 1fr; } }
.bup { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bup-box { height: 110px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-s); display: grid; place-items: center; padding: 12px; cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.bup-box:hover, .bup-box.over { border-color: var(--brand); background: var(--brand-soft); }
.bup-box.light { background: #fff; } .bup-box.dark { background: #14171c; border-color: #3a404a; }
.bup-box.square { width: 110px; }
.bup-box img { max-width: 100%; max-height: 84px; object-fit: contain; }
.bup-empty { color: var(--text-3); } .bup-box.dark .bup-empty { color: #8e959e; }
.brand-presets { gap: 8px; }
.swatch { display: inline-flex; width: 44px; height: 44px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); cursor: pointer; background: none; }
.swatch i { flex: 1; } .swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: var(--ring); }
input[type="color"] { width: 48px; min-width: 48px; height: var(--touch); padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); background: var(--surface); cursor: pointer; }
.row.nowrap { flex-wrap: nowrap; }

/* the preview box: its own small copy of the shell, sign-in card and document */
.bp { --surface: #fff; --surface-2: #f8f9f6; --text: #14171c; --text-2: #474d55; --line: #e3e6e0; --doc: var(--brand);
  display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: var(--radius); background: #f4f5f2; border: 1px solid var(--line); color: var(--text); font-size: 12.5px; }
.bp[data-mode="dark"] { --surface: #171a1f; --surface-2: #1c2026; --text: #e8eaed; --text-2: #bcc1c8; --line: #2a2f37; background: #0f1114; border-color: #2a2f37; }
.bp-app { display: grid; grid-template-columns: 120px 1fr; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); min-height: 150px; }
.bp-side { background: #14171c; color: #d9dde3; padding: 8px 6px; display: flex; flex-direction: column; gap: 3px; }
.bp[data-mode="dark"] .bp-side { background: #0b0d10; }
.bp-brand { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 4px 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-weight: 700; font-size: 12px; overflow: hidden; }
.bp-brand > img { max-height: 22px; max-width: 104px; object-fit: contain; }
.bp-tile { display: inline-grid; place-items: center; background: #fff; border-radius: 6px; padding: 2px 5px; height: 24px; }
.bp-tile img { max-height: 18px; max-width: 92px; object-fit: contain; }
.bp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; font-size: 11.5px; color: #b6bcc4; }
.bp-item .ico { width: 14px; height: 14px; }
.bp-item.on { background: #22262d; color: #fff; } .bp-item.on .ico { color: var(--accent); }
.bp-item.on::before { content: ""; position: absolute; inset-inline-start: -6px; inset-block: 5px; width: 3px; border-radius: 3px; background: var(--accent); }
.bp-main { background: var(--surface-2); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.bp-head { display: flex; align-items: center; justify-content: space-between; }
.bp-btn { display: inline-flex; align-items: center; gap: 4px; background: var(--brand); color: var(--brand-ink); border-radius: 7px; padding: 4px 9px; font-weight: 700; font-size: 11.5px; }
.bp-btn .ico { width: 12px; height: 12px; } .bp-btn.wide { justify-content: center; padding: 7px; }
.bp-card { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 6px; font-size: 11px; }
.bp-chip { background: var(--brand-soft); color: var(--link); border-radius: 99px; padding: 1px 7px; font-weight: 700; font-size: 10.5px; }
.bp-link { color: var(--link); margin-inline-start: auto; font-weight: 600; pointer-events: none; }
.bp-login { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.bp-login-head { display: flex; align-items: center; gap: 8px; } .bp-login-head img { max-height: 30px; max-width: 160px; object-fit: contain; }
.bp-input { height: 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.bp-doc { background: #fff; color: #14171c; border: 1px solid #e3e6e0; border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.bp-doc-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--doc); }
.bp-doc-head img { max-height: 26px; max-width: 120px; object-fit: contain; }
.bp-doc-title { margin-inline-start: auto; font-weight: 700; color: var(--doc); }
.bp.doc-plain .bp-doc-head { border-bottom-color: #14171c; } .bp.doc-plain .bp-doc-title { color: #14171c; }
.bp-doc-line { height: 7px; border-radius: 3px; background: #eef0ea; } .bp-doc-line.short { width: 60%; }
.bp-doc-foot { font-size: 10px; color: #5c636c; min-height: 12px; }.side-mark.side-mark-only { display: block; }
.top-brand { display: none; flex: none; } .top-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; display: block; }
@media (max-width: 760px) { .top-brand { display: inline-flex; } }
/* health check: saved automatically when JavaScript runs (work.js data-autosave); the button stays for no-JS */
.js-on form[data-autosave] .hc-save { display: none; }
/* health check (UI/UX): green is one tap; the note, estimate and photo open only for amber and red */
.hc-rate { align-items: center; gap: 8px 10px; }
.hc-more { display: contents; }
.hc-rate:not(:has(input[value="advise"]:checked, input[value="urgent"]:checked)) .hc-more { display: none; }
.hc-rate .hc-more input[name="note"] { flex: 1 1 220px; min-width: 0; }
.hc-rate [aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

/* ---------- Support desk (S1) ---------- */
.fw-6 { font-weight: 600; }
.fld-legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 6px; }
.sd-fs { border: 0; padding: 0; }
.sd-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-choice { position: relative; display: inline-flex; }
.sd-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sd-choice span { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.sd-choice input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.sd-choice.p-urgent input:checked + span { background: var(--bad); border-color: var(--bad); color: var(--on-strong); }
.sd-choice.p-high input:checked + span { background: var(--warn); border-color: var(--warn); color: var(--on-strong); }
.sd-choice input:focus-visible + span { box-shadow: var(--ring); }
.sd-ctx summary { cursor: pointer; font-weight: 600; }
.sd-ctx ul { padding-inline-start: 18px; margin-top: 8px; display: grid; gap: 4px; }
.sd-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 700; }
.btn.pri .sd-n { background: rgba(255, 255, 255, .2); color: inherit; } .sd-n.bad { background: var(--bad); color: var(--on-strong); }
.sd-row.p-urgent td:first-child { box-shadow: inset 4px 0 0 var(--bad); } [dir="rtl"] .sd-row.p-urgent td:first-child { box-shadow: inset -4px 0 0 var(--bad); }
.sd-row.p-high td:first-child { box-shadow: inset 4px 0 0 var(--warn); } [dir="rtl"] .sd-row.p-high td:first-child { box-shadow: inset -4px 0 0 var(--warn); }
.sd-sla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.sd-sla li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.sd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .sd-layout { grid-template-columns: 1fr; } }
.sd-side { position: sticky; top: calc(var(--top) + 12px); }
@media (max-width: 1100px) { .sd-side { position: static; } }
.sd-msg { display: flex; flex-direction: column; gap: 8px; }
.sd-msg.is-staff { border-inline-start: 4px solid var(--brand); }
.sd-msg.is-note { background: var(--warn-soft); border-color: transparent; border-inline-start: 4px solid var(--warn); }
.sd-files { gap: 6px; }
.sd-actions { gap: 8px; }
.sd-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; align-items: baseline; }
.sd-kv > span:first-child { color: var(--text-3); flex: none; }
.sd-kv > :last-child { text-align: end; min-width: 0; overflow-wrap: anywhere; }
/* ---------------------------------------------------------------- walk-around: car diagram, damage marks, fuel gauge, photos */
.wa-seg { margin: 0; }
.wa-views { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.wa-views .wa-side { grid-column: span 3; } .wa-views .wa-end, .wa-views .wa-top { grid-column: span 2; }
.wa-views .wa-top svg { max-height: 230px; margin-inline: auto; width: auto; }
@media (max-width: 640px) { .wa-views .wa-side { grid-column: span 6; } .wa-views .wa-end, .wa-views .wa-top { grid-column: span 3; } .wa-views .wa-top { grid-column: span 6; } }
.wa-view { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2, var(--surface)); }
.wa-view figcaption { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-block-end: 4px; }
.wa-view svg { display: block; width: 100%; height: auto; max-height: 260px; touch-action: manipulation; }
.wa-views.is-live svg { cursor: crosshair; }
.wa-views.is-live .wa-view:hover { border-color: var(--brand); }
.wa-car .body { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.6; }
.wa-car .glass { fill: var(--info-soft); stroke: var(--text-2); stroke-width: 1.2; }
.wa-car .line { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.wa-car .tyre { fill: var(--text-2); } .wa-car .rim { fill: var(--surface-3); }
.wa-car .lamp { fill: var(--warn-soft); stroke: var(--warn); stroke-width: 1; } .wa-car .tail { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 1; }
.wa-mark circle { stroke: #fff; stroke-width: 1.6; }
.wa-mark text { font: 700 9px/1 system-ui, sans-serif; fill: #fff; text-anchor: middle; pointer-events: none; }
.wa-mark.k-scratch circle, .wa-num.k-scratch, .wa-key.k-scratch::before, .wa-kind.k-scratch span::before { fill: var(--warn); background: var(--warn); }
.wa-mark.k-dent circle, .wa-num.k-dent, .wa-key.k-dent::before, .wa-kind.k-dent span::before { fill: var(--info); background: var(--info); }
.wa-mark.k-broken circle, .wa-num.k-broken, .wa-key.k-broken::before, .wa-kind.k-broken span::before { fill: var(--bad); background: var(--bad); }
.wa-mark.k-paint circle, .wa-num.k-paint, .wa-key.k-paint::before, .wa-kind.k-paint span::before { fill: var(--violet); background: var(--violet); }
.wa-mark.old circle { fill: #9aa1a9; } .wa-mark.old { opacity: .75; }
.wa-key.old::before { background: #9aa1a9; }
.wa-legend { gap: 14px; flex-wrap: wrap; }
.wa-key { display: inline-flex; align-items: center; gap: 6px; }
.wa-key::before, .wa-kind span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.wa-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; }
.hc-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hc-photos img, .hc-video { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2, #eee); border: 1px solid var(--line); }
.wa-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; display: block; }
.wa-kinds { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wa-kinds legend { font-weight: 600; margin-block-end: 6px; }
.wa-kind { display: flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.wa-kind input { position: absolute; opacity: 0; pointer-events: none; }
.wa-kind span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.wa-kind:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.wa-kind:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.wa-fuel { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; direction: ltr; }
.wa-fuel-step { display: grid; place-items: center; min-height: var(--touch); border-radius: 8px; background: var(--surface-3); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-2); }
.wa-fuel-step input { position: absolute; opacity: 0; pointer-events: none; }
.wa-fuel-step.on { background: var(--ok); color: var(--on-strong, #fff); }
.wa-fuel-step:first-child.on:last-child, .wa-fuel-step:has(input[value="0"]:checked) { background: var(--bad); color: #fff; }
.wa-fuel-step:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.wa-fuel:disabled .wa-fuel-step { cursor: default; }
.wa-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.wa-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.wa-sig { max-width: 320px; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.wa-cam-video { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; }
.wa-cam-shots { display: flex; gap: 6px; flex-wrap: wrap; }
.wa-cam-shots img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }
dialog.wa-cam { width: min(720px, calc(100vw - 24px)); }
.tagno-btn { cursor: pointer; gap: 4px; display: inline-flex; align-items: center; font: inherit; font-weight: 800; font-size: 12px; }
.tagno-btn .ico { width: 13px; height: 13px; }
.tagno-btn:hover { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Mobile workshop: the customer's place on the map (sitemap.js) */
.site-pick { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; margin: 0; }
.site-map { position: relative; height: 320px; overflow: hidden; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-3); touch-action: none; direction: ltr; cursor: crosshair; user-select: none; }
.site-tiles { position: absolute; inset: 0; }
.site-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.site-pin { position: absolute; width: 24px; height: 24px; margin: -30px 0 0 -12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--bad); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); pointer-events: none; }
.site-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.site-zoom button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 20px; font-weight: 700; cursor: pointer; }
.site-attr { position: absolute; bottom: 2px; right: 4px; font-size: 10px; padding: 0 4px; background: rgba(255, 255, 255, .85); color: #333; border-radius: 3px; }
@media (max-width: 600px) { .site-map { height: 280px; } }

/* ============================================================ parts search suggestions (owner, 7 Nov 2026) */
form:has(> .suggest) { position: relative; z-index: 4; }  /* above the cards that follow (they make their own layers), under the sticky top bar (5) */
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.suggest li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 12px; cursor: pointer; }
.suggest li a { flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.suggest li small { display: block; color: var(--text-3); font-size: 12.5px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--brand-soft); }

/* ============================================================ upload box, every file field (owner, 7 Nov 2026) */
.upl { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.upl-zone { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.upl-zone:hover, .upl.over .upl-zone { border-color: var(--brand); background: var(--brand-soft); }
.upl-zone:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--brand); }
.upl-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--brand); flex: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: transform var(--t-fast) var(--ease); }
.upl.over .upl-ic { transform: translateY(-2px) scale(1.05); }
.upl-txt { display: flex; flex-direction: column; min-width: 0; }
.upl-txt b { font-weight: 600; color: var(--text); } .upl-txt u { color: var(--link); text-underline-offset: 3px; }
.upl-txt small { color: var(--text-3); font-size: 12.5px; }
.upl-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset: 0; }
.upl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.upl-list:empty { display: none; }
.upl-file { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  animation: sc-pop var(--t) var(--ease); }
.upl-th { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.upl-th img { width: 100%; height: 100%; object-fit: cover; }
.upl-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upl-meta b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .upl-meta small { color: var(--text-3); font-size: 12.5px; }
.upl-err:empty { display: none; } .upl-err { color: var(--bad); font-size: 13px; }
.upl.bad .upl-zone { border-color: var(--bad); background: var(--bad-soft); }
.upl.sending .upl-file { position: relative; overflow: hidden; }
.upl.sending .upl-file::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent);
  background-size: 50% 100%; background-repeat: no-repeat; animation: upl-run 1.1s linear infinite; }
.upl.sending .upl-rm { visibility: hidden; }
@keyframes upl-run { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.btn.is-busy { opacity: .75; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .upl.sending .upl-file::after { animation: none; background: var(--brand); } .upl-file { animation: none; } }
.row > .upl { flex-basis: 100%; order: -1; }  /* in a one-line form the box takes the full width above the other fields */
.upl.busy .upl-zone { opacity: .6; cursor: progress; }  /* a big photo is being made smaller */

/* ============================================================ parts list: filters, groups, saved searches, cards (owner, 7 Nov 2026) */
.plist-bar { position: relative; z-index: 4; }
.plist-bar .sp { flex: 1; }
.plist-search { display: flex; align-items: center; gap: 8px; padding-inline: 12px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); color: var(--text-3); min-width: 220px; }
.plist-search input { flex: 1; border: 0; background: none; min-height: 42px; padding: 0; } .plist-search input:focus-visible { box-shadow: none; }
.plist-search:focus-within { box-shadow: var(--ring); }
.plist-menu { position: relative; }
.plist-drop { display: grid; grid-template-columns: repeat(3, minmax(200px, 1fr)); gap: 4px; width: min(760px, calc(100vw - 32px)); }
.plist-drop[hidden] { display: none; }
.plist-col { min-width: 0; padding-inline: 4px; } .plist-col + .plist-col { border-inline-start: 1px solid var(--line); }
.plist-h { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); font-size: 13px; }
.plist-dot { width: 20px; flex: none; }
.plist-drop a[aria-checked="true"] { color: var(--brand); font-weight: 600; }
.plist-saved { display: flex; align-items: center; } .plist-saved a { flex: 1; min-width: 0; } .plist-saved .btn { width: auto; flex: none; }
.plist-pad { padding: 4px 10px; } .plist-pad .btn { width: auto; }
.plist-sel select { min-width: 0; flex: 0 1 190px; }
.plist-view { margin: 0; } .plist-view a { display: grid; place-items: center; min-width: 38px; min-height: 34px; border-radius: 8px; color: var(--text-2); }
.plist-chips .tag { display: inline-flex; align-items: center; gap: 4px; }
.plist-group { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 16px; }
.plist-part { flex-wrap: nowrap; gap: 10px; align-items: center; } .plist-sub { display: block; }
.plist-th { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); }
.plist-star-col { width: 40px; }
.plist-pager { justify-content: center; margin-top: 16px; }
.star-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--text-3); cursor: pointer; }
.star-btn:hover { background: var(--surface-3); color: var(--warn); }
.star-btn.on { color: #e6a700; } .star-btn.on .ico { fill: currentColor; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pcard.off { opacity: .6; }
.pcard-img { display: block; height: 170px; overflow: hidden; background: var(--surface-3); }  /* every card the same, whatever the photo's size */
.pcard-img img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 10px; background: #fff; }
.pcard-none { display: grid; place-items: center; height: 100%; color: var(--text-3); } .pcard-none .ico { width: 44px; height: 44px; opacity: .5; }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.pcard-code { font-weight: 700; font-size: 13px; } .pcard-name { color: var(--text); font-weight: 600; line-height: 1.35; }
.pcard-foot { margin-top: auto; padding-top: 6px; } .pcard-tags { gap: 6px; }
@media (max-width: 760px) {
  .plist-drop { grid-template-columns: 1fr; position: fixed; inset: auto 8px 8px 8px; width: auto; max-height: 75vh; overflow-y: auto; }
  .plist-col + .plist-col { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard-img { height: 130px; }
  .plist-sel select { flex: 1 1 45%; }
}
.plist-search .scan-wrap { flex: 1; align-self: stretch; }  /* the camera button sits at the end of the search box */
.plist-search { padding-inline-end: 4px; } .plist-search .scan-btn { border: 0; background: none; min-height: 36px; width: 38px; }
.plist-search .scan-btn:hover { background: var(--surface-3); }
#plist-live.is-loading { opacity: .55; transition: opacity var(--t-fast) var(--ease); }

/* ============================================================ parts asked in words (owner, 7 Nov 2026) */
.text-warn { color: var(--warn); } .text-ok { color: var(--ok); }
.ps-anchor { position: relative; }
.suggest li .suggest-th { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; }
.asked-jc.is-urgent { border-inline-start: 4px solid var(--bad); }
.asked-req + .asked-req, form + .asked-req { border-block-start: 1px dashed var(--line); padding-block-start: 12px; }
.asked-tbl td { vertical-align: top; } .asked-tbl td:nth-child(3) { min-width: 320px; }
.asked-picks { gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.asked-pick { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; text-align: start; cursor: pointer; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.asked-pick img { width: 36px; height: 36px; border-radius: 7px; object-fit: contain; background: #fff; flex: none; }
.asked-pick small { display: block; color: var(--text-3); font-size: 12px; }
.asked-pick:hover { border-color: var(--brand); }
.asked-pick[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.asked-more summary { list-style: none; } .asked-more summary::-webkit-details-marker { display: none; }
.asked-act { min-width: 260px; padding-top: 6px; }

/* ============================================================ approval path (owner, 8 Nov 2026) */
.apath-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.apath-step { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.apath-step:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.apath-step.is-done:not(:last-child)::before { background: var(--ok); }
.apath-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2); }
.is-asked .apath-dot { background: var(--brand-soft); color: var(--brand); } .apath-step.is-asked:not(:last-child)::before { background: var(--ok); }
.is-done .apath-dot { background: var(--ok); color: var(--on-strong); } .is-rejected .apath-dot { background: var(--bad); color: var(--on-strong); }
.is-now .apath-dot { background: var(--warn); color: #fff; box-shadow: 0 0 0 4px var(--warn-soft); }
.is-next b, .is-skipped b { color: var(--text-3); }
.kcard .text-warn { display: flex; align-items: center; gap: 4px; }

/* ============================================================ VOR orders (owner, 8 Nov 2026) */
.vor-card { border-inline-start: 4px solid var(--bad); }
.vor-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: vs; }
.vor-steps li { counter-increment: vs; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); font-size: 13px; }
.vor-steps li::before { content: counter(vs); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--text-2); font-size: 11px; font-weight: 700; }
.vor-steps li.done { background: var(--ok-soft); color: var(--text); } .vor-steps li.done::before { content: "✓"; background: var(--ok); color: var(--on-strong); }
.vor-steps li.now { background: var(--warn-soft); color: var(--text); font-weight: 600; } .vor-steps li.now::before { background: var(--warn); color: #fff; }
.suggest-float { position: fixed; z-index: 70; margin: 0; }  /* the part picker on forms: on <body>, placed by script */

/* ============================================================ parts counter sale (owner, 8 Nov 2026) */
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.cs-sum { position: sticky; top: calc(var(--top) + 12px); display: grid; gap: 8px; }
.cs-total { border-block-start: 1px solid var(--line); padding-top: 8px; font-size: 18px; }
.cs-lines td { vertical-align: top; } .cs-part { min-width: 300px; }
.cs-info { display: flex; gap: 10px; align-items: center; margin-top: 6px; } .cs-info small { display: block; font-size: 12.5px; }
.cs-info img { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; }
.cs-serial { margin-top: 6px; width: 100%; }
.cs-row.is-bad input[name="part"] { border-color: var(--bad); }
.cs-row.is-flash td { background: var(--ok-soft); transition: background .3s; }
.cs-hint { margin: 6px 0 0; }
@media (max-width: 960px) { .cs-grid { grid-template-columns: 1fr; } .cs-sum { position: static; } }
.cs-part .scan-wrap:has(> .cs-serial[hidden]) { display: none; }  /* no serial field (nor its camera button) unless the part needs it */
.cs-related { gap: 6px; margin-top: 6px; } .cs-related .btn { font-size: 12.5px; }
.cs-cust-new { margin-top: 6px; } .cs-cash input { width: 100%; }
.cs-keys kbd { font-family: var(--mono-font); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--surface-2); }
#cs-cust-list li a { display: block; } #cs-cust-list li small { display: block; color: var(--text-3); font-size: 12.5px; }
.visit-more summary { list-style: none; width: fit-content; } .visit-more summary::-webkit-details-marker { display: none; } .visit-info { margin-top: 8px; gap: 12px; }
.car-fields { border: 0; padding: 0; margin: 0; } .car-fields legend { padding: 0; }

/* ---------------------------------------------------------------- notifications (owner, 8 Nov 2026) */
.nicon { --c: var(--text-2); --cs: var(--surface-3); width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: var(--cs); }
.nicon .ico { width: 20px; height: 20px; }
.nicon.xs { width: 22px; height: 22px; border-radius: 7px; } .nicon.xs .ico { width: 13px; height: 13px; }
.nicon.c-visits { --c: var(--info); --cs: var(--info-soft); }
.nicon.c-parts { --c: var(--warn); --cs: var(--warn-soft); }
.nicon.c-approvals { --c: #7a3fc2; --cs: rgba(122, 63, 194, .12); }
.nicon.c-jobs { --c: var(--brand); --cs: color-mix(in srgb, var(--brand) 12%, transparent); }
.nicon.c-money { --c: var(--ok); --cs: var(--ok-soft); }
.nicon.c-alerts { --c: var(--bad); --cs: var(--bad-soft); }
:root[data-theme="dark"] .nicon.c-approvals { --c: #c8a6ff; --cs: rgba(200, 166, 255, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nicon.c-approvals { --c: #c8a6ff; --cs: rgba(200, 166, 255, .14); } }
.nbadge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 7px; border-radius: 99px; background: var(--bad); color: var(--on-strong); font-size: 12px; font-weight: 700; vertical-align: middle; }
.nbadge[hidden] { display: none; }
.nbell { position: relative; }
.nbell b { position: absolute; top: 3px; inset-inline-end: 1px; box-shadow: 0 0 0 2px var(--surface); }

.ncentre { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.ncentre-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ncentre-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; }
.nfilters { display: flex; flex-direction: column; gap: 10px; }
.nseg { margin: 0; align-self: flex-start; max-width: 100%; }
.nseg a { padding: 8px 16px; border-radius: 9px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.nseg a:hover { text-decoration: none; color: var(--text); }
.nseg-n { font-size: 11.5px; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 99px; background: var(--bad); color: var(--on-strong); display: inline-grid; place-items: center; }
.nchips { display: flex; gap: 8px; overflow-x: auto; padding-block-end: 2px; scrollbar-width: none; }
.nchips::-webkit-scrollbar { display: none; }
.nchip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; min-height: 36px; padding-inline: 8px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; }
.nchip:first-child { padding-inline-start: 14px; }
.nchip:hover { text-decoration: none; border-color: var(--brand); color: var(--text); }
.nchip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.nday { display: flex; flex-direction: column; gap: 6px; }
.nday-head { margin: 6px 4px 0; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: var(--text-3); text-transform: uppercase; }
.nlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.nrow { position: relative; display: flex; align-items: stretch; border-block-end: 1px solid var(--line); transition: background .15s; }
.nrow:last-child { border-block-end: 0; }
.nrow:hover { background: var(--surface-2); }
.nrow.unread { background: color-mix(in srgb, var(--info) 5%, var(--surface)); }
.nrow.unread:hover { background: color-mix(in srgb, var(--info) 9%, var(--surface)); }
.nrow.unread::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--info); }
.nrow-main { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; padding-block: 13px; padding-inline: 16px 4px; color: var(--text); }
.nrow-main:hover { text-decoration: none; }
.nrow-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-block-start: 1px; }
.nrow-title { font-size: 14.5px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.nrow.unread .nrow-title { color: var(--text); font-weight: 600; }
.nrow-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.nrow-meta time { font-variant-numeric: tabular-nums; }
.nrow-dot { flex: none; width: var(--touch); border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 0; }
.nrow-dot span { width: 10px; height: 10px; border-radius: 50%; border: 2px solid transparent; transition: transform .15s, background .15s, border-color .15s; }
.nrow.unread .nrow-dot span { background: var(--info); }
.nrow:not(.unread) .nrow-dot:hover span, .nrow:not(.unread) .nrow-dot:focus-visible span { border-color: var(--line-2); }
.nrow-dot:hover span { transform: scale(1.25); }
.nempty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--text-2); }
.nempty .ico { width: 30px; height: 30px; color: var(--text-3); margin-block-end: 4px; }
.nempty.big { padding: 56px 16px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.ncentre .center { display: flex; justify-content: center; }

.pushbox { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, var(--info-soft), var(--surface) 70%); }
.pushbox[hidden] { display: none; }
.pushbox[data-state="on"] { background: linear-gradient(135deg, var(--ok-soft), var(--surface) 70%); }
.pushbox[data-state="denied"], .pushbox[data-state="unsupported"] { background: var(--surface-2); }
.pushbox[data-state="loading"] .pushbox-act { visibility: hidden; }
.pushbox.busy { opacity: .7; pointer-events: none; }
.pushbox-ic { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--info); box-shadow: var(--shadow); }
.pushbox[data-state="on"] .pushbox-ic { color: var(--ok); }
.pushbox .grow { flex: 1; min-width: 0; }
.pushbox .stack-xs { display: flex; flex-direction: column; gap: 3px; }
.pushbox [hidden] { display: none !important; }
.pushbox-out:empty { display: none; } .pushbox-out { color: var(--ok); font-weight: 600; }
.pushbox-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pushbox[data-compact] { padding: 10px 12px; border-radius: var(--radius-s); }
.npanel .pushbox[data-compact] { margin: 0 10px 10px; }
.pushbox[data-compact] .pushbox-ic { width: 34px; height: 34px; }
.pushbox[data-compact][data-state="on"], .pushbox[data-compact][data-state="unsupported"] { display: none; }
@media (max-width: 560px) { .pushbox:not([data-compact]) { flex-wrap: wrap; } .pushbox:not([data-compact]) .pushbox-act { width: 100%; } .pushbox:not([data-compact]) .pushbox-act .btn { flex: 1; } }

.npanel { position: fixed; z-index: 60; inset-inline-end: 12px; width: min(420px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - var(--top) - 24px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: npanel-in .16s ease-out; }
.npanel[hidden] { display: none; }
@keyframes npanel-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.npanel-head { display: flex; align-items: center; gap: 8px; padding-block: 12px 10px; padding-inline: 16px 12px; font-size: 16px; }
.npanel-head .sp { flex: 1; }
.npanel .nlist { border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; flex: 1; border-block-start: 1px solid var(--line); }
.npanel .nrow-title { font-size: 13.5px; }
.npanel .nicon { width: 36px; height: 36px; border-radius: 10px; }
.npanel-foot { display: block; text-align: center; padding: 13px; font-weight: 600; border-block-start: 1px solid var(--line); }
.npanel-foot:hover { background: var(--surface-2); text-decoration: none; }
.npanel-load { display: grid; place-items: center; height: 140px; color: var(--text-3); animation: npulse 1s infinite alternate; }
@keyframes npulse { from { opacity: .35; } to { opacity: 1; } }
@media (max-width: 640px) {
  .npanel { inset-inline: 8px; width: auto; border-radius: 16px; max-height: calc(100dvh - var(--top) - 90px); }
  .npanel-head .btn span { display: none; }
  .ncentre-head h1 { font-size: 22px; }
  .nrow-main { padding-inline: 12px 2px; gap: 10px; }
}

.ntoast { position: fixed; z-index: 70; inset-inline-end: 16px; inset-block-start: calc(var(--top) + 10px); width: min(380px, calc(100vw - 24px)); display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.ntoast.on { opacity: 1; transform: none; pointer-events: auto; }
.ntoast-body { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; padding-block: 12px; padding-inline: 14px 4px; color: var(--text); }
.ntoast-body .grow { flex: 1; min-width: 0; }
.ntoast-body:hover { text-decoration: none; }
.ntoast-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); }
.ntoast-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 600; }
.ntoast-x { flex: none; width: var(--touch); height: var(--touch); border: 0; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; border-radius: 12px; }
.ntoast-x:hover { color: var(--text); background: var(--surface-3); }
@media (max-width: 640px) { .ntoast { inset-inline: 8px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .npanel, .npanel-load { animation: none; } .ntoast { transition: none; } }

/* ---------------------------------------------------------------- scanning and the search page (owner, 8 Nov 2026) */
.scan-view { position: relative; }
.scan-got { position: absolute; inset-inline: 12px; inset-block-end: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ok); color: var(--on-strong); font-weight: 700; font-size: 14px; text-align: center; overflow-wrap: anywhere; animation: sc-pop var(--t) var(--ease); }
.scan-got[hidden] { display: none; }
.scan-hint { margin: 10px 0 0; text-align: center; }
.scan-dlg [role=status]:empty { display: none; }
.scan-torch { margin: 8px auto 0; display: flex; }
.scan-torch[hidden] { display: none; }
.scan-torch[aria-pressed="true"] { background: var(--warn-soft); border-color: var(--warn); }

.srch { max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.srch-box { position: relative; display: flex; gap: 8px; align-items: center; padding: 6px; padding-inline-start: 42px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); }
.srch-box > .ico { position: absolute; inset-inline-start: 14px; color: var(--text-3); }
.srch-box .scan-wrap { flex: 1; }
.srch-box input { border: 0; min-height: 44px; font-size: 16px; background: none; box-shadow: none; padding-inline: 0; }
.srch-box input:focus-visible { box-shadow: none; }
.srch-box:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.srch-read { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--line-2); }
.srch-read .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.srch-read-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--info); box-shadow: var(--shadow); }
.srch-read-v { overflow-wrap: anywhere; font-size: 14.5px; }
.srch-group { display: flex; flex-direction: column; gap: 6px; }
.srch-group-h { margin: 6px 4px 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.srch-group-h .muted { font-weight: 600; }
.srch-go { align-self: center; color: var(--text-3); padding-inline-end: 10px; }
[dir="rtl"] .srch-go .ico { transform: scaleX(-1); }
.srch-exact { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.srch-none { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.srch-none h2 { margin: 4px 0 0; font-size: 19px; overflow-wrap: anywhere; }
.srch-none p { margin: 0; max-width: 520px; }
.srch-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.srch-acts:empty { display: none; }
.srch-tips { text-align: start; margin: 8px 0 0; padding-inline-start: 18px; max-width: 520px; display: flex; flex-direction: column; gap: 4px; }
.srch-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: start; margin: 4px 0; }
.srch-facts dt { color: var(--text-3); } .srch-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .srch-box .btn { display: none; } .srch-acts .btn { flex: 1 1 100%; } }

/* ---------------------------------------------------------------- the Istimara on the new-vehicle form (owner, 8 Nov 2026) */
.istimara { display: flex; flex-direction: column; gap: 12px; }
.istimara-head { display: flex; gap: 12px; align-items: flex-start; }
.istimara-head h2 { font-size: 16px; }
.istimara-head .grow { flex: 1; min-width: 0; }
.istimara-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.istimara-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.istimara-status:empty { display: none; }
.istimara-status { margin: 0; font-weight: 600; }
.istimara.busy .istimara-acts { opacity: .6; pointer-events: none; }
.istimara-status.busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--line-2); border-block-start-color: var(--info); animation: ist-spin .8s linear infinite; }
@keyframes ist-spin { to { transform: rotate(360deg); } }
.istimara-picks:empty { display: none; }
.istimara-read { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); }
.istimara-read[hidden] { display: none; }
.istimara-read dt { color: var(--text-3); font-size: 13px; }
.istimara-read dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.warn-text { color: var(--warn); } .ok-text { color: var(--ok); }
.from-card { border-color: var(--ok) !important; background: color-mix(in srgb, var(--ok) 7%, var(--surface)) !important; }
.ist-frame { position: absolute; inset: 50% auto auto 50%; width: 92%; aspect-ratio: 1.59; max-height: 92%; transform: translate(-50%, -50%); border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; }
[dir="rtl"] .ist-frame { transform: translate(50%, -50%); inset: 50% 50% auto auto; }
.ist-dlg video { aspect-ratio: 16 / 10; }
.ist-take { width: 100%; margin-block-start: 10px; }
@media (max-width: 560px) { .istimara-acts .btn { flex: 1; } }

/* the VIN as a QR code on the job card (owner, 8 Nov 2026) */
.vinqr-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 2px; margin-inline-start: 6px; vertical-align: middle; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; cursor: zoom-in; }
.vinqr-btn:hover, .vinqr-btn:focus-visible { border-color: var(--brand); }
.vinqr-btn svg { width: 100%; height: 100%; display: block; }
.vinqr-big { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.vinqr-code { background: #fff; padding: 10px; border-radius: 12px; }
.vinqr-code svg { width: min(260px, 70vw); height: auto; aspect-ratio: 1; display: block; }
.vinqr-big .mono { font-size: 17px; letter-spacing: .04em; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- vehicle screen (owner, 8 Nov 2026) */
.vh-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vh-title h1 { margin: 0; }
.vh-make-m { display: none; }
.vh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vh-chips .chip { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; min-height: 28px; }
.vh-chips .chip .ico { width: 14px; height: 14px; }
.vh-chips a.chip:hover { text-decoration: none; filter: brightness(.97); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.vh-vin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vin-copy { border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 14px; letter-spacing: .04em; cursor: copy; }
.vin-copy:hover { border-color: var(--brand); }
.vh-vin .vinqr-btn { margin: 0; }
dl.vh-tiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vh-tiles dt { display: flex; align-items: center; gap: 5px; }
.vh-tiles dt .ico { width: 14px; height: 14px; color: var(--text-3); }
.vh-owner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); max-width: 520px; }
.vh-owner .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vh-owner .avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.vh-owner .chipbtn { border: 1px solid var(--line-2); background: var(--surface); }
.vh-wa { color: #128c4b; }
.vh-actions { gap: 8px; }
@media (max-width: 760px) {
  .vh .jc-top { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .vh .jc-top > .make { display: none; }
  .vh-make-m { display: grid; width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
  .vh-title h1 { font-size: 22px; flex: 1; min-width: 0; }
  .vh-title .plate { order: 3; }
  .vh .jc-id { gap: 12px; }
  .vh-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding-block-end: 2px; }
  .vh-chips::-webkit-scrollbar { display: none; }
  .vh-chips .chip { flex: none; white-space: nowrap; }
  dl.vh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vh-tiles > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
  .vh-tiles dd { font-size: 15px; font-weight: 700; }
  .vh-owner { max-width: none; }
  .vh-actions { display: grid; gap: 8px; }
  .vh-actions > .btn.pri { min-height: 50px; font-size: 16px; }
  .vh-actions > .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .vh-actions > .row .btn { padding-inline: 8px; font-size: 13.5px; }
  .vh + section .tabs, #v-tabbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border: 0; gap: 6px; padding-block-end: 4px; }
  #v-tabbar::-webkit-scrollbar { display: none; }
  #v-tabbar [role=tab] { flex: none; border-radius: 99px; border: 1px solid var(--line-2); padding: 6px 14px; min-height: 38px; white-space: nowrap; }
  #v-tabbar [role=tab].on { background: var(--text); color: var(--surface); border-color: var(--text); }
}

/* ================================================================ phone layer (owner, 8 Nov 2026)
   "Make every screen used on a phone look like the vehicle screen": compact headers, tiles, clear actions, pill tabs
   and one card per table row. Phones only; the computer layout does not change. */
@media (max-width: 760px) {
  .content { padding: 12px 12px 96px; }
  .card { padding: 14px; border-radius: 16px; }
  h1 { font-size: 22px; line-height: 1.3; }
  h2 { font-size: 17px; }
  .crumbs { margin-block-end: 2px; }

  /* page title and its buttons: the main action first and wide, the others as a tidy row */
  .pagehead { gap: 8px; }
  .pagehead h1 { flex: 1 1 100%; margin: 0; }
  .pagehead .sp { display: none; }
  .pagehead > .btn, .pagehead > a.btn, .pagehead > form > .btn, .pagehead > .has-menu > .btn { min-height: 40px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
  .pagehead > .btn.pri, .pagehead > a.btn.pri { flex: 1 1 100%; min-height: 46px; font-size: 15px; order: 5; }

  /* tabs: pills that scroll sideways */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-block-end: 0; gap: 6px; padding-block-end: 4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button, .tabs [role=tab], .tabs a { flex: none; border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 14px; min-height: 38px; white-space: nowrap; }
  .tabs button.on, .tabs button[aria-selected="true"], .tabs a.on, .tabs a[aria-current] { background: var(--text); color: var(--surface); border-color: var(--text); }
  .tabs .badge { background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; }

  /* headers of a record (job card, vehicle): no big make box, facts as tiles, actions in a clear grid */
  .jc-head .jc-top { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .jc-head .jc-top > .make { display: none; }
  .jc-head .jc-id > .row:first-child { gap: 6px; }
  .jc-head .jc-id > .row:first-child h1 { flex: 1 1 100%; }
  .jc-head .facts:not(dl) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 13.5px; }
  .jc-head .facts:not(dl) > span { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; color: var(--text); font-weight: 600; }
  .jc-head .facts:not(dl) > span:first-child { grid-column: 1 / -1; }
  .jc-head .jc-side { align-items: stretch; gap: 8px; }
  .jc-head .jc-side > .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
  .jc-head .jc-side > .row > *, .jc-head .jc-side > .row form, .jc-head .jc-side > .row .btn { width: 100%; }
  .jc-head .jc-side .btn.pri { min-height: 48px; }
  /* owner, 16 Nov 2026: two even columns; long labels wrap inside the button instead of running out of it; an odd last one takes the row */
  .jc-head .jc-side > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .jc-head .jc-side > .row > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .jc-head .jc-side > .row .btn { white-space: normal; text-align: center; justify-content: center; line-height: 1.25; min-height: 48px; height: 100%; padding: 6px 10px; gap: 6px; min-width: 0; }
  .jc-head .jc-side > .row .btn .ico { flex: none; }
  .jc-head .jc-side > .row form, .jc-head .jc-side > .row .has-menu { display: flex; min-width: 0; }
  .jc-total { font-size: 26px; }

  /* numbers at a glance: two per row */
  .g4:has(> .kpi), .g3:has(> .kpi), .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; } .kpi .v { font-size: 22px; }

  /* tables as cards: each row a card, its first cell the title, the rest label : value */
  .tbl-wrap:has(> .tbl-cards) { border: 0; background: none; overflow: visible; border-radius: 0; }
  .tbl-cards tbody { display: flex; flex-direction: column; gap: 8px; }
  .tbl-cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); }
  .card .tbl-cards tr { box-shadow: none; background: var(--surface-2); }
  .tbl-cards tr:hover { background: inherit; }
  .tbl-cards td { align-items: baseline; padding: 4px 0; min-width: 0; text-align: end; overflow-wrap: anywhere; }
  .tbl-cards td[data-label]::before { flex: none; max-width: 48%; text-align: start; }
  .tbl-cards td:first-child { font-size: 15px; font-weight: 700; text-align: start; padding-block-end: 6px; }
  .tbl-cards td:first-child::before { display: none; }
  .tbl-cards td:empty { display: none; }
  .tbl-cards td[colspan] { text-align: center; justify-content: center; }
  .tbl-cards td:has(> .btn, > form, > .row > .btn) { justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .tbl-cards td:has(> .btn, > form, > .row > .btn)::before { display: none; }
  .tbl-cards td input:not([type=checkbox]), .tbl-cards td select { max-width: 60%; }
  .tbl-cards tfoot { display: block; } .tbl-cards tfoot tr { display: flex; justify-content: space-between; }

  .tbl-cards td.rowno { display: inline-flex; float: inline-end; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
  .tbl-cards td.rowno::before { content: "#"; display: inline; color: inherit; font-size: inherit; }
  .tbl-cards td.rowtool { float: inline-end; padding: 0; margin-inline-start: 8px; }
  .tbl-cards td.rowtool::before { display: none; }
  .tbl-cards td.rowtitle { font-size: 15px; font-weight: 700; text-align: start; justify-content: flex-start; padding-block-end: 6px; }
  .tbl-cards td.rowtitle::before { display: none; }

  /* related records (hours, messages, credit, visits…): tiles, two per row, nothing cut off */
  .sbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 0; border-radius: 0; background: none; overflow: visible; }
  .sbtn { flex: none; min-height: 56px; padding: 10px 12px; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .card .sbtn { background: var(--surface-2); }
  .sbtn b { font-size: 16px; }
  .sbtn small { white-space: normal; }

  /* boards (job cards by status, parts kanban): one column at a time, swiped sideways */
  .kanban { grid-auto-columns: 86%; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline-end: 12px; align-items: start; }
  .kanban::-webkit-scrollbar { display: none; }
  .kanban > * { scroll-snap-align: start; }

  /* messages and empty states */
  .banner { border-radius: 12px; padding: 10px 12px; }
  .empty { padding: 24px 12px; }
}

/* customer screen header (owner, 8 Nov 2026): same pattern as the vehicle screen */
.ph { display: flex; flex-direction: column; gap: 14px; }
.ph-top { display: flex; gap: 12px; align-items: center; }
.ph-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ph-avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 20px; }
.ph-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ph-line { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 11px; color: var(--text); font-weight: 600; background: var(--surface); }
.ph-line:hover { text-decoration: none; border-color: var(--brand); }
.ph-line .ico { width: 17px; height: 17px; color: var(--text-3); }
.ph-contact .chipbtn { border: 1px solid var(--line-2); }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-actions > .row { display: flex; gap: 8px; }
.ph-cars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-cars a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-2); }
.ph-cars a:hover { text-decoration: none; border-color: var(--brand); }
.ph-cars .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-cars .vh-make-m { display: grid; width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
@media (max-width: 760px) {
  .ph-contact .ph-line { flex: 1 1 auto; }
  .ph-actions { display: grid; } .ph-actions > .row { display: grid; grid-template-columns: 1fr 1fr; }
  .ph-cars a { flex-wrap: wrap; } .ph-cars .plate { margin-inline-start: 50px; }
}

/* the VIN box on the vehicle screen (owner, 8 Nov 2026): the QR code big enough to be seen and scanned */
.vh-vin { align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); flex-wrap: nowrap; max-width: 560px; }
.vin-card-qr { flex: none; width: 84px; height: 84px; padding: 4px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: zoom-in; }
.vin-card-qr:hover, .vin-card-qr:focus-visible { border-color: var(--brand); }
.vin-card-qr svg { width: 100%; height: 100%; display: block; }
.vin-card-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.vin-card-text .vin-copy { max-width: 100%; overflow-wrap: anywhere; text-align: start; }
@media (max-width: 760px) { .vh-vin { max-width: none; } .vin-card-qr { width: 76px; height: 76px; } .vin-card-text .vin-copy { font-size: 13px; } }

/* fixing job card lines (owner, 8 Nov 2026): the ⋯ menu, removed lines, the reason pick */
tr.is-removed { display: none; }
.show-removed tr.is-removed { display: table-row; }
.show-removed tr.is-removed td { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); }
.show-removed tr.is-removed td.row-actions, .show-removed tr.is-removed td:has(.chip) { text-decoration: none; }
.removed-bar { justify-content: flex-end; margin-block-end: 6px; }
[data-toggle-removed][aria-pressed="true"] { background: var(--surface-3); }
.row-actions { white-space: nowrap; }
.row-actions > * + * { margin-inline-start: 4px; }
.line-menu { display: inline-block; position: relative; vertical-align: middle; }
.line-menu > .chipbtn { min-width: 38px; min-height: 38px; border: 1px solid var(--line-2); }
.line-menu .dots { font-size: 20px; line-height: 1; letter-spacing: 1px; }
.line-menu .menu { min-width: 220px; }
.menu .danger { color: var(--bad); }
.menu .is-off { opacity: .6; cursor: not-allowed; align-items: flex-start; padding-block: 8px; height: auto; }
.menu .is-off > span { display: flex; flex-direction: column; gap: 2px; }
.menu-why { font-size: 11.5px; color: var(--text-3); white-space: normal; line-height: 1.35; }
.reason-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.reason-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 11px; cursor: pointer; }
.reason-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
form.inline { display: inline; margin: 0; }
@media (max-width: 760px) {
  .show-removed .tbl-cards tr.is-removed { display: block; opacity: .75; }
  .tbl-cards td.row-actions { justify-content: flex-end; }
  .tbl-cards td.row-actions::before { display: none; }
}

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.file-list .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.removed-files { display: none; margin-block-start: 6px; }
.show-removed .removed-files { display: flex; }
.danger-text { color: var(--bad); }

/* approvals: what it is about (owner, 8 Nov 2026) */
.appr-subject { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.appr-kind { font-size: 17px; font-weight: 700; }
.appr-jc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-2); }
.appr-jc .ico { width: 16px; height: 16px; color: var(--text-3); }

.menu.menu-float { z-index: 80; animation: sc-drop var(--t) var(--ease); }

/* an upload box never gets squeezed into a sliver (owner, 8 Nov 2026): it keeps a readable width and wraps to its own line */
.upl { min-width: min(260px, 100%); }
.row > .fld:has(.upl), .row > .upl { flex: 1 1 280px; min-width: min(260px, 100%); }
.doc-upload .fld select { max-width: 460px; }
.fld > .upl, .stack > .upl { flex: none; }  /* in a vertical field the 280px basis would become height */

/* ================================================================ online booking journey (owner, 8 Nov 2026) */
.bk { display: flex; flex-direction: column; gap: 16px; max-width: 620px; margin-inline: auto; width: 100%; }
.bk-head { display: flex; flex-direction: column; gap: 8px; }
.bk-bar { display: flex; gap: 6px; }
.bk-bar span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); transition: background .2s; }
.bk-bar span.on { background: var(--info); }
.bk-step { display: flex; flex-direction: column; gap: 12px; }
.bk-step[hidden] { display: none; }
.bk-step h2 { margin: 0; font-size: 18px; }
.bk-step h2:focus { outline: none; }
.bk-cards { display: flex; flex-direction: column; gap: 8px; }
.bk-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); cursor: pointer; min-height: 60px; }
.bk-card:hover { border-color: var(--info); }
.bk-card input { position: absolute; opacity: 0; pointer-events: none; }
.bk-card:has(input:checked) { border: 2px solid var(--info); padding: 11px 13px; background: var(--info-soft); }
.bk-card:has(input:focus-visible) { box-shadow: var(--ring); }
.bk-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.bk-tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bk-tx b { font-size: 15px; } .bk-tx small { font-size: 12.5px; color: var(--text-3); }
.bk-price { font-size: 15px; white-space: nowrap; color: var(--info); }
.bk-price small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.bk-fit { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--on-strong); background: var(--info); padding: 1px 8px; border-radius: 99px; }
.bk-fit[hidden] { display: none; }
.bk-pkg.fits { order: -1; }
.bk-note { display: flex; gap: 8px; align-items: center; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bk .fld { display: flex; flex-direction: column; gap: 4px; }
.bk .fld > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.bk .fld[hidden] { display: none; }
.bk-days, .bk-times, .bk-hand { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
/* 9 Nov 2026: the 7 days always fit the card (a fieldset grows to its content, so a scrolling row ran off the phone screen) */
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; min-inline-size: 0; min-width: 0; }
.bk-days legend { margin-block-end: 6px; }
.bk-day { min-width: 0; cursor: pointer; }
.bk-day input { position: absolute; opacity: 0; pointer-events: none; }
.bk-day span { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 68px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.bk-day b { font-size: 18px; } .bk-day small { font-size: 11px; color: var(--text-3); }
.bk-day:has(input:checked) span { background: var(--info); border-color: var(--info); color: var(--on-strong); }
.bk-day:has(input:checked) small { color: inherit; opacity: .85; }
.bk-day:has(input:focus-visible) span { box-shadow: var(--ring); }
.bk-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bk-slots > .muted { grid-column: 1 / -1; }
.bk-slot { cursor: pointer; }
.bk-slot input { position: absolute; opacity: 0; pointer-events: none; }
.bk-slot span { display: grid; place-items: center; height: 44px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; direction: ltr; }
.bk-slot:has(input:checked) span { background: var(--info); border-color: var(--info); color: var(--on-strong); }
.bk-slot:has(input:focus-visible) span { box-shadow: var(--ring); }
.bk-opt, .bk-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.bk-opt input, .bk-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--info); flex: none; }
.bk-opt span { display: flex; flex-direction: column; } .bk-opt small { font-size: 12.5px; color: var(--text-3); }
.bk-opt:has(input:checked) { border-color: var(--info); }
.bk-sum { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.bk-sum:empty { display: none; }
.bk-sum dt { color: var(--text-3); font-size: 13px; } .bk-sum dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bk-foot { display: flex; gap: 8px; justify-content: space-between; position: sticky; bottom: 0; padding-block: 10px 4px; background: var(--surface); border-block-start: 1px solid var(--line); }
.bk-foot .btn.pri { flex: 1; min-height: 50px; font-size: 16px; }
.bk-foot .btn[hidden] { display: none; }
.bk-err[hidden] { display: none; }
.bk-done { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.bk-done-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.bk-done-ic.bad { background: var(--bad-soft); color: var(--bad); }
.bk-ticket { display: flex; align-items: center; gap: 16px; }
.bk-qr { flex: none; width: 120px; height: 120px; padding: 6px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.bk-qr svg { width: 100%; height: 100%; display: block; }
.bk-ticket-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk-no { font-size: 20px; letter-spacing: .02em; }
.bk-when { display: block; font-size: 17px; margin-block-end: 10px; }
.bk-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bk-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 600; text-align: center; }
.bk-act:hover { text-decoration: none; border-color: var(--info); }
.bk-act .ico { color: var(--info); }
.bk-act.bad, .bk-act.bad .ico { color: var(--bad); }
.bk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bk-list .ico { color: var(--ok); }
@media (max-width: 560px) {
  .bk-grid { grid-template-columns: minmax(0, 1fr); }
  .bk-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.bk-staff { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--info); }
.bk-staff h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.bk-staff .row { align-items: flex-end; flex-wrap: wrap; }
.bk-pre { border: 1px solid var(--info); background: var(--info-soft); }
.bk-pre .fld { display: flex; flex-direction: column; gap: 4px; }

/* the booking page while the car is with us (owner, 8 Nov 2026) */
.bk-track-head { display: flex; flex-direction: column; gap: 4px; }
.bk-eta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--info); color: var(--on-strong); }
.bk-eta span:last-child { display: flex; flex-direction: column; } .bk-eta small { opacity: .9; } .bk-eta b { font-size: 20px; }
.bk-eta-ic .ico { width: 28px; height: 28px; }
.bk-approve { border: 1px solid var(--warn); }
.bk-approve h2 { font-size: 17px; }
.bk-item { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bk-item-top { display: flex; gap: 12px; align-items: flex-start; }
.bk-item-ph { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); }
.bk-item-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-item-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk-item-tx .chip { align-self: flex-start; }
.bk-item-tx small { color: var(--text-3); }
.bk-item-price { font-weight: 700; }
.bk-yn label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); cursor: pointer; font-weight: 600; }
.bk-yn input { width: 20px; height: 20px; accent-color: var(--info); }
.bk-yn label:has(input:checked) { border-color: var(--info); background: var(--info-soft); }
.bk-approve .fld { display: flex; flex-direction: column; gap: 4px; }
.bk-tl ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bk-tl li { display: flex; gap: 12px; position: relative; padding-block-end: 16px; }
.bk-tl li:last-child { padding-block-end: 0; }
.bk-tl li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.bk-tl li.done:not(:last-child)::after { background: var(--ok); }
.bk-tl-dot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--surface); color: var(--on-strong); }
.bk-tl li.done .bk-tl-dot { background: var(--ok); border-color: var(--ok); }
.bk-tl li.now .bk-tl-dot { border-color: var(--info); background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.bk-tl-tx { display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
.bk-tl-tx small { color: var(--text-3); }
.bk-tl li:not(.done):not(.now) b { color: var(--text-3); font-weight: 600; }

/* ready, rating and next service on the booking page (owner, 8 Nov 2026) */
.bk-ready { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.bk-ready h2 { font-size: 20px; }
.bk-bill .bk-sum dd.num, .bk-bill .bk-sum dd { text-align: end; }
.bk-faces, .bk-nps { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.bk-faces { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bk-nps { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; direction: ltr; }
.bk-faces legend, .bk-nps legend { margin-block-end: 6px; direction: inherit; }
[dir="rtl"] .bk-nps legend { direction: rtl; text-align: right; }
.bk-faces label, .bk-nps label { cursor: pointer; }
.bk-faces input, .bk-nps input { position: absolute; opacity: 0; pointer-events: none; }
.bk-faces span, .bk-nps span { display: grid; place-items: center; height: 46px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; }
.bk-nps span { height: 40px; font-size: 13px; border-radius: 9px; }
.bk-faces label:has(input:checked) span, .bk-nps label:has(input:checked) span { background: var(--info); border-color: var(--info); color: var(--on-strong); }
.bk-faces label:has(input:focus-visible) span, .bk-nps label:has(input:focus-visible) span { box-shadow: var(--ring); }
.bk-scale { display: flex; justify-content: space-between; }
.bk-rate .fld { display: flex; flex-direction: column; gap: 4px; }
.bk-next b { display: flex; align-items: center; gap: 8px; }

/* customer pages: light / dark switch beside the language (owner, 8 Nov 2026) */
.portal-tools { display: flex; align-items: center; gap: 8px; }
.portal-theme { width: 44px; height: 44px; border: 1px solid var(--line-2); font-size: 18px; }

/* 9 Nov 2026: the VIN is already on file (new vehicle form) */
.vin-existing { border: 1px solid var(--warn); border-inline-start-width: 4px; display: flex; flex-direction: column; gap: 10px; margin-block-end: 12px; }
.vin-existing h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }

/* an error toast stays until closed (owner, 9 Nov 2026) */
#toast .toast-x { flex: none; min-width: 34px; font-size: 18px; line-height: 1; }
#toast.bad { max-width: min(640px, calc(100vw - 32px)); }
/* QA-005: an error shows under the top bar, never over the form's primary button at the bottom; it closes when a field is edited */
#toast.bad { inset-block-start: calc(var(--top, 60px) + 12px); inset-block-end: auto; }
#toast.bad.on { pointer-events: none; } /* a click on what lies under the message still reaches it; only × catches clicks */
#toast.bad.on button { pointer-events: auto; }

/* Invoice tab: lines already on an invoice (owner, 9 Nov 2026) */
.tbl tr.is-invoiced > td { background: color-mix(in srgb, var(--ok, #1f8a5b) 9%, transparent); }
.tbl tr.is-invoiced > td:first-child { box-shadow: inset 3px 0 0 var(--ok, #1f8a5b); }
[dir="rtl"] .tbl tr.is-invoiced > td:first-child { box-shadow: inset -3px 0 0 var(--ok, #1f8a5b); }
.sec-pct { display: block; font-size: 11px; color: var(--brand); white-space: nowrap; } .sec-pct.muted { color: var(--text-3); }
.tbl tr.sec-sub td { background: var(--brand-soft); padding: 6px 12px; font-size: 13px; }
.sec-sub-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .sec-sub-in > svg { color: var(--brand); } .sec-sub-in .sp { flex: 1; }
.disc-sum { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--text-2); padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); }
.dlv-head { gap: 10px; flex-wrap: wrap; } .dlv-tbl td { vertical-align: top; } .dlv-tbl td > div + div { margin-block-start: 4px; }
.asked-tab-req { border-block-start: 1px solid var(--line); padding-block-start: 8px; display: flex; flex-direction: column; gap: 4px; }
.asked-tab-req:first-of-type { border: 0; padding: 0; } .asked-tab-req.is-slow { border-inline-start: 3px solid var(--bad); padding-inline-start: 8px; }
.asked-tab .list-plain li { padding-block: 3px; gap: 8px; flex-wrap: wrap; }
.xr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-block: 8px; }
.xr-photos img, .xr-photos video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); display: block; }
.inv-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.inv-tool { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.inv-tool-h { display: flex; gap: 8px; align-items: flex-start; } .inv-tool-h > svg { color: var(--brand); flex: none; margin-block-start: 2px; }
.inv-tool-h > div { display: flex; flex-direction: column; gap: 2px; }
.inv-tool-f { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .inv-tool-f select { flex: 1 1 160px; } .inv-tool-f .grow { flex: 1 1 160px; min-width: 0; }
.card.inv-done { border-color: color-mix(in srgb, var(--ok, #1f8a5b) 45%, transparent); }
.row > .banner.w-100 { flex-basis: 100%; margin: 6px 0 0; }

/* Invoice tab: "Before invoicing" card (kilometres out, history note), owner 9 Nov 2026 */
.out-card { padding: 0; overflow: hidden; border-inline-start: 4px solid var(--warn); }
.out-card.is-done { border-inline-start-color: var(--ok); }
.out-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.out-head .grow { flex: 1 1 220px; min-width: 0; }
.out-ico { display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); flex: none; }
.out-card.is-done .out-ico { background: var(--ok-soft); color: var(--ok); }
.out-fields { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; gap: 14px 16px; align-items: start; padding: 14px 16px 16px; }
.out-fields .fld { margin: 0; min-width: 0; }
.out-km { position: relative; }
.out-km input { inline-size: 100%; padding-inline-end: 40px; font-variant-numeric: tabular-nums; }
.out-km .unit { position: absolute; inset-inline-end: 12px; inset-block-start: 50%; translate: 0 -50%; color: var(--muted, #6b7280); font-size: 13px; pointer-events: none; }
.out-note input { inline-size: 100%; }
.out-save { align-self: end; }
.out-save .btn { min-width: 120px; }
@media (max-width: 760px) {
  .out-fields { grid-template-columns: 1fr; }
  .out-save .btn { inline-size: 100%; }
}

/* scConfirm: the system's own question box instead of the browser's (owner, 9 Nov 2026) */
dialog.sc-ask { width: min(420px, calc(100vw - 32px)); border-radius: 18px; padding: 0; overflow: hidden; animation: sc-pop .16s var(--ease, ease-out); }
dialog.sc-ask::backdrop { background: rgba(15, 17, 20, .45); backdrop-filter: blur(2px); }
dialog.sc-ask.is-leaving { opacity: 0; transform: scale(.98); transition: opacity .12s, transform .12s; }
.sc-ask .ask-body { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 10px; }
.sc-ask .ask-ico { flex: none; display: grid; place-items: center; inline-size: 42px; block-size: 42px; border-radius: 12px; background: var(--info-soft); color: var(--info); }
.sc-ask .ask-ico svg { inline-size: 22px; block-size: 22px; }
.sc-ask.is-danger .ask-ico { background: var(--bad-soft); color: var(--bad); }
.sc-ask .ask-text { min-width: 0; padding-top: 2px; }
.sc-ask .ask-msg { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--text); }
.sc-ask .ask-detail { margin: 6px 0 0; color: var(--text-3, #6b7280); font-size: 13.5px; }
.sc-ask .ask-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.sc-ask .ask-foot .btn { min-width: 110px; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-fill:hover { filter: brightness(1.08); }
@media (max-width: 480px) { .sc-ask .ask-foot { flex-direction: column-reverse; } .sc-ask .ask-foot .btn { inline-size: 100%; } }

/* Cashier desk and collect screen (owner, 9 Nov 2026) */
.desk-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.desk-stat { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.desk-stat > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.desk-stat small { color: var(--text-3); font-size: 12.5px; } .desk-stat b { font-size: 22px; line-height: 1.2; }
.desk-stat.is-queue b { color: var(--info); } .desk-stat.is-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.desk-stat.is-warn .kpi-ic { background: var(--warn-soft); color: var(--warn); }
.desk-search { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.desk-search .ds-ico { color: var(--text-3); padding-inline-start: 6px; display: grid; }
.desk-search input { flex: 1; min-width: 0; border: 0; box-shadow: none; font-size: 16px; min-height: 44px; background: transparent; }
.desk-list { display: grid; gap: 10px; }
.desk-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-inline-start: 4px solid var(--line-2); }
.desk-row.is-ready { border-inline-start-color: var(--ok); }
.dr-who, .dr-what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dr-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dr-due { text-align: end; display: flex; flex-direction: column; } .dr-due b { font-size: 19px; }
.dr-act .btn { min-width: 120px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 16px; text-align: center; }
@media (max-width: 860px) {
  .desk-top { grid-template-columns: 1fr; }
  .desk-row { grid-template-columns: 1fr auto; } .dr-what { grid-column: 1 / -1; order: 3; } .dr-act { grid-column: 1 / -1; order: 4; } .dr-act .btn { inline-size: 100%; }
}

.col-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.col-who { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.cw-row { display: flex; gap: 12px; align-items: flex-start; } .cw-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cw-row small { color: var(--text-3); font-size: 12px; }
.cw-sums { margin: 0; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.cw-sums > div { display: flex; justify-content: space-between; gap: 10px; } .cw-sums dt { color: var(--text-3); } .cw-sums dd { margin: 0; }
.cw-sums .cw-due { margin-top: 4px; padding: 10px 12px; border-radius: 12px; background: var(--info-soft); }
.cw-sums .cw-due dt { color: var(--info); font-weight: 700; } .cw-sums .cw-due dd { font-size: 22px; font-weight: 800; color: var(--info); }
.col-pay { padding: 16px; display: grid; gap: 12px; }
.cp-quick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-line { display: grid; grid-template-columns: 150px minmax(120px, 200px) minmax(0, 1fr); gap: 10px; align-items: center; }
.cp-line > label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cp-line input[inputmode="decimal"] { font-size: 18px; font-variant-numeric: tabular-nums; text-align: end; }
.cp-line:has(input[name="cheque"]) { grid-template-columns: 150px minmax(120px, 200px) repeat(3, minmax(0, 1fr)); }
/* QA-008: a reference (mada approval code, transfer reference, cheque details) is a labelled field; below 1280 px it takes its own row under the amount */
.cp-line > label.cp-ref { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-weight: 400; min-inline-size: 0; }
.cp-ref > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.cp-ref > input { inline-size: 100%; min-inline-size: 0; }
@media (max-width: 1279.98px) {
  .cp-line:has(input[name="cheque"]) { grid-template-columns: 150px minmax(120px, 200px) minmax(0, 1fr); }
  .cp-line > label.cp-ref { grid-column: 2 / -1; max-inline-size: 420px; }
}
.cp-change { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.cp-change label { font-size: 13px; color: var(--text-3); } .cp-change input { inline-size: 120px; text-align: end; }
.cp-change input.is-short { border-color: var(--bad); }
.cp-change-out b { font-size: 18px; color: var(--ok); }
.cp-more summary { cursor: pointer; color: var(--link); font-weight: 600; padding: 4px 0; }
.cp-more[open] { display: grid; gap: 10px; }
.cp-total { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.cp-total > div { display: flex; flex-direction: column; } .cp-total small { color: var(--text-3); } .cp-total b { font-size: 22px; }
.cp-total [data-left-box].is-zero b { color: var(--ok); }
.cp-go { justify-self: end; min-width: 220px; min-height: 52px; font-size: 17px; }
.col-done { padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cd-ico { display: grid; place-items: center; inline-size: 56px; block-size: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.cd-ico svg { inline-size: 28px; block-size: 28px; }
.col-done h2 { margin: 0; }
.cd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; inline-size: min(100%, 460px); }
.cd-list li { display: flex; gap: 8px; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.cd-act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 860px) {
  .col-grid { grid-template-columns: 1fr; }
  .cp-line, .cp-line:has(input[name="cheque"]) { grid-template-columns: 1fr 1fr; } .cp-line > label { grid-column: 1 / -1; }
  .cp-change { grid-column: 1 / -1; } .cp-go { justify-self: stretch; }
  .cp-line > label.cp-ref { grid-column: 1 / -1; max-inline-size: none; }
}
.reg-form .span-all { grid-column: 1 / -1; }
.reg-invs { display: grid; gap: 6px; }
.reg-inv { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.reg-inv:has(input:checked) { border-color: var(--info); background: var(--info-soft); }
.reg-go { align-self: end; }
/* owner, 21 Nov 2026: Register payment - invoices with their claims, a running total and what the button will do */
.reg-page { display: grid; gap: 12px; }
.reg-role { margin-block-start: 6px; justify-self: start; width: fit-content; }
.reg-list { display: grid; gap: 4px; }
.reg-list-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-block-end: 4px; }
.reg-list-head h2 { font-size: 15px; }
.reg-all { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.reg-row { display: grid; grid-template-columns: 22px minmax(120px, 160px) minmax(0, 1fr) 100px 100px; gap: 10px; align-items: center;
  padding: 9px 4px; border-top: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.reg-row-h { border-top: 0; cursor: default; padding-block: 2px; }
.reg-row .r { text-align: end; }
.reg-row .d-block { display: block; }
.reg-row .chip { min-height: 22px; font-size: 12px; }
.reg-row:has(input[hidden]) { grid-template-columns: 0 minmax(120px, 160px) minmax(0, 1fr) 100px 100px; cursor: default; }
.reg-row:has(input:checked) { background: var(--info-soft); }
.reg-row:has(input:not(:checked)) [data-reg-pay] { color: var(--text-3); }
.reg-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 8px; z-index: 2; }
.reg-sum { font-size: 14px; font-weight: 600; }
@media (max-width: 640px) {
  .reg-row { grid-template-columns: 22px minmax(0, 1fr) 84px; }
  .reg-row > :nth-child(3), .reg-row > :nth-child(4) { grid-column: 2 / -1; }
  .reg-row-h { display: none; }
}
.dr-ref { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* vehicle actions on a phone (owner, 9 Nov 2026): three buttons (estimation, odometer, edit) – two per row, the last one full
   width; long labels wrap instead of running under the icon */
@media (max-width: 760px) {
  .jc-side.vh-actions > .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .jc-side.vh-actions > .row .btn { white-space: normal; text-align: center; line-height: 1.2; min-height: 48px; gap: 6px; min-width: 0; padding-inline: 8px; }
  .jc-side.vh-actions > .row .btn .ico { flex: none; }
  .jc-side.vh-actions > .row > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .desk-top { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .desk-stat { padding: 10px; gap: 0; } .desk-stat .kpi-ic { display: none; }
  .desk-stat b { font-size: 16px; } .desk-stat small { font-size: 11.5px; } .desk-stat .small, .desk-stat span { font-size: 11.5px; overflow-wrap: anywhere; }
  .desk-search input { font-size: 15px; } .desk-search .btn.pri { padding-inline: 12px; }
}

/* row sequence in every list (owner, 9 Nov 2026) */
table.tbl th.seq, table.tbl td.seq { inline-size: 1%; white-space: nowrap; text-align: center; padding-inline: 10px 6px; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12.5px; }
table.tbl td.seq { font-weight: 600; }

/* job card Activity tab: a readable timeline (owner, 9 Nov 2026) */
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.act-item { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.act-dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--info); margin-top: 6px; }
.act-invoices_created .act-dot, .act-gate_pass_issued .act-dot { background: var(--ok); }
.act-cancel .act-dot, .act-complaint_removed .act-dot, .act-operation_removed .act-dot, .act-manual_line_removed .act-dot { background: var(--bad); }
.act-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-change { overflow-wrap: anywhere; }
.act-meta { white-space: nowrap; text-align: end; }
@media (max-width: 760px) { .act-item { grid-template-columns: 14px minmax(0, 1fr); } .act-meta { grid-column: 2; text-align: start; white-space: normal; } }
.act-links { display: flex; flex-direction: column; gap: 2px; } .act-links a { overflow-wrap: anywhere; }
.cd-list li { align-items: center; } .cd-list li > b { margin-inline-start: auto; }

/* ============================================================ monthly targets (owner, 9 Nov 2026) */
.tg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.tg-bar form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.tg-bar .sp { flex: 1; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tg-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 0; }
.tg-mine .tg-card { background: var(--surface-2); border-radius: 12px; }
.tg-mine .tg-grid { margin: 10px 0 0; }
.tg-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.tg-top > span:first-child { flex: 1; min-width: 0; }
.tg-top .tg-edit { min-height: 28px; min-width: 28px; padding: 0; }
.tg-v { font-size: 24px; font-weight: 700; line-height: 1.2; }
.tg-v small { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tg-prog { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.tg-prog .meter { flex: 1; }
.tg-first { color: var(--warn); }

/* ============================================================ technician: My day (owner, 9 Nov 2026) */
.tday-head { display: flex; align-items: center; gap: 12px; }
.tday-head h1 { font-size: 20px; }
.tday-find { display: flex; gap: 8px; align-items: center; margin: 0; }
.tday-find input { flex: 1; min-width: 0; min-height: 48px; font-size: 16px; }
.tday-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tday-alerts a.banner { text-decoration: none; }
.tday-found { outline: 2px solid var(--brand); outline-offset: 2px; }
.tday-figs { display: flex; flex-direction: column; gap: 10px; }
.tday-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.tday-grid b { display: block; font-size: 22px; font-weight: 700; }
.tday-grid small { color: var(--text-2); font-size: 12px; }
.tday-target { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.dict { position: relative; }
.dict textarea { width: 100%; padding-inline-end: 48px; }
.dict [data-dictate] { position: absolute; inset-inline-end: 4px; top: 4px; }
.dict [data-dictate].is-on { background: var(--bad-soft); color: var(--bad); }

/* Workshop now: the job controller's home (owner, 10 Nov 2026) */
.wsn { display: flex; flex-direction: column; gap: 12px; }
.wsn .row { flex-wrap: wrap; }
.wsn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.wsn-k { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-2); color: var(--text); text-decoration: none; min-height: var(--touch); }
.wsn-k b { font-size: 24px; line-height: 1.2; } .wsn-k span { font-size: 12.5px; color: var(--text-2); font-weight: 600; } .wsn-k small { font-size: 12px; color: var(--text-3); }
.wsn-k.warn { background: var(--warn-soft); border-inline-start-color: var(--warn); } .wsn-k.bad { background: var(--bad-soft); border-inline-start-color: var(--bad); } .wsn-k.bad b { color: var(--bad); }
.wsn-k:hover { border-color: var(--line-2); }
.wsn-h3 { margin: 4px 0 0; font-size: 15px; }
.wsn .att .chip { flex: none; }
/* planning board: a car that may miss the promised time, and the promised time on the lane */
.plan-board .bar.risk { outline: 2px solid var(--bad); outline-offset: -2px; }
.plan-board .promise-line { position: absolute; top: 0; bottom: 0; border-inline-start: 2px dashed var(--bad); pointer-events: none; }
.plan-batch li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-block-end: 1px solid var(--line); }
.plan-batch li label { display: flex; gap: 10px; align-items: center; flex: 1; min-height: var(--touch); }
.plan-move { display: grid; gap: 10px 12px; grid-template-columns: 1fr 1fr; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-move .fld { min-width: 0; }
.plan-move .plan-force, .plan-move > .btn { grid-column: 1 / -1; }
.plan-move > .btn { justify-self: start; }
@media (max-width: 560px) { .plan-move { grid-template-columns: 1fr; } }
/* owner, 19 Nov 2026: "Book anyway" as a tidy line: box and text side by side, never squeezed into a column */
.plan-force { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; margin: 0; line-height: 1.35; }
.plan-force input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--brand); }
/* a technician's permission of a few hours, shaded on his lane */
.plan-board .perm-block { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--info-soft) 0 6px, transparent 6px 12px); border-inline: 1px dashed var(--info); pointer-events: auto; z-index: 1; }
/* the customer's photos on the booking (owner, 10 Nov 2026) */
.bk-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-photos a { display: block; width: 96px; height: 96px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.bk-photos img { width: 100%; height: 100%; object-fit: cover; }
.bk-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 4px; text-align: center; color: var(--text-2); }
/* Makes and models: show / hide (owner, 10 Nov 2026) */
.mk-sum { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.mk-tools { flex-wrap: wrap; margin-bottom: 12px; }
.mk-list { display: flex; flex-direction: column; gap: 8px; }
.mk-card { padding: 0; }
.mk-card > summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; min-height: var(--touch); flex-wrap: wrap; }
.mk-card.mk-off > summary b { color: var(--text-3); }
.mk-sw { margin: 0; }
.mk-sw .switch { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); cursor: pointer; font-size: 13px; font-weight: 600; }
.mk-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; border-block-start: 1px solid var(--line); padding-block-start: 10px; }
.mk-bulk { gap: 8px; flex-wrap: wrap; } .mk-bulk form { margin: 0; }
.mk-models { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.mk-models form { margin: 0; }
.mk-model { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.mk-model.off span { color: var(--text-3); }
.mk-add { gap: 8px; flex-wrap: wrap; } .mk-add input { flex: 1 1 160px; }

/* ============================================================ date and time picker (owner, 10 Nov 2026; datepick.js) */
input.dp-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.dp-field { display: inline-flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); color: var(--text); text-align: start; cursor: pointer; }
.fld .dp-field { min-height: var(--touch); }
.dp-field:hover { border-color: var(--text-3); } .dp-field:focus-visible { border-color: var(--brand); outline: none; box-shadow: var(--ring); }
.dp-field .ico { color: var(--text-3); flex: none; }
.dp-field.dp-empty .dp-text { color: var(--text-3); }
.dp-field.bad { border-color: var(--bad); }
.dp-field[disabled] { opacity: .6; cursor: not-allowed; }
.dp-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-err { display: block; color: var(--bad); font-size: 12.5px; margin-top: 4px; }
.dp-err:empty { display: none; }
.dp-pop { position: absolute; z-index: 1000; width: 300px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dp-pop:not(.dp-time-only) { width: 320px; }
.dp-pop.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; border-radius: 16px 16px 0 0; max-height: 85vh; overflow: auto; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.dp-head { display: flex; align-items: center; gap: 8px; }
.dp-month { flex: 1; text-align: center; font-size: 15px; }
.dp-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; cursor: pointer; }
[dir=rtl] .dp-nav { transform: scaleX(-1); }
.dp-nav:hover { background: var(--surface-2); }
.dp-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.dp-chip { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-height: 34px; }
.dp-chip:hover { border-color: var(--brand); color: var(--brand); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-wd { font-size: 12px; color: var(--text-3); padding: 4px 0; font-weight: 600; }
.dp-day { aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 50%; background: none; cursor: pointer; font-variant-numeric: tabular-nums; font-size: 14px; }
.dp-day:hover:not([disabled]) { background: var(--brand-soft); }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 700; }
.dp-day.sel { background: var(--brand); color: var(--on-strong, #fff); font-weight: 700; }
.dp-day[disabled] { color: var(--text-3); opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.dp-day:focus-visible, .dp-slot:focus-visible, .dp-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dp-times { border-block-start: 1px solid var(--line); padding-block-start: 10px; }
.dp-time-only .dp-times { border: 0; padding: 0; }
.dp-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 210px; overflow-y: auto; padding: 2px; }
.dp-slot { min-height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.dp-slot:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.dp-slot.sel { background: var(--brand); border-color: var(--brand); color: var(--on-strong, #fff); font-weight: 700; }
.dp-slot[disabled] { opacity: .35; cursor: not-allowed; }
.dp-hint { margin: 0; color: var(--text-3); font-size: 13px; }
.dp-foot { display: flex; align-items: center; gap: 8px; }
.dp-sp { flex: 1; }
.dp-link { border: 0; background: none; color: var(--link); cursor: pointer; padding: 6px 4px; }
@media (max-width: 640px) { .dp-slots { grid-template-columns: repeat(4, 1fr); max-height: 40vh; } .dp-day { min-height: 44px; } }

/* ============================================================ appointments screen (owner, 10 Nov 2026) */
.ap-top { display: flex; flex-direction: column; gap: 12px; }
.ap-filter { flex-wrap: wrap; gap: 8px; } .ap-filter .dp-field { width: auto; min-width: 230px; }
.ap-week { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.ap-wnav { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; border-radius: var(--radius-s); border: 1px solid var(--line); color: var(--text-2); }
.ap-wday { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; background: var(--surface); }
.ap-wday small { font-size: 12px; color: var(--text-3); } .ap-wday b { font-size: 18px; line-height: 1.1; }
.ap-wday .ap-n { font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; border-radius: 999px; padding: 1px 6px; background: var(--brand-soft); color: var(--brand); }
.ap-wday .ap-n.zero { background: none; color: var(--text-3); font-weight: 400; }
.ap-wday.today { border-color: var(--brand); }
.ap-wday.on { background: var(--brand); border-color: var(--brand); color: var(--on-strong); }
.ap-wday.on small, .ap-wday.on .ap-n { color: var(--on-strong); background: rgba(255,255,255,.18); }
.ap-figs { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.ap-figs b { font-size: 17px; color: var(--text); } .ap-figs .ok b { color: var(--ok); } .ap-figs .bad b { color: var(--bad); } .ap-figs .warn b { color: var(--warn); }
.ap-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.ap-hour { display: flex; flex-direction: column; gap: 8px; }
.ap-h { font-size: 14px; margin: 0; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.ap-h::after { content: ""; flex: 1; border-block-start: 1px solid var(--line); }
.ap-hour.now .ap-h { color: var(--brand); } .ap-hour.now .ap-h::after { border-color: var(--brand); }
.ap-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-inline-start: 4px solid var(--line-2); }
.ap-card.st-checked_in { border-inline-start-color: var(--ok); } .ap-card.soon { border-inline-start-color: var(--warn); }
.ap-card.late, .ap-card.st-no_show { border-inline-start-color: var(--bad); } .ap-card.st-cancelled { opacity: .6; }
.ap-time { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; } .ap-time small { font-weight: 400; color: var(--text-3); font-size: 12.5px; }
.ap-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ap-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .ap-l1 b { font-size: 15px; }
.ap-l2 { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ap-note { margin: 2px 0 0; color: var(--text-2); }
.ap-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; max-width: 420px; }
.ap-acts form { margin: 0; }
.ap-adv select { min-height: 34px; padding: 4px 8px; font-size: 13px; } .ap-adv select.need { border-color: var(--warn); background: var(--warn-soft); }
@media (max-width: 760px) { .ap-card { grid-template-columns: 54px 1fr; } .ap-acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } }
.ap-grid > summary { cursor: pointer; font-weight: 700; font-size: 16px; padding: 6px 0; }
.ap-plus { width: 30px; height: 30px; border-radius: 50%; border: 1px dashed var(--line-2); background: none; color: var(--brand); cursor: pointer; font-size: 16px; }
.ap-plus:hover { background: var(--brand-soft); border-style: solid; }
/* new booking as a side panel */
.modal.drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.modal.drawer .box { width: min(560px, 100%); max-height: none; height: 100%; border-radius: 0; display: flex; flex-direction: column; }
.modal.drawer .box > form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal.drawer .box .bd { flex: 1; overflow-y: auto; }
.ap-found { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.ap-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
.ap-hit:hover, .ap-hit:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.ap-hit small { color: var(--text-3); }
.ap-picked { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ok); background: var(--ok-soft); border-radius: var(--radius-s); }
.ap-picked > span { flex: 1; display: flex; flex-direction: column; } .ap-picked small { color: var(--text-2); }
.ap-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-slot { min-width: 64px; min-height: 36px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-variant-numeric: tabular-nums; }
.ap-slot:hover { border-color: var(--brand); color: var(--brand); } .ap-slot.sel { background: var(--brand); color: var(--on-strong); border-color: var(--brand); }
.ap-slot.busy { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.ap-more > summary { cursor: pointer; color: var(--link); padding: 4px 0; }
/* a dialog whose body and footer sit inside its form get the same spacing (appointments: move, check in, new booking) */
.modal .box > form > .bd { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal .box > form > footer { padding: 12px 20px 16px; border-block-start: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface); }
.modal.drawer .box > header { padding-inline: 20px; }
.ap-new .bd > .fld > label, .ap-new .form .fld > label { font-weight: 600; }
.ap-new .form { gap: 12px; }
.ap-new input[type=search] { width: 100%; }
.ap-new .form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-new .form .span2 { grid-column: 1 / -1; }
@media (max-width: 480px) { .ap-new .form { grid-template-columns: 1fr; } }

/* ============================================================ loan cars (owner, 10 Nov 2026) */
.lc-figs { padding: 12px 16px; }
.lc-weeknav { gap: 8px; margin-bottom: 10px; align-items: center; }
.lc-board { display: grid; grid-template-columns: 190px minmax(560px, 1fr); row-gap: 6px; }
.lc-days, .lc-lane { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.lc-hd { font-size: 12.5px; color: var(--text-3); font-weight: 600; text-align: center; padding: 4px 0; }
.lc-car-h { text-align: start; }
.lc-hd.today { color: var(--brand); }
.lc-car { display: flex; flex-direction: column; justify-content: center; padding-inline-end: 10px; min-height: 52px; }
.lc-lane { min-height: 52px; background: var(--surface-2); border-radius: var(--radius-s); padding: 4px; grid-auto-flow: dense; }
.lc-lane > * { grid-row: 1; }
.c1 { grid-column-start: 1; } .c2 { grid-column-start: 2; } .c3 { grid-column-start: 3; } .c4 { grid-column-start: 4; } .c5 { grid-column-start: 5; } .c6 { grid-column-start: 6; } .c7 { grid-column-start: 7; }
.lc-bar.s1 { grid-column-end: span 1; } .lc-bar.s2 { grid-column-end: span 2; } .lc-bar.s3 { grid-column-end: span 3; } .lc-bar.s4 { grid-column-end: span 4; } .lc-bar.s5 { grid-column-end: span 5; } .lc-bar.s6 { grid-column-end: span 6; } .lc-bar.s7 { grid-column-end: span 7; }
.lc-bar { display: flex; flex-direction: column; justify-content: center; padding: 4px 8px; border-radius: var(--radius-s); text-decoration: none; color: var(--text); background: var(--info-soft); border-inline-start: 4px solid var(--info); min-width: 0; overflow: hidden; }
.lc-bar b, .lc-bar small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lc-bar b { font-size: 13px; } .lc-bar small { font-size: 11.5px; color: var(--text-2); }
.lc-bar.st-out { background: var(--warn-soft); border-color: var(--warn); }
.lc-bar.st-in_approval { background: var(--violet-soft); border-color: var(--violet); }
.lc-bar.st-returned { background: var(--surface-3); border-color: var(--line-2); color: var(--text-2); }  /* 25 Nov 2026: back with us */
.lc-bar.late { background: var(--bad-soft); border-color: var(--bad); }
.lc-free { border: 1px dashed var(--line-2); background: none; border-radius: var(--radius-s); color: var(--brand); cursor: pointer; font-size: 18px; min-height: 44px; opacity: .55; }
.lc-free:hover, .lc-free:focus-visible { opacity: 1; background: var(--brand-soft); border-style: solid; }
.lc-legend { gap: 12px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.lc-legend .lg { display: inline-flex; align-items: center; gap: 6px; } .lc-legend .lg::before { content: ""; width: 14px; height: 10px; border-radius: 3px; background: var(--info-soft); border-inline-start: 3px solid var(--info); }
.lc-legend .lg.st-out::before { background: var(--warn-soft); border-color: var(--warn); } .lc-legend .lg.st-in_approval::before { background: var(--violet-soft); border-color: var(--violet); } .lc-legend .lg.late::before { background: var(--bad-soft); border-color: var(--bad); } .lc-legend .lg.st-returned::before { background: var(--surface-3); border-color: var(--line-2); }
.lc-h.late { color: var(--bad); }
.lc-r { border-inline-start: 4px solid var(--line-2); } .lc-r.late { border-inline-start-color: var(--bad); }
.lc-r-head { flex-wrap: wrap; gap: 8px; }
.lc-act > summary { list-style: none; display: inline-flex; width: auto; } .lc-act > summary::-webkit-details-marker { display: none; }
.lc-act[open] > summary { display: none; }
.lc-fuel { display: inline-flex; } .lc-fuel label { cursor: pointer; } .lc-fuel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lc-fuel span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2); margin-inline-start: -1px; }
.lc-fuel label:first-child span { border-start-start-radius: var(--radius-s); border-end-start-radius: var(--radius-s); } .lc-fuel label:last-child span { border-start-end-radius: var(--radius-s); border-end-end-radius: var(--radius-s); }
.lc-fuel input:checked + span { background: var(--brand); color: var(--on-strong); border-color: var(--brand); } .lc-fuel input:focus-visible + span { outline: 2px solid var(--brand); }
/* owner, 25 Nov 2026: the four fuel buttons share their column (52px each ran under the damage notes) */
.lc-fuel { display: flex; max-width: 100%; margin-inline: 0; } .lc-fuel label { flex: 1 1 0; min-width: 0; } .lc-fuel span { min-width: 0; width: 100%; padding: 0 4px; }
.lc-pick { border: 0; padding: 0; margin: 0; } .lc-pick legend { font-weight: 600; margin-bottom: 6px; }
.lc-carpick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 6px; cursor: pointer; }
.lc-carpick > span:first-of-type { flex: 1; display: flex; flex-direction: column; } .lc-carpick small { color: var(--text-3); }
.lc-carpick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.lc-set.off { opacity: .65; }
@media (max-width: 640px) { .lc-board { grid-template-columns: 120px minmax(480px, 1fr); } }

.lc-month { min-width: 130px; text-align: center; }
.kpi-card.bad .kpi-v { color: var(--bad); }
.bad-text { color: var(--bad); font-weight: 700; }
.jc-delay-form { gap: 6px; flex-wrap: wrap; margin-top: 6px; } .jc-delay-form select, .jc-delay-form input { min-height: 36px; }
/* the picker is fixed to the screen and, where supported, opens in the top layer (above windows) */
.dp-pop { position: fixed; }
.dp-pop[popover] { margin: 0; inset: auto; overflow: visible; color: var(--text); }
.dp-pop.sheet[popover] { inset: auto 0 0 0; overflow: auto; }
/* picker: never taller than the screen; date and time side by side on wide screens */
.dp-pop { overflow-y: auto; }
.dp-body { display: flex; flex-direction: column; gap: 10px; }
.dp-pop.dp-wide { width: 600px; }
.dp-pop.dp-wide .dp-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.dp-pop.dp-wide .dp-cal { display: flex; flex-direction: column; gap: 10px; }
.dp-pop.dp-wide .dp-times { border-block-start: 0; padding-block-start: 0; border-inline-start: 1px solid var(--line); padding-inline-start: 14px; }
.dp-pop.dp-wide .dp-slots { grid-template-columns: repeat(2, 1fr); max-height: 300px; }
.dp-cal { display: flex; flex-direction: column; gap: 10px; }
/* picker time row: hour and minute lists (owner, 10 Nov 2026) */
.dp-tm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-block-start: 1px solid var(--line); padding-block-start: 10px; }
.dp-tm-l { font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.dp-tm select { min-height: 40px; min-width: 84px; font-variant-numeric: tabular-nums; }
.dp-tm b { font-size: 18px; }
.dp-foot .btn.pri { min-width: 84px; }
/* compact picker: fits under or over a field in a window */
.dp-pop { padding: 10px 12px; gap: 8px; }
.dp-pop:not(.dp-time-only) { width: 312px; }
.dp-now { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--radius-s); background: var(--brand-soft); }
.dp-now span { font-size: 11.5px; color: var(--text-2); } .dp-now b { font-size: 14px; color: var(--text); }
.dp-pop .dp-head .dp-nav { width: 34px; height: 34px; font-size: 20px; }
.dp-pop .dp-quick .dp-chip { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.dp-pop .dp-day { aspect-ratio: auto; min-height: 0; height: 34px; border-radius: 10px; }
.dp-pop .dp-wd { padding: 2px 0; }
.dp-pop .dp-tm { padding-block-start: 8px; } .dp-pop .dp-tm select { min-height: 36px; }
.dp-pop .dp-foot .btn { min-height: 36px; }
@media (max-width: 640px) { .dp-pop .dp-day { height: 42px; } }

/* an error shown inside a window spans the whole form */
.dlg-body > .dlg-error { grid-column: 1 / -1; }

/* ============================================================ managers' home (owner, 12 Nov 2026) */
.mg-switch select { min-height: 40px; min-width: 180px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); }
.mg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.mg-k { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-2); color: var(--text); text-decoration: none; }
.mg-k span { font-size: 12.5px; color: var(--text-2); font-weight: 600; } .mg-k b { font-size: 24px; line-height: 1.2; } .mg-k small { font-size: 12px; color: var(--text-3); }
.mg-k.ok { border-inline-start-color: var(--ok); } .mg-k.warn { border-inline-start-color: var(--warn); background: var(--warn-soft); } .mg-k.bad { border-inline-start-color: var(--bad); background: var(--bad-soft); } .mg-k.bad b { color: var(--bad); }
a.mg-k:hover { border-color: var(--line-2); }
.mg-k .meter { margin-top: 4px; }
.mg-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.mg-stage { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); text-align: center; color: var(--text); text-decoration: none; }
.mg-stage b { font-size: 22px; } .mg-stage span { font-size: 12.5px; font-weight: 600; } .mg-stage small { color: var(--text-3); font-size: 12px; }
.mg-stage.warn { background: var(--warn-soft); border-color: var(--warn); } .mg-stage.bad { background: var(--bad-soft); border-color: var(--bad); } .mg-stage.bad b { color: var(--bad); }
.mg-dec { gap: 6px; margin: 0; flex-wrap: nowrap; }
.mg-tbl td, .mg-tbl th { white-space: nowrap; }

/* customers list: quick filters (owner, 12 Nov 2026) */
.cu-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.cu-f { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); text-decoration: none; background: var(--surface); min-height: 38px; }
.cu-f b { font-size: 13px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); }
.cu-f.bad b { background: var(--bad-soft); color: var(--bad); } .cu-f.warn b { background: var(--warn-soft); color: var(--warn); } .cu-f.ok b { background: var(--ok-soft); color: var(--ok); }
.cu-f.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.cu-acts { white-space: nowrap; text-align: end; }

/* job cards board: filters, age and promised time (owner, 12 Nov 2026) */
.jb-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.jb-filters select { min-height: 38px; }
.jb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; min-height: 38px; background: var(--surface); }
.jb-chip input { width: 16px; height: 16px; }
.jb-chip.on { border-color: var(--brand); background: var(--brand-soft); } .jb-chip.on.bad { border-color: var(--bad); background: var(--bad-soft); } .jb-chip.on.warn { border-color: var(--warn); background: var(--warn-soft); }
.jb-key { margin-inline-start: auto; }
.kcol-sum { margin: -4px 2px 6px; }
.kc-time { flex-wrap: wrap; gap: 4px; }

.fu-re { margin: 0; } .fu-re select { min-height: 34px; max-width: 180px; }

/* ============================================================ charts (owner, 12 Nov 2026; charts.js) */
.ch { position: relative; width: 100%; }
.ch-s { height: 180px; } .ch-m { height: 240px; } .ch-l { height: 300px; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin: 2px 0 8px; }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ch-legend i.dash { height: 3px; border-radius: 0; width: 14px; }
.ch-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ch-card h2 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; } .ch-card h2 .sp { flex: 1; } .ch-card h2 small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.ch-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.ch-grid.wide-first > :first-child { grid-column: 1 / -1; }
@media (min-width: 1100px) { .ch-grid.two-one { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
/* report filter bar: period presets, branch, compare */
.rp-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; }
.rp-bar .rp-p { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none; font-size: 13px; min-height: 34px; display: inline-flex; align-items: center; }
.rp-bar .rp-p.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 600; }
.rp-bar .sp { flex: 1; }
.rp-bar select { min-height: 36px; }
.rp-custom { display: none; gap: 6px; align-items: center; flex-wrap: wrap; } .rp-custom.on { display: inline-flex; }
.rp-custom .dp-field { width: auto; min-width: 190px; }
.rp-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 12px; }
.rp-t { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.rp-t span { font-size: 12.5px; color: var(--text-2); font-weight: 600; } .rp-t b { font-size: 24px; line-height: 1.2; }
.rp-t .dl { font-size: 12px; font-weight: 600; } .rp-t .dl.up { color: var(--ok); } .rp-t .dl.down { color: var(--bad); } .rp-t .dl.flat { color: var(--text-3); }
.rp-t svg.spark { width: 100%; height: 30px; }
/* date fields inside a row of filters keep their own width */
.row .dp-field { width: auto; min-width: 200px; }
.rp-cd { display: inline-flex; } .rp-cd > summary { list-style: none; cursor: pointer; gap: 6px; } .rp-cd > summary::-webkit-details-marker { display: none; }
.rp-cd[open] { gap: 6px; align-items: center; }
/* bookings heatmap */
table.heat { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 11.5px; }
table.heat th { color: var(--text-3); font-weight: 600; text-align: center; padding: 0 2px; } table.heat th[scope=row] { text-align: start; white-space: nowrap; }
table.heat td { height: 26px; min-width: 26px; text-align: center; border-radius: 4px; background: var(--surface-2); color: var(--text-2); font-variant-numeric: tabular-nums; }
.hl1 { background: #e6f1fb !important; } .hl2 { background: #b5d4f4 !important; } .hl3 { background: #85b7eb !important; color: #042c53 !important; }
.hl4 { background: #378add !important; color: #fff !important; } .hl5 { background: #185fa5 !important; color: #fff !important; }
.ch-legend i.hl1, .ch-legend i.hl2, .ch-legend i.hl3, .ch-legend i.hl4, .ch-legend i.hl5 { width: 16px; }

.ap-trends > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* expiry actions (owner, 13 Nov 2026): sell first, return to supplier, scrap */
.ex-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.ex-acts form { margin: 0; }
.ex-more > summary { list-style: none; } .ex-more > summary::-webkit-details-marker { display: none; }
.ex-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 200px; }

/* users set-up (owner, 13 Nov 2026): list + side panel */
.us-head h2 { margin: 0; }
.us-kpis { margin-top: 10px; }
.us-kpis .mg-k.us-on { box-shadow: 0 0 0 2px var(--brand); }
.us-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .us-layout.us-open { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } }
.us-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.us-row + .us-row { border-block-start: 1px solid var(--line); }
.us-link { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: var(--text); text-decoration: none; }
.us-link:hover { background: var(--surface-2); }
.us-row.on .us-link { background: var(--brand-soft); }
.us-row.off .us-main b { color: var(--text-3); }
.us-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 13px; font-weight: 700; }
.us-row.on .us-av { background: var(--brand); color: #fff; }
.us-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.us-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.us-chips .chip { min-height: 22px; font-size: 11.5px; }
.us-miss { color: var(--warn); display: inline-flex; gap: 3px; align-items: center; }
.us-miss .ic { width: 14px; height: 14px; }
.us-when { flex: none; text-align: end; }
.us-empty { padding: 16px; }
.us-panel { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.us-panel h3 { margin: 0; }
.us-form { display: flex; flex-direction: column; gap: 10px; }
.us-form .fld > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.us-picks { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.us-picks legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.us-pick { display: inline-flex; gap: 6px; align-items: center; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; cursor: pointer; min-height: 34px; }
.us-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
@media (max-width: 899px) { .us-panel { position: static; order: -1; } }

/* part movements (owner, 13 Nov 2026) */
.mv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
.mv-bar input[type=search] { flex: 1 1 220px; min-width: 0; }
.mv-bar select, .mv-bar input[type=date], .mv-bar .dp-field { flex: 0 1 190px; min-width: 0; width: auto; }
.mv-bar .scan-wrap { flex: 1 1 220px; min-width: 0; }
.mv-seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mv-tools { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.mv-in { color: var(--ok, #15803d); font-weight: 600; }
.mv-out { color: var(--bad, #b91c1c); font-weight: 600; }
.mv-grp > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
.mv-grp > summary::-webkit-details-marker { display: none; }
.mv-grp > summary .sp { flex: 1; }
.mv-grp[open] > summary { margin-bottom: 8px; }
.mv-plain { padding: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }

/* booking QR (owner, 13 Nov 2026) */
.qr-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.qr-card h2 { margin: 0; font-size: 16px; }
.qr-img { width: 200px; max-width: 100%; background: #fff; padding: 8px; border-radius: 8px; }
.qr-img svg, .qr-big svg { display: block; width: 100%; height: auto; }
.qr-url { overflow-wrap: anywhere; color: var(--text-3); }
.qr-poster-body { background: #fff; color: #111; margin: 0; }
.qr-poster { max-width: 640px; margin: 0 auto; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr-poster h1 { font-size: 40px; margin: 8px 0 0; }
.qr-logo { max-height: 90px; max-width: 70%; }
.qr-brand { font-size: 28px; font-weight: 700; margin: 0; }
.qr-lead { font-size: 20px; margin: 0; color: #333; }
.qr-big { width: 380px; max-width: 90vw; padding: 12px; border: 3px solid #111; border-radius: 16px; background: #fff; }
.qr-branch { font-size: 24px; font-weight: 700; margin: 0; }
.qr-small { font-size: 12px; color: #555; margin: 0; overflow-wrap: anywhere; }
@media print { .qr-noprint { display: none !important; } .qr-poster { padding-top: 10mm; } @page { size: A4; margin: 12mm; } }

/* ============================================================ set-up: API and webhooks (owner, 13 Nov 2026; mock-up work/mockups_api_webhooks) */
.api-intro { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--brand-soft); border-color: transparent; }
.api-intro p { color: var(--text-2); }
.api-intro .grow { flex: 1 1 260px; }
.api-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.api-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-sub { display: block; font-size: 12px; color: var(--text-3); }
.api-nowrap { white-space: nowrap; }
.api-inline { display: inline; }
.api-hooks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.api-hook { display: flex; flex-direction: column; gap: 12px; }
.api-url { font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; text-align: start; }
.api-ev { display: flex; flex-wrap: wrap; gap: 6px; }
.api-ev span { background: var(--surface-3); border-radius: 10px; padding: 4px 10px; font-size: 13px; font-weight: 600; line-height: 1.35; }
.api-ev small { display: block; font-weight: 400; font-size: 11px; color: var(--text-3); }
.api-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.api-dev summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.api-dev dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 12px 0; font-size: 13.5px; }
.api-dev dt { font-weight: 700; } .api-dev dd { margin: 0; overflow-wrap: anywhere; }
.api-code { text-align: left; background: #14171c; color: #e8eaed; border-radius: 10px; padding: 10px 14px; font-family: var(--mono-font); font-size: 12.5px; overflow-x: auto; margin: 6px 0 0; white-space: pre; }
.api-choice, .api-evpick { border: 0; margin: 0; padding: 0; }
.api-choice legend, .api-evpick legend { font-size: 13.5px; font-weight: 600; margin-block-end: 6px; }
.api-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.api-choice label { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.api-choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.api-choice small { display: block; color: var(--text-3); font-size: 12px; }
.api-evpick label { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-block-end: 1px solid var(--line); cursor: pointer; }
.api-evpick small { margin-inline-start: auto; color: var(--text-3); font-size: 11px; }
.api-keybox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; }
.api-keybox code { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; text-align: left; }
dialog.dlg.api-log { width: min(820px, calc(100vw - 24px)); }
.api-log .dlg-head small { display: block; overflow-wrap: anywhere; }
.api-detail td { padding-block: 0 8px; border-block-end-width: 1px; }
.api-detail summary { color: var(--text-3); }
@media (max-width: 760px) { .api-choice { grid-template-columns: 1fr; } .api-dev dl { grid-template-columns: 1fr; } .api-dev dd { margin-block-end: 6px; } }

/* branch hours (owner, 13 Nov 2026): week grid, holidays */
.bh-head h2 { margin: 0; }
.bh-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .bh-layout { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); } }
.bh-week, .bh-side > .card { display: flex; flex-direction: column; gap: 10px; }
.bh-week h3, .bh-side h3 { margin: 0; }
.bh-side { display: flex; flex-direction: column; gap: 14px; }
.bh-grid { display: flex; flex-direction: column; }
.bh-day { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 0; border-block-end: 1px solid var(--line); }
.bh-sw { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; cursor: pointer; font-weight: 600; }
.bh-sw input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; flex: none; margin: 0; transition: background var(--t-fast); }
.bh-sw input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start var(--t-fast); }
.bh-sw input:checked { background: var(--ok); }
.bh-sw input:checked::after { inset-inline-start: 21px; }
.bh-sw input:focus-visible { box-shadow: var(--ring); }
.bh-closed { display: none; font-weight: 400; }
.bh-day:has(.bh-sw input:not(:checked)) .bh-closed { display: inline; }
.bh-day:has(.bh-sw input:not(:checked)) .bh-spans { display: none; }
.bh-day:has(.bh-sw input:not(:checked)) .bh-dn { color: var(--text-3); }
.bh-spans { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; flex: 1; }
.bh-span { display: inline-flex; align-items: center; gap: 6px; }
.bh-span input[type=time] { width: 118px; min-height: 38px; }
.bh-2:has(input[value=""]) input { border-style: dashed; }
.bh-copy { margin-inline-start: auto; font-size: 12.5px; }
.bh-foot { flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.bh-tags input { width: 110px; }
.bh-tags > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.bh-hols { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bh-hols li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-block-end: 1px solid var(--line); }
.bh-hols li form { margin: 0; }
.bh-hn { font-weight: 600; flex: 1; min-width: 0; }
.bh-add { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.bh-add > input, .bh-add > button { grid-column: 1 / -1; }
.bh-wide { width: 100%; justify-content: center; }
.bh-from select { width: 100%; }

/* platform team (owner, 13 Nov 2026) */
.pt-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .pt-layout { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); } }
.pt-link { display: flex; flex-direction: column; gap: 10px; border-color: var(--brand); }
.pt-invite h2 { font-size: 16px; }

/* platform subscription panel (owner, 13 Nov 2026) */
.sp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.sp-card { display: flex; flex-direction: column; gap: 10px; }
.sp-card h3 { margin: 0; }
.sp-date { font-size: 17px !important; }
.sp-trial, .sp-pay { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-pay select, .sp-pay input[name=reference] { flex: 1 1 200px; min-width: 0; }
.sp-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; }
.sp-feat { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.sp-feat.sp-special { color: var(--brand); font-weight: 600; }
.sp-tbl .sp-n { width: 80px; min-height: 34px; }
.sp-hist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* sign-up: the submit button keeps its text inside, full row on its own (owner, 14 Nov 2026) */
.su-go { align-items: flex-start; }
.su-go .btn { padding-inline: 32px; white-space: nowrap; }
@media (max-width: 560px) { .su-go { align-items: stretch; } }

/* message log (owner, 14 Nov 2026) */
.ml-text summary { cursor: pointer; color: var(--text-2); }
.ml-text p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 60ch; }

/* authority matrix (owner, 14 Nov 2026) */
.mx-head { gap: 10px; align-items: center; }
.mx-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .mx-layout { grid-template-columns: 240px minmax(0, 1fr); } }
.mx-list { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
@media (min-width: 960px) { .mx-list { position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow-y: auto; } }
.mx-list input { width: 100%; margin-bottom: 6px; }
.mx-area { font-size: 12px; font-weight: 700; color: var(--text-3); margin: 10px 4px 2px; }
.mx-item { display: block; padding: 7px 10px; border-radius: var(--radius-xs); color: var(--text); text-decoration: none; font-size: 13.5px; }
.mx-item:hover { background: var(--surface-2); }
.mx-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.mx-item.off { color: var(--text-3); }
.mx-sum { border-inline-start: 4px solid var(--brand); }
.mx-sum .row { gap: 8px; flex-wrap: wrap; align-items: center; }
.mx-cond { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mx-cond select, .mx-cond input { flex: 1 1 160px; min-width: 0; }
.mx-chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.mx-step { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--brand); background: var(--brand-soft); border-radius: var(--radius-s); flex: 1 1 210px; max-width: 280px; }
.mx-step.mx-new { border-style: dashed; border-color: var(--line-2); background: transparent; }
.mx-step select { width: 100%; }
.mx-h { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.mx-h input { width: 70px; min-height: 34px; }
.mx-arrow { align-self: center; color: var(--text-3); font-size: 18px; }
[dir="ltr"] .mx-arrow { transform: scaleX(-1); }
.mx-send { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.mx-send .fld { flex: 1 1 280px; }
.mx-try { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.mx-try .fld { flex: 0 1 180px; }

/* read-only role (internal auditor, owner 14 Nov 2026): no buttons that change data; the server refuses saves anyway */
body.is-ro main form[method="post" i]:not(.ro-ok), body.is-ro main form[method="POST"]:not(.ro-ok) { display: none !important; }
body.is-ro main [data-dialog]:not(.ro-ok), body.is-ro main .ro-hide { display: none !important; }
.ro-banner { margin-bottom: 12px; }

/* audit trail (owner, 14 Nov 2026) */
.au-tbl tr.au-money td { background: var(--bad-soft); }
.au-tbl tr.au-access td { background: var(--warn-soft); }
.au-tbl td s { text-decoration-thickness: 1px; }

/* auditor's dashboard (owner, 14 Nov 2026) */
.ad-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.ad-tile b { font-size: 22px; }
.ad-tile.ad-zero { opacity: .6; }
.ad-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .ad-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); } }
.ad-exp { display: flex; flex-direction: column; gap: 8px; }
.ad-exp .btn { justify-content: flex-start; }

/* booking panel: add a customer not found (owner, 15 Nov 2026) */
.ap-newcust { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px; border: 1px dashed var(--brand); border-radius: var(--radius-s); background: var(--brand-soft); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }

/* a scanned booking opens with its card marked (owner, 15 Nov 2026) */
.ap-card:target { outline: 3px solid var(--brand); outline-offset: 2px; scroll-margin-top: 90px; }
.lc-limit { flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }

/* ============================================================ health check items as cards (owner, 16 Nov 2026: UI/UX)
   one card per item: name | rating with what was found | customer decision; amber and red cards are tinted */
.tbl-wrap:has(> .hc-table) { border: 0; background: none; overflow: visible; border-radius: 0; }
.hc-table, .hc-table tbody { display: block; }
.hc-table tbody { display: flex; flex-direction: column; gap: 8px; }
.tbl-wrap .hc-table tr.hc-row { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) max-content; gap: 10px 20px; align-items: center;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-2); border-radius: 12px; box-shadow: none; }
.tbl-wrap .hc-table tr.hc-row:hover { background: var(--surface); }
.tbl-wrap .hc-table tr.hc-row.r-ok { border-inline-start-color: var(--ok); }
.tbl-wrap .hc-table tr.hc-row.r-na { border-inline-start-color: var(--line-2); opacity: .85; }
.tbl-wrap .hc-table tr.hc-row.r-advise { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); border-inline-start-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.tbl-wrap .hc-table tr.hc-row.r-urgent { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); border-inline-start-color: var(--bad); background: color-mix(in srgb, var(--bad-soft) 60%, var(--surface)); }
.tbl-wrap .hc-table td, .tbl-wrap .hc-table td:first-child { display: block; padding: 0; border: 0; min-width: 0; text-align: start; font-size: inherit; font-weight: inherit; box-shadow: none; }
.hc-table td[data-label]::before { display: none; }
.hc-table td:empty { display: none; }
.hc-item { display: flex; align-items: center; gap: 8px; font-size: 14.5px; line-height: 1.3; }
.hc-item .hc-dot { flex: none; }
.hc-note { margin-top: 4px; padding-inline-start: 20px; }
.hc-table .hc-photos { padding-inline-start: 20px; }
.hc-table .hc-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.hc-table .hc-seg { margin: 0; padding: 3px; }
.hc-table .hc-rate .hc-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex: 1 1 100%; }
.hc-table .hc-rate .hc-more input[name="note"] { flex: 1 1 240px; min-width: 0; max-width: none; }
.hc-est { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.hc-table .hc-rate .hc-est input { width: 100px; max-width: none; }
.hc-decide { display: flex; flex-direction: column; gap: 6px; }
.hc-decide .btn { justify-content: flex-start; }
@media (max-width: 1180px) {
  .tbl-wrap .hc-table tr.hc-row { grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); }
  .hc-table td:nth-child(3) { grid-column: 2; }
  .hc-decide { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .tbl-wrap .hc-table tr.hc-row { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .hc-table td:nth-child(3) { grid-column: 1; }
  .hc-table .hc-seg { width: 100%; } .hc-table .hc-opt { flex: 1; } .hc-table .hc-opt span { justify-content: center; width: 100%; }
  .hc-decide .btn { flex: 1; justify-content: center; }
}

/* health check: a photo or video on its way (owner, 16 Nov 2026) */
.hc-uploading { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: 12.5px; font-weight: 600; }
.hc-uploading[hidden] { display: none; }
.hc-spin { inline-size: 14px; block-size: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: hc-spin .8s linear infinite; flex: none; }
.hc-upbar { inline-size: 70px; block-size: 4px; border-radius: 4px; background: color-mix(in srgb, var(--info) 22%, transparent); overflow: hidden; }
.hc-upbar > span { display: block; block-size: 100%; inline-size: 0; background: currentColor; transition: inline-size .2s; }
@keyframes hc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hc-spin { animation-duration: 2.4s; } }
form.is-uploading label:has(> input[type=file]) { opacity: .45; pointer-events: none; }
/* cancel job card: the inspection fee amount shows when ticked (owner, 16 Nov 2026) */
#dlg-cancel .cn-fee:not(:has([data-fee-toggle]:checked)) .cn-fee-amt { display: none; }
#dlg-cancel .cn-fee-amt { gap: 8px; margin-top: 6px; }
#dlg-cancel form:has([data-fee-toggle]:checked) .banner.warn { display: none; }

/* Visit requests (owner, 16 Nov 2026): what can be taken comes first, by day, cards in a grid */
.visits-page { display: flex; flex-direction: column; gap: 20px; }
.visits-page .visits-mine.is-empty { order: 2; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.visits-page .visits-mine.is-empty h2 { font-size: 15px; }
.visit-day { margin: 8px 0 0; font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.visit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.visit-grid .visit-card { display: flex; flex-direction: column; gap: 8px; border-inline-start: 4px solid var(--ok); }
.visit-grid .visit-card.fit-warn { border-inline-start-color: var(--warn); }
.visit-grid .visit-card.fit-bad { border-inline-start-color: var(--bad); }
.visit-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.visit-when { display: flex; align-items: baseline; gap: 8px; } .visit-when b { font-size: 18px; }
.visit-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .visit-line > .ico { flex: none; color: var(--text-3, var(--text-2)); }
.visit-plate { display: inline-block; padding: 1px 8px; border: 1.5px solid var(--text); border-radius: 6px; font-weight: 700; font-size: 13px; unicode-bidi: isolate; white-space: nowrap; }
.visit-fit { display: flex; flex-wrap: wrap; gap: 6px; } .visit-fit:empty { display: none; }
.visit-fit .chip { white-space: normal; }
.visit-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.visit-act form { margin: 0; }
[data-visit-near].is-on { border-color: var(--ok); color: var(--ok); }
.pushbox[data-put-away] { display: none; }
@media (max-width: 760px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-act > * { flex: 1 1 100%; } .visit-act .btn { width: 100%; justify-content: center; }
}

/* A visit at home: the customer follows the van; the technician's phone says it is sharing (owner, 16 Nov 2026) */
.bk-visit-tech { display: flex; align-items: center; gap: 12px; }
.bk-visit-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-soft, var(--info-soft)); color: var(--brand, var(--info)); font-weight: 800; font-size: 18px; }
.bk-track { display: flex; flex-direction: column; gap: 8px; }
.track-map { position: relative; height: 280px; overflow: hidden; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-3); direction: ltr; }
.track-van { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--info); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(37, 99, 235, .5), 0 2px 6px rgba(0, 0, 0, .35); animation: track-pulse 2s infinite; }
@keyframes track-pulse { 70% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0), 0 2px 6px rgba(0, 0, 0, .35); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), 0 2px 6px rgba(0, 0, 0, .35); } }
@media (prefers-reduced-motion: reduce) { .track-van { animation: none; } }
.bk-track-info { font-weight: 700; }
.visit-share { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--info-soft); color: var(--info); }
.visit-share-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; opacity: .5; }
.visit-share.is-live { background: var(--ok-soft); color: var(--ok); } .visit-share.is-live .visit-share-dot { opacity: 1; animation: track-pulse 2s infinite; }
.visit-share.is-off { background: var(--warn-soft); color: var(--warn); }

/* Registering the car at the customer's place (owner, 16 Nov 2026) */
.visit-open { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.visit-step { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.visit-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft, var(--info-soft)); color: var(--brand, var(--info)); font-weight: 800; font-size: 13px; flex: none; }
.visit-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.visit-car { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.visit-car input { margin-top: 3px; accent-color: var(--brand, var(--info)); }
.visit-car-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.visit-car.is-on, .visit-car:has(input:checked) { border-color: var(--brand, var(--info)); background: var(--brand-soft, var(--info-soft)); }
.visit-car.is-new { border-style: dashed; } .visit-car.is-new.is-on, .visit-car.is-new:has(input:checked) { border-style: solid; }
.visit-reg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.visit-reg[hidden] { display: none; }
.visit-reg .span2 { grid-column: 1 / -1; }
.visit-reg-h { float: inline-start; width: 100%; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; padding: 0; }
.visit-reg-h .small { font-weight: 400; flex-basis: 100%; }
.visit-reg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 10px; }
.visit-reg input, .visit-reg select, .visit-odo input { min-height: 46px; font-size: 16px; }
.visit-vin { letter-spacing: .08em; text-transform: uppercase; }
[data-vin-count] { align-self: flex-end; } [data-vin-count].is-ok { color: var(--ok); font-weight: 700; }
.visit-other summary { cursor: pointer; color: var(--brand, var(--info)); font-weight: 600; width: fit-content; }
.visit-fuel { border: 0; padding: 0; margin: 0; } .visit-fuel legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; padding: 0; }
.visit-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
.visit-seg label { position: relative; }
.visit-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.visit-seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 6px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); text-align: center; }
.visit-seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.visit-seg input:focus-visible + span { outline: 2px solid var(--brand, var(--info)); outline-offset: 1px; }
.visit-unit { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); overflow: hidden; max-width: 260px; }
.visit-unit input { border: 0; flex: 1; min-width: 0; background: transparent; } .visit-unit span { padding: 0 14px; color: var(--text-2); font-weight: 600; }
.visit-unit:focus-within { outline: 2px solid var(--brand, var(--info)); outline-offset: 1px; }
.visit-open [aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft); }
.visit-go { min-height: 52px; font-size: 16px; } .visit-go.is-busy { opacity: .75; }
@media (max-width: 640px) {
  .visit-reg, .visit-reg-grid { grid-template-columns: 1fr; padding: 12px; }
  .visit-reg { margin: 0 -4px; }
  .visit-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-unit { max-width: none; }
  .visit-go { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); z-index: 2; box-shadow: var(--shadow); }
}

/* Finishing a visit in the van (owner, 16 Nov 2026) */
.van-finish { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.van-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.van-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: center; position: relative; }
.van-steps li > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 800; font-size: 13px; }
.van-steps li.done > span { background: var(--ok); color: #fff; } .van-steps li.now > span { background: var(--brand, var(--info)); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft, var(--info-soft)); }
.van-steps li.now { color: var(--text); }
.van-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.van-ops li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.van-act { display: flex; flex-wrap: wrap; gap: 8px; } .van-act form { margin: 0; }
.van-form { display: flex; flex-direction: column; gap: 12px; }
.van-form textarea { font-size: 16px; }
.van-due { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.van-due b { font-size: 26px; }
.van-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.van-pay-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.van-pay-row .visit-unit { max-width: none; }
.van-cash-amt { font-size: 22px; }
@media (max-width: 640px) {
  .van-finish { padding: 12px; margin: 0 -4px; }
  .van-pay-row { grid-template-columns: 1fr; }
  .van-act > * { flex: 1 1 100%; } .van-act .btn { width: 100%; justify-content: center; }
}

/* job card files: a preview, open and download (owner, 17 Nov 2026) */
.file-list li { flex-wrap: wrap; }
.file-thumb { width: 52px; height: 52px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-ext { font-size: 12px; font-weight: 800; color: var(--bad); }
.file-name { font-weight: 600; }
@media (max-width: 640px) { .file-list .file-act { display: none; } }
/* approval page (owner, 17 Nov 2026) */
.appr-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; } .appr-head h1 { margin-block-end: 6px; }
.appr-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.appr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; margin-block-end: 14px; }
.appr-money th { font-weight: 500; text-align: start; background: none; white-space: normal; color: var(--text-2); } .appr-money td { white-space: normal; overflow-wrap: anywhere; } .appr-grid > .card { min-width: 0; } .appr-head h1 { overflow-wrap: anywhere; } .appr-money .appr-extra th, .appr-money .appr-extra td { font-weight: 700; border-top: 2px solid var(--line-2); }
.appr-quote { gap: 10px; align-items: center; flex-wrap: wrap; } .appr-quote > svg { color: var(--brand); }
.appr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.appr-reasons { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; } .appr-reasons legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-block-end: 6px; padding: 0; }
.appr-reason input { position: absolute; opacity: 0; } .appr-reason span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 13px; }
.appr-reason input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); } .appr-reason input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 720px) { .appr-actions { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -4px 14px rgb(0 0 0 / .08); } .appr-actions > .btn { flex: 1; } }
/* new purchase order (owner, 17 Nov 2026) */
.po-lines td { vertical-align: top; } .po-lines .po-part input { flex: 1 1 260px; min-width: 0; }
.po-info { color: var(--text-2); margin-block-start: 4px; display: flex; flex-direction: column; gap: 2px; } .po-info b { color: var(--text); }
.po-lines tr.po-dupline td { background: var(--warn-soft); }
.po-sum .facts { margin-block: 8px; }


/* ---- form checks in the app's own look (validate.js, owner 19 Nov 2026) ---- */
.is-invalid, :where(input, select, textarea)[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft); }
.seg.is-invalid, fieldset.is-invalid, label.is-invalid { border-radius: var(--radius-s); }
.fld-msg { display: flex; align-items: flex-start; gap: 7px; margin-block-start: 6px; padding: 7px 10px; border-radius: var(--radius-xs);
  background: var(--bad-soft); color: var(--bad); font-size: 12.5px; font-weight: 600; line-height: 1.4; max-width: 100%;
  animation: sc-msg-in .16s ease-out; }
.fld-msg-ic { flex: 0 0 auto; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--bad); color: var(--surface, #fff); font-size: 11.5px; font-weight: 800; line-height: 1; margin-block-start: 1px; }
.form-msg { display: flex; align-items: center; gap: 8px; margin-block: 10px; padding: 9px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--bad); background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600; }
.form-msg::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bad); color: var(--surface, #fff); font-size: 12px; font-weight: 800; }
td > .fld-msg { margin-block-start: 4px; padding: 5px 8px; }
@keyframes sc-msg-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fld-msg { animation: none; } }

/* error message bar from the server (owner 19 Nov 2026): a light card with a red edge and icon, like the field messages,
   instead of a solid red block; readable in light and dark themes, full width on a phone */
#toast.bad { background: var(--surface); color: var(--text); border: 1px solid var(--bad); border-inline-start-width: 5px;
  padding: 12px 12px 12px 14px; gap: 12px; align-items: flex-start; box-shadow: var(--shadow-lg); font-weight: 600; line-height: 1.45;
  width: max-content; max-width: min(600px, calc(100vw - 32px)); }
#toast.bad::before { content: "!"; flex: 0 0 auto; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bad); color: var(--surface, #fff); font-size: 13px; font-weight: 800; margin-block-start: 1px; }
#toast.bad > span { flex: 1 1 auto; padding-block: 1px; }
#toast.bad .toast-x { background: transparent; color: var(--text-3); min-width: 30px; min-height: 30px; padding: 0; border-radius: 8px; font-size: 20px; }
#toast.bad .toast-x:hover { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 600px) { #toast.bad { width: calc(100vw - 32px); } }

.fld.has-error :where(input:not([type=checkbox]):not([type=radio]), select, textarea) { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft); }
.fld.has-error > label { color: var(--bad); }

/* parts on the estimate: the part search takes the room, qty and button stay beside it (owner 19 Nov 2026) */
.ps-wrap.grow { flex: 1 1 260px; min-width: 200px; display: flex; align-items: center; gap: 6px; }
.ps-wrap.grow > input { flex: 1 1 auto; width: auto; min-width: 0; }
/* an opened panel in a row's actions (parts on the estimate, photos) takes the whole row instead of spilling out (owner 19 Nov 2026) */
td.row-actions { flex-wrap: wrap; }
td.row-actions > details[open] { flex: 1 1 100%; width: 100%; max-width: 100%; white-space: normal; margin-inline-start: 0; }
td.row-actions > details[open] form { flex-wrap: wrap; max-width: 100%; }
td.row-actions > details[open] .ps-wrap.grow { flex: 1 1 100%; min-width: 0; }  /* search on its own line, qty + button below */
@media (min-width: 761px) { td.row-actions > details[open] { width: min(360px, 50vw); min-width: 280px; } }
td.row-actions > details[open] { text-align: start; }

/* ---- a smarter, modern calendar (owner, 19 Nov 2026) ---- */
.dp-pop:not(.dp-time-only) { width: 340px; }
.dp-pop { border-radius: 18px; padding: 14px; box-shadow: 0 18px 50px rgba(20, 23, 28, .18), 0 2px 6px rgba(20, 23, 28, .06); }
.dp-head { gap: 6px; }
.dp-title { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 4px; min-width: 0; }
.dp-ttl { border: 0; background: none; font: inherit; font-size: 16px; font-weight: 750; color: var(--text); padding: 4px 8px; border-radius: 10px; cursor: pointer; }
.dp-ttl:hover { background: var(--brand-soft); color: var(--brand); }
.dp-hijri { flex-basis: 100%; text-align: center; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.dp-nav { width: 36px; height: 36px; border: 0; background: var(--surface-2); color: var(--text-2); display: inline-grid; place-items: center; transition: background .15s, color .15s; }
.dp-nav:hover { background: var(--brand-soft); color: var(--brand); }
.dp-quick { gap: 6px; }
.dp-chip { background: var(--surface); border-color: var(--line-2); font-weight: 600; font-size: 12.5px; padding: 5px 11px; min-height: 30px; transition: all .15s; }
.dp-chip:hover { background: var(--brand-soft); border-color: transparent; }
.dp-grid { gap: 3px; }
.dp-wd { font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; }
.dp-wd.we { color: var(--brand); opacity: .8; }
.dp-day { position: relative; display: grid; place-items: center; border-radius: 12px; font-weight: 550; color: var(--text); transition: background .12s, color .12s, transform .12s; }
.dp-day > span { position: relative; z-index: 1; }
.dp-day.we:not(.sel):not([disabled]) { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.dp-day.other { color: var(--text-3); opacity: .55; font-weight: 450; }
.dp-day:hover:not([disabled]):not(.sel) { background: var(--brand-soft); color: var(--brand); transform: translateY(-1px); }
.dp-day.today { box-shadow: none; font-weight: 800; color: var(--brand); }
.dp-day.today::after { content: ""; position: absolute; inset-block-end: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.dp-day.sel { background: var(--brand); color: var(--on-strong, #fff); box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.dp-day.sel::after { background: var(--on-strong, #fff); }
.dp-day.range { background: var(--brand-soft); border-radius: 6px; }
.dp-day.from { box-shadow: inset 0 0 0 2px var(--brand); }
.dp-day[disabled] { opacity: .3; }
.dp-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; }
.dp-info b { font-weight: 650; color: var(--text); }
.dp-info span { color: var(--text-2); }
.dp-info em { font-style: normal; color: var(--brand); font-weight: 650; margin-inline-start: auto; }
.dp-mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-block: 6px; }
.dp-mcell { min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; transition: all .12s; }
.dp-mcell:hover { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.dp-mcell.today { color: var(--brand); border-color: var(--brand); }
.dp-mcell.sel { background: var(--brand); color: var(--on-strong, #fff); border-color: var(--brand); }
.dp-mcell:focus-visible, .dp-ttl:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dp-slide-next .dp-grid { animation: dp-in-next .2s ease-out; }
.dp-slide-prev .dp-grid { animation: dp-in-prev .2s ease-out; }
@keyframes dp-in-next { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes dp-in-prev { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
[dir=rtl] .dp-slide-next .dp-grid { animation-name: dp-in-prev; } [dir=rtl] .dp-slide-prev .dp-grid { animation-name: dp-in-next; }
.dp-pop:not(.sheet) { animation: dp-pop-in .14s ease-out; }
@keyframes dp-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dp-slide-next .dp-grid, .dp-slide-prev .dp-grid, .dp-pop:not(.sheet) { animation: none; } .dp-day:hover { transform: none; } }

/* ---- Due dates window: one row per document with its state (owner, 19 Nov 2026) ---- */
dialog.dlg-due { width: min(620px, calc(100vw - 24px)); }
.dlg-due .dlg-body { gap: 10px; }
.due-row { display: grid; grid-template-columns: 40px 1fr minmax(200px, 240px); align-items: center; gap: 6px 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.due-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.due-main { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.due-main label { font-weight: 650; font-size: 14px; color: var(--text); }
.due-main .chip { font-size: 12px; }
.due-in { min-width: 0; }
.due-in .dp-field { min-height: 42px; }
.due-sub { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 4px; padding-block-start: 8px; border-block-start: 1px dashed var(--line); }
.due-sub label { font-size: 13px; font-weight: 600; color: var(--text-2); }
@media (max-width: 560px) {
  .due-row { grid-template-columns: 40px 1fr; }
  .due-in, .due-sub { grid-column: 1 / -1; }
}

/* a button whose form is being sent (validate.js): dimmed with a small spinner, no second press */
.btn.is-busy { position: relative; pointer-events: none; opacity: .85; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; margin-inline-start: 8px; border-radius: 50%; border: 2px solid currentColor;
  border-inline-end-color: transparent; display: inline-block; vertical-align: -2px; animation: sc-spin .7s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::after { animation-duration: 2s; } }

/* ---- Hijri mode and the Gregorian / Hijri switch (owner, 19 Nov 2026) ---- */
.dp-cal-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-block-end: 8px; border-radius: 12px; background: var(--surface-2); }
.dp-cal-mode button { border: 0; background: transparent; border-radius: 9px; padding: 6px 8px; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--text-2); cursor: pointer; }
.dp-cal-mode button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 23, 28, .12); }
.dp-hgrid .dp-day { grid-template-rows: 1fr auto; padding-block: 3px; }
.dp-hgrid .dp-day > small { font-size: 9.5px; line-height: 1; color: var(--text-3); font-weight: 500; }
.dp-hgrid .dp-day.sel > small { color: inherit; opacity: .8; }
.dp-hgrid .dp-day.today::after { inset-block-end: 2px; }
.dp-field .dp-htext { margin-inline-start: auto; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* the operation's photos in the technician's Photos sheet (owner, 19 Nov 2026) */
.op-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.op-gallery a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.op-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.op-doc { height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; padding: 6px; color: var(--text-2); text-align: center; }
.op-doc small { font-size: 11px; word-break: break-all; }
/* owner, 19 Nov 2026: the additional-repair quotation shows how its total is made */
.qt-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, rgba(127,127,127,.08)); }
.qt-sum .qt-op { color: var(--text-2); font-weight: 600; }
.qt-sum .qt-total b { font-size: 1.15em; }
#qb-src { margin-block-start: 4px; }
/* owner, 19 Nov 2026: sent messages are shown whole; long links wrap instead of being cut */
.msg-full { min-width: 260px; max-width: 560px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.msg-full a { direction: ltr; unicode-bidi: isolate; }
/* owner, 20 Nov 2026: the parts of an operation (kit) on the operation's screen */
.kit-grp > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; min-height: 40px; }
.kit-grp > summary::-webkit-details-marker { display: none; }
.kit-grp > summary .sp { flex: 1; }
.kit-grp + .kit-grp { border-top: 1px solid var(--line, #e5e7eb); padding-top: 6px; }
.kit-grp[open] > summary { margin-bottom: 6px; }
/* owner, 20 Nov 2026: stock count scope (whole store or a cycle count) */
.cnt-scope { border: 0; padding: 0; margin: 0; } .cnt-scope legend { font-weight: 600; font-size: 13px; color: var(--text-2); margin-block-end: 6px; }
.cnt-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cnt-opts label { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; background: var(--surface); }
.cnt-opts label:has(input:checked) { border-color: var(--accent, #2563eb); background: var(--info-soft); color: var(--info); font-weight: 600; }
.cnt-new [hidden] { display: none !important; }

/* Set-up > WhatsApp (20 Nov 2026) */
.wa-wrap{overflow-wrap:anywhere;padding:6px 8px;background:var(--surface-2,#f4f5f2);border-radius:8px}
.wa-steps{list-style:none;padding:0}
.wa-steps .chip{min-width:28px;justify-content:center}
/* owner, 20 Nov 2026: a value cleared because an earlier choice changed */
.was-cleared select, .was-cleared input { outline: 2px solid var(--warn, #c77700); outline-offset: 1px; transition: outline-color .4s; }

/* owner, 20 Nov 2026: list grids (app.js): sortable column titles, filter / columns / export bar */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: "↕"; opacity: .3; margin-inline-start: 4px; font-size: .85em; }
th.sortable[aria-sort="ascending"]::after { content: "↑"; opacity: .9; }
th.sortable[aria-sort="descending"]::after { content: "↓"; opacity: .9; }
th.sortable:hover, th.sortable:focus-visible { color: var(--accent, inherit); }
.grid-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.grid-bar input[type=search] { flex: 1 1 220px; max-width: 360px; }
.grid-cols { position: relative; }
.grid-cols > summary { list-style: none; }
.grid-cols > summary::-webkit-details-marker { display: none; }
.grid-cols-menu { position: absolute; z-index: 30; inset-inline-start: 0; top: calc(100% + 4px); min-width: 200px; max-height: 320px; overflow: auto;
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
@media print { .grid-bar { display: none; } th.sortable::after { content: none; } }

/* owner, 21 Nov 2026: purchase order page: five steps, the current one highlighted */
.po-progress { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sh-progress { grid-template-columns: repeat(5, minmax(0, 1fr)); } /* 24 Nov 2026: import shipment, five steps */
.jc-progress li.now { color: var(--text); } .jc-progress li.now::before { background: var(--warn); }
.menu form { margin: 0; }

/* owner, 21 Nov 2026: purchasing page: status tiles that filter, tabs, the two reorder choices */
.po-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.po-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.po-tile small { color: var(--text-2); } .po-tile b { font-size: 24px; line-height: 1.2; }
.po-tile:hover { text-decoration: none; border-color: var(--line); } .po-tile.on { border-color: var(--accent, var(--info)); }
.po-tile.bad b { color: var(--bad); }
.po-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--line); }
.po-tabs a { padding: 8px 2px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.po-tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent, var(--info)); }
.po-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.po-choices fieldset { border: 0; padding: 0; margin: 0; }

/* Record form, owner 21 Nov 2026 (master-detail like an order form): actions left, steps right, main card + history beside */
.rec-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block: 6px; border-bottom: 1px solid var(--line); }
.rec-steps { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid var(--line); border-radius: var(--radius-xs); overflow: hidden; }
.rec-steps li { padding: 6px 14px; font-size: 13px; color: var(--text-3); border-inline-start: 1px solid var(--line); white-space: nowrap; }
.rec-steps li:first-child { border-inline-start: 0; }
.rec-steps li.done { color: var(--text-2); }
.rec-steps li.now { background: var(--info-soft); color: var(--info); font-weight: 700; }
.rec-steps li.now.bad { background: var(--bad-soft); color: var(--bad); }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.rec-main { display: flex; flex-direction: column; gap: 6px; }
.rec-no { margin: 0; font-size: 28px; line-height: 1.2; }
.rec-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rec-side { position: sticky; top: calc(var(--top) + 12px); max-height: calc(100vh - var(--top) - 24px); overflow: auto; }
.rec-hist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rec-hist li { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rec-hist li.note { background: var(--warn-soft); border-radius: var(--radius-xs); padding: 8px 10px; border: 0; }
.rec-more { position: relative; } .rec-more > summary { list-style: none; } .rec-more > summary::-webkit-details-marker { display: none; }
.rec-pop { position: absolute; z-index: 20; inset-inline-start: 0; top: calc(100% + 6px); width: 280px; box-shadow: var(--shadow-lg); }
@media (max-width: 1000px) { .rec-grid { grid-template-columns: minmax(0, 1fr); } .rec-side { position: static; max-height: none; } }
@media (max-width: 640px) { .rec-fields { grid-template-columns: minmax(0, 1fr); } .rec-steps li { padding: 6px 8px; font-size: 12px; } }

/* Owner, 21 Nov 2026: the show / hide columns button at the end of every list's title row (as in Odoo) */
.grid-host { position: relative; }
.grid-host > .grid-cols { position: absolute; top: 5px; inset-inline-end: 6px; z-index: 6; }
.grid-host > .grid-cols .grid-cols-menu { inset-inline-start: auto; inset-inline-end: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; }
.grid-cols-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-xs); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.grid-cols-btn:hover, .grid-cols[open] > .grid-cols-btn { color: var(--text); border-color: var(--text-3); }
.grid-cols-btn:focus-visible { box-shadow: var(--ring); outline: none; }
table.tbl th.grid-last { padding-inline-end: 42px; }
@media print { .grid-cols { display: none; } }
table.tbl tr.row-on > td { background: var(--info-soft); }

/* Owner, 21 Nov 2026: searchable lists float on <body>, placed by script next to their field (never cut by a table) */
.combo-list.combo-float { position: fixed; inset: auto; z-index: 75; min-width: 240px; }

/* ---------------------------------------------------------------- job card Operations tab (owner, 21 Nov 2026) */
.ops-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-block-end: 10px; }
.ops-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.ops-tile span { font-size: 12px; color: var(--text-3); }
.ops-tile b { font-size: 18px; }
.ops-tile.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); } .ops-tile.warn b { color: var(--warn); }
.ops-tile.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); } .ops-tile.bad b { color: var(--bad); }
.ops-bar { min-height: 36px; margin-block-end: 8px; gap: 8px; flex-wrap: wrap; }
.ops-bulk { gap: 6px; flex-wrap: wrap; align-items: center; background: var(--info-soft); border-radius: 10px; padding: 4px 10px; }
.ops-bulk[hidden] { display: none; }
.ops-tbl .ops-tick { width: 34px; text-align: center; }
.ops-tbl tr.ops-grp td { background: var(--surface-3); padding-block: 7px; }
.ops-tbl tr.ops-grp input { margin-inline-end: 8px; vertical-align: middle; }
.ops-grp-sum { float: inline-end; }
.ops-tbl tr.ops-add td { padding-block: 4px; border-block-end: 2px solid var(--line); }
.ops-tbl tr.is-picked td { background: var(--info-soft); }
.ops-tbl tfoot td { border-block-start: 2px solid var(--line); }
.ops-name > span:first-child { font-weight: 600; }
.ops-badge { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; vertical-align: middle; }
.ops-badge:hover { color: var(--text); border-color: var(--text-3); }
.ops-badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.ops-tech { background: none; border: 1px dashed transparent; border-radius: 8px; padding: 2px 6px; margin-inline-start: -6px; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.ops-tech:hover { border-color: var(--line); background: var(--surface-2); }
.ops-tech.empty { color: var(--brand); border-color: var(--line); }
dialog.dlg.ops-drawer { margin: 0; margin-inline-start: auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); border-radius: 0; }
dialog.dlg.ops-drawer[open] { display: flex; flex-direction: column; }
dialog.dlg.ops-drawer .dlg-body { flex: 1; overflow-y: auto; }
@media (max-width: 760px) {
  .ops-tbl tr.ops-grp, .ops-tbl tr.ops-add { display: block; }
  .ops-tbl tr.ops-grp td, .ops-tbl tr.ops-add td { display: block; }
  .ops-grp-sum { float: none; display: block; }
  .ops-tbl tfoot { display: none; }
}
/* ---------------------------------------------------------------- transfers: one shipment per branch (owner, 21 Nov 2026) */
.ship-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }
.ship-card { padding: 12px 14px; }
.ship-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ship-list .check { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* cash session: count the notes */
.cash-den { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } .cash-den .fld { gap: 2px; } .cash-den input { min-height: 34px; padding-block: 4px; }
@media (max-width: 640px) { .cash-den { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
[data-cash-note].need label { color: var(--bad); }
.plan-kpi.brand { border-inline-start-color: var(--brand); }

/* ---------------------------------------------------------------- job card Gate pass tab (owner, 21 Nov 2026) */
.gp-status { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
.gp-card { border: 2px solid color-mix(in srgb, var(--info) 55%, var(--line)); padding: 14px; }
.gp-card .row { flex-wrap: wrap; gap: 6px; }
.gp-no { font-size: 20px; font-weight: 700; }
.gp-link { overflow-wrap: anywhere; }
.gp-hist { list-style: none; margin: 8px 0 0; padding: 0; }
.gp-hist li { padding: 6px 0; border-block-start: 1px solid var(--line); flex-wrap: wrap; gap: 6px; }
.gp-card .menu form { margin: 0; }
.gp-card .menu form button { width: 100%; }

.gp-card .menu button > span { display: flex; flex-direction: column; align-items: flex-start; }
.gp-card .menu .menu-why { display: block; font-size: 12px; color: var(--text-3); }

/* ---------------------------------------------------------------- Complaints tab (owner, 21 Nov 2026) */
.cp-head { margin-block-end: 6px; flex-wrap: wrap; gap: 6px; }
.cp-desc { font-size: 15px; font-weight: 600; }
.cp-tags { gap: 4px; margin-block-start: 4px; flex-wrap: wrap; }
.cp-no { width: 32px; font-weight: 700; }
.cp-common { gap: 6px; flex-wrap: wrap; align-items: center; }
.cp-chip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.cp-chip:hover { border-color: var(--text-3); }
.cp-sugg { margin-block-start: 3px; color: var(--info); }
.cp-billto { margin-block-start: 3px; }
table.lines tr.is-saving td { opacity: .6; }
table.lines tr.is-saving td:first-child::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 6px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sc-spin .8s linear infinite; vertical-align: middle; }
table.lines tr.is-saved td { background: var(--ok-soft); transition: background .2s; }


/* planning board: lanes of technicians below the level the dragged operation needs (owner, 21 Nov 2026) */
.plan-board .lane.lane-low { background: repeating-linear-gradient(45deg, var(--warn-soft), var(--warn-soft) 8px, transparent 8px, transparent 16px); }


/* operation photos: a small gallery in the photo window and on the Documents tab (owner, 21 Nov 2026) */
.op-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.op-shot { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text-3); }
.op-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.op-shot:hover img { border-color: var(--brand); }
.op-shot small { font-size: 11px; }
.op-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--text); text-align: center; padding: 6px; }
.op-add { gap: 8px; flex-wrap: wrap; align-items: center; }
.op-work { padding: 10px 14px; }


/* claim review on the approval and claim pages (owner, 21 Nov 2026) */
.cr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cr-box { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.cr-checks { gap: 4px; flex-wrap: wrap; }
.cr-desc { font-size: 16px; font-weight: 600; margin-block-start: 2px; }


/* claims desk (owner, 21 Nov 2026) */
.cl-money { gap: 16px; flex-wrap: wrap; align-items: baseline; }


/* end of day: what is still open, reopen (owner, 21 Nov 2026) */
.eod-open { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.eod-list { margin: 4px 0 0; padding-inline-start: 18px; }
.eod-reopen { gap: 8px; flex: 1; min-width: 260px; }


/* warranty badge in the job card header (owner, 21 Nov 2026) */
.wty-chip { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }

.wty-chip { white-space: normal; height: auto; line-height: 1.3; padding-block: 4px; }
/* owner, 21 Nov 2026: Campaigns page - guide, filters, rows with period bar, uses and revenue */
.cmp-guide { display: grid; gap: 10px; }
.cmp-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.cmp-steps li span { display: block; font-size: 13px; color: var(--text-2); }
.cmp-steps li.done b { text-decoration: line-through; color: var(--text-3); }
.cmp-guide .btn { justify-self: start; }
.cmp-sec { display: grid; gap: 2px; }
.cmp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-block-end: 6px; }
.cmp-head h2 { font-size: 16px; margin-inline-end: 8px; }
.cmp-f { font-size: 13px; padding: 3px 10px; border-radius: 999px; color: var(--text-2); }
.cmp-f.on { background: var(--mute-soft); color: var(--text); font-weight: 600; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(110px, .8fr) minmax(0, 1.2fr) 70px 100px; gap: 12px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--line); color: var(--text); font-size: 13.5px; }
a.cmp-row:hover { background: var(--mute-soft); text-decoration: none; }
.cmp-row-h { border-top: 0; padding-block: 2px; }
.cmp-row .r { text-align: end; }
.cmp-row .d-block { display: block; }
.cmp-pkg { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) 90px 90px minmax(80px, .6fr); }
.cmp-bar { display: block; height: 4px; border-radius: 2px; background: var(--mute-soft); margin-block-start: 4px; max-width: 220px; }
.cmp-bar i { display: block; width: 0; height: 4px; border-radius: 2px; background: var(--info); }
@media (max-width: 720px) {
  .cmp-row, .cmp-pkg { grid-template-columns: minmax(0, 1fr) auto; }
  .cmp-row > :nth-child(n+3) { grid-column: 1 / -1; text-align: start; }
  .cmp-row-h { display: none; }
}

/* owner, 21 Nov 2026: campaign page - stepper, checklist, rules as chips, lists to tick */
.cmp-top { display: grid; gap: 10px; }
.cmp-stepper { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.cmp-stepper li { font-size: 12.5px; padding: 3px 12px; border-radius: 999px; background: var(--mute-soft); color: var(--text-2); }
.cmp-stepper li.on { background: var(--info-soft); color: var(--info); font-weight: 600; }
.cmp-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; }
.cmp-checks li { display: flex; gap: 8px; align-items: center; }
.cmp-checks li.ok svg { color: var(--ok); } .cmp-checks li.bad svg { color: var(--bad); } .cmp-checks li.warn svg { color: var(--warn); }
.cmp-checks li.bad { font-weight: 600; }
.cmp-block { display: grid; gap: 10px; }
.cmp-big { font-size: 22px; line-height: 1; }
.cmp-rule { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 10px; align-items: center; padding-block: 8px; border-top: 1px solid var(--line); }
.cmp-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; margin: 2px; border: 1px solid var(--line-2, var(--line)); border-radius: 999px; font-size: 13px; }
.cmp-chip.ex { border-color: var(--bad); color: var(--bad); }
.cmp-chip form.inline { display: inline; }
.cmp-x { border: 0; background: none; padding: 2px; cursor: pointer; color: inherit; display: inline-grid; place-items: center; border-radius: 999px; }
.cmp-x:hover { background: var(--mute-soft); } .cmp-x svg { width: 14px; height: 14px; }
.cmp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.cmp-filter { margin-block-end: 6px; }
dialog.dlg.dlg-wide { width: min(820px, calc(100vw - 24px)); }
@media (max-width: 640px) { .cmp-rule { grid-template-columns: 1fr; gap: 4px; } }

/* owner, 21 Nov 2026: loan car terms and follow-up on the board */
.lc-terms { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-block: 6px; }
.lc-terms form.inline { display: inline; }

/* owner, 21 Nov 2026: ready-made packages - package page totals, makes, and the offers on the complaints tab */
.pkg-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 8px 0 0; justify-items: end; font-size: 14px; }
.pkg-tot dt { color: var(--text-2); } .pkg-tot dd { margin: 0; min-width: 110px; text-align: end; }
.pkg-tot .pkg-price { font-size: 18px; font-weight: 700; color: var(--text); }
.pkg-makes { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pkg-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; }
.cp-packages .cp-pkg { border-color: var(--info); }

/* owner, 22 Nov 2026: fleet customer page - actions, ageing bar */
.fl-sec { display: grid; gap: 8px; }
.fl-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-block: 8px; border-top: 1px solid var(--line); font-size: 13.5px; }
.fl-age { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--mute-soft); }
.fl-age i { display: block; width: 0; height: 10px; }
.fl-age .age-1, .fl-age-l.age-1::before { background: var(--ok); } .fl-age .age-2, .fl-age-l.age-2::before { background: var(--warn); }
.fl-age .age-3, .fl-age-l.age-3::before { background: #e07b39; } .fl-age .age-4, .fl-age-l.age-4::before { background: var(--bad); }
.fl-age .age-5, .fl-age-l.age-5::before { background: #7a1f1f; }
.fl-age-l { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 16px; }
.fl-age-l::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.po-tile.warn b { color: var(--warn); } .po-tile.bad small + b { color: var(--text); }

/* owner, 22 Nov 2026: the answer to a technician's Start / Pause / Complete, under the pressed button */
.offline-note { margin-block-start: 8px; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.offline-note.muted { padding: 0; font-weight: 400; }
.offline-note.warn { background: var(--warn-soft); color: var(--warn); }
.offline-note.bad { background: var(--bad-soft); color: var(--bad); }
/* Phase 2c, 23 Nov 2026: the shared list (templates/web/_list.html) */
.lv-sf { border: 0; border-inline-start: 1px solid var(--line); background: none; min-height: 34px; max-width: 170px; color: var(--text-2); font-size: 13px; }
.lv-chip.lv-filter { background: var(--brand-soft); color: var(--brand); } .lv-chip.lv-group { background: var(--surface-2, var(--surface-3)); font-weight: 600; } .lv-chip.lv-cond { border-style: dashed; }
.lv-tbl th a { color: inherit; text-decoration: none; } .lv-tbl th a:hover { text-decoration: underline; }
.lv-row[data-href] { cursor: pointer; } .lv-row[data-href]:hover td { background: var(--surface-3); }
.lv-ghead th, .lv-ghead td { background: var(--surface-3); font-weight: 700; }
.lv-ghead a, .lv-gsub a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.lv-gsub th { padding-inline-start: 34px; font-weight: 600; }
[data-lv-open][aria-expanded="true"] svg { transform: rotate(90deg); } [dir="rtl"] [data-lv-open][aria-expanded="true"] svg { transform: rotate(-90deg); }
.lv-open > td { padding: 0 0 8px; background: var(--surface); } .lv-inner { margin: 0; font-size: 13.5px; }
.lv-more td { text-align: center; }
.lv-tbl tfoot td, .lv-tbl tfoot th { border-block-start: 2px solid var(--line-2); }
/* Phase 2c: the shared list's tick column and the buttons over the ticked rows */
.lv-tbl .lv-tick { width: 2.25rem; text-align: center; }
.lv-act { gap: .5rem; align-items: center; margin-block: .5rem; }
.lv-acts { white-space: nowrap; text-align: end; }
/* Phase 2c: financial statements (templates/ledger/report.html) */
.rp-form { gap: .75rem; align-items: flex-end; }
.rp-form .fld { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; }
.rp-tbl th[scope="rowgroup"] { text-align: start; padding-block-start: 1rem; font-size: .95rem; }
.rp-tbl .rp-l1 { padding-inline-start: 1.5rem; font-weight: 400; }
.rp-tbl tr.rp-total th, .rp-tbl tr.rp-total td { font-weight: 600; border-block-start: 1px solid var(--line-2); }
.rp-tbl tr.rp-grand th, .rp-tbl tr.rp-grand td { font-weight: 700; border-block-start: 2px solid var(--line-2); background: var(--bg-2, transparent); }
.rp-tbl td a { color: inherit; text-decoration: none; } .rp-tbl td a:hover { text-decoration: underline; }
/* Phase 2c: manual journal lines (templates/ledger/journal.html): the account wide, the amounts narrow */
.jr-lines td.jr-acc { min-width: 16rem; }
.jr-lines td.jr-memo { min-width: 9rem; }
.jr-lines td.jr-party { min-width: 11rem; }
.jr-lines td.jr-acc > *, .jr-lines td.jr-memo > *, .jr-lines td.jr-party > * { width: 100%; }
.jr-lines td.jr-br select { max-width: 9rem; }
.jr-lines input[type="number"] { width: 7.5rem; text-align: end; }/* Phase 2c: bank reconciliation (templates/ledger/bank_account.html) */
.ba-line { border-block-start: 1px solid var(--line-2); padding-block: .75rem; display: grid; gap: .5rem; }
.ba-line:first-of-type { border-block-start: 0; }
.ba-do { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; padding-inline-start: 1rem; }
.ba-match label { align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.ba-book { align-items: flex-end; gap: .5rem; flex-wrap: wrap; }
.ba-book label { display: flex; flex-direction: column; gap: .25rem; min-width: 14rem; }
@media (max-width: 900px) { .ba-do { grid-template-columns: 1fr; padding-inline-start: 0; } }
/* Phase 2c: chart of accounts groups in the statements */
.rp-tbl .rp-l2 { padding-inline-start: 2.5rem; font-weight: 400; }
.rp-tbl .rp-l3 { padding-inline-start: 3.5rem; font-weight: 400; }
.rp-tbl .rp-l4 { padding-inline-start: 4.5rem; font-weight: 400; }
.rp-tbl tr.rp-subhead th { font-weight: 600; font-size: .9rem; padding-block-start: .6rem; }
.rp-tbl tr.rp-subtotal th, .rp-tbl tr.rp-subtotal td { font-weight: 600; font-style: italic; border-block-start: 1px dashed var(--line-2); }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.num-sm { width: 5.5rem; }

/* Phase 2h, 24 Nov 2026: the finance overview (templates/ledger/overview.html); series colours validated blue/orange pair */
:root { --fo-in: #2a78d6; --fo-out: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fo-in: #3987e5; --fo-out: #d95926; } }
:root[data-theme="dark"] { --fo-in: #3987e5; --fo-out: #d95926; }
.fo-alerts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.fo-alerts .banner a { margin-inline-start: auto; font-weight: 600; }
.fo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.fo-wide { grid-column: 1 / -1; }
.fo-big { font-size: 1.7rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.fo-mini { width: 100%; border-collapse: collapse; font-size: .9rem; }
.fo-mini th, .fo-mini td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.fo-mini tbody th { font-weight: 500; }
.fo-mini thead th { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.fo-mini tfoot th, .fo-mini tfoot td { font-weight: 600; border-bottom: 0; }
.fo-mini .r { text-align: end; } .fo-sub { display: block; font-weight: 400; } .fo-mini .chip { white-space: nowrap; }
.fo-facts { display: grid; gap: 4px; margin: 0; }
.fo-facts div { display: flex; justify-content: space-between; gap: 8px; }
.fo-facts dt { color: var(--text-2); } .fo-facts dd { margin: 0; }
.fo-legend { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; font-size: .85rem; color: var(--text-2); }
.fo-legend li { display: flex; align-items: center; gap: 6px; }
.fo-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fo-in { background: var(--fo-in); } .fo-out { background: var(--fo-out); }
.fo-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 190px; padding-top: 8px; }
.fo-col { display: flex; flex-direction: column; min-width: 0; }
.fo-bars { flex: 1; width: 100%; border-bottom: 1px solid var(--line-2); overflow: visible; }
svg.fo-bars .fo-in { fill: var(--fo-in); } svg.fo-bars .fo-out { fill: var(--fo-out); }
svg.fo-bars rect:hover { stroke: var(--text); stroke-width: 2; }
.fo-lbl { text-align: center; padding-top: 4px; }
@media (forced-colors: active) { .fo-bars, .fo-key { forced-color-adjust: none; } }

/* ============================================================ bin map (owner, 25 Nov 2026; mock-up QA/mockups/Bins-map.html) */
.bm-tools form { margin: 0; } .bm-tools input[name="q"] { min-width: 220px; }
.bm-seg { margin: 0; } .bm-seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.bm-lay { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.bm-floor { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 16px; border: 2px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); }
.bm-zone { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 2px dashed var(--warn); border-radius: var(--radius-s); background: var(--warn-soft); }
.bm-zone h3 { margin: 0; font-size: 13px; }
.bm-zone.drop-on, .bm-bin.drop-on { outline: 3px dashed var(--brand); outline-offset: 2px; }
.bm-aisles { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.bm-aisle { display: flex; flex-direction: column; gap: 6px; } .bm-aisle > b { font-size: 12px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; }
.bm-racks { display: flex; flex-wrap: wrap; gap: 12px; }
.bm-rack { display: flex; flex-direction: column; gap: 5px; width: 132px; padding: 5px; border-radius: 9px; background: var(--surface-3); }
.bm-rack > small { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-2); }
.bm-bin { display: flex; flex-direction: column; justify-content: space-between; min-height: 56px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 12px; }
.bm-bin:hover { border-color: var(--brand); } .bm-code { font-weight: 700; } .bm-q { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-bin.f1, .bm-legend i.f1 { background: var(--ok-soft); } .bm-bin.f2, .bm-legend i.f2 { background: color-mix(in srgb, var(--ok) 28%, var(--surface)); }
.bm-bin.f3, .bm-legend i.f3 { background: color-mix(in srgb, var(--ok) 45%, var(--surface)); }
.bm-bin.hit, .bm-item.hit, .bm-legend i.hit { outline: 3px solid var(--brand); outline-offset: 1px; }
.bm-bin.dim { opacity: .4; } .bm-bin.sel { outline: 3px solid var(--text); outline-offset: 1px; }
.bm-others { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line-2); } .bm-others .bm-bin { width: 132px; }
.bm-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--text-2); }
.bm-legend i { display: inline-block; width: 14px; height: 14px; margin-inline-end: 5px; vertical-align: -2px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); }
.bm-item { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.bm-item[draggable="true"] { cursor: grab; } .bm-grip { color: var(--text-3); }
.bm-panel { position: sticky; top: calc(var(--top, 64px) + 8px); }
.bl-body { background: #fff; } .bl-bar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.bl-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 4mm; padding: 8mm; }
.bl-label { display: flex; gap: 4mm; align-items: center; padding: 3mm; border: 1px dashed #999; break-inside: avoid; }
.bl-qr svg { width: 24mm; height: 24mm; display: block; } .bl-code { font: 700 20pt/1.1 var(--mono-font, monospace); } .bl-wh { color: #555; font-size: 9pt; }
@media (max-width: 900px) { .bm-lay { grid-template-columns: 1fr; } .bm-panel { position: static; } .bm-floor { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .bm-aisle, .bm-aisles { width: 100%; } .bm-rack, .bm-others .bm-bin { width: calc(50% - 6px); } .bm-tools input[name="q"] { min-width: 0; flex: 1; } }
@media print { .bl-sheet { padding: 0; } }
/* Receive goods (owner, 25 Nov 2026): one block per line, the counts on one row and its checks in a strip under it */
.rg { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.rg [hidden] { display: none !important; }
.rg-head, .rg-main { display: grid; grid-template-columns: 28px minmax(180px, 1.6fr) 96px 100px 140px 100px 120px; gap: 12px; align-items: start; padding: 8px 14px; }
.rg-head { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text-3); align-items: end; }
.rg .r { text-align: end; }
.rg-line { border-bottom: 1px solid var(--line); } .rg-line:last-child { border-bottom: 0; }
.rg-main { padding-block: 12px; }
.rg-main input, .rg-main select { width: 100%; }
.rg-main input { text-align: end; }
.rg-n { color: var(--text-3); font-weight: 600; padding-top: 8px; }
.rg-part { padding-top: 4px; } .rg-part > div { font-size: 12.5px; color: var(--text-3); }
.rg-left { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 6px; }
.rg-left small { font-size: 12px; color: var(--text-3); font-weight: 500; }
.rg-l { display: none; }
.rg-checks { margin: 0 14px 12px 54px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); padding: 10px 12px; }
.rg-ch { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.rg-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; align-items: start; }
.rg-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.rg-f input, .rg-f select, .rg-f textarea { width: 100%; font-weight: 400; }
.rg-f input.num { text-align: end; }
.rg-f .hint { font-weight: 400; font-size: 11.5px; line-height: 1.3; }
.rg-f .err { font-size: 11.5px; }
.rg-f.wide { grid-column: span 2; }
.rg-f > span:first-child { min-height: 2.7em; display: flex; align-items: flex-end; gap: 0; line-height: 1.35; }  /* labels of one or two lines: the inputs stay level */
.rg-f.bad :where(input, select) { border-color: var(--bad); background: var(--bad-soft); }
.rg-foot { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) {
  .rg-head { display: none; }
  .rg-main { grid-template-columns: 1fr 1fr; padding: 12px; }
  .rg-n { display: none; } .rg-part { grid-column: 1 / -1; }
  .rg-cell { display: flex; flex-direction: column; gap: 4px; }
  .rg-l { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
  .rg .r { text-align: start; }
  .rg-checks { margin: 0 12px 12px; }
  .rg-f.wide { grid-column: auto; }
}
/* PO quantities (owner, 25 Nov 2026): each part from ordered to billed */
.qf { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.qf-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(6, minmax(76px, .6fr)); border-bottom: 1px solid var(--line); }
.qf-row:last-child { border-bottom: 0; }
.qf-head { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-3); }
.qf-head > div { padding: 8px 10px; }
.qf-step { display: flex; flex-direction: column; gap: 2px; }
.qf-step small { font-weight: 400; font-size: 11px; line-height: 1.25; }
.qf-part { padding: 12px 10px; } .qf-part > div { font-size: 12.5px; color: var(--text-3); }
.qf-n { padding: 12px 10px; text-align: center; position: relative; border-inline-start: 1px solid var(--line); }
.qf-n b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.qf-n span, .qf-n a { display: block; font-size: 11.5px; color: var(--text-3); }
.qf-n a { color: var(--link); }
.qf-n.bad b { color: var(--bad); } .qf-n.warn b { color: var(--warn); } .qf-n.ok b { color: var(--ok); } .qf-n.na b { color: var(--line-2); }
.qf-n:not(:last-child)::after { content: "›"; position: absolute; inset-inline-end: -6px; top: 18px; color: var(--line-2); font-size: 16px; z-index: 1; }
:root:lang(ar) .qf-n:not(:last-child)::after { content: "‹"; }
.qf-bar { grid-column: 1 / -1; padding: 0 10px 12px; min-width: 0; }
.qf-track { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.qf-track i { display: block; width: 0; } .qf-track .p { background: var(--ok); } .qf-track .w { background: #e0a640; } .qf-track .t { background: var(--surface-3); }
.qf-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.qf-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.qf-legend .p::before { background: var(--ok); } .qf-legend .w::before { background: #e0a640; } .qf-legend .t::before { background: var(--surface-3); border: 1px solid var(--line-2); } .qf-legend .d::before { background: var(--bad); }
.qf-dl { margin-top: 8px; font-size: 12.5px; } .qf-dl td { white-space: nowrap; }
.claim-from { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 760px) {
  .qf-head { display: none; }
  .qf-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qf-part { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .qf-n { border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .qf-n::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin-bottom: 2px; }
  .qf-n:not(:last-child)::after { content: none; }
  .qf-bar { padding-top: 10px; }
}
/* Bin map photos and part card (owner, 25 Nov 2026) */
.bm-sw { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.bm-sw i { position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); transition: background .15s; }
.bm-sw i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.bm-sw[aria-checked="true"] i { background: var(--ok); } .bm-sw[aria-checked="true"] i::after { inset-inline-start: 16px; }
.bm-th { display: none; flex: none; width: 38px; height: 38px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.bm-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-th.sm { width: 26px; height: 26px; border-radius: 6px; margin: 3px 0; }
.bm-panel .bm-th, .ph-on .bm-th { display: block; }
.bm-it { display: flex; flex-direction: column; min-width: 0; flex: 1; } .bm-it > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-nm { display: none; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-on .bm-nm { display: block; }
.ph-on.bm-floor { grid-template-columns: 250px minmax(0, 1fr); }
.bm-info { flex: none; border: 0; background: none; color: var(--link); font-weight: 700; font-size: 15px; cursor: pointer; padding: 2px 5px; border-radius: 6px; }
.bm-info:hover, .bm-info:focus-visible { background: var(--brand-soft); }
.bm-peek-code { font-size: 16px; }
.bm-peek-ph { margin: 10px 0 6px; border-radius: var(--radius-s); background: var(--surface-3); aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; }
.bm-peek-ph img { width: 100%; height: 100%; object-fit: contain; }
.bm-peek-none { aspect-ratio: 5 / 2; gap: 4px; align-content: center; }
.bm-peek-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.bm-peek-thumbs button { width: 46px; height: 46px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--surface-3); cursor: pointer; }
.bm-peek-thumbs button[aria-current="true"] { border-color: var(--brand); }
.bm-peek-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.bm-peek-flags { gap: 6px; flex-wrap: wrap; }
.bm-peek-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 10px 0; font-size: 13px; }
.bm-peek-dl dt { color: var(--text-3); } .bm-peek-dl dd { margin: 0; overflow-wrap: anywhere; }
.bm-peek-where { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.bm-peek-where > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
@media (max-width: 900px) {

  .ph-on.bm-floor { grid-template-columns: 1fr; }
}
.bm-sheet { position: fixed; inset: auto 0 0 0; z-index: 200; max-height: 82vh; overflow: auto; margin: 0; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.bm-sheet[hidden] { display: none; }
/* A side panel that can be hidden (owner, 25 Nov 2026): hidden, it shrinks to a slim strip with its title and "Show" */
.side-head { gap: 8px; }
.grid.side-off { grid-template-columns: minmax(0, 1fr) auto; }
.side-off > .side-panel { padding: 10px 8px; align-self: start; }
.side-off > .side-panel > :not(.side-head) { display: none; }
.side-off > .side-panel .side-head { flex-direction: column; align-items: center; }
.side-off > .side-panel .side-head .sp { display: none; }
.side-off > .side-panel .side-head h2, .side-off > .side-panel [data-side-toggle] { writing-mode: vertical-rl; font-size: 14px; }
.side-off > .side-panel [data-side-toggle] { padding: 10px 4px; font-size: 12.5px; }
@media (max-width: 760px) {
  .grid.side-off { grid-template-columns: minmax(0, 1fr); }
  .side-off > .side-panel .side-head { flex-direction: row; }
  .side-off > .side-panel .side-head h2, .side-off > .side-panel [data-side-toggle] { writing-mode: horizontal-tb; padding: 4px 10px; }
  .side-off > .side-panel .side-head .sp { display: block; }
}
/* Loan car from the job card (owner, 25 Nov 2026) */
.ap-hit.lc-hit { flex-direction: row; align-items: center; width: 100%; gap: 10px; }
.lc-hit .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-stage { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.lc-found { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.lc-none { padding: 10px; border: 1px dashed var(--line-2); border-radius: var(--radius-s); color: var(--text-2); margin: 0; }
.lc-picked [data-picked-text] { display: flex; flex-direction: column; gap: 2px; }
/* owner, 25 Nov 2026: in the drawer each date has the full width (four columns cut it to "W. Juma...", two still cut the day and the Hijri date) */
.lc-new .form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* Job card board (owner, 25 Nov 2026): fits the screen, columns scroll on their own, stage strip, fold, compact, list */
.kb [hidden] { display: none !important; }
.kb-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.kb-switch button { border: 0; background: none; padding: 6px 11px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.kb-switch button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink, #fff); }
.kb-jump { position: sticky; top: var(--top, 0px); z-index: 4; background: var(--bg); display: flex; gap: 6px; align-items: center; padding: 6px 0 8px; overflow-x: auto; scrollbar-width: thin; }
.kb-jump button { flex: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.kb-jump button b { color: var(--text); font-variant-numeric: tabular-nums; }
.kb-jump button.empty { opacity: .55; }
.kb-late { background: var(--bad-soft); color: var(--bad); border-radius: 6px; padding: 0 5px; font-size: 11px; }
.kb-arrows { margin-inline-start: auto; display: flex; gap: 4px; flex: none; }
.kb .kanban { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; align-items: stretch; padding-block-end: 8px; scroll-snap-type: x proximity; }
.kb .kcol { flex: 0 0 276px; min-height: 0; padding: 0; gap: 0; scroll-snap-align: start; overflow: hidden; }
.kb .kcol-h { position: relative; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); }
.kb .kcol-h h3 { margin: 0; padding-inline-end: 26px; }
.kb .kcol-sum { margin: 2px 0 0; }
.kb-fold { position: absolute; inset-inline-end: 6px; top: 7px; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 14px; padding: 2px 5px; border-radius: 6px; }
.kb-fold:hover { background: var(--surface); }
.kb .kcol-cards { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.kb .kcol.folded { flex-basis: 46px; cursor: pointer; }
.kb .kcol.folded .kcol-cards, .kb .kcol.folded .kcol-sum, .kb .kcol.folded .kb-fold { display: none; }
.kb .kcol.folded .kcol-h { writing-mode: vertical-rl; border: 0; height: 100%; padding: 12px 8px; }
.kb .kcol.folded .kcol-h h3 { padding: 0; gap: 8px; justify-content: flex-start; }
.kb .kcol.kb-flash { outline: 3px solid var(--brand); outline-offset: -3px; }
.kb .kcard { border-inline-start: 4px solid transparent; flex: none; }
.kb .kcard.e-late { border-inline-start-color: var(--bad); }
.kb .kcard.e-wait { border-inline-start-color: var(--warn); }
.kb-none { margin: 4px; } .kb-more { display: block; text-align: center; padding: 4px; }
.kb.compact .kcol { flex-basis: 236px; }
.kb.compact .kcard { padding: 6px 9px; gap: 3px; }
.kb.compact .kcard .kc-who, .kb.compact .kcard .kc-prom { display: none; }
.kb-list tr.e-late td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.kb-list tr.e-wait td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
@media (max-width: 760px) {
  .kb .kanban { flex-direction: column; overflow: visible; height: auto !important; }
  .kb .kcol, .kb.compact .kcol { flex-basis: auto; }
  .kb .kcol-cards { overflow: visible; }
  .kb .kcol.folded { flex-basis: auto; }
  .kb .kcol.folded .kcol-h { writing-mode: horizontal-tb; height: auto; }
  .kb-arrows { display: none; }
}
/* Loan car walk-around (owner, 25 Nov 2026) */
.lc-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.lc-slot { display: flex; gap: 6px; border: 1px dashed var(--line-2); border-radius: var(--radius-s); padding: 6px; background: var(--surface-2); }
.lc-slot.ok { border-style: solid; border-color: var(--ok); }
.lc-now, .lc-was { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; font-size: 12.5px; }
.lc-was { opacity: .85; border-inline-end: 1px dashed var(--line-2); padding-inline-end: 6px; }
.lc-now img, .lc-was img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.lc-plus { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--surface-3); color: var(--link); font-size: 22px; }
.lc-slot-form { margin: 0; }
.lc-more img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.lc-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.lc-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.lc-item.bad { border-color: var(--bad); background: var(--bad-soft); }
.lc-yn { display: inline-flex; } .lc-yn label { cursor: pointer; } .lc-yn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lc-yn span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); margin-inline-start: -1px; font-size: 13px; font-weight: 600; }
.lc-yn label:first-child span { border-start-start-radius: var(--radius-s); border-end-start-radius: var(--radius-s); } .lc-yn label:last-child span { border-start-end-radius: var(--radius-s); border-end-end-radius: var(--radius-s); }
.lc-yn input[value="yes"]:checked + span { background: var(--ok); color: var(--on-strong); border-color: var(--ok); } .lc-yn input[value="no"]:checked + span { background: var(--bad); color: var(--on-strong); border-color: var(--bad); }
.lc-yn input:focus-visible + span { outline: 2px solid var(--brand); }

/* owner, 25 Nov 2026: the card a loan bar opens (mock-up QA/mockups/LoanCar-bar-card.html) */
.lc-bar { cursor: pointer; } .lc-bar[aria-current="true"] { box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 4px var(--brand); }
.lc-pop { position: absolute; z-index: 150; width: min(400px, calc(100vw - 24px)); max-height: min(80vh, 640px); overflow: auto; padding: 14px 16px; box-shadow: var(--shadow-lg); }
.lc-pop[hidden], .lc-pop-shade[hidden] { display: none; }
.lc-pop.sheet { position: fixed; inset: auto 0 0 0; width: auto; max-height: 82vh; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 200; }
.lc-pop-shade { position: fixed; inset: 0; background: rgb(0 0 0 / .4); z-index: 199; }
.lc-card h3 { font-size: 16px; } .lc-card-h { align-items: flex-start; gap: 8px; }
.lc-card-sec { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.lc-card-sec h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.lc-kv { display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px; margin: 0; font-size: 13px; } .lc-kv dt { color: var(--text-3); } .lc-kv dd { margin: 0; min-width: 0; }
.lc-kv dd .btn { min-height: 28px; padding: 0 8px; }
.lc-card-qr { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .lc-card-qr svg { width: 84px; height: 84px; flex: none; }
.lc-card-btns { gap: 6px; margin-top: 12px; flex-wrap: wrap; } .lc-card-btns form { margin: 0; }
.lc-kv dd.lc-tel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; } .lc-tel .num { margin-inline-end: 4px; }
/* owner, 25 Nov 2026: the customer's evaluation on the tracking page */
.pt-stars { gap: 4px; align-items: center; font-size: 26px; } .pt-star { color: var(--line-2); } .pt-star.on { color: #e3a33b; } .pt-stars b { font-size: 16px; margin-inline-start: 8px; }
/* Owner, 26 Nov 2026: the Accounting panel at the bottom of documents */
.doc-acc > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-acc > summary::-webkit-details-marker { display: none; }
.doc-acc > summary h2::before { content: "▸ "; color: var(--text-3); } .doc-acc[open] > summary h2::before { content: "▾ "; }
.doc-acc[open] > summary { margin-block-end: 12px; }
.doc-acc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-block-end: 12px; }
.doc-acc-kpis > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.doc-acc-kpis .l { color: var(--text-3); font-size: 12.5px; font-weight: 600; } .doc-acc-kpis b { font-size: 18px; }
.doc-acc-ent td { background: var(--surface-2, #f7f9fc); font-weight: 600; }
.doc-acc-net { margin-block: 10px; }
.doc-acc-tbl { min-width: 560px; }
/* Owner, 26 Nov 2026: saved replies (list + one open reply, placeholder buttons, preview) */
.sr-grid { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 14px; align-items: start; }
.sr-grid > * { min-width: 0; }
@media (max-width: 860px) { .sr-grid { grid-template-columns: minmax(0, 1fr); } }
.sr-rows { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.sr-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; border: 1px solid transparent; min-width: 0; }
.sr-row:hover { background: var(--surface-2); } .sr-row.on { background: var(--brand-soft); border-color: var(--line-2); }
.sr-row.dragging { opacity: .5; }
.sr-row > a { flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.sr-row b { display: block; } .sr-row small { display: block; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-grip { color: var(--text-3); cursor: grab; user-select: none; padding-top: 2px; }
.sr-move { display: flex; gap: 2px; } .sr-move .btn { min-height: 28px; padding: 2px 6px; }
@media (pointer: fine) { .sr-move { visibility: hidden; } .sr-row:hover .sr-move, .sr-row:focus-within .sr-move { visibility: visible; } }
.sr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 700px) { .sr-two { grid-template-columns: 1fr; } }
.sr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sr-chip { border: 1px dashed var(--line-2); background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.sr-chip small { color: var(--text-3); }
.sr-warn { margin-top: 6px; font-size: 12.5px; }
.sr-phone { background: var(--surface-3); border-radius: 14px; padding: 12px; display: grid; gap: 8px; margin-top: 6px; }
.sr-bubble { background: var(--ok-soft); border-radius: 14px 14px 14px 4px; padding: 10px 12px; max-width: 420px; white-space: pre-wrap; }
.sr-bubble.ar { margin-inline-start: auto; border-radius: 14px 14px 4px 14px; }
/* Owner, 26 Nov 2026: a model's option set editor */
.os-ghead { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.os-teams { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.os-teams legend { float: left; margin-inline-end: 8px; color: var(--text-3); }
.os-rows input { width: 100%; }
.os-rows td:last-child, .os-rows th:last-child { width: 40px; text-align: center; }
.os-copy { flex-wrap: wrap; align-items: center; gap: 8px; } .os-copy select { min-width: 220px; }
.mk-opts { font-size: 12px; margin-inline-start: 6px; }
.os-teams label { display: inline-flex; gap: 4px; align-items: center; font-weight: 400; margin: 0; }
.os-ghead > .fld { flex: 1 1 240px; min-width: min(100%, 240px); }
.os-ghead > .fld input { width: 100%; }
@media (max-width: 600px) { .os-rows td { padding-inline: 4px; } .os-rows td:first-child { width: 42%; } }
/* owner, 26 Nov 2026: Fit to screen: the hours share the space shown, no sideways scroll (Wide view still widens the page) */
html.plan-fit .plan-board, html.plan-fit.plan-wide .plan-board { min-width: 0; }
html.plan-fit .plan-board .hd:not(.hd-tech) { font-size: 11px; padding-inline: 2px; overflow: hidden; text-overflow: clip; white-space: nowrap; }
html.plan-fit .plan-board .bar { font-size: 11px; }
[data-plan-fit][aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.plan-views { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* owner, 26 Nov 2026: every target card in the same order and at the same heights (name, state, value, bar, caption), so the
   values and bars line up across the row whatever the length of the name */
.tg-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name edit" "state state"; align-items: start; gap: 6px 8px; }
.tg-top .tg-name { grid-area: name; min-height: 2.7em; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tg-top .tg-edit { grid-area: edit; }
.tg-top .tg-state { grid-area: state; justify-self: start; }
.tg-top:not(:has(.tg-state))::after { content: ""; grid-area: state; height: 24px; }
.tg-card .meter { width: 100%; }
.tg-card > .small { margin-top: auto; }
/* owner, 26 Nov 2026: parts on the estimate, found by name */
.ops-drawer:has(.ep) { width: min(720px, 100vw); }
.ep-sec { font-weight: 700; font-size: 12.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.ep-kit { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-kitbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 10px; text-align: start; cursor: pointer; font: inherit; min-width: 160px; color: var(--text); }
.ep-kitbtn b { display: block; } .ep-kitbtn small { color: var(--text-3); }
.ep-kitbtn.added { background: var(--ok-soft); border-color: var(--ok); }
.ep-q { width: 100%; }
.ep-cats { display: flex; flex-wrap: wrap; gap: 6px; } .ep-cat.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.ep-res { border: 1px solid var(--line); border-radius: 12px; max-height: 340px; overflow: auto; }
.ep-res > .small { padding: 10px 12px; }
.ep-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.ep-row:first-child { border-top: 0; }
.ep-row img, .ep-ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--text-3); }
.ep-nm b { display: block; } .ep-nm small { display: block; }
.ep-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } .ep-tags .chip { font-size: 11.5px; }
.ep-add { display: flex; gap: 6px; align-items: center; } .ep-add-q { width: 54px; text-align: center; }
.ep-line { display: grid; grid-template-columns: minmax(0, 1fr) 64px 90px 32px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); }
.ep-line:first-child { border-top: 0; } .ep-ln-q { width: 60px; text-align: center; }
.ep-why { display: block; font-size: .78rem; margin-top: 2px; }
@media (max-width: 560px) { .ep-row { grid-template-columns: 36px minmax(0, 1fr); } .ep-add { grid-column: 1 / -1; justify-content: flex-end; } }

/* owner, 26 Nov 2026: the approval code the advisor reads to the customer (no SMS service) */
.code-shown{margin-top:6px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.code-shown b{font-size:1.6rem;letter-spacing:.18em;padding:2px 10px;border-radius:8px;background:var(--warn-soft);color:var(--warn)}
/* ---- Set-up (owner, 26 Nov 2026, approved mock-up "Servics Set-up Redesign"): grouped home, left list, side panel ---- */
.setup-intro { margin: 0 0 14px; max-width: 75ch; }
.setup-search { position: relative; max-width: 640px; margin-block-end: 20px; }
.setup-search .ico { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.setup-search input { width: 100%; padding-inline-start: 40px; min-height: 46px; font-size: 15px; }
.setup-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 16px; align-items: start; }
.setup-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.setup-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.setup-card p { margin: 0 0 4px; }
.setup-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--text); flex: none; }
.setup-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.setup-card li a, .setup-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-xs); color: var(--text); text-decoration: none; min-height: 36px; }
.setup-card li a:hover, .setup-nav a:hover { background: var(--surface-3); }
.setup-card .cnt, .setup-nav .cnt { margin-inline-start: auto; font-size: 12px; color: var(--text-3); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.setup-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.setup-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.setup-main > .pagehead { margin: 0; }
.setup-nav { position: sticky; top: 12px; max-height: calc(100vh - var(--top) - 40px); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.setup-nav input[type=search] { width: 100%; margin-block-end: 4px; }
.setup-nav .setup-all { color: var(--link); font-weight: 600; }
.setup-grp { border-block-start: 1px solid var(--line); padding-block: 4px; }
.setup-grp > summary { cursor: pointer; list-style: none; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 6px; }
.setup-grp > summary::-webkit-details-marker { display: none; }
.setup-nav a { font-size: 13.5px; min-height: 32px; padding: 5px 8px; }
.setup-nav a.on { background: var(--brand-soft); font-weight: 700; }
.setup-nav a.on .cnt { background: var(--surface); }
@media (max-width: 899px) { .setup-layout { grid-template-columns: 1fr; } .setup-nav { position: static; max-height: none; } }
.ms-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .ms-head h1 { margin: 0; }
.ms-tools { gap: 10px; align-items: center; } .ms-tools form { flex: 1 1 260px; margin: 0; }
.ms-show { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ms-show .chip { text-decoration: none; border: 1px solid var(--line-2); background: var(--surface); }
.ms-show .chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.ms-tbl tbody tr[data-href] { cursor: pointer; }
.ms-tbl tbody tr[data-href]:hover { background: var(--surface-2); }
.ms-tbl tbody tr.sel { background: var(--brand-soft); }
.ms-tbl tbody tr[data-off] td { color: var(--text-3); }
.ms-act form { margin: 0; }
@media (hover: hover) { .ms-act .btn { opacity: 0; } .ms-tbl tr:hover .ms-act .btn, .ms-act .btn:focus-visible { opacity: 1; } }
.ms-panel .box > form > .bd { gap: 12px; }
.ms-panel .box > form > footer { justify-content: flex-start; flex-wrap: wrap; }
.ms-panel footer .sp { flex: 1; }
.ms-more > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.ms-more > .stack { margin-block-start: 8px; }
.ms-kit-h { font-size: 16px; }
/* set-up list: fold groups, fold all, hide the list (owner, 26 Nov 2026) */
.setup-navbar { display: flex; align-items: center; gap: 2px; position: sticky; top: -10px; z-index: 1; background: var(--surface); margin: -10px -10px 0; padding: 6px 6px 4px 10px; border-radius: var(--radius) var(--radius) 0 0; }
.setup-navbar .sp { flex: 1; }
.setup-navbar .setup-all { min-height: 36px; }
.setup-tgl { min-height: 36px; min-width: 36px; padding-inline: 6px; }
.setup-tgl.is-closed .ico { transform: rotate(180deg); }
.setup-nav-body { display: flex; flex-direction: column; gap: 4px; }
.setup-grp > summary { display: flex; align-items: center; gap: 6px; border-radius: var(--radius-xs); }
.setup-grp > summary:hover { background: var(--surface-3); color: var(--text); }
.setup-grp > summary > span { flex: 1; }
.setup-grp > summary .ico { flex: none; transition: transform var(--t-fast) var(--ease); }
.setup-grp:not([open]) > summary .ico { transform: rotate(-90deg); }
[dir="rtl"] .setup-grp:not([open]) > summary .ico { transform: rotate(90deg); }
.setup-layout.nav-off { grid-template-columns: auto minmax(0, 1fr); }
.nav-off .setup-nav { padding: 4px; overflow: visible; }
.nav-off .setup-navbar { margin: 0; padding: 0; flex-direction: column; }
.nav-off .setup-nav-body, .nav-off .setup-navbar .sp, .nav-off .setup-navbar .setup-all span, .nav-off [data-setup-groups] { display: none; }
.nav-off [data-setup-hide] .ico { transform: scaleX(-1); }
[dir="rtl"] .nav-off [data-setup-hide] .ico { transform: none; }
@media (prefers-reduced-motion: reduce) { .setup-grp > summary .ico { transition: none; } }
@media (max-width: 899px) { .setup-layout.nav-off { grid-template-columns: 1fr; } .nav-off .setup-navbar { flex-direction: row; } .nav-off .setup-navbar .setup-all span { display: inline; } }
/* master data in folding groups (owner, 26 Nov 2026) */
.ms-gbar { align-items: center; gap: 10px; }
.ms-gpick { align-items: center; gap: 8px; margin: 0; } .ms-gpick label { font-weight: 600; color: var(--text-2); } .ms-gpick select { min-width: 220px; }
[data-ms-groups].is-closed .ico { transform: rotate(180deg); }
.ms-groups { display: flex; flex-direction: column; gap: 10px; }
.ms-grp { padding: 0; overflow: hidden; }
.ms-grp > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; min-height: 52px; }
.ms-grp > summary::-webkit-details-marker { display: none; }
.ms-grp > summary:hover { background: var(--surface-2); }
.ms-grp > summary .sp { flex: 1; }
.ms-grp > summary > .ico { transition: transform var(--t-fast) var(--ease); color: var(--text-3); }
.ms-grp:not([open]) > summary > .ico { transform: rotate(-90deg); }
[dir="rtl"] .ms-grp:not([open]) > summary > .ico { transform: rotate(90deg); }
.ms-grp[open] > summary { border-block-end: 1px solid var(--line); }
.ms-grp .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; margin: 0; }
@media (prefers-reduced-motion: reduce) { .ms-grp > summary > .ico { transition: none; } }
.ms-groups .grid-bar { display: none; }  /* one search above all the groups, not one per group */
/* My cars (owner, 26 Nov 2026, approved mock-up "Advisor Call Desk"): the advisor answers a call in seconds */
.mc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .mc-head h1 { margin: 0; }
.mc-head .seg a { padding: 6px 12px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 13px; }
.mc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; margin-block-start: 12px; }
.mc-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mc-caller { display: flex; align-items: center; gap: 10px; border: 2px solid var(--text); border-radius: 14px; padding: 4px 6px 4px 14px; background: var(--surface); }
.mc-caller:focus-within { box-shadow: 0 0 0 4px var(--brand-soft); }
.mc-caller input { flex: 1; border: 0; min-height: 46px; font-size: 17px; background: none; box-shadow: none; outline: none; min-width: 0; }
.mc-found { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.mc-hit { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 10px; border-radius: var(--radius-xs); color: var(--text); text-decoration: none; }
.mc-hit:hover { background: var(--surface-3); }
.mc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; margin-inline-end: 5px; background: var(--line-2); }
.mc-dot.red { background: var(--bad); } .mc-dot.amber { background: var(--warn); } .mc-dot.green { background: var(--ok); }
.mc-cards { display: flex; flex-direction: column; gap: 10px; }
.mc-car { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; color: var(--text); text-decoration: none; border-inline-start: 5px solid var(--line-2); padding: 12px 14px; }
.mc-car:hover { border-color: var(--line-2); text-decoration: none; } .mc-car.sel { background: var(--brand-soft); }
.mc-car.red { border-inline-start-color: var(--bad); } .mc-car.amber { border-inline-start-color: var(--warn); } .mc-car.green { border-inline-start-color: var(--ok); }
.mc-plate { background: var(--surface-3); border-radius: 6px; padding: 2px 7px; align-self: start; white-space: nowrap; font-size: 13px; }
.mc-who { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-width: 0; }
.mc-prom { display: flex; flex-direction: column; text-align: end; white-space: nowrap; }
.mc-say { grid-column: 2 / 4; font-size: 15px; line-height: 1.5; }
.mc-meta { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--text-3); }
.mc-tag { border-radius: 999px; padding: 2px 9px; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.mc-tag.parts { background: var(--warn-soft); color: var(--warn); } .mc-tag.approval, .mc-tag.insurer { background: var(--info-soft); color: var(--info); }
.mc-tag.ready { background: var(--ok-soft); color: var(--ok); } .mc-tag.qc { background: var(--brand-soft); color: var(--text); }
.mc-stale { color: var(--bad); }
.mc-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.mc-h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; }
.mc-alert { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding-block-start: 10px; border-block-start: 1px solid var(--line); font-size: 13.5px; }
.mc-legend span { display: flex; align-items: center; }
.mc-panel .box > .bd { display: flex; flex-direction: column; gap: 14px; }
.mc-read { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; font-size: 16.5px; line-height: 1.55; }
.mc-read-l { display: block; font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-block-end: 4px; }
.mc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mc-facts > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.mc-facts span { font-size: 11.5px; color: var(--text-3); } .mc-facts b { display: flex; align-items: center; }
.mc-h3 { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
.mc-op, .mc-tl { display: flex; gap: 10px; justify-content: space-between; padding: 6px 0; border-block-start: 1px solid var(--line); font-size: 13.5px; }
.mc-tl { justify-content: flex-start; } .mc-tl > span:first-child { min-width: 78px; }
.mc-st { font-size: 12px; font-weight: 600; white-space: nowrap; } .mc-st.done { color: var(--ok); } .mc-st.doing { color: var(--info); } .mc-st.wait, .mc-wait { color: var(--warn); }
.mc-act { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.mc-act > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.mc-act form { margin-block-start: 8px; }
.mc-out { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; } .mc-out .chip { cursor: pointer; }
@media (max-width: 1100px) { .mc-grid { grid-template-columns: 1fr; } .mc-side { position: static; } }
@media (max-width: 640px) { .mc-car { grid-template-columns: minmax(0, 1fr) auto; } .mc-plate { grid-column: 1 / 3; justify-self: start; } .mc-say, .mc-meta { grid-column: 1 / 3; } .mc-facts { grid-template-columns: 1fr 1fr; } }
/* My cars on a phone (owner, 26 Nov 2026): caller box stays on top, filters scroll sideways, alerts fold above the cars,
   the answer card fills the screen with its actions in a bar at the bottom */
.mc-alerts-m, .mc-bar { display: none; }
.mc-hacts { display: inline-flex; align-items: center; gap: 4px; }
.mc-callbtn { color: var(--ok); }
@media (max-width: 640px) {
  .mc-head .seg { width: 100%; } .mc-head .seg a { flex: 1; text-align: center; }
  .mc-caller { position: sticky; top: calc(var(--top) + 6px); z-index: 5; box-shadow: var(--shadow); padding-inline-start: 10px; }
  .mc-caller input { font-size: 16px; min-height: 44px; }
  .mc-caller .btn { min-height: 40px; }
  .mc-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px; }
  .mc-filters::-webkit-scrollbar { display: none; }
  .mc-filters .chip { flex: none; min-height: 34px; }
  .mc-side .mc-alerts-d { display: none; }
  .mc-side { gap: 8px; }
  .mc-alerts-m { display: block; padding: 0; overflow: hidden; }
  .mc-alerts-m > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 48px; }
  .mc-alerts-m > summary::-webkit-details-marker { display: none; }
  .mc-alerts-m > .stack { padding: 0 14px 12px; }
  .mc-alert { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .mc-car { padding: 10px 12px; gap: 4px 8px; }
  .mc-who b { font-size: 15px; }
  .mc-plate { grid-column: 1; grid-row: 1; } .mc-prom { grid-row: 1; grid-column: 2; flex-direction: row; gap: 6px; align-items: baseline; }
  .mc-who { grid-column: 1 / 3; grid-row: 2; }
  .mc-say { font-size: 15.5px; }
  .mc-meta { gap: 4px 10px; font-size: 12px; }
  .mc-panel .box { width: 100%; }
  .mc-panel .box > header { position: sticky; top: 0; z-index: 2; background: var(--surface); padding-top: max(14px, env(safe-area-inset-top, 0px)); }
  .mc-panel .box > .bd { padding-bottom: 12px; }
  .mc-read { font-size: 17.5px; }
  .mc-facts { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .mc-facts > div { padding: 6px 8px; } .mc-facts b { font-size: 13px; }
  .mc-act textarea { font-size: 16px; }
  .mc-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-block-start: 1px solid var(--line); background: var(--surface);
            padding: 6px 6px max(6px, env(safe-area-inset-bottom, 0px)); position: sticky; bottom: 0; z-index: 2; }
  .mc-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 12px;
              color: var(--text); text-decoration: none; font-size: 12px; font-weight: 600; }
  .mc-bar a:first-child { color: var(--ok); }
  .mc-bar a:active, .mc-bar a:hover { background: var(--surface-3); }
}
/* Import costs policy (owner, 26 Nov 2026, mock-up "Import Shipment Costing") */
.imp-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.imp-step { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.imp-step span { font-size: 11.5px; color: var(--text-3); } .imp-step small { color: var(--text-3); font-size: 12px; }
.imp-step.done { border-color: var(--ok); background: var(--ok-soft); } .imp-step.now { border-color: var(--text); box-shadow: var(--shadow); }
.imp-step.wait { border-style: dashed; border-color: var(--warn); background: var(--warn-soft); }
.imp-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; } .imp-h .sp { flex: 1; }
.imp-rel { gap: 8px; align-items: center; margin: 0; } .imp-rel input[name=reason] { min-width: 220px; flex: 1; }
.imp-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-block-start: 1px solid var(--line); }
.imp-task-link { padding: 12px 14px; color: var(--text); text-decoration: none; border-block-start: 1px solid var(--line); }
.imp-area { background: var(--surface-3); border-radius: 8px; padding: 6px 10px; font-weight: 600; min-width: 44px; text-align: center; }
.imp-line { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.imp-line select { min-height: 44px; min-width: 140px; } .imp-qty { font-size: 18px; }
.imp-low { color: var(--bad); }
.imp-choice { border: 0; padding: 0; margin: 0; }
.imp-opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.imp-opt:has(input:checked) { border-color: var(--text); box-shadow: var(--shadow); }
.imp-opt > span { display: flex; flex-direction: column; gap: 4px; } .imp-opt input { margin-top: 4px; }
.imp-kpis .card { display: flex; flex-direction: column; gap: 4px; } .imp-big { font-size: 22px; }
@media (max-width: 760px) { .imp-strip { grid-template-columns: 1fr 1fr; } .imp-task { grid-template-columns: auto minmax(0, 1fr); } .imp-task > .row { grid-column: 1 / -1; } }
/* Finance reports (owner, 26 Nov 2026, mock-up "Finance Reports Drill-down"): sticky toolbar, key figures, folding, drill-down */
.rp-bar { position: sticky; top: calc(var(--top) + 4px); z-index: 5; display: flex; flex-wrap: wrap; box-shadow: var(--shadow); }
.rp-bar .sp { flex: 1; }
.rp-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rp-tools input[type=search] { min-width: 180px; }
.rp-check { display: inline-flex; flex-direction: row !important; align-items: center; gap: 6px; min-height: 36px; }
.rp-tools .seg { display: inline-flex; margin: 0; }
.rp-tools .seg button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.rp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-block: 12px; }
.rp-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.rp-kpi b { font-size: 20px; }
.rp-up { color: var(--ok); } .rp-down { color: var(--bad); }
.rp-spark { color: var(--link); margin-block-start: 2px; }
.rp-wrap { max-height: calc(100vh - 220px); overflow: auto; }
.rp-tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.rp-tbl tbody th[scope=row], .rp-tbl tbody th[scope=rowgroup] { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; }
.rp-tbl tr.rp-grand th { background: var(--surface-2); }
.rp-tg { border: 0; background: none; width: 22px; cursor: pointer; color: var(--text-3); font-size: 11px; padding: 0; }
.rp-tbl tr.rp-subhead td { font-weight: 600; }
.rp-tbl td a[data-rp-drill] { border-block-end: 1px dotted var(--line-2); }
.rp-tbl td a[data-rp-drill]:hover { color: var(--link); border-block-end-color: var(--link); text-decoration: none; }
.rp-pct { font-size: 12px; color: var(--text-3); }
.rp-drill .box { width: min(620px, 100%); }
.rp-drill .bd { display: flex; flex-direction: column; gap: 12px; }
.rp-trail { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px 20px; background: var(--surface-2); border-block-end: 1px solid var(--line); font-size: 12.5px; }
.rp-trail button { border: 0; background: none; color: var(--link); cursor: pointer; padding: 2px 4px; font: inherit; }
.rp-trail button[aria-current] { color: var(--text); font-weight: 600; }
.rp-dtotal { display: flex; flex-direction: column; } .rp-dtotal b { font-size: 22px; }
.rp-by { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rp-by .chip { cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); }
.rp-by .chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.rp-parts { display: flex; flex-direction: column; gap: 2px; }
.rp-part { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; border: 0; background: none; text-align: start; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; }
.rp-part:hover, .rp-part:focus-visible { background: var(--surface-3); }
.rp-meter { grid-column: 1 / -1; display: block; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.rp-meter i { display: block; height: 100%; background: var(--link); }
.meter.rp-meter { height: 5px; border-radius: 3px; } .meter.rp-meter rect { fill: var(--link); }  /* the bar as an SVG: no style attribute (CSP) */
.rp-items td { vertical-align: top; }
.rp-buckets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-block: 0 12px; }
.rp-bucket { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; color: var(--text); text-decoration: none; }
.rp-bucket:hover { border-color: var(--link); text-decoration: none; } .rp-bucket.on { border-color: var(--text); box-shadow: var(--shadow); }
.rp-aging td.rp-b4, .rp-aging td.rp-b5 { color: var(--bad); }
@media (max-width: 900px) { .rp-kpis { grid-template-columns: 1fr 1fr; } .rp-buckets { grid-template-columns: 1fr 1fr; } .rp-bar { position: static; } }
@media print { .rp-bar, .rp-kpis .rp-spark, .rp-tg { display: none !important; } .rp-wrap { max-height: none; overflow: visible; } .rp-tbl tr[hidden] { display: table-row !important; } }

/* ============================================================ side menu (owner, 26 Nov 2026: design A + A)
   Groups fold with a smooth animation (open ones kept in the sc_nav cookie, the group of the open page always open),
   pinned pages on top, a filter box; folded to a rail, one icon per group with its pages popping out beside it. */
.shell { transition: grid-template-columns var(--t) var(--ease); }
.side-find { padding: 12px 10px 4px; flex: none; }
.side-find-box { display: flex; align-items: center; gap: 8px; height: 38px; padding-inline: 11px; border-radius: 10px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08); color: var(--side-muted); cursor: text; transition: border-color var(--t-fast), background var(--t-fast); }
.side-find-box:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: rgba(255, 255, 255, .08); }
.side-find-box .ico { width: 18px; height: 18px; }
.side .side-find-box input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #fff; font: inherit; font-size: 13.5px; outline: none; appearance: none; }
.side .side-find-box input::placeholder { color: var(--side-muted); opacity: 1; }
.side .side-find-box input::-webkit-search-cancel-button { filter: invert(1) opacity(.55); }
.side .kbd { border-color: rgba(255, 255, 255, .14); color: var(--side-muted); opacity: 1; }
.side-collapse .kbd { margin-inline-start: auto; }

.side .grp { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 34px; margin-block-start: 6px; padding: 0; padding-inline: 12px 8px; border: 0; border-radius: 9px; background: none;
  color: var(--side-muted); font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; text-align: start; cursor: pointer; white-space: nowrap; }
:lang(ar) .side .grp, :lang(ar) .grp-pins, :lang(ar) .side-fly h4 { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.side .grp:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.side .grp:focus-visible, .side .pin:focus-visible, .side-nav a:focus-visible, .side-fly a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.side .grp .gi { display: none; }
.side .grp .count { margin-inline-start: auto; font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums; opacity: .8; }
.side .grp .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity var(--t-fast); flex: none; }
.nav-grp.has-on:not(.open) > .grp .dot { opacity: 1; }
.side .grp .chev { display: inline-grid; transition: transform var(--t) var(--ease); } .side .grp .chev .ico { width: 16px; height: 16px; }
.nav-grp:not(.open) > .grp .chev { transform: rotate(-90deg); } [dir="rtl"] .nav-grp:not(.open) > .grp .chev { transform: rotate(90deg); }
.nav-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t) var(--ease); }
.nav-grp.open > .nav-body, .side-nav.filtering .nav-grp.found > .nav-body { grid-template-rows: 1fr; }
.nav-body > div { overflow: hidden; min-height: 0; margin-inline: -10px; padding-inline: 10px; }  /* room for the active bar */
.nav-body .nav-item { opacity: 0; transform: translateY(-4px); transition: opacity 200ms ease, transform 200ms var(--ease); }
.nav-grp.open .nav-item, .side-nav.filtering .nav-item { opacity: 1; transform: none; }

.nav-item { position: relative; }
.side-nav a.on { background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
.side-nav a .lbl { flex: 1; min-width: 0; }
.side-nav a mark, .side-fly a mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: #fff; border-radius: 3px; padding: 0 1px; }
.side .badge, .side-fly .badge { background: var(--accent); color: var(--accent-ink); }
.side .pin { position: absolute; inset-block-start: 50%; inset-inline-end: 6px; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 8px; background: none;
  color: var(--side-muted); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--t-fast), color var(--t-fast); }
.side .pin .ico { width: 15px; height: 15px; }
.side .pin:hover { color: var(--accent); background: rgba(255, 255, 255, .07); }
.side .pin[aria-pressed="true"] { color: var(--accent); } .side .pin[aria-pressed="true"] .ico { fill: currentColor; }
.nav-item:hover .pin, .nav-item:focus-within .pin { opacity: 1; }
@media (hover: hover) { .nav-item:hover > a, .nav-item:focus-within > a { padding-inline-end: 40px; } }
@media (hover: none) { .side .pin { opacity: .6; } .side-nav .nav-item > a { padding-inline-end: 40px; } }

.grp-pins { display: flex; align-items: center; min-height: 30px; margin-block-start: 6px; padding-inline: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--side-muted); }
.side-hint { display: none; margin: 0 12px 6px; font-size: 12px; line-height: 1.35; color: var(--side-muted); white-space: normal; }
.side-pins.is-empty .side-hint { display: block; }
.side-none { margin: 10px 12px; font-size: 13px; color: var(--side-muted); white-space: normal; }
.side .side-none a { display: inline-flex; min-height: 0; margin-block-start: 6px; padding: 0; gap: 6px; color: var(--accent); }
.side .side-none a:hover { background: none; text-decoration: underline; }
.side-none .ico { width: 16px; height: 16px; }
.side-nav.filtering .side-pins, .side-nav.filtering .nav-grp:not(.found) { display: none; }
.side-nav.filtering .grp { pointer-events: none; } .side-nav.filtering .grp .chev { visibility: hidden; }

/* pop-out of a group on the folded menu */
.side-fly { position: fixed; z-index: 70; width: 260px; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border-radius: 14px; background: var(--side-2);
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow-lg); color: var(--side-text); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent;
  opacity: 0; transform: translateX(-6px); pointer-events: none; transition: opacity 160ms ease, transform 200ms var(--ease); }
[dir="rtl"] .side-fly { transform: translateX(6px); }
.side-fly.show { opacity: 1; transform: none; pointer-events: auto; }
.side-fly h4 { margin: 2px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--side-muted); }
.side-fly a { display: flex; align-items: center; gap: 12px; min-height: 38px; padding-inline: 10px; border-radius: 10px; color: var(--side-text); font-size: 14px; font-weight: 500; white-space: nowrap; }
.side-fly a:hover, .side-fly a:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.side-fly a.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: #fff; font-weight: 600; }
.side-fly a .ic { display: inline-grid; place-items: center; width: 20px; color: var(--side-muted); } .side-fly a.on .ic { color: var(--accent); }
.side-fly a .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 761px) {
  .shell.is-mini .side-find, .shell.is-mini .side-hint, .shell.is-mini .side-pins.is-empty, .shell.is-mini .side .pin, .shell.is-mini .side-collapse .kbd, .shell.is-mini .side-none { display: none; }
  .shell.is-mini .nav-body { display: none; }
  .shell.is-mini .grp-pins { min-height: 0; height: 1px; margin: 8px 12px; padding: 0; overflow: hidden; background: rgba(255, 255, 255, .08); color: transparent; }
  .shell.is-mini .side .grp { position: relative; justify-content: center; min-height: 42px; margin-block: 2px; padding: 0; color: var(--side-text); }
  .shell.is-mini .side .grp .gi { display: inline-grid; color: var(--side-muted); }
  .shell.is-mini .side .grp .count, .shell.is-mini .side .grp .chev { display: none; }
  .shell.is-mini .side .grp:hover, .shell.is-mini .side .grp.hot { background: rgba(255, 255, 255, .07); }
  .shell.is-mini .side .grp:hover .gi, .shell.is-mini .side .grp.hot .gi { color: #fff; }
  .shell.is-mini .nav-grp.has-on > .grp { background: color-mix(in srgb, var(--accent) 12%, transparent); }
  .shell.is-mini .nav-grp.has-on > .grp .gi { color: var(--accent); }
  .shell.is-mini .side .grp .dot { position: absolute; inset-block-start: 9px; inset-inline-end: 15px; }
  .shell.is-mini .nav-grp.has-badge:not(.has-on) > .grp .dot { opacity: 1; }
  .shell.is-mini .side .badge { position: absolute; inset-block-start: 2px; inset-inline-end: 4px; min-width: 16px; height: 16px; padding-inline: 4px; font-size: 10px; }
}
@media (max-width: 760px) { .side .kbd { display: none; } }
