/* ===========================================================================
   WuWa Bot Console — shared design system
   ---------------------------------------------------------------------------
   One stylesheet for every page in the console. The palette is the validated
   data-viz reference instance, carried over unchanged from the watch-party
   board so the two never drift apart: same ramps, same status steps, same
   surfaces. Dark mode is a *selected* set of steps for the dark surface, not
   an automatic inversion.

   Rules this file holds itself to:
     · status is never colour alone — every status chip ships a glyph + a word
     · text wears text tokens; a coloured mark beside it carries identity
     · tabular figures only where numbers must line up vertically
   =========================================================================== */

/* ---- tokens -------------------------------------------------------------- */
:root {
  color-scheme: light;

  --plane:          #f9f9f7;   /* page background */
  --surface:        #fcfcfb;   /* card background */
  --surface-sunken: #f2f1ed;   /* wells, table heads, empty states */
  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --muted:          #898781;
  --gridline:       #e1e0d9;
  --baseline:       #c3c2b7;
  --border:         rgba(11,11,11,0.10);
  --border-strong:  rgba(11,11,11,0.18);

  /* categorical slots, fixed order — never cycled */
  --series-1: #2a78d6;  /* blue   */
  --series-2: #eb6834;  /* orange */
  --series-3: #1baf7a;  /* aqua   */
  --series-4: #eda100;  /* yellow */

  --accent:       #2a78d6;
  --accent-track: #cde2fb;
  --accent-ink:   #1c5cab;   /* accent used as text on a light surface */

  /* status — reserved, never reused as a series colour */
  --good:     #0ca30c;
  --good-ink: #006300;
  --warning:  #fab219;
  --warning-ink: #6b4700;
  --serious:  #ec835a;
  --critical: #d03b3b;
  --critical-ink: #a12a2a;

  --shadow:    0 1px 2px rgba(11,11,11,0.05), 0 8px 24px rgba(11,11,11,0.06);
  --shadow-lg: 0 2px 8px rgba(11,11,11,0.08), 0 24px 64px rgba(11,11,11,0.14);

  --radius:    14px;
  --radius-sm: 9px;

  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* dark values live under both scopes: the media query covers the OS setting,
   the [data-theme] scope covers the toggle, and the toggle wins both ways */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --plane:          #0d0d0d;
    --surface:        #1a1a19;
    --surface-sunken: #141413;
    --text-primary:   #ffffff;
    --text-secondary: #c3c2b7;
    --muted:          #898781;
    --gridline:       #2c2c2a;
    --baseline:       #383835;
    --border:         rgba(255,255,255,0.10);
    --border-strong:  rgba(255,255,255,0.20);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --accent:       #3987e5;
    --accent-track: #1c2a3f;
    --accent-ink:   #86b6ef;
    --good-ink:     #34c759;
    --warning-ink:  #fab219;
    --critical-ink: #e66767;
    --shadow:    0 1px 2px rgba(0,0,0,0.40), 0 8px 24px rgba(0,0,0,0.50);
    --shadow-lg: 0 2px 8px rgba(0,0,0,0.50), 0 24px 64px rgba(0,0,0,0.60);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plane:          #0d0d0d;
  --surface:        #1a1a19;
  --surface-sunken: #141413;
  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --muted:          #898781;
  --gridline:       #2c2c2a;
  --baseline:       #383835;
  --border:         rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.20);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --accent:       #3987e5;
  --accent-track: #1c2a3f;
  --accent-ink:   #86b6ef;
  --good-ink:     #34c759;
  --warning-ink:  #fab219;
  --critical-ink: #e66767;
  --shadow:    0 1px 2px rgba(0,0,0,0.40), 0 8px 24px rgba(0,0,0,0.50);
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.50), 0 24px 64px rgba(0,0,0,0.60);
}

