/* Fusaro Fleet web app.
 *
 * Built for two places: a yard office on a laptop, and a driver's phone in
 * the sun. Hence large touch targets, strong contrast, and nothing loaded
 * from anyone else's server (no web fonts, no CDNs).
 *
 * The one deliberate flourish is the number plate: registrations are how
 * fleet people name vehicles, so they are drawn as plates everywhere.
 */

:root {
  --ink: #18212e;          /* asphalt */
  --ink-2: #2b3646;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --line: #d6dce4;
  --muted: #5a6575;
  --yellow: #f2b705;       /* road-marking yellow: expiring, focus */
  --yellow-soft: #fff4cc;
  --red: #c4122f;          /* expired, blocking */
  --red-soft: #fde8eb;
  --green: #17794a;        /* in date */
  --green-soft: #e3f4ea;
  --link: #1d4fd8;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-plate: "Arial Narrow", "Roboto Condensed", "DejaVu Sans Condensed", "Liberation Sans Narrow", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;

  --radius: 8px;
  --nav-w: 232px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--font);
}
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--step-1); font-weight: 650; }
h3 { font-size: var(--step-0); font-weight: 650; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.boot { padding: 2rem; color: var(--muted); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- plates */

.plate {
  display: inline-block;
  font: 700 1.05em/1 var(--font-plate);
  font-stretch: condensed;
  letter-spacing: .06em;
  padding: .28em .5em .24em;
  background: #fff;
  color: #111;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #c9ced6;
  white-space: nowrap;
  text-decoration: none;
}
.plate.big { font-size: 1.6rem; }
a.plate:hover { background: var(--yellow-soft); }

/* ---------------------------------------------------------------- shell */

.shell { min-height: 100vh; display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }
.side {
  background: var(--ink);
  color: #dfe5ee;
  padding: 1.25rem .75rem;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: .25rem;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: 0 .5rem 1rem; color: #fff; font-weight: 700; }
.brand img { width: 28px; height: 28px; }
.org { padding: 0 .5rem 1rem; font-size: var(--step--1); color: #a9b4c4; }
.side a {
  color: #dfe5ee; text-decoration: none;
  padding: .6rem .75rem; border-radius: 6px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
}
.side a:hover { background: var(--ink-2); }
.side a[aria-current="page"] { background: #fff; color: var(--ink); }
.side .count { background: var(--red); color: #fff; border-radius: 99px; padding: 0 .45rem; font-size: .75rem; font-weight: 700; }
.side .spacer { flex: 1; }
.side .me { font-size: var(--step--1); color: #a9b4c4; padding: .5rem .75rem; }

/* min-width: 0 lets wide tables scroll inside their box instead of
   pushing the whole page sideways on a phone. */
main { padding: 1.75rem 2rem 4rem; max-width: 1180px; width: 100%; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head p { margin: 0; }

.bottom-nav { display: none; }

@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { padding: 1rem 1rem 6rem; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
    background: var(--ink); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a {
    color: #dfe5ee; text-decoration: none; text-align: center;
    padding: .7rem .2rem; font-size: .8rem; font-weight: 600;
  }
  .bottom-nav a[aria-current="page"] { color: var(--yellow); }
  .topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
}
@media (min-width: 821px) { .topbar { display: none; } }

/* ---------------------------------------------------------------- controls */

button, .button {
  font: inherit; font-weight: 600;
  min-height: 44px; padding: .55rem 1rem;
  border-radius: var(--radius); border: 1.5px solid var(--ink);
  background: var(--ink); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--ink-2); }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); }
button.secondary:hover, .button.secondary:hover { background: var(--paper); }
button.danger { background: var(--red); border-color: var(--red); }
button.link { background: none; border: 0; color: var(--link); padding: 0; min-height: 0; font-weight: 500; text-decoration: underline; }
button:disabled { opacity: .55; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: .3rem; }
.hint { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; width: 100%;
  min-height: 44px; padding: .5rem .7rem;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 3px solid var(--yellow); outline-offset: 0; }
.field { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.check input { width: auto; min-height: 0; }

.search { max-width: 320px; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip-filter { min-height: 36px; padding: .3rem .8rem; border-radius: 99px; font-weight: 600; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.chip-filter[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------------------------------------------------------------- content */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.panel > h2 { margin-bottom: .75rem; }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); margin-bottom: 1.25rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: var(--step--1); color: var(--muted); font-weight: 600; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: var(--step--1); white-space: nowrap; }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--green); }
.status.warn { color: #946c00; }
.status.bad { color: var(--red); }
.status.idle { color: var(--muted); }

/* The day's priorities: the manager's home page. */
.headline { font-size: var(--step-3); font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; max-width: 22ch; margin: .25rem 0 1.5rem; }
.priorities { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .6rem; }
.priority {
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--muted);
  border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .25rem;
}
.priority.CRITICAL { border-left-color: var(--red); }
.priority.HIGH { border-left-color: #e0670c; }
.priority.MEDIUM { border-left-color: var(--yellow); }
.priority .title { font-weight: 650; }
.priority .why { color: var(--muted); font-size: var(--step--1); }
.priority .do { font-size: var(--step--1); }
.all-clear { background: var(--green-soft); border: 1px solid #b9e2c9; border-radius: var(--radius); padding: 1rem 1.25rem; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.figure b { display: block; font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.figure span { color: var(--muted); font-size: var(--step--1); }

.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.error-box { background: var(--red-soft); border: 1px solid #f3b5bf; color: #7a0b1d; border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.note-box { background: var(--yellow-soft); border: 1px solid #f0d77a; border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.ok-box { background: var(--green-soft); border: 1px solid #b9e2c9; border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }

/* ---------------------------------------------------------------- dialog & toast */

dialog {
  border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 2rem));
  box-shadow: 0 20px 60px rgba(24, 33, 46, .35); color: var(--ink);
}
dialog::backdrop { background: rgba(24, 33, 46, .55); }
dialog form, dialog .body { padding: 1.25rem 1.25rem .5rem; }
dialog footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 0 1.25rem 1.25rem; }

.toast {
  position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: var(--radius);
  font-weight: 600; z-index: 20; max-width: calc(100vw - 2rem);
}

/* ---------------------------------------------------------------- sign-in */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--ink); }
.auth .card { background: var(--surface); border-radius: 12px; padding: 2rem; width: min(420px, 100%); }
.auth .card .plate { margin-bottom: 1.25rem; }

/* ---------------------------------------------------------------- driver */

.driver { max-width: 520px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.driver-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.vehicle-pick { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; display: grid; gap: .5rem; }
.tiles { display: grid; gap: .75rem; }
.tile {
  display: block; width: 100%; text-align: left;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 12px; padding: 1.1rem 1.2rem; min-height: 84px;
}
.tile:hover { background: var(--yellow-soft); }
.tile b { display: block; font-size: var(--step-1); }
.tile span { color: var(--muted); font-weight: 500; }
.tile.alert { border-color: var(--red); }
.back { margin-bottom: 1rem; }
.severity-pick { display: grid; gap: .5rem; }
.severity-pick label { display: flex; gap: .7rem; align-items: start; border: 1.5px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; font-weight: 500; font-size: var(--step-0); }
.severity-pick input { width: auto; min-height: 0; margin-top: .3rem; }
.severity-pick label:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }

/* ---------------------------------------------------------------- import */

.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 1.5rem; text-align: center; background: var(--surface); }
.drop.over { border-color: var(--ink); background: var(--yellow-soft); }

/* Buttons inside tables stay compact and on one line. */
td button, td .button { min-height: 36px; padding: .35rem .75rem; white-space: nowrap; }
td .actions { gap: .4rem; }
.severity-pick { border: 0; padding: 0; margin: 0 0 1rem; }
.severity-pick legend { font-weight: 600; margin-bottom: .4rem; }
.under-plate { margin-top: .6rem; }
.drop input[type="file"] { max-width: 100%; }

/* ---------------------------------------------------------------- emergencies */

.alert-slot:empty { display: none; }
.alert-band {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center;
  background: var(--red); color: #fff; border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .75rem;
}
.alert-band.SUPPORT { background: #8a5a00; }
.alert-band .button, .alert-band button { background: #fff; color: var(--red); border-color: #fff; }
.alert-band.PANIC { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(196, 18, 47, .25); } }

.panic {
  display: grid; place-items: center; width: 100%; min-height: 120px;
  background: var(--red); color: #fff; border: 0; border-radius: 16px;
  font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; position: relative; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.panic:hover { background: #a80f28; }
.panic .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(0, 0, 0, .25); }
.panic span { position: relative; }
.panic small { display: block; font-size: .85rem; font-weight: 600; opacity: .9; }
.call-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.call-grid a { min-height: 64px; flex-direction: column; font-size: .8rem; }
.call-grid a b { font-size: 1.2rem; }
.help-sent { background: var(--red-soft); border: 2px solid var(--red); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }

/* ---------------------------------------------------------------- schedule */

.schedule { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.schedule .row { display: grid; grid-template-columns: 170px 1fr; min-width: 760px; border-bottom: 1px solid var(--line); }
.schedule .row:last-child { border-bottom: 0; }
.schedule .who { padding: .6rem .8rem; font-weight: 600; border-right: 1px solid var(--line); }
.schedule .lane { position: relative; min-height: 52px; }
.schedule .hours { font-size: .75rem; color: var(--muted); }
.schedule .tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid #eef1f4; padding-left: 3px; }
.schedule .block {
  position: absolute; top: 8px; bottom: 8px; border-radius: 6px; padding: 2px 6px; overflow: hidden;
  background: #e7edf7; border: 1.5px solid var(--ink); font-size: .78rem; line-height: 1.2; white-space: nowrap;
}
.schedule .block.IN_PROGRESS { background: var(--yellow-soft); border-color: #946c00; }
.schedule .block.COMPLETED { background: #eef1f4; border-color: var(--line); color: var(--muted); }
.schedule .now { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--red); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.timeline li { border-left: 3px solid var(--line); padding: .1rem 0 .1rem .75rem; }
.timeline li.DELAY { border-color: var(--yellow); }
.timeline li.SLIP { border-color: var(--green); }
.filters select, .filters input { width: auto; min-width: 0; }
.call-grid { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.call-grid a b { font-size: 1.05rem; white-space: nowrap; }
.grid-2 > * { min-width: 0; }

/* Update 12 */
a.link-figure { color: inherit; text-decoration: none; }
a.link-figure:hover { border-color: var(--ink); background: var(--yellow-soft); }
.economics h2 { margin-top: .5rem; }
.doc-image { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 6px; }

/* Office (update 13) */
.office-label { margin: 0 0 .25rem; text-transform: uppercase; letter-spacing: .06em; }
.office-summary { margin: 0 0 1rem; }
.warn-text { color: var(--red); }
.range { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.range .field { margin: 0; }
.range input { width: auto; }

/* Map (update 14) */
.map { height: min(65vh, 560px); border: 1px solid var(--line); border-radius: var(--radius); margin: .5rem 0 .75rem; background: #e8ecef; z-index: 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .75rem 0 .25rem; }
.map-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.dot.faded { background: var(--muted); opacity: .45; }
.depot-pin { background: var(--ink); border: 2px solid var(--yellow); border-radius: 2px; }
.map-name { font-weight: 600; padding: 1px 5px; }
.map-pop { min-width: 180px; line-height: 1.4; }
.map-pop .actions { margin-top: .4rem; display: flex; gap: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: .5rem 0 .75rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; }
.stat-value { font-size: var(--step-1); font-weight: 700; }
.replay { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.replay input[type=range] { flex: 1; min-width: 0; }
.replay span { min-width: 9rem; text-align: right; }
.range select { width: auto; }

/* Traccar Client set-up (update 15) */
.steps { padding-left: 1.25rem; line-height: 1.5; }
.steps > li { margin-bottom: .9rem; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .5rem; align-items: center; margin: .5rem 0; }
.copy-row .muted { grid-column: 1 / -1; }
.copy-row code { overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .5rem; font-size: var(--step--1); }

/* Job-finished alerts (update 16) */
.job-alerts { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: grid; gap: .5rem; width: min(360px, calc(100vw - 2rem)); }
.job-alert { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(24, 33, 46, .18); padding: .75rem .9rem; display: grid; gap: .4rem; }
.job-alert .actions { display: flex; gap: 1rem; }
@media (max-width: 820px) { .job-alerts { bottom: 5rem; } }
.checks { display: grid; gap: .6rem; margin: .5rem 0 1rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; }
label.check input { width: auto; margin-top: .25rem; }
.device-box { border-top: 1px solid var(--line); padding-top: .75rem; margin-bottom: .75rem; }
.actions + .panel { margin-top: 1rem; }

/* ---------------------------------------------------------------- driver app (update 17)
 * One bold thing: the duty band, drawn as a strip of road with a lane line.
 * Everything else is quiet: white cards, line icons, big type for gloves and sun. */

.driver { padding-top: 0; }
.d-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin: 0 -1rem; padding: 1rem 1rem .9rem; background: var(--ink); color: #fff;
}
.d-who { display: flex; align-items: center; gap: .75rem; }
.d-who b { font-size: var(--step-1); }
.d-avatar {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 1rem;
}
.d-sub { margin-top: .2rem; font-size: var(--step--1); color: #c9d1db; }
.d-sub .plate { transform: scale(.82); transform-origin: left center; }
.d-signout { background: transparent; color: #fff; border: 1.5px solid #5d6b7e; min-height: 40px; padding: .4rem .8rem; font-size: var(--step--1); }
.d-signout:hover { background: var(--ink-2); }

.duty {
  margin: 0 -1rem 1.1rem; padding: .9rem 1rem 1.1rem; color: #fff; background: var(--ink-2);
  /* The lane line: road-marking yellow dashes along the top edge. */
  background-image: repeating-linear-gradient(90deg, var(--yellow) 0 28px, transparent 28px 46px);
  background-size: 100% 4px; background-repeat: no-repeat; background-position: 0 0;
}
.duty-now { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .35rem 0 .75rem; }
.duty-now b { font-size: var(--step-2); line-height: 1.1; }
.duty-now span { color: #c9d1db; font-size: var(--step--1); }
.duty-ON_DUTY .duty-now b { color: #7ee2a8; }
.duty-ON_BREAK .duty-now b { color: var(--yellow); }
.duty-OFF_DUTY .duty-now b { color: #fff; }
.duty-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; background: rgba(0,0,0,.25); padding: .3rem; border-radius: 14px; }
.duty-opt {
  min-height: 52px; border-radius: 11px; border: 0; background: transparent; color: #dfe5ec;
  font-weight: 700; font-size: var(--step-0);
}
.duty-opt:hover { background: rgba(255,255,255,.08); }
.duty-opt[aria-pressed="true"] { color: var(--ink); }
.duty-opt-ON_DUTY[aria-pressed="true"] { background: #7ee2a8; }
.duty-opt-ON_BREAK[aria-pressed="true"] { background: var(--yellow); }
.duty-opt-OFF_DUTY[aria-pressed="true"] { background: #fff; }
.duty-opt:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.d-job {
  display: grid; gap: .25rem; width: 100%; text-align: left; margin-bottom: 1rem;
  justify-content: stretch; justify-items: start; align-content: start;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line);
  border-left: 6px solid var(--muted); border-radius: 14px; padding: 1rem 1.1rem;
}
.d-job.live { border-left-color: var(--green); }
.d-job b { font-size: var(--step-2); letter-spacing: .01em; }
.d-job-tag { font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.d-job.live .d-job-tag { color: var(--green); }
.d-job-to { font-size: var(--step-1); font-weight: 600; }
.d-job-time, .d-job-more { color: var(--muted); }
.d-job.empty { border-left-color: var(--line); }
.d-job.empty span { color: var(--muted); }
.d-panic-open { display: grid; gap: .2rem; width: 100%; text-align: left; justify-content: stretch; justify-items: start; margin-bottom: 1rem; background: var(--red-soft); color: var(--red); border: 2px solid var(--red); border-radius: 14px; padding: 1rem; }

.driver .panic { margin-bottom: 1.1rem; border-radius: 18px; min-height: 104px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); }

.d-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.d-tile {
  display: grid; gap: .3rem; align-content: start; justify-items: start; justify-content: stretch; text-align: left;
  min-height: 118px; padding: .95rem; background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px;
}
.d-tile:hover { border-color: var(--ink); }
.d-tile:active { transform: translateY(1px); }
.d-tile b { font-size: var(--step-0); font-weight: 750; line-height: 1.2; }
.d-tile span { color: var(--muted); font-size: var(--step--1); font-weight: 500; }
.d-tile.warn .d-icon { color: var(--red); }
.d-tile.wide { grid-column: 1 / -1; min-height: 0; grid-template-columns: auto 1fr; align-items: center; column-gap: .8rem; }
.d-tile.wide .d-icon { grid-row: span 2; }
.d-icon { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--ink); margin-bottom: .2rem; }
@media (prefers-reduced-motion: reduce) { .d-tile:active { transform: none; } }
.d-head + .back, .d-head + h1 { margin-top: 1rem; }
