/* DriveGuard — the depot clipboard.
   Printed black ink on paper, ballpoint blue for what the driver fills in,
   a red pen for marks on the truck drawing, and the Danish number plate.
   Spacing sits on a 4px grid. Two weights: 400 and 500. */

:root {
  --page: #f6f5f2;
  --card: #ffffff;
  --raised: #eeede9;
  --text: #1c1b19;
  --text-2: #55524c;
  --text-3: #716d66;
  --line: rgba(28, 27, 25, 0.1);
  --line-strong: rgba(28, 27, 25, 0.22);

  --ink: #1e3fae;       /* ballpoint blue: answers, selections, focus, links */
  --ink-wash: #edf0fa;
  --red: #c9302c;       /* red pen: marks on the drawing, errors, "haster" */
  --ok: #1f9d55;
  --soon: #d98a0b;
  --stop: #d1332b;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --cond: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;

  --r-control: 10px;
  --r-card: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 500; }
ul, ol { list-style: none; }
a { color: var(--ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
main:focus { outline: none; }

.mono { font-family: var(--mono); font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hint, .note { font-size: 14px; color: var(--text-2); }
.dot { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--text-3); }
.dot.ok { background: var(--ok); }
.dot.soon { background: var(--soon); }
.dot.stop { background: var(--stop); }

/* ---------- the number plate ---------- */
.plate {
  display: inline-flex; align-items: stretch; flex: none; height: 24px;
  border: 1.5px solid #c8102e; border-radius: 4px; background: #fff; overflow: hidden; vertical-align: middle;
}
.plate i {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  width: 14px; padding-bottom: 2px; background: #24439c; color: #fff;
  font: 500 7px/1 var(--font); font-style: normal;
}
.plate b {
  display: flex; align-items: center; padding: 0 6px;
  font: 600 15px/1 var(--cond); letter-spacing: 0.04em; color: #111; white-space: nowrap;
}
.plate.lg { height: 40px; border-width: 2px; border-radius: 6px; }
.plate.lg i { width: 24px; gap: 2px; padding-bottom: 4px; font-size: 9px; }
.plate.lg i svg { width: 16px; height: 16px; }
.plate.lg b { padding: 0 12px; font-size: 26px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-control);
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.btn-block { width: 100%; }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #34322e; }
.btn-primary:disabled { background: var(--raised); color: var(--text-3); cursor: default; }
.btn-secondary { background: var(--card); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { background: var(--raised); }
.btn-quiet { height: 36px; padding: 0 8px; margin: 0 -8px; background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink-wash); }
.btn-quiet.danger { color: var(--text-2); }
.btn-quiet.danger:hover { background: #fbeceb; color: var(--red); }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: none; color: var(--text-3); cursor: pointer; transition: background-color 0.16s var(--ease);
}
.icon-btn:hover { background: var(--raised); color: var(--text); }

/* ---------- fields ---------- */
.fld { display: block; }
.lbl { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-2); }
.opt { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--text-3); }
.field {
  display: block; width: 100%; height: 48px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--card); color: var(--ink); font-size: 16px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
