/* ————————————————————————————————————————————————
   CONVOY · motorpool console
   Identity: tar chrome, poured-concrete deck, keytag yellow.
   Type: Saira (UI) · Saira Condensed (plates, counts) · Spline Sans Mono (data).
   Signature: the key wall — die-cut keytags under a hook rail.
———————————————————————————————————————————————— */

/* Layout rules below set display on .gate/.modal, which would otherwise beat
   the UA stylesheet's [hidden] and leave the sign-in gate painted over the
   console after login. */
[hidden] { display: none !important; }

:root {
  --tar: #22251F;
  --tar-2: #2B2F27;
  --tar-3: #383D33;
  --concrete: #E8E6DF;
  --card: #FDFCF8;
  --card-dim: #F3F1EA;
  --ink: #181A15;
  --muted: #5F6457;
  --faint: #8A8E80;
  --line: #D5D2C6;
  --line-soft: #E2DFD4;
  --yellow: #F2C614;
  --yellow-deep: #CFA400;
  --yellow-soft: #FBF0C4;
  --green: #2E7D43;
  --green-soft: #E3EFE4;
  --blue: #3D6B9E;
  --blue-soft: #E4EBF4;
  --rust: #A6532A;
  --rust-soft: #F5E7DD;
  --red: #B0362C;
  --red-soft: #F6E3E0;
  --gray: #75796D;
  --gray-soft: #E9E8E1;
  --f-body: "Saira", system-ui, sans-serif;
  --f-disp: "Saira Condensed", "Saira", sans-serif;
  --f-mono: "Spline Sans Mono", ui-monospace, monospace;
  --r: 10px;
  --shadow: 0 1px 2px rgba(24, 26, 21, 0.08), 0 6px 18px -12px rgba(24, 26, 21, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--concrete);
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 60;
  background: var(--yellow); color: var(--ink); padding: 8px 14px;
  border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 8px; }

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

.mono { font-family: var(--f-mono); }

/* ——— hazard chevron: used once per surface, top edge ——— */
.chevron {
  height: 7px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--tar) 12px 24px);
}

/* ——— brand tag (die-cut keytag) ——— */
.brand-tag {
  position: relative;
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.14em;
  line-height: 1;
  padding: 20px 20px 10px;
  border-radius: 9px 9px 12px 12px;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(24, 26, 21, 0.18);
}
.bt-hole {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--tar);
  box-shadow: 0 0 0 3px rgba(24, 26, 21, 0.22);
}
.gate .bt-hole { background: var(--tar); }

/* ————————————————— GATE ————————————————— */
.gate {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 16px 48px;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(242, 198, 20, 0.07), transparent 60%),
    var(--tar);
}
.gate-card {
  width: 100%; max-width: 430px;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
}
.gate-body { padding: 26px 30px 30px; }
.gate-kicker {
  margin: 14px 0 18px;
  font-family: var(--f-disp);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}
