/* ZKI landing + admin site — single design system.
   Shared by index.html (download hero) and every server-rendered page
   (html_page() in server.py). Keep class names stable: server-rendered
   markup and client JS (assets/signup-links-admin.js, inline admin
   scripts) bind to these selectors directly. */

:root {
  color-scheme: dark;
  --bg: #0a0d10;
  --panel: #111820;
  --panel-2: #151f29;
  --panel-3: #1b2834;
  --line: #263442;
  --line-strong: #385063;
  --text: #edf3f8;
  --soft: #c2ccd5;
  --muted: #9eaebd;
  --green: #2ed47a;
  --teal: #31c6b5;
  --blue: #57a8ff;
  --amber: #f5c451;
  --red: #ff6f61;
  --purple: #9b8cff;

  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 16px;

  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 24px 60px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------------------------------------------------------------- */
/* Reset + base                                                           */
/* ---------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}
/* soft glow behind the content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(620px 380px at 50% -8%, rgba(46, 212, 122, 0.10), transparent 70%),
    radial-gradient(720px 460px at 110% 12%, rgba(87, 168, 255, 0.08), transparent 70%);
}
a { color: var(--blue); }

/* ---------------------------------------------------------------------- */
/* Site navigation                                                        */
/* ---------------------------------------------------------------------- */
.site-nav {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}
.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
/* right-side account cluster (user chip + sign out), visually separated
   from the left nav links */
.site-nav-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.site-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0d131a;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.site-nav-link:hover,
.site-nav-link.active {
  border-color: var(--blue);
  color: var(--text);
  background: var(--panel-2);
}
.site-nav-user {
  color: var(--muted);
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------- */
/* Layout: main / card / panel                                            */
/* ---------------------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 32px 20px;
}
/* wider main for admin/table pages (signup links, testflight, inventory
   images, admin hub) */
main.wide { width: min(1120px, 100%); }
/* index.html's single download hero: vertically centered card instead of
   a stacked-panel column */
main.hero {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, rgba(21, 31, 41, 0.55), rgba(17, 24, 32, 0.95)), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-lg);
}

.panel {
  background: linear-gradient(180deg, rgba(21, 31, 41, 0.55), rgba(17, 24, 32, 0.95)), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------------- */
/* Brand                                                                  */
/* ---------------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(46, 212, 122, 0.25);
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-title { font-size: 20px; font-weight: 800; letter-spacing: -0.2px; }
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------------------------------------------------------------------- */
/* Typographic scale                                                      */
/* ---------------------------------------------------------------------- */
h1 {
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
h2 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--text); }
p, li { color: var(--soft); line-height: 1.55; }
.lead, p.lead {
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.55;
}
.muted { color: var(--muted); }
small { font-size: 12px; }