textarea.field { height: auto; padding: 12px; line-height: 1.5; resize: none; }
.field::placeholder { color: var(--text-3); opacity: 1; }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-wash); }
select.field, .lang-pick {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355524c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .fld { min-width: 0; }

.checks { display: grid; gap: 4px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

/* One of several: the chosen answer is written in ballpoint blue. */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--raised); border-radius: var(--r-control);
}
.seg button {
  min-height: 40px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 15px; line-height: 1.25; cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: var(--card); border-color: var(--line); color: var(--ink); font-weight: 500;
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.08);
}
.seg-2x2, .seg-4 { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
@media (min-width: 520px) { .seg-4 { grid-template-columns: repeat(4, 1fr); } }
.seg-small { display: inline-grid; }
.seg-small button { min-height: 28px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
.seg-small button .mono { margin-left: 6px; }

/* ---------- cards ---------- */
.card { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.card > * + *, .more > * + *, #vehicleBox > * + * { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.card-head .btn { margin-block: -6px; }
.card-title { font-size: 17px; line-height: 24px; }
.sub { margin-top: 24px !important; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }

.empty { display: grid; gap: 8px; justify-items: center; padding: 48px 24px; color: var(--text-2); text-align: center; }
.empty strong { font-weight: 500; color: var(--text); }
.empty .btn { margin-top: 8px; }

/* ---------- the truck drawing ---------- */
.truck { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.truck-view { min-width: 0; }
.truck-view.left, .truck-view.right, .truck-view.top { grid-column: 1 / -1; }
.truck-view figcaption { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.truck-canvas { position: relative; }
.truck-art {
  display: block; width: 100%; height: auto;
  fill: none; stroke: var(--text); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round;
}
.truck-art * { vector-effect: non-scaling-stroke; }
.truck-art .faint { stroke-width: 1; opacity: 0.3; }
.truck-art .solid { fill: var(--paper, var(--card)); }
.truck.editable .truck-view {
  --paper: var(--page);
  padding: 12px; background: var(--page); border: 1px solid var(--line); border-radius: var(--r-control);
}
.truck.editable .truck-canvas { cursor: crosshair; touch-action: manipulation; }

.pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--red); color: #fff; font: 500 12px/1 var(--mono);
  box-shadow: 0 0 0 2px var(--card);
}
.marks:empty { display: none; }
.marks li {
  display: grid; grid-template-columns: 24px 1fr auto auto; align-items: center; gap: 12px;
  min-height: 44px; border-top: 1px solid var(--line);
}
.marks li:first-child { border-top: 0; }
.marks .pin { position: static; transform: none; box-shadow: none; }
.mark-kind { font-size: 14px; color: var(--text-2); }

/* ---------- toast, lightbox ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 12px);
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-control);
  background: var(--text); color: #fff; font-size: 15px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #a32620; }
.driver-app .toast { bottom: 112px; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(20, 19, 18, 0.88); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 48px); border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: var(--r-control); background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer;
}

/* ============================================================
   DRIVER PAGES  ( /  /skade  /fejl )
   ============================================================ */

.bar { border-bottom: 1px solid var(--line); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; max-width: 560px; height: 56px; margin: 0 auto; padding: 0 16px; }
.wordmark { font-size: 17px; font-weight: 500; color: var(--text); text-decoration: none; }
.lang-pick {
  height: 36px; padding-left: 12px; border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background-color: var(--card); font-size: 14px;
}

.page { display: grid; gap: 12px; max-width: 560px; margin: 0 auto; padding: 20px 16px 0; animation: rise 0.28s var(--ease) both; }
.page > * { min-width: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.who-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.who { display: grid; font-size: 17px; font-weight: 500; line-height: 24px; }
.who span { font-size: 14px; font-weight: 400; line-height: 20px; color: var(--text-3); }
.home h1 { margin-top: 12px; font-size: 22px; line-height: 28px; }

.vehicle { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 16px; }
.vehicle .plate { justify-self: start; }
.vehicle-meta { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 15px; line-height: 20px; }
.picker { padding-top: 8px; border-top: 1px solid var(--line); }
.picker .field { margin: 8px 0; }
.pick {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  width: 100%; height: 48px; padding: 0 8px; border: 0; border-radius: 8px; background: none;
  font-size: 15px; text-align: left; cursor: pointer; transition: background-color 0.16s var(--ease);
}
.pick:hover { background: var(--raised); }
.pick[aria-pressed="true"] { background: var(--ink-wash); }

.prefilled { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.prefilled dt { font-size: 13px; line-height: 20px; color: var(--text-3); }
.prefilled dd { font-size: 15px; line-height: 20px; color: var(--ink); }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 16px 16px 16px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  color: var(--text); text-decoration: none; transition: border-color 0.16s var(--ease);
}
.choice:hover { border-color: var(--line-strong); }
.choice-text { display: grid; gap: 2px; margin-right: auto; }
.choice-text strong { font-size: 17px; font-weight: 500; line-height: 24px; }
.choice-text span { font-size: 14px; line-height: 20px; color: var(--text-2); }
.choice .icon { color: var(--text-3); }

.page-head { display: grid; justify-items: start; gap: 4px; margin-bottom: 4px; }
.page-head h1 { font-size: 28px; line-height: 36px; letter-spacing: -0.01em; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-control); background: var(--raised); overflow: hidden; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.busy img { opacity: 0.45; }
.thumb.failed { outline: 2px solid var(--red); outline-offset: -2px; }
.thumb-x {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 6px; background: rgba(28, 27, 25, 0.72); color: #fff; cursor: pointer;
}
.photo-add {
  display: grid; place-content: center; justify-items: center; gap: 4px; aspect-ratio: 1; padding: 0;
  border: 1px dashed var(--line-strong); border-radius: var(--r-control); background: transparent;
  color: var(--text-2); font-size: 13px; cursor: pointer; transition: background-color 0.16s var(--ease);
}
.photo-add:hover { background: var(--page); }
.photos:not(:has(.thumb)) .photo-add { grid-column: 1 / -1; grid-auto-flow: column; gap: 8px; height: 48px; aspect-ratio: auto; font-size: 15px; }

.sevs { display: grid; gap: 8px; }
.sev {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--card);
  font-size: 16px; text-align: left; cursor: pointer;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.sev[aria-pressed="true"] { border-color: var(--ink); background: var(--ink-wash); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--ink); }

.sendbar {
  position: sticky; bottom: 0; z-index: 10; margin: 4px -16px 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--page); border-top: 1px solid var(--line);
}
.sendbar-inner { display: grid; gap: 8px; }
.sendbar .btn { height: 52px; font-size: 16px; }
.missing { font-size: 14px; line-height: 20px; color: var(--text-2); }
.missing:empty { display: none; }

.receipt { display: grid; justify-items: start; gap: 12px; padding: 32px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.receipt h1 { font-size: 22px; line-height: 28px; }
.receipt-ref { display: flex; align-items: center; gap: 12px; }
.receipt .btn { margin-top: 12px; }
.tick { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink-wash); color: var(--ink); }

.foot { max-width: 560px; margin: 0 auto; padding: 16px; font-size: 13px; color: var(--text-3); }
.foot a, .login-foot a, .side-driver { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.foot a:hover, .login-foot a:hover, .side-driver:hover { color: var(--text); }

/* ============================================================
   THE FRONT PAGE  ( / ) — three doors, one street
   ============================================================ */
.start { display: grid; align-content: center; gap: 32px; width: min(1120px, 100% - 32px); min-height: 100dvh; margin: 0 auto; padding: 32px 0; }
.start-lang { position: absolute; top: 16px; right: 16px; }
.start-brand { font-size: 28px; font-weight: 500; line-height: 36px; text-align: center; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.door {
  display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card);
  color: var(--text); text-decoration: none; transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.door:hover { border-color: var(--line-strong); box-shadow: 0 6px 24px rgba(28, 27, 25, 0.08); transform: translateY(-2px); }
.door:active { transform: none; }
.door-text { display: grid; gap: 2px; padding: 16px 20px 20px; }
.door-text strong { font-size: 18px; font-weight: 500; line-height: 26px; }
.door-text span { font-size: 14px; line-height: 20px; color: var(--text-2); }
.scene { display: block; width: 100%; height: auto; background: var(--ink-wash); }
.scene * { stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.scene .road { fill: #dcd9d2; stroke: none; }
.scene .lane { stroke: #fff; stroke-width: 2.5; stroke-dasharray: 14 12; }
.scene .box, .scene .wall { fill: #fff; }
.scene .cab { fill: var(--ink); }
.scene .glass { fill: #cfd8f5; }
.scene .screen { fill: #fff; stroke-width: 1.5; }
.scene .skin { fill: #f2d6bd; }
.scene .dark { fill: #4a4844; }
.scene .tyre { fill: var(--text); }
.scene .hub { fill: #fff; stroke: none; }
.scene .lamp { fill: #ffd25e; stroke-width: 1.5; }
.scene .ink2 { stroke-width: 1.5; }
.scene .speed { stroke: var(--text-3); stroke-width: 2; }
.scene .route { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 4; }
.scene .spot { fill: var(--ink); stroke: #fff; stroke-width: 1.5; }
.scene .spot.red, .scene .sign { fill: var(--red); }
.scene .sign { stroke: #fff; stroke-width: 2; }
.scene .wrench { fill: #fff; stroke: none; }
.scene .rim { stroke-width: 12; }
.scene .rim-in { stroke: #fff; stroke-width: 1.5; stroke-opacity: 0.35; }
.scene .spoke { stroke-width: 11; stroke-linecap: butt; }
@media (max-width: 767px) {
  .start { align-content: start; gap: 20px; padding-top: 24px; }
  .doors { grid-template-columns: 1fr; gap: 12px; }
  .door { grid-template-columns: 128px 1fr; align-items: center; }
  .scene { height: 100%; object-fit: cover; }
  .door-text { padding: 12px 16px; }
  .door-text strong { font-size: 17px; line-height: 24px; }
}

/* ============================================================
   FLEET MANAGEMENT  ( /fleet )
   ============================================================ */

.fleet { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100dvh; }
.fleet:has(> .side[hidden]) { grid-template-columns: 1fr; }
.fleet-app .field { height: 40px; font-size: 15px; }
.fleet-app textarea.field { height: auto; }
.fleet-app .btn { height: 40px; }
.fleet-app .btn-quiet { height: 32px; }

.side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 16px 12px; border-right: 1px solid var(--line); }
.side-brand { display: grid; padding: 4px 8px 20px; }
.side-brand strong { font-size: 17px; font-weight: 500; line-height: 24px; }
.side-brand span { font-size: 13px; line-height: 20px; color: var(--text-3); }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-out {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 8px;
  border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 15px;
  text-decoration: none; cursor: pointer; transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.side-nav a:hover, .side-out:hover { background: var(--raised); color: var(--text); }
.side-nav a[aria-current] { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.count { margin-left: auto; font: 400 13px var(--mono); color: var(--text-3); }
.side-out { margin-top: auto; }
.side-driver { margin-top: auto; padding: 8px; font-size: 13px; color: var(--text-3); }
.side-driver + .side-out { margin-top: 4px; }
.login-foot { width: min(400px, 100% - 32px); margin: 12px auto 0; font-size: 13px; color: var(--text-3); }
.fleet-foot { display: none; }

.pane-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 68px; padding: 20px 20px 12px; }
.pane-head h1 { font-size: 22px; line-height: 28px; }

.inbox { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); height: 100dvh; }
.list-pane { border-right: 1px solid var(--line); overflow-y: auto; }
.detail-pane { background: var(--card); overflow-y: auto; }

.reports { display: grid; gap: 2px; padding: 0 8px 16px; }
.rrow {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--r-control);
  color: var(--text); text-decoration: none; transition: background-color 0.16s var(--ease);
}
@media (hover: hover) { .rrow:hover { background: var(--raised); } }
.rrow[aria-current] { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.rrow > .dot { margin-top: 7px; }
.rrow-body { display: grid; flex: 1; gap: 4px; min-width: 0; }
.rrow-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.rrow-type { font-size: 15px; font-weight: 500; }
.rrow-time { margin-left: auto; font-family: var(--font); white-space: nowrap; }
.rrow-desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: 14px; line-height: 20px; color: var(--text-2); overflow: hidden;
}
.rrow-meta { font-size: 13px; line-height: 20px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.flag.high { color: var(--red); font-weight: 500; }
.flag .icon { width: 14px; height: 14px; }

.detail { max-width: 1240px; padding: 24px 32px 64px; }
.detail .back { display: none; }
.detail-head { display: grid; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-head h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font-size: 22px; line-height: 28px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 40px; padding-top: 24px; }
.detail-main { display: grid; gap: 32px; min-width: 0; container-type: inline-size; }
.detail-side { position: sticky; top: 24px; display: grid; gap: 16px; }
.detail-side .block { padding: 20px; background: var(--page); border: 1px solid var(--line); border-radius: var(--r-card); }
.block > * + * { margin-top: 12px; }
.block-title { font-size: 15px; line-height: 20px; }
.block form > * + * { margin-top: 12px; }
.block .lbl { margin-bottom: 4px; }
.block .lbl + .quote { margin-top: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 16px 24px; }
.facts dt { font-size: 13px; line-height: 20px; color: var(--text-3); }
.facts dd { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 24px; }
/* The driver's own words stay in ballpoint blue on the fleet side too. */
.quote { max-width: 68ch; font-size: 16px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.original { max-width: 68ch; font-size: 14px; color: var(--text-2); }

.fleet-app .truck { grid-template-columns: repeat(12, 1fr); gap: 20px 24px; max-width: 760px; }
.fleet-app .truck-view.left, .fleet-app .truck-view.right, .fleet-app .truck-view.top { grid-column: span 6; }
.fleet-app .truck-view.front, .fleet-app .truck-view.rear { grid-column: span 3; }
.fleet-app .marks { max-width: 760px; }
.fleet-app .pin { width: 20px; height: 20px; font-size: 11px; }
/* In a narrow case column the two side views get the full width, so pins stay readable. */
@container (max-width: 559px) {
  .fleet-app .truck { gap: 16px; }
  .fleet-app .truck-view.left, .fleet-app .truck-view.right { grid-column: 1 / -1; }
}
.fleet-app .marks li { grid-template-columns: 20px 160px 1fr; min-height: 36px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; max-width: 760px; }
.gallery button { aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: var(--r-control); background: var(--raised); overflow: hidden; cursor: zoom-in; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }

p.sent { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; }
p.sent .icon { margin-top: 3px; color: var(--ok); }
p.sent > span { display: grid; }
p.sent.shop .icon, .flag.shop { color: var(--ink); }
p.sent.act { font-weight: 500; }
/* what someone wrote, translated: the original a click away */
details.original { margin-top: 6px; font-size: 13px; color: var(--text-3); }
details.original summary { cursor: pointer; width: fit-content; }
details.original summary:hover { color: var(--text-2); }
details.original p { margin-top: 4px; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.hint.translating { font-size: 13px; color: var(--text-3); }
.side .lang-pick { margin: auto 8px 0; width: calc(100% - 16px); }
.side .lang-pick + .side-driver, .side .lang-pick + .side-out { margin-top: 8px; }
.login-foot .lang-pick { margin-left: 8px; vertical-align: middle; }
.ws-notes { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.ws-notes li { padding-left: 12px; border-left: 2px solid var(--line-strong); }
.ws-notes .quote { font-size: 15px; line-height: 1.5; }
.ws-note-meta { margin-top: 2px; font-size: 13px; color: var(--text-3); }
.block form > .fld + .btn, .block > .fld + .btn { margin-top: 12px; }
p.sent.act .icon { color: var(--red); }
.seg.seg-stack { display: grid; grid-auto-flow: row; grid-template-columns: 1fr; }
.seg.seg-stack button { text-align: left; padding-inline: 12px; }

/* ============================================================
   THE WORKSHOPS  ( /vaerksted ) — fleet management's layout,
   with folders in the side bar that cases are dragged onto
   ============================================================ */
.side-tip { margin: 16px 8px 0; font-size: 13px; line-height: 20px; color: var(--text-3); }
@media (hover: none) { .side-tip { display: none; } }
.workshop-app .rrow[draggable="true"] { cursor: grab; }
.workshop-app .rrow.dragged { opacity: 0.45; }
.side.dropping [data-folder]:not([aria-current]) { outline: 1px dashed var(--line-strong); outline-offset: -1px; }
.side.dropping [data-folder].over { background: var(--ink-wash); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.workshop-app .detail-side .btn .icon { margin-right: 6px; }

.admin { max-width: 960px; padding: 0 32px 64px; }
.admin .pane-head { padding: 20px 0 4px; min-height: 0; }
.lead { margin-bottom: 24px; font-size: 15px; color: var(--text-2); }
.addform {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 24px; padding: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
}
.addform .fld { flex: 1 1 160px; }
.items li { display: grid; align-items: center; gap: 16px; min-height: 52px; padding: 0 12px 0 4px; border-top: 1px solid var(--line); font-size: 15px; }
.items.vehicles li { grid-template-columns: 132px 0.8fr 0.8fr 1.4fr auto auto; }
.items.workshops li { grid-template-columns: 1fr 1.5fr 1fr auto; }
.ws-login { font-size: 14px; color: var(--text-3); }
.ws-login .mono { color: var(--text); }
.items .plate { justify-self: start; }

/* ============================================================
   THE WORKSHOP CALENDAR  ( /vaerksted#/kalender, /fleet#/calendar )
   A week from Monday, 06–18; 48px an hour (kalender.js knows it too)
   ============================================================ */
.calendar-page { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100dvh; }
.cal-list { overflow-y: auto; }
.cal-tip { margin: -4px 20px 12px; font-size: 13px; line-height: 20px; color: var(--text-3); }
.cal-list-title { margin: 12px 20px 4px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.cal-list-title .mono { color: var(--text-3); font-weight: 400; }
.rrow.mini { padding: 8px 12px; cursor: grab; }
.rrow.mini > .dot { margin-top: 6px; }
.cal-pane { min-width: 0; overflow: auto; padding: 0 24px 32px; background: var(--card); }
.fleet-cal { height: 100dvh; }
.cal-head { padding: 20px 0 12px; }
.cal-head h1 span { margin-left: 8px; font-size: 15px; font-weight: 400; color: var(--text-3); }
.cal-nav { display: flex; gap: 4px; }
.cal-nav .btn { min-width: 36px; height: 32px; font-size: 15px; }
.cal-nav .btn[disabled] { opacity: 0.4; cursor: default; }

.cal { min-width: 640px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.cal-days, .cal-grid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
.cal-days { border-bottom: 1px solid var(--line); background: var(--page); }
.cal-days span { padding: 8px 8px 6px; font-size: 13px; color: var(--text-2); border-left: 1px solid var(--line); }
.cal-days span:first-child { border-left: 0; }
.cal-days b { font-weight: 500; color: var(--text); }
.cal-days .now { color: var(--ink); }
.cal-days .now b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; background: var(--ink); color: #fff; }
.cal-grid { height: calc(var(--hour) * var(--hours)); }
.cal-hours { position: relative; }
.cal-hours span { display: block; height: var(--hour); padding: 2px 6px 0 0; font: 400 11px var(--mono); color: var(--text-3); text-align: right; }
.cal-day {
  position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px) var(--hour));
}
.cal-day.weekend { background-color: rgba(28, 27, 25, 0.025); }
.cal-day.past { background-color: rgba(28, 27, 25, 0.045); }
.cal-day.over { background-color: var(--ink-wash); }
.cal-block {
  position: absolute; display: grid; align-content: start; gap: 0; overflow: hidden; padding: 4px 6px;
  border-radius: 6px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff);
  color: var(--text); font-size: 12px; line-height: 16px; text-align: left; text-decoration: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent);
}
.cal-block:hover { background: color-mix(in srgb, var(--c) 20%, #fff); }
.cal-block[draggable="true"] { cursor: grab; }
.cal-block.dragged { opacity: 0.4; }
.cal-time { font: 500 11px var(--mono); color: var(--c, var(--text-2)); }
.cal-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-sub { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-block.short { grid-template-columns: auto 1fr; gap: 6px; align-items: center; padding-block: 2px; }
.cal-block.short .cal-sub { display: none; }
/* free time: hatched, a button */
.cal-block.free, .agenda-item.free {
  border: 1px dashed var(--c); border-left-width: 3px; border-left-style: solid; cursor: pointer;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, #fff) 0 6px, #fff 6px 12px);
}
.cal-block.free .cal-title { color: var(--c); }
.cal-ghost {
  position: absolute; left: 2px; right: 2px; z-index: 2; padding: 4px 6px; border-radius: 6px; pointer-events: none;
  border: 2px dashed var(--ink); background: rgba(237, 240, 250, 0.85); color: var(--ink); font: 500 11px var(--mono);
}
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -4px 0 12px; font-size: 13px; color: var(--text-2); }
.cal-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; background: var(--c); vertical-align: -1px; }
.cal-legend .none::before { display: none; }
.cal-legend a { margin-left: auto; color: var(--ink); }

.agenda { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
.agenda ul { display: grid; gap: 6px; padding: 0; margin: 6px 0 0; list-style: none; }
.agenda-day { font-size: 14px; font-weight: 500; color: var(--text-2); }
.agenda-day::first-letter { text-transform: uppercase; }
.agenda-day.now { color: var(--ink); }
.agenda-item {
  display: flex; gap: 12px; width: 100%; padding: 10px 12px; border-radius: var(--r-control); border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--text); text-align: left; text-decoration: none; font-size: 14px;
}
.agenda-text { display: grid; min-width: 0; }

.free-form {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-bottom: 16px; padding: 12px 16px;
  border: 1px dashed color-mix(in srgb, #1f7a4d 45%, transparent); border-radius: var(--r-card);
  background: color-mix(in srgb, #1f7a4d 5%, #fff);
}
.free-form-title { display: flex; align-items: center; gap: 6px; flex-basis: 100%; font-size: 14px; font-weight: 500; color: #1f7a4d; }
.free-form .fld { flex: 0 1 150px; }
.free-form .hint { flex-basis: 100%; margin: 0; font-size: 13px; }
.booking-form > * + * { margin-top: 12px; }
.booking-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
p.sent > span a { font-size: 14px; }

dialog.fill {
  width: min(560px, 100% - 32px); max-height: min(720px, 100dvh - 64px); padding: 20px; border: 0; border-radius: var(--r-card);
  background: var(--card); color: var(--text); box-shadow: 0 24px 64px rgba(28, 27, 25, 0.25);
}
dialog.fill::backdrop { background: rgba(28, 27, 25, 0.35); }
.fill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fill-head h2 { font-size: 19px; line-height: 26px; }
.fill-head p { font-size: 15px; color: var(--text-2); }
.fill-head p::first-letter { text-transform: uppercase; }
.fill-list { display: grid; gap: 2px; margin-top: 12px; padding: 0; list-style: none; }
.fill-list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); }
.fill-list .btn { flex: none; height: 36px; }
.slot-note { display: grid; gap: 2px; margin: 8px 0 4px; padding: 10px 12px; border-radius: var(--r-control); background: color-mix(in srgb, #1f7a4d 7%, #fff); }
.slot-note .quote { font-size: 15px; }
.slot-form > * + * { margin-top: 12px; }
.slot-actions { display: flex; justify-content: space-between; gap: 12px; }
.free-form .free-note { flex: 1 1 260px; }

.notices { padding: 0; margin: 0; list-style: none; }
.notices li { display: grid; gap: 2px; padding: 12px 4px 12px 16px; border-top: 1px solid var(--line); position: relative; font-size: 15px; }
.notices li.unread::before { content: ""; position: absolute; left: 2px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.notices li.unread .notice-text { font-weight: 500; }
.notice-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-3); }
.notice-meta a { color: var(--ink); }
.contact-note { flex-basis: 100%; margin: 0; font-size: 13px; }

@media (max-width: 899px) {
  .calendar-page { grid-template-columns: 1fr; height: auto; }
  .cal-pane, .fleet-cal { height: auto; padding: 0 16px 32px; overflow: visible; }
  .cal-head h1 span { display: block; margin: 0; }
  .free-form .fld { flex: 1 1 120px; }
}

.login {
  display: grid; gap: 16px; width: min(400px, 100% - 32px); margin: 12vh auto 0; padding: 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
}
.login-brand { font-size: 15px; font-weight: 500; color: var(--text-3); }
.login h1 { margin-top: -12px; font-size: 22px; line-height: 28px; }
.login p { font-size: 15px; color: var(--text-2); }
.login .btn { margin-top: 4px; }
.login .hint { font-size: 13px; }
.login .hint .mono { color: var(--text); }
.driver-app .login { margin-top: 32px; padding: 24px; }
.driver-app .login h1 { margin-top: 0; }

@media (max-width: 1279px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail-side { position: static; max-width: 480px; }
  .workshop-app .detail-side { order: -1; } /* moving the case is what the workshop came for */
}

@media (max-width: 899px) {
  .fleet { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: static; flex-direction: row; align-items: center; gap: 4px; height: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .side-brand { padding: 0 4px; }
  .side-brand span { display: none; }
  @media (max-width: 479px) { .side-brand { display: none; } } /* the four links need the room */
  .side-nav { display: flex; }
  .side-nav a { width: auto; padding: 0 8px; white-space: nowrap; }
  .side-nav .icon { display: none; }
  .side-out { width: auto; margin: 0 0 0 auto; }
  .side-driver { display: none; }
  .side .lang-pick { width: auto; margin: 0 0 0 auto; flex: none; }
  .side .lang-pick + .side-out { margin: 0; }
  .side-driver + .side-out { margin-top: 0; }
  .fleet-foot { display: block; max-width: none; }
  .fleet:has(> .side[hidden]) ~ .fleet-foot { display: none; }
  .side-out span { display: none; }
  .fleet-app .field { font-size: 16px; }

  .inbox { grid-template-columns: 1fr; height: auto; }
  .list-pane { border-right: 0; overflow: visible; }
  .detail-pane { overflow: visible; }
  .inbox.has-detail .list-pane, .inbox:not(.has-detail) .detail-pane { display: none; }
  .detail { padding: 12px 16px 48px; }
  .detail .back { display: inline-flex; margin-bottom: 8px; }
  .admin { padding: 0 16px 48px; }
  .items.vehicles li { grid-template-columns: auto 1fr auto; padding-block: 8px; }
  .items.vehicles li .mono { grid-column: 2; grid-row: 2; margin-top: -12px; }
  .items.vehicles li .btn { grid-column: 3; grid-row: 1; }
  .items.vehicles li .btn.danger { grid-row: 2; }
  .items.workshops li { grid-template-columns: 1fr auto; padding-block: 8px; }
  .items.workshops li > .mono { grid-column: 1; grid-row: 2; margin-top: -12px; }
  .items.workshops li .ws-login { grid-column: 1; grid-row: 3; margin-top: -12px; }
  .side-tip { display: none; }
  .items.workshops li .btn { grid-column: 2; grid-row: 1 / span 3; }
}

@media (max-width: 599px) {
  .fleet-app .marks li { grid-template-columns: 20px 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.approve-case { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; font-weight: 600; }

/* the other party signs with a finger (driver, phone) */
.sign { margin-top: 16px; }
.sign-hint { font-size: 14px; color: var(--text-2); margin: 2px 0 8px; }
.sign-pad { display: block; width: 100%; height: 170px; background: #fff; border: 1px dashed var(--line-strong, #b9b6ae); border-radius: 10px; touch-action: none; }
.sign-clear { margin-top: 4px; }
.signature { display: block; max-width: 320px; width: 100%; background: #fff; border: 1px solid var(--line, #e4e1da); border-radius: 8px; margin-top: 6px; }

/* when the trucks are due: service, inspection, tachograph (fleet and workshop) */
.addform .due-fields { flex: 1 1 100%; }
.due-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.due-checks { border: 0; padding: 0; margin: 0; min-width: 0; }
.due-checks .check { min-height: 36px; font-size: 15px; }
.due-checks:first-of-type { grid-column: span 2; display: flex; flex-wrap: wrap; column-gap: 24px; align-items: center; }
.due-checks:first-of-type legend { flex: 1 1 100%; }
dialog .due-fields { margin: 8px 0 20px; }
.due-page .pane-head h1 { display: flex; align-items: center; gap: 10px; }
.due-page .pane-head h1 .icon { width: 22px; height: 22px; }
.due-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.due-list li + li { border-top: 1px solid var(--line); }
.due-row { display: grid; grid-template-columns: 132px 1fr auto auto; align-items: center; gap: 16px; width: 100%; min-height: 60px; padding: 10px 16px; font: inherit; text-align: left; color: inherit; background: none; border: 0; }
div.due-row { grid-template-columns: 132px 1fr auto; }
button.due-row { cursor: pointer; }
button.due-row:hover { background: var(--raised); }
button.due-row > .icon { color: var(--text-3); }
.due-truck { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--text-2); }
.due-flags { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.flag.eu6 { color: var(--ok); font-weight: 500; }
.due-when { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.due { font-size: 14px; font-weight: 600; white-space: nowrap; }
.due.late { color: var(--red); }
.due.soon { color: var(--soon); }
.due.ok { color: var(--ok); font-weight: 500; }
.due.none { color: var(--text-3); font-weight: 400; }
.due-date { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
@media (max-width: 899px) {
  .due-fields { grid-template-columns: 1fr; }
  .due-checks:first-of-type { grid-column: auto; }
  .due-row, div.due-row { grid-template-columns: auto 1fr; }
  .due-row .due-truck { grid-column: 1 / -1; grid-row: 2; }
  .due-row > .icon { display: none; }
}
.due-fields > .fld { align-self: end; }

/* ticking trucks in a folder and mailing them to a workshop */
.due-item { display: flex; align-items: stretch; }
.due-item.picked { background: var(--ink-wash); }
.due-pick { display: flex; align-items: center; padding: 0 4px 0 16px; cursor: pointer; }
.due-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.due-item .due-row { flex: 1; padding-left: 12px; }
.due-sent { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink); }
.due-sent .icon { width: 14px; height: 14px; }
.due-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 52px; margin-bottom: 12px; padding: 6px 12px; background: var(--page); }
.due-bar > span:first-child { margin-right: auto; font-weight: 600; }
.due-bar .hint { font-weight: 400; color: var(--text-3); }
.due-bar .btn .icon { margin-right: 6px; }
.mail-trucks { list-style: none; margin: 4px 0 16px; padding: 0; border-top: 1px solid var(--line); }
.mail-trucks li { display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 15px; }
dialog form .fld { margin-bottom: 14px; }
.seg-small.folders button .icon { width: 14px; height: 14px; margin-right: 5px; }
.seg-small.folders { display: flex; flex-wrap: wrap; max-width: 100%; }

/* visits over whole days: bars above the hours (fleet puts mailed trucks here) */
.cal-spans { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); grid-auto-rows: 44px; gap: 3px 0; padding: 4px 0; border-bottom: 1px solid var(--line); background: var(--page); }
.cal-span {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; margin: 0 3px; padding: 2px 10px; overflow: hidden;
  font: inherit; text-align: left; color: var(--text); background: color-mix(in srgb, var(--c) 14%, #fff);
  border: 0; border-left: 3px solid var(--c); border-radius: 6px;
}
button.cal-span { cursor: pointer; }
button.cal-span:hover { background: color-mix(in srgb, var(--c) 22%, #fff); }
.cal-span.cut-start { border-left-style: dashed; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-span.cut-end { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-span .cal-title, .cal-span .cal-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-days span.over { background: var(--ink-wash); }
.cal-span { font-size: 12px; line-height: 16px; }

/* fleet: the mailed trucks waiting for a date, beside the calendar */
.fleet-cal-page .fleet-cal { height: 100dvh; }
.waiting .rrow.mini { display: flex; align-items: center; gap: 8px; cursor: grab; }
.waiting .rrow.mini .btn { flex: none; font-size: 13px; padding: 0 8px; min-height: 32px; }
.waiting .rrow.mini.dragged { opacity: 0.5; }
.cal-waiting-narrow { margin-bottom: 16px; }
.visit-facts { margin: 8px 0 20px; }
.veh-driver { font-size: 15px; }
.veh-driver .none { color: var(--text-3); }
.veh-driver .mono { font-size: 13px; color: var(--text-3); }
@media (max-width: 899px) { .items.vehicles li .veh-driver { grid-column: 2; grid-row: 3; } }

/* "Get the app": the front page and the driver's footer */
.start-app-install { margin-top: 24px; text-align: center; }
.app-install { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; font: 500 15px var(--font); color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); border-radius: 22px; cursor: pointer; }
.app-install .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.foot #appInstall { margin-left: 16px; }
.foot .app-install { min-height: 36px; font-size: 14px; }
.app-steps { margin: 8px 0 20px; padding-left: 22px; font-size: 16px; line-height: 26px; }
.app-steps li + li { margin-top: 8px; }
.app-steps .icon.share { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-steps { list-style: decimal; } .app-steps li::marker { font-weight: 600; color: var(--ink); }

/* ---------- picking a day and a time (kalender.js dayTimePicker) ---------- */
.dtp { display: grid; gap: 16px; }
.dtp button { font: inherit; cursor: pointer; transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease); }
.dtp-cal { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.dtp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dtp-head b { font-weight: 500; text-transform: capitalize; }
.dtp-head .btn { min-width: 40px; min-height: 40px; padding: 0; font-size: 22px; line-height: 1; }
.dtp-head .btn:disabled { opacity: 0.3; cursor: default; }
.dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dtp-grid i { font-style: normal; font-size: 12px; color: var(--text-3); padding-bottom: 4px; text-transform: capitalize; }
.dtp-grid button {
  height: 40px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums;
}
.dtp-grid button:hover:not(:disabled) { background: var(--raised); }
.dtp-grid button:disabled { color: var(--text-3); opacity: 0.45; cursor: default; }
.dtp-grid button.is-today { border-color: var(--line-strong); }
.dtp-grid button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.dtp-time .lbl { margin-bottom: 8px; }
.dtp-hours, .dtp-mins { display: grid; gap: 4px; padding: 4px; background: var(--raised); border-radius: var(--r-control); }
.dtp-hours { grid-template-columns: repeat(6, 1fr); }
.dtp-mins { grid-template-columns: repeat(4, 1fr); margin-top: 6px; }
.dtp-hours button, .dtp-mins button {
  min-height: 40px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  color: var(--text-2); font-size: 15px; font-variant-numeric: tabular-nums;
}
.dtp-hours button:hover, .dtp-mins button:hover:not(:disabled) { color: var(--text); }
.dtp-mins button:disabled { color: var(--text-3); cursor: default; }
.dtp-hours button[aria-pressed="true"], .dtp-mins button[aria-pressed="true"] {
  background: var(--card); border-color: var(--line); color: var(--ink); font-weight: 500;
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.08);
}
.dtp-sum { padding: 10px 12px; border-radius: var(--r-control); background: var(--raised); color: var(--text-3); font-size: 15px; }
.dtp-sum.is-set { background: var(--ink-wash); color: var(--ink); font-weight: 500; }
.dtp-sum.is-set::first-letter { text-transform: uppercase; }
@media (min-width: 640px) { .dtp-hours { grid-template-columns: repeat(12, 1fr); } }
.dtp + .hint { margin: 8px 0 20px; }

/* ---------- messages, gathered by case (beskeder.js) ---------- */
.threads .rrow > .dot { background: transparent; }
.threads .rrow > .dot.new { background: var(--ink); }
.threads .rrow.unread .rrow-type, .threads .rrow.unread .rrow-desc { color: var(--text); font-weight: 500; }
.threads .count, .side-nav .count.new { margin-left: 0; padding: 0 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; line-height: 20px; }
.side-nav .count.new { margin-left: auto; }
.convo { max-width: 760px; }
.convo .detail-head h2 { font-size: 20px; }
.msgs { display: grid; gap: 12px; padding: 24px 0; }
.msg { justify-self: start; max-width: min(560px, 88%); display: grid; gap: 4px; }
.msg-who { font-size: 13px; color: var(--text-3); }
.msg-text {
  padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--page); border: 1px solid var(--line);
  font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.mine { justify-self: end; text-align: right; }
.msg.mine .msg-text { border-radius: 14px 4px 14px 14px; background: var(--ink-wash); border-color: transparent; color: var(--ink); text-align: left; }
.msg-event { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 2px 16px; font-size: 13px; color: var(--text-3); text-align: center; }
.msg-event .mono { font-family: var(--font); font-size: 12px; }
.reply { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.reply .btn { justify-self: end; }
.reply-none { padding-top: 16px; border-top: 1px solid var(--line); }
.contact-box { margin: 16px 16px 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.contact-box summary { cursor: pointer; font-size: 14px; color: var(--text-2); }
.contact-box .addform { margin-top: 12px; }
.thread-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.thread-link .count { margin-left: 2px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; line-height: 20px; }