.gate h1 {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.gate-lede { margin: 10px 0 22px; color: var(--muted); }
.gate-alt { margin-top: 20px; font-size: 13.5px; color: var(--muted); }
#signupForm { margin-top: 14px; padding-top: 4px; border-top: 1px dashed var(--line); }

.demo-tag {
  margin-top: 22px;
  border: 1.5px dashed var(--yellow-deep);
  background: var(--yellow-soft);
  border-radius: var(--r);
  padding: 14px 16px;
}
.dt-title {
  font-family: var(--f-disp);
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.dt-creds { margin: 6px 0 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.dt-creds .mono { font-size: 12.5px; }

/* ——— forms ——— */
label {
  display: block;
  margin: 14px 0 5px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
input, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--yellow-deep); box-shadow: 0 0 0 3px rgba(242, 198, 20, 0.28); }
.mono-input { font-family: var(--f-mono); font-size: 13.5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-err {
  margin: 12px 0 0;
  padding: 9px 12px;
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  color: #7C241C;
  font-size: 13.5px;
}
.form-ok {
  margin: 12px 0 0;
  padding: 9px 12px;
  background: var(--green-soft);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  color: #1F5730;
  font-size: 13.5px;
}

.btn {
  display: inline-block;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(24, 26, 21, 0.18); }
.btn-primary:hover:not([disabled]) { background: #FFD52E; }
.btn-ghost { background: transparent; border-color: var(--line); color: inherit; }
.btn-ghost:hover:not([disabled]) { border-color: var(--faint); }
.btn-dark { background: var(--tar); color: #F2F1E9; }
.btn-dark:hover:not([disabled]) { background: var(--tar-3); }
.btn-wide { width: 100%; margin-top: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.linklike {
  background: none; border: 0; padding: 0;
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

/* ————————————————— CONSOLE FRAME ————————————————— */
.console { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.rail {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  background: var(--tar);
  color: #E9E8DE;
  overflow-y: auto;
}
.rail-brand { margin: 22px 20px 0; align-self: flex-start; }
.rail-sub {
  margin: 10px 20px 0;
  font-family: var(--f-disp);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #A9AC9C;
}
.rail-clock {
  margin: 16px 20px 6px;
  padding: 8px 12px;
  border: 1px solid var(--tar-3);
  border-radius: 8px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-size: 12.5px; color: #C9CBBD;
}
.rail-clock .mono { font-size: 13px; color: var(--yellow); }

.rail-nav { display: flex; flex-direction: column; margin: 14px 0 12px; }
.rail-nav a {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 20px 11px 24px;
  font-family: var(--f-disp);
  font-weight: 600; font-size: 15.5px;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: #C7C9BA;
  text-decoration: none;
  border-left: 4px solid transparent;
}
.rail-nav a:hover { color: #F4F3E9; background: var(--tar-2); }
.rail-nav a[aria-current="page"] {
  color: var(--yellow);
  background: var(--tar-2);
  border-left-color: var(--yellow);
}
.nav-badge {
  min-width: 22px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11.5px; letter-spacing: 0;
  color: #E9E8DE;
  background: var(--tar-3);
  border-radius: 20px;
  padding: 1px 7px;
}
.nav-badge-live { background: var(--blue); }
.nav-badge-warn { background: var(--rust); }

.op-card { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid var(--tar-3); }
.op-name { font-weight: 600; }
.op-role { font-size: 12.5px; color: #A9AC9C; margin: 1px 0 12px; }
.op-card .btn-ghost { border-color: var(--tar-3); color: #C7C9BA; font-size: 13px; }
.op-card .btn-ghost:hover { color: #F4F3E9; border-color: var(--faint); }

/* ——— deck ——— */
.deck { padding: 30px 36px 60px; min-width: 0; }
.deck-head { margin-bottom: 22px; }
.deck-head h1 {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 42px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}
.deck-stamp { margin-top: 6px; color: var(--muted); }

.panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  margin-bottom: 22px;
  min-width: 0;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 {
  font-family: var(--f-disp);
  font-weight: 700; font-size: 19px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.panel-link {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
.panel-link:hover { color: var(--ink); }

.board-cols, .dispatch-cols, .service-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  align-items: start;
}
.board-cols .panel, .dispatch-cols .panel, .service-cols .panel { margin-bottom: 0; }
.board-cols { margin-bottom: 22px; }

/* ——— status strip (magnet counts) ——— */
.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.magnet {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px 16px 10px;
  border-top: 4px solid var(--gray);
}
.magnet-n {
  font-family: var(--f-disp);
  font-weight: 700; font-size: 40px; line-height: 1;
}
.magnet-l {
  font-family: var(--f-disp);
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.magnet-available { border-top-color: var(--green); }
.magnet-in_use { border-top-color: var(--blue); }
.magnet-in_shop { border-top-color: var(--rust); }
.magnet-retired { border-top-color: var(--gray); }

/* ——— chips ——— */
.chip {
  display: inline-block;
  font-family: var(--f-disp);
  font-weight: 600; font-size: 11.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.chip-available, .chip-active, .chip-completed { background: var(--green-soft); color: var(--green); }
.chip-in_use, .chip-on_trip, .chip-run { background: var(--blue-soft); color: var(--blue); }
.chip-in_shop, .chip-off_duty { background: var(--rust-soft); color: var(--rust); }
.chip-retired { background: var(--gray-soft); color: var(--gray); }
.chip-danger { background: var(--red-soft); color: var(--red); }
.chip-warn { background: var(--yellow-soft); color: #7A6200; }
.chip-ok { background: var(--green-soft); color: var(--green); }
.chip-type { background: var(--gray-soft); color: var(--muted); }

/* ——— odometer drum ——— */
.odo {
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.odo-cells {
  display: inline-flex;
  border-radius: 5px; overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.55);
}
.odo-cells span {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1;
  padding: 4px 4px 3px;
  background: #1D1F1A;
  color: #F3F2E7;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.odo-cells span:last-child { background: #F3F2E7; color: #1D1F1A; border-right: 0; }
.odo-unit { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }

/* ————————————————— KEY WALL ————————————————— */
.wall-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wall-filters button {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: var(--f-disp);
  font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.wall-filters button:hover { border-color: var(--faint); color: var(--ink); }
.wall-filters button[aria-pressed="true"] {
  background: var(--tar); border-color: var(--tar); color: var(--yellow);
}

.wall {
  background: var(--tar-2);
  border-radius: 12px;
  padding: 0 18px 22px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}
.wall-rail {
  height: 16px;
  margin: 0 -18px 20px;
  border-radius: 12px 12px 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(242, 198, 20, 0.85) 34px 38px, transparent 38px 72px),
    linear-gradient(#454A3E, #33372D);
  background-position: 18px 0, 0 0;
  border-bottom: 2px solid #171912;
}
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 20px 16px;
}

.tag {
  position: relative;
  display: block;
  background: var(--card);
  border-radius: 9px 9px 14px 14px;
  padding: 26px 14px 12px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 14px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tag::before {
  content: "";
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--tar-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 0 3px #C9C6B8;
}
.tag:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 14px 22px -10px rgba(0, 0, 0, 0.65); }
.tag-plate {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px; margin-bottom: 8px;
}
.tag-model { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.tag-sub { color: var(--muted); font-size: 12.5px; margin: 1px 0 9px; }
.tag-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.tag-out {
  margin-top: 9px;
  font-size: 12.5px; font-weight: 600;
  color: var(--blue);
}
.tag--in_use { border-style: dashed; border-color: var(--blue); background: var(--card-dim); }
.tag--in_shop { border-color: var(--rust); }
.tag--retired { opacity: 0.62; }
.tag--in_shop .tag-plate { border-bottom-color: var(--rust); }

/* ————————————————— VEHICLE SHEET ————————————————— */
.backlink {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 600; font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
}
.backlink::before { content: "◂ "; }
.backlink:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.sheet-head {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 22px;
  display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center;
}
.sheet-plate {
  background: var(--tar);
  color: #F5F4EA;
  border-radius: 8px;
  padding: 10px 16px 8px;
  font-family: var(--f-mono);
  font-weight: 600; font-size: 27px; letter-spacing: 0.1em;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px #F5F4EA33;
}
.sheet-id h2 { font-family: var(--f-disp); font-weight: 700; font-size: 27px; text-transform: uppercase; letter-spacing: 0.02em; }
.sheet-id p { color: var(--muted); font-size: 13.5px; }
.sheet-id .mono { font-size: 12.5px; }
.sheet-status { margin-left: auto; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.sheet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.sheet-cols .panel { margin-bottom: 22px; }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.spec-grid dt {
  font-family: var(--f-disp);
  font-weight: 600; font-size: 11.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.spec-grid dd { margin: 1px 0 0; font-weight: 500; overflow-wrap: anywhere; }
dl { margin: 0; }

.hist { list-style: none; margin: 0; padding: 0; }
.hist li { padding: 11px 0; border-top: 1px dashed var(--line); }
.hist li:first-child { border-top: 0; padding-top: 2px; }
.hist-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hist-title { font-weight: 600; }
.hist-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hist-amt { font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }

/* ————————————————— DISPATCH ————————————————— */
.run-card {
  border: 1.5px solid var(--blue);
  border-radius: var(--r);
  background: linear-gradient(0deg, rgba(61, 107, 158, 0.05), rgba(61, 107, 158, 0.05)), var(--card);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.run-card:last-child { margin-bottom: 0; }
.run-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; }
.run-title { font-family: var(--f-disp); font-weight: 700; font-size: 19px; letter-spacing: 0.02em; }
.run-title .mono { font-size: 15px; letter-spacing: 0.08em; }
.run-elapsed { font-family: var(--f-mono); font-size: 12.5px; color: var(--blue); white-space: nowrap; }
.run-meta { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.run-meta strong { color: var(--ink); }
.run-form {
  margin-top: 14px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0 12px;
  align-items: end;
}
.run-form .btn { margin-bottom: 1px; }
.run-hint { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.run-form .form-err { grid-column: 1 / -1; }

/* ——— tables ——— */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left;
  font-family: var(--f-disp);
  font-weight: 600; font-size: 11.5px;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px 8px;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .mono { font-size: 12.5px; white-space: nowrap; }
.td-num { text-align: right; font-family: var(--f-mono); font-size: 12.5px; white-space: nowrap; }
.td-wrap { min-width: 180px; }

/* ————————————————— DRIVERS ————————————————— */
.driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 16px; }
.driver-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.driver-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.driver-name { font-family: var(--f-disp); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.driver-contact { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.license-line {
  margin-top: 12px;
  padding: 9px 12px;
  background: var(--card-dim);
  border-radius: 8px;
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between;
  font-size: 12.5px;
}
.license-line .mono { font-size: 12px; }
.driver-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.driver-note { font-size: 12.5px; color: var(--muted); }

/* ————————————————— SERVICE ————————————————— */
.svc-rows { display: flex; flex-direction: column; }
.svc-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 11px 2px;
  border-top: 1px dashed var(--line);
}
.svc-row:first-child { border-top: 0; }
.svc-plate { font-family: var(--f-mono); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; }
.svc-main { font-weight: 600; font-size: 13.5px; }
.svc-sub { color: var(--muted); font-size: 12.5px; }

/* ——— add-folds, skeletons, empty, toast ——— */
.add-fold {
  margin-top: 22px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 0 20px;
}
.add-fold summary {
  cursor: pointer;
  padding: 14px 0;
  font-family: var(--f-disp);
  font-weight: 600; font-size: 14px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.add-fold summary:hover { color: var(--ink); }
.add-fold[open] { border-style: solid; }
.add-fold form { padding-bottom: 20px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 0 14px; }
.grid-form label { margin-top: 12px; }
.gf-wide { grid-column: 1 / -1; }
.grid-form .btn { margin-top: 14px; }

.empty {
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
}
.empty strong { display: block; font-family: var(--f-disp); font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin-bottom: 3px; }
.wall .empty { color: #C7C9BA; border-color: var(--tar-3); }
.wall .empty strong { color: #F4F3E9; }

.skel { position: relative; overflow: hidden; background: var(--line-soft); border-radius: 8px; min-height: 16px; }
.skel::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 1.3s infinite;
}
.skel-tag { height: 128px; border-radius: 9px 9px 14px 14px; background: #3A3E34; }
.skel-tag::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); }
.skel-row { height: 42px; margin-bottom: 10px; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

.toast {
  position: fixed;
  left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 50;
  max-width: min(560px, calc(100vw - 32px));
  background: var(--tar);
  color: #F2F1E7;
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}
.toast--err { border-left-color: var(--red); }

/* ————————————————— RESPONSIVE ————————————————— */
@media (max-width: 1180px) {
  .run-form { grid-template-columns: 1fr 1fr; }
  .run-form .btn { margin-top: 14px; }
  .grid-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .console { display: block; }
  .rail { position: static; height: auto; overflow: visible; padding-bottom: 0; }
  .rail-brand { margin-top: 16px; }
  .rail-clock { display: none; }
  .rail-sub { display: inline-block; }
  .rail-nav {
    flex-direction: row;
    overflow-x: auto;
    margin: 12px 0 0;
    border-top: 1px solid var(--tar-3);
  }
  .rail-nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 11px 14px; white-space: nowrap; }
  .rail-nav a[aria-current="page"] { border-left: 0; border-bottom-color: var(--yellow); }
  .op-card {
    position: absolute; top: 14px; right: 14px;
    margin: 0; padding: 0; border: 0;
  }
  .op-name, .op-role { display: none; }
  .rail { position: relative; }
  .deck { padding: 22px 18px 48px; }
  .board-cols, .dispatch-cols, .service-cols, .sheet-cols { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deck-head h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .grid-form { grid-template-columns: 1fr; }
  .run-form { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 1fr auto; }
  .svc-plate { grid-column: 1; }
  .svc-row .chip { grid-row: 1; grid-column: 2; justify-self: end; }
  .sheet-status { margin-left: 0; align-items: flex-start; }
  .tag-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .gate-body { padding: 22px 20px 26px; }
  .deck { padding: 18px 12px 44px; }
  .panel { padding: 14px 14px 16px; }
  .wall { padding: 0 12px 16px; }
  .wall-rail { margin: 0 -12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .tag:hover { transform: none; }
}
