/* Zatra admin console. Swiss-minimal and dense, in the design system's colours:
   cotton, ink, gamosa (red), muga (gold), tea (green) and river (blue), day and night. */
@font-face {
  font-family: "Anek Latin";
  src: url("/fonts/AnekLatin-Latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* Surfaces */
  --canvas: #f4efe4; --surface: #fffdf8; --surface-2: #f7f3ea; --surface-3: #efe9dc;
  --line: #e2d9c8; --line-strong: #8d8474;
  /* Text */
  --ink: #1c2321; --ink-2: #3a423e; --ink-muted: #5c655f;
  /* Actions and states */
  --primary: #1c2321; --on-primary: #fffdf8;
  --gamosa: #b42318; --on-gamosa: #fffdf8; --gamosa-tint: #f9e3de; --gamosa-ink: #8e1c13;
  --muga: #a86f12; --muga-tint: #f7ead0; --muga-ink: #7a500c;
  --tea: #2f6b4f; --on-tea: #fffdf8; --tea-tint: #dcebe1; --tea-ink: #22513b;
  --river: #1f5e8c; --river-tint: #dce9f3;
  --focus: #1f5e8c;
  --shadow-1: 0 1px 2px rgba(28, 35, 33, .06), 0 1px 1px rgba(28, 35, 33, .04);
  --shadow-2: 0 12px 32px rgba(28, 35, 33, .16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --side: 248px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0f1312; --surface: #171c1a; --surface-2: #1d2320; --surface-3: #262d29;
    --line: #2c3430; --line-strong: #6f7973;
    --ink: #f2eee4; --ink-2: #d6d2c8; --ink-muted: #a2aaa4;
    --primary: #f2eee4; --on-primary: #121614;
    --gamosa: #f0705f; --on-gamosa: #1a0f0d; --gamosa-tint: #3a1d19; --gamosa-ink: #ffb4a8;
    --muga: #e3ae4c; --muga-tint: #3a2e17; --muga-ink: #f3cf8a;
    --tea: #6fbf94; --on-tea: #0f1f17; --tea-tint: #1c3328; --tea-ink: #a6dcbd;
    --river: #7fb6e0; --river-tint: #1a2c3a;
    --focus: #7fb6e0;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 16px 40px rgba(0, 0, 0, .55);
  }
}

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 500 15px/1.5 "Anek Latin", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface);
  font: 650 11px/1 "Anek Latin", system-ui, sans-serif; color: var(--ink-muted);
}
.muted { color: var(--ink-muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: var(--r-sm); text-decoration: none; font-weight: 650; }
.skip:focus { top: 12px; }

/* Icons are inline SVG drawn into .ico spans by admin.js. */
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary);
  font-weight: 650; font-size: 15px; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s;
}
.btn:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; box-shadow: none; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--surface-2); box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); box-shadow: none; }
.btn--go { background: var(--tea); color: var(--on-tea); }
.btn--go:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tea) 22%, transparent); }
.btn--danger { background: var(--surface); color: var(--gamosa-ink); border-color: color-mix(in srgb, var(--gamosa) 55%, transparent); }
.btn--danger:hover { background: var(--gamosa-tint); box-shadow: none; }
.btn--danger-solid { background: var(--gamosa); color: var(--on-gamosa); }
.btn--danger-solid:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gamosa) 22%, transparent); }