/* ---- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--plane);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 96px; }
.num  { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.spacer { flex: 1 1 auto; }
[hidden] { display: none !important; }

/* ---- top bar ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--plane) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  max-width: 1180px; margin: 0 auto; padding: 11px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 680; font-size: 15px;
  letter-spacing: -0.015em; white-space: nowrap;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--series-1), var(--series-3));
  color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand small {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--muted); letter-spacing: 0;
}

.tabs { display: flex; gap: 2px; align-items: center; }
.tab {
  text-decoration: none; font-size: 13px; font-weight: 550;
  color: var(--text-secondary);
  padding: 7px 12px; border-radius: var(--radius-sm);
  white-space: nowrap;
}
.tab:hover { color: var(--text-primary); background: var(--surface-sunken); }
.tab[aria-current="page"] {
  color: var(--text-primary); background: var(--surface);
  border: 1px solid var(--border); padding: 6px 11px;
}
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  appearance: none; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 560;
  padding: 7px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color .12s ease, background .12s ease;
}
.btn:hover { border-color: var(--border-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); border-color: transparent; color: #fff;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text-primary); }
.btn-danger { color: var(--critical-ink); border-color: color-mix(in srgb, var(--critical) 35%, var(--border)); }
.btn-sm { font-size: 12px; padding: 5px 10px; }
.icon-btn {
  appearance: none; cursor: pointer;
  width: 34px; height: 34px; flex: none;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary);
  display: grid; place-items: center; font-size: 15px; padding: 0;
}
.icon-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.icon-btn img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.icon-btn.on { border-color: var(--good); }

/* ---- status chip --------------------------------------------------------- */
/* glyph + word always, so the state survives colour-blindness, greyscale
   printing and forced-colors — the colour is the third channel, not the only */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 640; letter-spacing: .02em;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-sunken); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip-good     { color: var(--good-ink);     background: color-mix(in srgb, var(--good) 13%, transparent);     border-color: color-mix(in srgb, var(--good) 28%, transparent); }