/* breadcrumb back-link on admin subpages */
.crumb { margin: 0 0 14px; font-size: 12.5px; }
.crumb a { color: var(--muted); text-decoration: none; font-weight: 700; }
.crumb a:hover { color: var(--text); }

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 10px;
}
.section-label.tight { margin-top: 22px; }
.rec-label {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin: 0 0 10px;
}
.rec-label::before {
  content: "";
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(46, 212, 122, 0.18);
}
body.has-rec .rec-label { display: flex; }
.alt-label { display: none; }
body.has-rec .alt-label { display: block; }

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 11.5px;
}
.meta-line span {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0d131a;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------- */
/* Buttons — server-page hierarchy (primary/secondary/danger)             */
/* ---------------------------------------------------------------------- */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--green);
  background: var(--green);
  color: #07100b;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.12s ease, border-color 0.12s ease;
}
button:active, .button:active { transform: translateY(1px); }
.button.secondary, button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}
.button.secondary:hover, button.secondary:hover { background: var(--panel-3); border-color: var(--line-strong); }
.danger { border-color: var(--red); background: #2a1518; color: #ffb7b0; }
.danger:hover { border-color: #ff9186; }

/* ---------------------------------------------------------------------- */
/* Buttons — index.html download tiles                                    */
/* ---------------------------------------------------------------------- */
.downloads { display: flex; flex-direction: column; gap: 12px; }
#recommendedSlot:empty { display: none; }
#recommendedSlot { display: flex; flex-direction: column; gap: 12px; }
.alt-platforms { display: flex; flex-direction: column; gap: 10px; }

a.btn, button.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.06s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
a.btn:active { transform: translateY(1px); }
a.btn:hover { background: var(--panel-3); border-color: var(--line-strong); }
a.btn.btn-disabled { pointer-events: none; }

.btn-secondary { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--panel-3); }

.dl-btn { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.dl-btn.is-recommended {
  background: var(--green);
  color: var(--bg);
  border-color: var(--green);
  padding: 18px 18px;
  box-shadow: 0 10px 28px rgba(46, 212, 122, 0.28);
}
.dl-btn.is-recommended:hover { background: #3ee08a; border-color: #3ee08a; }
.dl-btn.is-unavailable {
  background: var(--panel-2);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-disabled {
  background: var(--panel-2);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
}
.btn-content { display: flex; align-items: center; gap: 13px; min-width: 0; }
.btn-icon { width: 22px; height: 22px; flex-shrink: 0; }
.is-recommended .btn-icon { width: 26px; height: 26px; }
.btn-meta { font-size: 12px; font-weight: 600; opacity: 0.72; margin-top: 2px; }
.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(155, 140, 255, 0.18);
  color: var(--purple);
  border: 1px solid rgba(155, 140, 255, 0.4);
  white-space: nowrap;
}
.arrow { flex-shrink: 0; }

/* ---------------------------------------------------------------------- */
/* Install steps (index.html, tabbed)                                     */
/* ---------------------------------------------------------------------- */
.steps {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.steps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.steps-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.step-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.step-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: #0d131a;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.step-tab:hover { border-color: var(--line-strong); color: var(--text); }
.step-tab.active { background: var(--panel-3); border-color: var(--blue); color: var(--text); }
.step-tab[disabled] { opacity: 0.4; cursor: not-allowed; }
.step-panel { display: none; }
.step-panel.active { display: block; }
.step-panel ol {
  margin: 0;
  padding-left: 18px;
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.65;
}
.step-panel ol li + li { margin-top: 5px; }
.step-panel code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text);
}

/* ---------------------------------------------------------------------- */
/* What's new (release notes, signed-in surfaces)                          */
/* ---------------------------------------------------------------------- */
.whats-new-meta {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.whats-new-list {
  margin: 0;
  padding-left: 18px;
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.65;
}
.whats-new-list li + li { margin-top: 5px; }

/* ---------------------------------------------------------------------- */
/* Forms                                                                  */
/* ---------------------------------------------------------------------- */
label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 14px 0 6px;
}
input, select, textarea {
  width: 100%;
  padding: 12px;
  background: #0d131a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }

code, pre {
  background: #0d131a;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
}
code { padding: 2px 5px; }
pre { padding: 14px; overflow: auto; white-space: pre-wrap; }

/* ---------------------------------------------------------------------- */
/* Tables                                                                 */
/* ---------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }
td, th { border-top: 1px solid var(--line); padding: 10px; text-align: left; color: var(--soft); }
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-top: none;
  border-bottom: 1px solid var(--line-strong);
}
tbody tr { transition: background 0.1s ease; }
tbody tr:hover td { background: rgba(87, 168, 255, 0.05); }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------------- */
/* Status pills                                                           */
/* ---------------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #151f29;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.status-pill.active, .status-pill.used { color: #07100b; border-color: var(--green); background: var(--green); }
.status-pill.expired, .status-pill.revoked { color: var(--text); border-color: #5b2a2a; background: #2a1518; }
.status-pill.pending { color: var(--amber); border-color: rgba(245, 196, 81, 0.45); background: rgba(245, 196, 81, 0.12); }
.status-pill.admin { color: var(--purple); border-color: rgba(155, 140, 255, 0.4); background: rgba(155, 140, 255, 0.12); }
.status-pill.warehouse { color: var(--blue); border-color: rgba(87, 168, 255, 0.4); background: rgba(87, 168, 255, 0.12); }
.status-pill.driver { color: var(--teal); border-color: rgba(49, 198, 181, 0.4); background: rgba(49, 198, 181, 0.12); }
.status-pill.treasury { color: var(--amber); border-color: rgba(245, 196, 81, 0.4); background: rgba(245, 196, 81, 0.12); }

/* ---------------------------------------------------------------------- */
/* QR share card                                                          */
/* ---------------------------------------------------------------------- */
.qr-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: #0d131a;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.qr-box { width: 360px; max-width: 100%; padding: 16px; background: #fff; border-radius: var(--radius-sm); border: 1px solid rgba(15, 22, 38, 0.12); }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-copy { display: grid; min-width: 0; gap: 8px; }
.qr-copy strong { color: var(--text); }
.qr-copy span { color: var(--muted); font-size: 13px; }
.qr-copy a {
  color: var(--soft);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .qr-card { grid-template-columns: 1fr; }
  .qr-box { width: 100%; }
}

/* ---------------------------------------------------------------------- */
/* Entity cards + admin hub                                               */
/* ---------------------------------------------------------------------- */
.entity-grid, .hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.entity-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 132px;
  text-align: left;
  align-content: start;
  background: #0d131a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.06s ease;
}
.entity-card:hover { border-color: var(--blue); }
.entity-card:active { transform: translateY(1px); }
.entity-card strong { color: var(--text); font-size: 15px; }
.entity-card small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.hub-section { margin: 0 0 24px; }
.hub-section:last-child { margin-bottom: 0; }

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
  border: 1px solid var(--line);
}
.count-badge.green { background: var(--green); color: #07100b; border-color: var(--green); }

/* ---------------------------------------------------------------------- */
/* Dialogs                                                                */
/* ---------------------------------------------------------------------- */
dialog {
  width: min(720px, calc(100% - 32px));
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.68); }
.dialog-body { display: grid; gap: 14px; padding: 22px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------------- */
/* Inventory images admin page                                            */
/* ---------------------------------------------------------------------- */
.image-manager { display: grid; gap: 16px; }
.manager-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.drop-zone {
  display: grid;
  gap: 10px;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #0d131a;
  text-align: center;
}
.drop-zone input { display: none; }
.drop-zone strong { color: var(--text); font-size: 18px; }
.drop-zone span { color: var(--muted); font-size: 13px; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 14px; align-items: start; }
.attachment-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duplicate-note { color: #f7c873; font-size: 12px; line-height: 1.35; }
.image-card {
  display: grid;
  gap: 10px;
  align-content: start;
  position: relative;
  background: #0d131a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}
.image-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
  background: #05080b;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.image-card img:hover { transform: scale(1.05); border-color: var(--blue); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); z-index: 2; }
.image-card h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.image-card .meta { color: var(--muted); font-size: 12px; }
.attention-layout { display: grid; grid-template-columns: minmax(280px, 520px) minmax(260px, 1fr); gap: 18px; align-items: start; }
.attention-deck { position: relative; min-height: 610px; }
.attention-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #0d131a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  transform: translate(var(--card-x, 0), var(--card-y, 0)) rotate(var(--card-r, 0));
  transition: transform 180ms ease, opacity 180ms ease;
}
.attention-card[data-depth="1"] { --card-x: 18px; --card-y: 14px; --card-r: 2deg; opacity: .62; pointer-events: none; }
.attention-card[data-depth="2"] { --card-x: 34px; --card-y: 28px; --card-r: -2deg; opacity: .34; pointer-events: none; }
.attention-card img { width: 100%; min-height: 0; height: 100%; max-height: 390px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #05080b; cursor: zoom-in; }
.attention-card h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.attention-card .meta { color: var(--muted); font-size: 12px; }
.attention-empty { display: grid; place-items: center; min-height: 260px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 14px; background: #0d131a; text-align: center; padding: 20px; }
.attention-summary { display: grid; gap: 12px; align-content: start; }
.attention-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; padding-right: 4px; }
.attention-list button { display: grid; gap: 3px; width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #0d131a; color: var(--text); text-align: left; padding: 9px 10px; cursor: pointer; }
.attention-list button:hover, .attention-list button:focus { border-color: var(--blue); outline: none; }
.attention-list .file { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-row { display: grid; gap: 7px; }
.combo-row input { min-height: 42px; }
.item-picker { position: relative; }
.item-picker input { width: 100%; }
.item-menu {
  display: none;
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: 40;
  max-height: min(320px, 56vh);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #05080b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  padding: 5px;
}
.item-picker.open .item-menu { display: grid; gap: 3px; }
.item-option { width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.item-option:hover, .item-option:focus { background: #16202b; outline: none; }
.item-option .sku { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.item-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions button { flex: 1 1 auto; }
.manager-status { min-height: 22px; color: var(--muted); }
.image-lightbox {
  width: min(96vw, 1100px);
  max-width: 96vw;
  max-height: 96vh;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #05080b;
  color: var(--text);
}
.image-lightbox::backdrop { background: rgba(0, 0, 0, 0.74); }
.image-lightbox img { display: block; width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius-sm); background: #05080b; }
.lightbox-close { position: absolute; top: 10px; right: 10px; min-height: 38px; padding: 0 12px; }
.lightbox-caption { margin-top: 8px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------- */
/* Footer (index.html)                                                    */
/* ---------------------------------------------------------------------- */
footer {
  position: relative;
  z-index: 1;
  padding: 18px 20px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
footer .version { color: var(--soft); }

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-nav { align-items: stretch; }
  .site-brand { width: 100%; justify-content: center; }
  .site-nav-links { width: 100%; justify-content: center; }
  .site-nav-cluster { width: 100%; justify-content: center; margin-left: 0; }
  .site-nav-link { flex: 1 1 auto; justify-content: center; }
  .site-nav-user { width: 100%; max-width: none; text-align: center; }
  .qr-card { grid-template-columns: 1fr; }
  .qr-box { width: min(100%, 280px); margin: 0 auto; }
  main.wide { padding-left: 12px; padding-right: 12px; }
  .panel { padding: 16px; border-radius: 12px; }
  .attention-layout { grid-template-columns: 1fr; }
  .attention-deck { min-height: 640px; }
  .image-grid { grid-template-columns: 1fr; }
  .manager-bar .button, .manager-bar button { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .card { padding: 26px 20px 22px; border-radius: 14px; }
  h1 { font-size: 24px; }
  .steps-head { align-items: flex-start; }
}
