:root {
  --bg: #141416;
  --bar: #19191C;
  --panel: #1A1A1D;
  --card: #1F1F23;
  --card-2: #222226;
  --chip: #26262B;
  --line: #2E2E33;
  --line-2: #3A3A40;
  --ink: #F5F2ED;
  --ink-2: #D6D2CB;
  --muted: #A9A49C;
  --accent: #D63A2C;
  --accent-soft: #2A1C1B;
  --accent-text: #FF7A6B;
  --gold: #F2C14E;
  --ok-bg: #1C2A20;
  --ok-line: #2F5A3B;
  --ok: #8FD9A6;
  --radius: 16px;
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
a:hover { color: #FFA197; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--bar); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand b { display: block; font-size: 22px; font-weight: 800; letter-spacing: .5px; line-height: 1.1; }
.brand small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.step { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid #34343A; color: var(--muted); background: transparent; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--chip); }
.step.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.current .n { background: rgba(255,255,255,.2); }
.step.done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.step.done .n { background: var(--ok-line); }
button.step { min-height: 38px; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #2A2A2F; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.who .name { font-weight: 600; display: block; line-height: 1.15; }
.who .sub { font-size: 13px; color: var(--muted); display: block; }
.toplink { font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink-2); }

/* ---------- layout ---------- */
.layout { display: flex; flex-wrap: wrap; gap: 24px; padding: 28px; align-items: flex-start; max-width: 1500px; margin: 0 auto; }
.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.aside { flex: 1 1 320px; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 92px; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
h1.title { margin: 0; font-size: 36px; font-weight: 800; }
.lead { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
h2.h2 { margin: 0; font-size: 22px; font-weight: 700; }
.label { font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; }
.btn:hover { border-color: #55555C; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-primary:hover { background: #E04536; border-color: #E04536; color: #fff; }
.btn-primary[disabled] { opacity: .45; cursor: not-allowed; }
.btn-lg { min-height: 54px; padding: 0 26px; border-radius: 14px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--muted); font-size: 14px; text-decoration: underline; padding: 6px; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.seg button { min-height: 44px; padding: 4px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.seg button small { font-size: 12px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 700; }
.seg button[aria-pressed="true"] small { color: #FFE3DF; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pills { display: grid; gap: 6px; }
.pills.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pills.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pills.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pills button { min-height: 52px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; padding: 4px 8px; }
.pills button small { font-size: 12px; opacity: .85; }
.pills button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); color: #fff; font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 8px; }
.input { height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 17px; width: 100%; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(214,58,44,.25); }
.input-lg { height: 56px; font-size: 20px; border-radius: 14px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 38px; height: 44px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--chip); color: var(--ink); font-size: 18px; }
.stepper button.plus { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
kbd { font-family: inherit; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-2); }
.error { padding: 12px 16px; border-radius: 12px; background: #3A1D19; border: 1px solid #7A3029; color: #FFB4AA; }

/* ---------- welcome ---------- */
/* Top-aligned (not vertically centred) so the pizza never moves when the form
   grows — e.g. the address field appearing for Delivery, or an error message. */
.welcome { display: flex; align-items: flex-start; justify-content: center; padding: clamp(24px, 6vh, 64px) 24px 40px; }
.welcome-inner { width: 100%; max-width: 1080px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.welcome-art { flex: 1 1 340px; display: flex; justify-content: center; padding-top: 24px; }
.welcome form { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { margin: 0; color: #F2B33D; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
.welcome h1 { margin: 0; font-size: clamp(36px, 5vw, 54px); line-height: 1.05; font-weight: 800; }
.deal { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px dashed #4A4A50; }
.deal .badge { padding: 4px 10px; border-radius: 999px; background: #F2B33D; color: #1A1A1A; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.deal span:nth-child(2) { flex: 1; color: var(--ink-2); }
.deal b { color: var(--gold); font-size: 18px; }

/* ---------- photos ---------- */
.ph { position: relative; display: inline-block; flex: none; overflow: hidden; background: #2A2A2F; }
.ph > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.round { border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.ph.tile { border-radius: 12px; background: #F4F1EC; }
.ph.hero { width: min(420px, 100%) !important; height: auto !important; aspect-ratio: 1; box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 0 10px #1C1C1F; }
.ph.hero img { transform: scale(1.05); }
.drink-top { position: relative; }
.drink-top .tag { position: absolute; top: 8px; right: 8px; }
.drink-photo { width: 100% !important; height: 150px !important; }

/* ---------- menu ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 270px; }
.card.in-cart { border: 2px solid var(--accent); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card h3 { margin: 0; font-size: 20px; font-weight: 700; }
.card p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.veg { background: var(--ok-bg); color: var(--ok); }
.tag.spicy { background: #3A1D19; color: #FF9A8E; }
.tag.in { background: var(--accent); color: #fff; }
.tag.adult { background: #3A2E14; color: var(--gold); font-weight: 700; }
.price { font-size: 22px; font-weight: 700; color: var(--gold); }

/* ---------- order summary ---------- */
.line-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: var(--card-2); }
.line-item .row { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.line-item .sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.line-item .acts { display: flex; gap: 6px; margin-top: 4px; }
.line-item .acts button { background: none; border: 0; padding: 6px 4px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.line-item .acts button.rm { color: var(--muted); font-weight: 400; }
.totals { border-top: 1px dashed var(--line-2); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.totals .row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.totals .row span:last-child { white-space: nowrap; }
.totals .row.ok { color: var(--ok); }
.totals .grand { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; color: var(--ink); }
.totals .grand span:last-child { color: var(--gold); }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; }

/* ---------- builder ---------- */
.preview { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
/* builder preview: pizza photo + topping pieces */
.big-pizza { position: relative; width: 340px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.big-pizza .big-photo { width: 100% !important; height: 100% !important; }
.big-pizza .big-photo img { transform: scale(1.06); }
.big-pizza.crust-thin .big-photo img { transform: scale(1.12); }
.big-pizza.crust-thick .big-photo img { transform: scale(1.0); }
.big-pizza .pieces { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.piece { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); background: center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); animation: drop .18s ease-out; }
.piece.red { filter: hue-rotate(-115deg) saturate(1.3) drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
@keyframes drop { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .piece { animation: none; } }
.half-line { position: absolute; left: 50%; top: 3%; bottom: 3%; border-left: 2px dashed rgba(255,255,255,.9); transform: translateX(-1px); filter: drop-shadow(0 0 2px rgba(0,0,0,.8)); transition: opacity .2s; pointer-events: none; }
.halves { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 0 24px; }
.tops { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.top-row.on { background: #24201F; border-color: #7A3029; }
.swatch { width: 48px; height: 48px; border-radius: 50%; flex: none; border: 2px solid rgba(255,255,255,.12); background-size: cover; background-position: center; }
.top-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.top-row .txt b { font-weight: 600; font-size: 15px; }
.top-row .txt small { font-size: 13px; color: var(--muted); }
.place { display: flex; gap: 4px; }
.place button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: #232327; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.place button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.build-foot { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; }
.breakdown { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.breakdown div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.qty-box { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); }
.qty-box button { width: 44px; height: 44px; border-radius: 9px; border: 0; background: var(--chip); color: var(--ink); font-size: 20px; }
.qty-box output { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }

/* ---------- drinks ---------- */
.drink-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.drink { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 230px; }
.drink.on { border: 2px solid var(--accent); }
.drink h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; }
.drink p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.drink .price { font-size: 19px; }

/* ---------- checkout ---------- */
.review { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 8px 20px; }
.review .item { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid #2A2A2F; }
.review .item:last-child { border-bottom: 0; }
.review .q { min-width: 36px; height: 32px; border-radius: 8px; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.review .what { flex: 1; min-width: 0; }
.review .what b { font-size: 17px; display: block; }
.review .what span { font-size: 14px; color: var(--muted); }
.review .amt { font-weight: 700; font-size: 17px; }
.pay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay label { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; }
.pay label:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 600; }
.pay input { accent-color: var(--accent); width: 18px; height: 18px; }
.place-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.place-bar .sum { display: flex; flex-direction: column; }
.place-bar .sum small { color: var(--muted); font-size: 14px; }
.place-bar .sum b { font-size: 36px; font-weight: 800; color: var(--gold); }
.ticket { background: #FAF7F2; color: #1A1A1A; border-radius: 6px; padding: 22px 20px; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.6; white-space: pre; overflow-x: auto; margin: 0; }
.note-ok { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); font-size: 14px; }

/* ---------- confirmation ---------- */
.done-wrap { max-width: 980px; margin: 0 auto; padding: 40px 24px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.done-msg { flex: 1 1 380px; display: flex; flex-direction: column; gap: 18px; }
.done-msg .check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); border: 2px solid var(--ok-line); display: flex; align-items: center; justify-content: center; color: var(--ok); }
.done-msg h1 { margin: 0; font-size: 42px; font-weight: 800; line-height: 1.1; }
.done-msg .acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- kitchen board ---------- */
.kitchen { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.k-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.k-stat { padding: 12px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.k-stat small { display: block; color: var(--muted); font-size: 13px; }
.k-stat b { font-size: 24px; }
.k-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.k-col { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.k-col h2 { margin: 0; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.k-col h2 .count { min-width: 28px; height: 28px; border-radius: 999px; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; padding: 0 8px; }
.k-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.k-card.fresh { border-color: var(--accent); }
.k-card .k-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.k-card .k-head b { font-size: 18px; }
.k-card .k-head span { font-size: 13px; color: var(--muted); }
.k-card ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.k-card ul small { color: var(--muted); }
.k-card .k-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.k-card .k-acts .btn { min-height: 40px; font-size: 14px; }
.k-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); text-transform: uppercase; letter-spacing: .5px; }

/* ---------- admin / updates ---------- */
code { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: .9em; background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.admin { max-width: 1100px; margin: 0 auto; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.admin code, .login-card code { overflow-wrap: anywhere; }
.admin-card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.admin-card.now { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.now-version { margin: 4px 0 2px; font-size: 40px; font-weight: 800; color: var(--gold); }
.now-meta { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.pill-ok { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); font-weight: 600; }
.pill-ok .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.upload { display: flex; flex-direction: column; gap: 16px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 170px; padding: 24px; border: 2px dashed #4A4A50; border-radius: 16px; background: var(--card); color: var(--ink-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.drop.has-file { border-style: solid; border-color: var(--ok-line); }
.drop-main { font-size: 18px; font-weight: 600; word-break: break-all; }
.drop-sub { font-size: 14px; color: var(--muted); }
.deploy { display: flex; flex-direction: column; gap: 14px; }
.bar { height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.bar span.bad { background: #B33A2E; }
.deploy-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.deploy-steps li { padding: 7px 14px; border-radius: 999px; border: 1px solid #34343A; color: var(--muted); font-size: 14px; font-weight: 600; }
.deploy-steps li[data-state="active"] { border-color: var(--gold); color: var(--gold); }
.deploy-steps li[data-state="done"] { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.deploy-steps li[data-state="done"]::before { content: '✓ '; }
.deploy-steps li[data-state="failed"] { background: #3A1D19; border-color: #7A3029; color: #FFB4AA; }
.deploy-steps li[data-state="failed"]::before { content: '✕ '; }
#deploy-msg pre, .err pre { white-space: pre-wrap; word-break: break-word; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; margin: 10px 0 0; max-height: 260px; overflow: auto; }
.table-wrap { overflow-x: auto; position: relative; }
.hist { width: 100%; border-collapse: collapse; font-size: 15px; }
.hist th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.hist td { padding: 12px 10px; border-bottom: 1px solid #2A2A2F; vertical-align: top; }
.hist tr.is-current td { background: #1E1C1B; }
.hist .rid { font-size: 11px; color: var(--muted); }
.hist .file { max-width: 260px; word-break: break-word; }
.hist .acts { white-space: nowrap; text-align: right; }
.hist .acts .btn { min-height: 38px; font-size: 14px; margin-left: 4px; }
.st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.st-active { background: var(--accent); color: #fff; }
.st-failed, .st-rejected { background: #3A1D19; color: #FFB4AA; }
.st-removed { color: var(--muted); }
.err summary { cursor: pointer; font-size: 13px; color: var(--accent-text); margin-top: 6px; }

@media (max-width: 720px) {
  .admin { padding: 16px; }
  .now-version { font-size: 32px; }
  .topbar { padding: 12px 16px; }
  .layout { padding: 16px; }
  .aside { position: static; }
  .steps .step .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top-grid { grid-template-columns: 1fr; }
  .pills.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay { grid-template-columns: 1fr; }
  h1.title { font-size: 28px; }
}

@media print {
  body * { visibility: hidden; }
  .ticket, .ticket * { visibility: visible; }
  .ticket { position: absolute; left: 0; top: 0; background: #fff; }
}