.chip-warning  { color: var(--warning-ink);  background: color-mix(in srgb, var(--warning) 18%, transparent);  border-color: color-mix(in srgb, var(--warning) 34%, transparent); }
.chip-critical { color: var(--critical-ink); background: color-mix(in srgb, var(--critical) 13%, transparent); border-color: color-mix(in srgb, var(--critical) 30%, transparent); }
.chip-accent   { color: var(--accent-ink);   background: color-mix(in srgb, var(--accent) 12%, transparent);   border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.chip-live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
@media (prefers-reduced-motion: reduce) { .chip-live .dot { animation: none } }

/* ---- page head ----------------------------------------------------------- */
.pagehead { padding: 34px 0 26px; display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pagehead h1 { font-size: 27px; font-weight: 700; }
.pagehead .lede { color: var(--text-secondary); font-size: 14px; margin: 6px 0 0; max-width: 62ch; }
.pagehead .eyebrow {
  font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 7px;
}

/* ---- cards & panels ------------------------------------------------------ */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: 14.5px; font-weight: 650; }
.panel-head .count { font-size: 12px; color: var(--muted); }
.panel-body { padding: 18px; }
.section { margin-top: 30px; }
.section > h2 {
  font-size: 13px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}

/* ---- stat tiles ---------------------------------------------------------- */
.statrow {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.tile .label {
  font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.tile .value {
  font-size: 30px; font-weight: 700; line-height: 1.12; margin-top: 5px;
  letter-spacing: -0.025em;
}
.tile .value.accent { color: var(--accent-ink); }
.tile .value.good   { color: var(--good-ink); }
.tile .sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

/* ---- fleet grid ---------------------------------------------------------- */
.fleet { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.bot-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .12s ease, transform .12s ease;
}
.bot-card:hover { border-color: var(--border-strong); }
.bot-card.is-offline { background: var(--surface-sunken); }
.bot-top { display: flex; align-items: flex-start; gap: 12px; padding: 17px 18px 13px; }
.bot-icon {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px;
  background: var(--surface-sunken); border: 1px solid var(--border);
}
.bot-name { font-size: 15px; font-weight: 660; letter-spacing: -0.01em; }
.bot-tagline { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.bot-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--border); border-top: 1px solid var(--border);
}
.bot-fact { background: var(--surface); padding: 11px 18px; }
/* an odd number of facts would otherwise leave a visible empty cell — the last
   one takes the whole row instead, which is also where the wordy ones belong */
.bot-fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bot-card.is-offline .bot-fact { background: var(--surface-sunken); }
.bot-fact .k {
  font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.bot-fact .v { font-size: 15px; font-weight: 620; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bot-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.bot-foot a { color: var(--accent-ink); text-decoration: none; font-weight: 580; }
.bot-foot a:hover { text-decoration: underline; }

.bot-card.is-ghost {
  border-style: dashed; background: transparent; box-shadow: none;
  align-items: center; justify-content: center; text-align: center;
  padding: 26px 18px; color: var(--text-secondary); cursor: pointer;
  min-height: 150px; gap: 4px;
}
.bot-card.is-ghost:hover { border-color: var(--accent); color: var(--text-primary); }
.bot-card.is-ghost .k { font-size: 21px; line-height: 1; }
.bot-card.is-ghost .t { font-size: 13px; font-weight: 580; }
.bot-card.is-ghost .s { font-size: 12px; color: var(--muted); max-width: 26ch; }

/* ---- activity feed ------------------------------------------------------- */
.feed { display: flex; flex-direction: column; }
.feed-day {
  font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); padding: 14px 18px 6px;
  border-bottom: 1px solid var(--border); background: var(--surface-sunken);
}
.feed-row {
  display: flex; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.feed-row:last-child { border-bottom: 0; }
.feed-mark { width: 18px; flex: none; text-align: center; line-height: 1.5; }
.feed-title { font-weight: 570; }
.feed-detail { color: var(--text-secondary); font-size: 12.5px; margin-top: 1px; }
.feed-meta { margin-left: auto; text-align: right; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.feed-bot {
  display: inline-block; font-size: 10.5px; font-weight: 620;
  color: var(--text-secondary); background: var(--surface-sunken);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; margin-bottom: 3px;
}

/* ---- work record --------------------------------------------------------- */
.work-item { margin-bottom: 18px; }
.work-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 17px 18px; }
.work-title { font-size: 16.5px; font-weight: 660; letter-spacing: -0.015em; }
.work-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.work-prose { padding: 0 18px 4px; }
.work-prose p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-secondary); max-width: 78ch; }
.work-prose p strong { color: var(--text-primary); font-weight: 600; }
.metric-strip {
  display: grid; gap: 1px; background: var(--border);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 12px 0 0;
}
.metric {
  background: var(--surface); padding: 12px 18px;
}
.metric .k {
  font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.metric .v {
  font-size: 21px; font-weight: 700; margin-top: 2px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.metric .n { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }
.metric.is-live .k::after {
  content: "LIVE"; margin-left: 6px; font-size: 9px; letter-spacing: .06em;
  color: var(--good-ink); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent);
  border-radius: 4px; padding: 0 3px; vertical-align: 1px;
}

/* ---- table --------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 10.5px; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  padding: 10px 16px; background: var(--surface-sunken);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--gridline); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-sunken); }
.table .r { text-align: right; }
.table .num { font-variant-numeric: tabular-nums; }

/* proportion mark: one sequential-hue bar against a recessive track, with the
   value printed beside it — the bar is the comparison, the number is the fact */
.meter {
  height: 7px; border-radius: 4px; overflow: hidden;
  background: var(--accent-track); min-width: 72px;
}
.meter-fill { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.meter-label { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; }
/* the cell where a proportion would be meaningless — stated, not drawn */
.rate-na { font-size: 12.5px; color: var(--muted); }

/* ---- screenshot gallery -------------------------------------------------- */
.shots {
  display: grid; gap: 12px; padding: 16px 18px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.shot {
  border: 1px solid var(--border); border-radius: 11px; overflow: hidden;
  background: var(--surface-sunken); cursor: zoom-in; position: relative;
  display: flex; flex-direction: column;
}
.shot:hover { border-color: var(--border-strong); }
.shot img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
  background: var(--surface-sunken);
}
.shot figcaption {
  font-size: 11.5px; color: var(--text-secondary);
  padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface);
}
.shot .shot-del {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  width: 26px; height: 26px; border-radius: 7px; border: 0; cursor: pointer;
  background: rgba(0,0,0,.62); color: #fff; font-size: 13px; line-height: 1;
  display: none; place-items: center;
}
body.is-admin .shot:hover .shot-del { display: grid; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0,0,0,.86); display: grid; place-items: center;
  padding: 28px; cursor: zoom-out;
}
.lightbox img {
  max-width: 100%; max-height: calc(100vh - 110px);
  border-radius: 10px; box-shadow: var(--shadow-lg);
}
.lightbox figcaption {
  color: #e8e8e6; font-size: 13px; text-align: center; margin-top: 14px; max-width: 70ch;
}
.lightbox .lb-close {
  position: absolute; top: 16px; right: 18px;
  width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 17px;
}

/* ---- dropzone ------------------------------------------------------------ */
.dropzone {
  border: 1.5px dashed var(--baseline); border-radius: 11px;
  padding: 20px; margin: 4px 18px 16px; text-align: center;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  background: var(--surface-sunken);
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--text-primary); }
.dropzone strong { color: var(--text-primary); }

/* ---- forms --------------------------------------------------------------- */
.field { display: block; margin-bottom: 13px; }
.field > span {
  display: block; font-size: 11.5px; font-weight: 640; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
input[type="text"], input[type="date"], input[type="password"], textarea, select {
  width: 100%; font: inherit; font-size: 13.5px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--plane); color: var(--text-primary);
}
textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.field-row { display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---- modal --------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 22px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: min(620px, 100%); max-height: calc(100vh - 60px);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15px; font-weight: 650; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot {
  display: flex; gap: 9px; justify-content: flex-end;
  padding: 13px 18px; border-top: 1px solid var(--border); background: var(--surface-sunken);
}

/* ---- empty state --------------------------------------------------------- */
.empty {
  text-align: center; padding: 52px 24px; color: var(--text-secondary);
  border: 1px dashed var(--baseline); border-radius: var(--radius);
  background: var(--surface-sunken);
}
.empty h3 { font-size: 15.5px; font-weight: 640; color: var(--text-primary); margin-bottom: 5px; }
.empty p { font-size: 13px; margin: 0; max-width: 46ch; margin-inline: auto; }

/* ---- misc ---------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--gridline) 50%, var(--surface-sunken) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0 } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none } }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 18px);
  background: var(--text-primary); color: var(--plane);
  font-size: 13px; font-weight: 550; padding: 10px 16px; border-radius: 10px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; z-index: 200; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.foot-note {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap;
}

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 700px) {
  .wrap { padding: 0 16px 72px; }
  .topbar-in { padding: 10px 16px; gap: 10px; }
  .brand small { display: none; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .topbar-right { margin-left: auto; }
  .pagehead { padding: 26px 0 20px; }
  .pagehead h1 { font-size: 23px; }
  .tile .value { font-size: 26px; }
  .fleet { grid-template-columns: 1fr; }
}

/* ---- print: the delivery packet ------------------------------------------ */
@media print {
  :root { --plane: #fff; --surface: #fff; --surface-sunken: #fff; }
  .topbar, .btn, .icon-btn, .dropzone, .shot-del, .no-print { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .panel, .tile, .bot-card { box-shadow: none; break-inside: avoid; }
  .work-item { break-inside: avoid; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  a { text-decoration: none; }
}