/* ------------------------------------------------------------ brand */
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; color: var(--ink); flex: none; }
.brand .ring { fill: var(--surface); stroke: var(--tea); stroke-width: 5.5; }
.brand .square { fill: var(--gamosa); }
.brand b { font-weight: 800; }
.brand__tag {
  display: inline-block; margin-left: 2px; padding: 2px 7px; border-radius: 6px; vertical-align: 2px;
  background: var(--surface-3); color: var(--ink-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.brand--large { font-size: 22px; justify-content: center; }
.brand--large svg { width: 40px; height: 40px; }

/* ------------------------------------------------------------ sign-in */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate__card {
  width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 32px 28px; box-shadow: var(--shadow-2); text-align: center;
}
.gate h1 { font-size: 26px; line-height: 1.2; font-weight: 750; margin: 26px 0 8px; letter-spacing: -.01em; }
.gate p { color: var(--ink-muted); }
.gate__who { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink) !important; font-weight: 650; overflow-wrap: anywhere; }
.gate__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.gate__foot { margin-top: 20px; font-size: 13px; }
.ms { width: 18px; height: 18px; flex: none; background: #fff; padding: 1px; border-radius: 2px; }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
  padding: 20px 14px 16px; background: var(--surface); border-right: 1px solid var(--line);
}
.side .brand { padding: 2px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__label { padding: 0 10px 8px; color: var(--ink-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-weight: 600; text-align: left;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav button > span:nth-child(2) { flex: 1; }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); box-shadow: inset 3px 0 0 var(--gamosa); }
.count {
  min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--ink-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.nav button[aria-pressed="true"] .count { background: var(--primary); color: var(--on-primary); }
.count:empty { display: none; }
.count--alert { background: var(--muga-tint); color: var(--muga-ink); }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px; min-width: 0; }
.me__avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--tea-tint); color: var(--tea-ink); font-weight: 750; font-size: 13px;
}
.me__text { display: flex; flex-direction: column; min-width: 0; }
.me__role { font-size: 12px; color: var(--ink-muted); }
.me__name { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__foot .btn { justify-content: flex-start; }

.main { padding: 28px 32px 40px; min-width: 0; }
.page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page h1 { font-size: 26px; line-height: 1.2; font-weight: 750; letter-spacing: -.015em; margin-bottom: 4px; }
.page__tools { display: flex; align-items: center; gap: 12px; }

/* ------------------------------------------------------------ stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.stat:hover { border-color: var(--line-strong); }
.stat[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.stat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-muted); font-size: 13px; font-weight: 650; }
.stat__dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.stat__dot .ico { width: 16px; height: 16px; }
.stat__value { font-size: 30px; line-height: 1; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 13px; color: var(--ink-muted); min-height: 1.5em; }
.stat__sub--warn { color: var(--muga-ink); font-weight: 650; }
.tone-waiting .stat__dot { background: var(--muga-tint); color: var(--muga-ink); }
.tone-changes .stat__dot { background: var(--river-tint); color: var(--river); }
.tone-approved .stat__dot { background: var(--tea-tint); color: var(--tea-ink); }
.tone-rejected .stat__dot { background: var(--gamosa-tint); color: var(--gamosa-ink); }

/* ------------------------------------------------------------ queue */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.has-detail .workspace { grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); }
.queue {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0;
}
.queue:focus { outline: none; }
.queue__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.queue__bar h2 { font-size: 17px; font-weight: 700; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 0 1 360px; min-width: 220px; min-height: 40px; padding: 0 10px 0 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink-muted);
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.search:focus-within { border-color: var(--ink); background: var(--surface); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); min-height: 38px; font-size: 14px; }
.search input::placeholder { color: var(--ink-muted); }
.search:focus-within .search__key { display: none; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 10px 16px; text-align: left; white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--line);
  color: var(--ink-muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { position: relative; transition: background-color .12s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.is-on { background: var(--muga-tint); }
.table tbody tr.is-on td:first-child { box-shadow: inset 3px 0 0 var(--muga); }
.sort { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort .ico { width: 14px; height: 14px; transition: transform .15s var(--ease); }
.sort.is-asc .ico { transform: rotate(180deg); }

/* The applicant name is the row's button; its ::after covers the whole row. */
.who-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2); font-weight: 750; font-size: 13px;
}
.row-link { border: 0; background: transparent; padding: 0; text-align: left; color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; }
.row-link::after { content: ""; position: absolute; inset: 0; }
.row-link:focus-visible { outline: none; }
tr:has(.row-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.sub { display: block; color: var(--ink-muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.plate { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.progress { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.progress__bar { width: 56px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress__bar i { display: block; height: 100%; border-radius: 3px; background: var(--tea); }
.progress--short .progress__bar i { background: var(--muga); }
.age--old { color: var(--muga-ink); font-weight: 650; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--in_review { background: var(--muga-tint); color: var(--muga-ink); }
.badge--changes_needed { background: var(--river-tint); color: var(--river); }
.badge--approved { background: var(--tea-tint); color: var(--tea-ink); }
.badge--rejected { background: var(--gamosa-tint); color: var(--gamosa-ink); }
.badge--applying { background: var(--surface-3); color: var(--ink-muted); }
.badge--recheck { background: transparent; color: var(--muga-ink); box-shadow: inset 0 0 0 1.5px var(--muga); }
.badge--recheck::before { display: none; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

.empty-row td { padding: 56px 16px; text-align: center; color: var(--ink-muted); }
.empty-row .ico { width: 28px; height: 28px; color: var(--line-strong); display: block; margin: 0 auto 10px; }
.empty-row b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.empty-row .btn { margin-top: 14px; }
.skeleton td { padding: 16px; }
.skeleton i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hint { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ detail */
.detail {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.detail__head {
  position: sticky; top: 0; z-index: 2; padding: 18px 20px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.detail__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.detail__nav .btn { min-height: 36px; padding: 0 10px; }
.back { display: none; }
.detail__title { display: flex; align-items: center; gap: 14px; }
.detail__title .avatar { width: 48px; height: 48px; font-size: 16px; background: var(--muga-tint); color: var(--muga-ink); }
.detail__title h2 { font-size: 22px; line-height: 1.2; font-weight: 750; letter-spacing: -.01em; }
.detail__meta { margin-top: 2px; color: var(--ink-muted); font-size: 13px; }
.detail__title .badges { margin-top: 6px; }
.decide { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.decide .btn { flex: 1 1 auto; }
.decided { margin-top: 10px; font-size: 13px; color: var(--ink-muted); }
.detail__body { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 22px; }

.notice { display: flex; gap: 10px; border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }
.notice .ico { margin-top: 2px; }
.notice b { display: block; margin-bottom: 2px; }
.notice--warn { background: var(--muga-tint); color: var(--muga-ink); }
.notice--bad { background: var(--gamosa-tint); color: var(--gamosa-ink); }
.notice--info { background: var(--river-tint); color: var(--river); }
.notice p { color: var(--ink); }

.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section__head h3 { font-size: 15px; font-weight: 700; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); text-align: left; cursor: zoom-in;
  transition: border-color .15s var(--ease);
}
.photo-tile:hover { border-color: var(--line-strong); }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-3); display: block; }
.photo-tile__label { padding: 0 10px 9px; display: flex; flex-direction: column; }
.photo-tile__label span { font-weight: 650; font-size: 13px; }
.photo-tile__label small { color: var(--ink-muted); font-size: 12px; }
.photo-tile img.photo-failed { opacity: .35; }
.photo-tile--missing { cursor: default; border-style: dashed; justify-content: center; align-items: center; text-align: center; aspect-ratio: 4 / 3.9; padding: 10px; color: var(--ink-muted); }
.photo-tile--missing .ico { width: 22px; height: 22px; }
.photo-tile--missing span { font-weight: 650; font-size: 13px; color: var(--ink); }
.photo-tile--missing small { color: var(--gamosa-ink); font-weight: 650; font-size: 12px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); }
.fact-card h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.fact-card h3 .ico { width: 16px; height: 16px; }
.fact-card dl { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 7px 14px; margin: 0; font-size: 14px; }
.fact-card dt { color: var(--ink-muted); }
.fact-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ------------------------------------------------------------ dialogs */
dialog {
  border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2); width: min(520px, calc(100vw - 32px));
}
dialog[open] { animation: rise .18s var(--ease); }
dialog::backdrop { background: rgba(15, 19, 18, .5); backdrop-filter: blur(2px); }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dialog__head { display: flex; gap: 14px; }
.dialog__icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--surface-3); }
.dialog__icon.tone-go { background: var(--tea-tint); color: var(--tea-ink); }
.dialog__icon.tone-changes { background: var(--river-tint); color: var(--river); }
.dialog__icon.tone-bad { background: var(--gamosa-tint); color: var(--gamosa-ink); }
dialog h2 { font-size: 19px; line-height: 1.3; font-weight: 750; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 14px; }
.field textarea {
  font-weight: 500; font-size: 15px; line-height: 1.45; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 10px 12px; resize: vertical; min-height: 104px;
}
.field textarea:focus { border-color: var(--ink); outline: 2px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 0; }
.field small { font-weight: 500; font-size: 12px; }
.form-error { color: var(--gamosa-ink); background: var(--gamosa-tint); border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; font-weight: 600; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.photo { width: min(1080px, calc(100vw - 24px)); }
.photo form { padding: 12px; gap: 10px; }
.photo__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 650; padding-left: 6px; }
.photo img { width: 100%; max-height: calc(100vh - 130px); object-fit: contain; border-radius: var(--r-md); background: var(--surface-3); }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 10px;
  background: var(--primary); color: var(--on-primary); padding: 12px 16px; border-radius: var(--r-md);
  box-shadow: var(--shadow-2); font-weight: 650; max-width: min(420px, calc(100vw - 32px)); animation: rise .2s var(--ease);
}
.toast .ico { color: var(--tea); }
.toast--bad .ico { color: var(--gamosa); }

/* ------------------------------------------------------------ responsive */
/* With the review panel open, the table keeps only what's needed to pick the next one. */
.has-detail .col-area, .has-detail .col-photos { display: none; }
@media (max-width: 1500px) {
  .has-detail .col-vehicle { display: none; }
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-detail .workspace { grid-template-columns: minmax(0, 1fr); }
  .has-detail .queue { display: none; }
  .detail { position: static; max-height: none; }
  .back { display: inline-flex; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { order: 3; flex-direction: row; overflow-x: auto; width: 100%; gap: 6px; padding-bottom: 2px; }
  .nav__label { display: none; }
  .nav button { width: auto; flex: none; border: 1px solid var(--line); }
  .nav button[aria-pressed="true"] { box-shadow: none; border-color: var(--ink); }
  .nav .ico { display: none; }
  .side__foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; border: 0; padding: 0; }
  .me__text { display: none; }
  .main { padding: 20px 16px 32px; }
  .hint { display: none; }
  .photos, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Table becomes a list of cards. */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
  .table td { padding: 0; border: 0; }
  .table td.col-area, .table td.col-photos { display: none; }
  .table td:nth-child(2) { grid-column: 1; }
  .table td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; }
  .table td:nth-child(6) { grid-column: 2; grid-row: 1; }
  .empty-row td, .skeleton td { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat__value { font-size: 24px; }
  .photos, .facts { grid-template-columns: minmax(0, 1fr); }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.spacer { height: 10px; }
