/* ============================================================
   CheatsDB · static/styles.css
   Brutalist · spec-sheet · semantic color · dark-only · mobile-first
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- TOKENS ---------- */
:root {
  --bg:        #0a0a0a;
  --bg-1:      #111;
  --bg-2:      #161616;
  --bg-3:      #1c1c1c;
  --line:      #262626;
  --line-2:    #333;
  --line-loud: #4a4a4a;

  --ink:       #f4f4f4;
  --ink-2:     #c8c8c8;
  --ink-3:     #8a8a8a;
  --ink-4:     #5a5a5a;

  --ok:        #22c55e;  --ok-bg:   #0e2a18;  --ok-ink:   #4ade80;
  --bad:       #ef4444;  --bad-bg:  #2a0e0e;  --bad-ink:  #fb7185;
  --warn:      #f59e0b;  --warn-bg: #2a1d05;  --warn-ink: #fbbf24;

  --display: "Anton", "Bebas Neue", "Oswald", "Arial Narrow", system-ui, sans-serif;
  --sans:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
}

/* ---------- TYPE ---------- */
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.92; text-transform: uppercase; }
.mono { font-family: var(--mono); }
.kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-3); }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 800px)  { .wrap { padding: 0 var(--s-5); } }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ---------- HEADER / NAV ---------- */
.hd { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.hd-row { display: flex; align-items: center; gap: var(--s-3); height: 56px; }
.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand-mark { width: 28px; height: 28px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--display); font-size: 20px; letter-spacing: 0.02em; text-transform: uppercase; }
.nav { display: none; gap: var(--s-5); margin-left: var(--s-5); }
@media (min-width: 800px) { .nav { display: flex; } }
.nav a { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.hd-spacer { flex: 1; }
.hd-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letterspacing: 0.12em; }

/* mobile menu — links wrap below header */
.nav-mobile { display: flex; gap: var(--s-4); padding: 8px var(--s-4) 12px; overflow-x: auto; border-top: 1px solid var(--line); white-space: nowrap; }
.nav-mobile a { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.nav-mobile a.is-active { color: var(--ink); }
@media (min-width: 800px) { .nav-mobile { display: none; } }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); padding: 10px 16px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); cursor: pointer; transition: background .12s, color .12s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-loud); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { display: flex; width: 100%; }

/* ---------- INPUTS ---------- */
.field { display: flex; align-items: center; background: var(--bg-1); border: 1px solid var(--line-2); padding: 0 12px; height: 40px; }
.field input, .field select { background: transparent; border: 0; outline: 0; width: 100%; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.field select { cursor: pointer; appearance: none; padding-right: 18px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%238a8a8a' stroke-width='1.5'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
.field-icon { color: var(--ink-3); margin-right: 8px; font-family: var(--mono); }
.field:focus-within { border-color: var(--ink); }
.field-lg { height: 56px; font-size: 16px; }

/* ---------- SEMANTIC CHIPS ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--bg-1); white-space: nowrap; }
.chip .dot { width: 6px; height: 6px; background: var(--ink-3); }

/* Verification pill — the loud one */
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.status-pill .dot { width: 8px; height: 8px; }
.status-undetected   { background: var(--ok-bg);   color: var(--ok-ink);   border: 1px solid var(--ok); }
.status-undetected .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-detected     { background: var(--bad-bg);  color: var(--bad-ink);  border: 1px solid var(--bad); }
.status-detected .dot   { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.status-unknown      { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn); }
.status-unknown .dot    { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

/* Detection-rate chips */
.info-chip-detection-good     { color: var(--ok-ink);   border-color: rgba(34,197,94,0.4);  background: rgba(34,197,94,0.08); }
.info-chip-detection-warning  { color: var(--warn-ink); border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08); }
.info-chip-detection-danger   { color: var(--bad-ink);  border-color: rgba(239,68,68,0.4);  background: rgba(239,68,68,0.08); }
.info-chip-detection-unknown  { color: var(--ink-3);    border-color: var(--line-2);        background: var(--bg-1); }

/* Cheat type */
.info-chip-type-external  { color: #93c5fd; border-color: rgba(147,197,253,0.35); background: rgba(59,130,246,0.08); }
.info-chip-type-internal  { color: #c4b5fd; border-color: rgba(196,181,253,0.35); background: rgba(139,92,246,0.08); }
.info-chip-type-dma       { color: #f9a8d4; border-color: rgba(249,168,212,0.35); background: rgba(236,72,153,0.08); }

/* Access */
.info-chip-access-public                { color: var(--ink-2); }
.info-chip-access-private               { color: #fcd34d; border-color: rgba(252,211,77,0.35); background: rgba(252,211,77,0.06); }
.info-chip-access-slotted               { color: #fb923c; border-color: rgba(251,146,60,0.35); background: rgba(251,146,60,0.06); }
.info-chip-access-invite-only           { color: #f472b6; border-color: rgba(244,114,182,0.35); background: rgba(244,114,182,0.06); }
.info-chip-access-application-required  { color: #a78bfa; border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.06); }

/* ---------- HOME ---------- */
.hero { padding: var(--s-7) 0 var(--s-6); }
@media (min-width: 800px) { .hero { padding: var(--s-8) 0 var(--s-6); } }
.hero-kicker { margin-bottom: 12px; }
.hero-title { font-family: var(--display); font-size: 56px; line-height: 0.9; margin: 0; max-width: 900px; text-transform: uppercase; }
@media (min-width: 800px)  { .hero-title { font-size: 84px; } }
@media (min-width: 1000px) { .hero-title { font-size: 96px; } }
.hero-title em { font-style: normal; color: var(--bad-ink); }
.hero-sub { color: var(--ink-2); max-width: 640px; font-size: 16px; margin-top: 16px; }
.hero-form { display: flex; gap: 8px; margin-top: var(--s-6); max-width: 720px; flex-wrap: wrap; }
.hero-form .field { flex: 1; min-width: 240px; }
.hero-form .btn { padding: 0 24px; }
@media (max-width: 800px) { .hero-form .btn { width: 100%; height: 48px; } }

/* Counter strip */
.counters { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5) var(--s-6); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
@media (min-width: 800px) { .counters { grid-template-columns: repeat(4, 1fr); } }
.counter { display: flex; flex-direction: column; gap: 4px; }
.counter-num { font-family: var(--display); font-size: 56px; line-height: 0.9; letter-spacing: -0.01em; }
@media (min-width: 800px) { .counter-num { font-size: 64px; } }
.counter-num.is-ok  { color: var(--ok-ink); }
.counter-num.is-bad { color: var(--bad-ink); }
.counter-num.is-warn{ color: var(--warn-ink); }
.counter-lab { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }

/* Category grid (home) */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: var(--s-5);
}
@media (min-width: 600px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px)  { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }

.cat-card {
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  transition: background .15s;
}
.cat-card:hover { background: var(--bg-1); }
.cat-card-image { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.18; pointer-events: none; }
.cat-card-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.5), rgba(10,10,10,0.95)); }
.cat-card-letter { position: absolute; right: 16px; bottom: 16px; font-family: var(--display); font-size: 96px; color: var(--bg-3); line-height: 0.85; pointer-events: none; user-select: none; }
.cat-card > * { position: relative; z-index: 1; }
.cat-kicker { color: var(--ink-3); }
.cat-name { font-family: var(--display); font-size: 24px; line-height: 0.95; text-transform: uppercase; }
.cat-desc { color: var(--ink-3); font-size: 12px; }
.cat-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.cat-count { font-family: var(--mono); font-size: 28px; font-weight: 600; color: var(--ink); }
.cat-arrow { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }

.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); padding-top: var(--s-6); }

/* ---------- CATEGORY HEADER ---------- */
.cat-hero { border-bottom: 1px solid var(--line); padding: var(--s-6) 0; position: relative; overflow: hidden; }
.cat-hero-banner { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.18; }
.cat-hero-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.6), rgba(10,10,10,0.95)); }
.cat-hero > .wrap { position: relative; }
.cat-hero-row { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 800px) { .cat-hero-row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; } }
.cat-hero-title { font-family: var(--display); font-size: 56px; line-height: 0.9; margin: 8px 0 0; text-transform: uppercase; }
@media (min-width: 800px)  { .cat-hero-title { font-size: 72px; } }
@media (min-width: 1000px) { .cat-hero-title { font-size: 80px; } }
.cat-hero-count { font-family: var(--display); font-size: 48px; line-height: 0.9; color: var(--ink); }
.cat-hero-desc { color: var(--ink-2); max-width: 640px; margin-top: 12px; }

/* ---------- FILTER BAR ---------- */
.filterbar { display: grid; grid-template-columns: 1fr; gap: 8px; margin: var(--s-5) 0 var(--s-4); }
@media (min-width: 800px)  { .filterbar { grid-template-columns: 2fr 1fr 1fr 1fr; } .filterbar.has-cat { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; } }
.filter-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: var(--s-3); }
.filter-count { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.filter-count strong { color: var(--ink); font-weight: 600; }
.btn-clear { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); padding: 6px 0; }
.btn-clear:hover { color: var(--ink); }
.btn-clear[hidden] { display: none; }

/* ---------- PRODUCT LIST (V1 spec-sheet) ---------- */
.product-list { border: 1px solid var(--line); display: flex; flex-direction: column; }
.product-card { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); transition: background .12s; }
.product-card:last-child { border-bottom: 0; }
.product-card:hover { background: var(--bg-1); }
.product-card[hidden] { display: none; }

@media (min-width: 800px) {
  .product-card { grid-template-columns: 160px 1fr 180px 120px; }
}

/* Status block (LEFT) */
.pc-status {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.pc-status-text {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}
.product-card .pc-status.is-ok    { background: var(--ok-bg); }
.product-card .pc-status.is-ok    .pc-status-text { color: var(--ok-ink); }
.product-card .pc-status.is-bad   { background: var(--bad-bg); }
.product-card .pc-status.is-bad   .pc-status-text { color: var(--bad-ink); }
.product-card .pc-status.is-warn  { background: var(--warn-bg); }
.product-card .pc-status.is-warn  .pc-status-text { color: var(--warn-ink); }
@media (min-width: 800px) {
  .pc-status { border-right: 1px solid var(--line); }
}

/* Body */
.pc-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc-name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.pc-name { font-family: var(--display); font-size: 20px; text-transform: uppercase; line-height: 1; }
.pc-cat-link { font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.pc-cat-link:hover { color: var(--ink); }
.pc-desc { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }

/* Detection */
.pc-det { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .pc-det { border-top: 0; border-left: 1px solid var(--line); } }
.pc-det-rate { font-family: var(--display); font-size: 24px; line-height: 1; text-transform: uppercase; }
.pc-det.is-good    .pc-det-rate { color: var(--ok-ink); }
.pc-det.is-warning .pc-det-rate { color: var(--warn-ink); }
.pc-det.is-danger  .pc-det-rate { color: var(--bad-ink); }
.pc-det.is-unknown .pc-det-rate { color: var(--ink-3); }
.pc-det-last { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* Price */
.pc-price { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-top: 1px solid var(--line); text-align: left; }
@media (min-width: 800px) { .pc-price { border-top: 0; border-left: 1px solid var(--line); text-align: right; align-items: flex-end; } }
.pc-price-val { font-family: var(--mono); font-size: 17px; font-weight: 600; }
.pc-price-arr { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-top: 4px; }

/* ---------- EMPTY STATES ---------- */
.empty {
  border: 1px dashed var(--line-loud);
  padding: var(--s-7) var(--s-5);
  text-align: center;
  color: var(--ink-3);
}
.empty[hidden] { display: none; }
.empty-title { font-family: var(--display); font-size: 32px; color: var(--ink); text-transform: uppercase; margin: 0 0 8px; }
.empty-msg { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- PRODUCT DETAIL ---------- */
.pd-hero { border-bottom: 1px solid var(--line); padding: var(--s-6) 0; }
.pd-back { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.pd-back:hover { color: var(--ink); }
.pd-kicker { margin-top: 16px; }
.pd-row { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
@media (min-width: 800px) { .pd-row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; } }
.pd-title { font-family: var(--display); font-size: 56px; line-height: 0.9; margin: 0; max-width: 800px; text-transform: uppercase; }
@media (min-width: 800px)  { .pd-title { font-size: 72px; } }
@media (min-width: 1000px) { .pd-title { font-size: 88px; } }
.pd-sub { color: var(--ink-2); max-width: 720px; margin-top: 16px; font-size: 16px; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.pd-grid { padding: var(--s-6) 0 var(--s-7); display: grid; grid-template-columns: 1fr; gap: var(--s-5); align-items: flex-start; }
@media (min-width: 1000px) { .pd-grid { grid-template-columns: 300px 1fr; gap: var(--s-6); } }

.pd-aside { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1000px) { .pd-aside { position: sticky; top: 72px; } }

.spec { border: 1px solid var(--line); }
.spec-head { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-1); }
.spec-head .label { color: var(--ink-2); }
.spec-body { padding: 0 14px; }
.spec-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.spec-row:last-child { border-bottom: 0; }
.spec-row .label { color: var(--ink-3); flex-shrink: 0; }
.spec-val { text-align: right; font-family: var(--mono); font-size: 13px; word-break: break-word; }

.price-stack .spec-row { padding: 12px 0; }
.price-val-strong { font-weight: 600; font-size: 14px; }

.pd-main { display: flex; flex-direction: column; gap: 16px; }
.pd-notes { color: var(--ink-2); margin: 0; padding: 14px; }

.related-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.related-card { border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: background .12s; }
.related-card:hover { background: var(--bg-1); }
.related-name { font-family: var(--display); font-size: 18px; text-transform: uppercase; line-height: 1; }
.related-desc { color: var(--ink-3); font-size: 12px; }

.pager { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: var(--s-4); margin-top: var(--s-3); }
.pager a { flex: 1; }
.pager a:first-child { justify-content: flex-start; }
.pager a:last-child { justify-content: flex-end; }

/* ---------- MODAL (features) ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 100; display: flex; align-items: center; justify-content: center; padding: var(--s-4); }
.modal-backdrop[hidden] { display: none !important; }
.modal { background: var(--bg-1); border: 1px solid var(--line-loud); max-width: 560px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; }
.modal-head { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-title { font-family: var(--display); font-size: 24px; text-transform: uppercase; margin: 0; }
.modal-close { font-family: var(--mono); font-size: 18px; color: var(--ink-3); padding: 4px 10px; border: 1px solid var(--line-2); }
.modal-close:hover { color: var(--ink); border-color: var(--ink); }
.modal-body { padding: var(--s-4) var(--s-5); overflow: auto; }
.feature-list { display: flex; flex-direction: column; gap: 0; }
.feature-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before { content: "▸"; color: var(--ok-ink); font-family: var(--mono); flex-shrink: 0; }

/* ---------- FOOTER ---------- */
.ft { border-top: 1px solid var(--line); margin-top: var(--s-7); padding: var(--s-5) 0; color: var(--ink-3); }
.ft-row { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
@media (min-width: 800px) { .ft-row { flex-direction: row; justify-content: space-between; } }

/* ---------- 404 ---------- */
.nf { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: var(--s-7) var(--s-4); }
.nf-code { font-family: var(--display); font-size: 160px; line-height: 0.85; color: var(--ink-3); margin: 0; }
@media (min-width: 800px) { .nf-code { font-size: 240px; } }
.nf-title { font-family: var(--display); font-size: 36px; text-transform: uppercase; margin: var(--s-4) 0 var(--s-2); }
.nf-msg { color: var(--ink-3); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: var(--s-5); }

/* ---------- ACCESSIBILITY ---------- */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============================================================
   ADMIN  ·  same dark-brutalist tokens, denser scaffolding
   ============================================================ */
.admin-page { padding: var(--s-6) 0 var(--s-7); }
.admin-page-header { padding: var(--s-5) 0 var(--s-4); border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.admin-page-title { font-family: var(--display); font-size: 36px; text-transform: uppercase; margin: 4px 0 0; line-height: 0.95; }
@media (min-width: 800px) { .admin-page-title { font-size: 48px; } }
.admin-page-sub { color: var(--ink-3); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 6px; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-4); }
.admin-actions form { display: inline; }

.btn-danger { background: var(--bad-bg); color: var(--bad-ink); border: 1px solid var(--bad); }
.btn-danger:hover { background: var(--bad); color: var(--bg); }

.btn-sm { padding: 6px 10px; font-size: 11px; }

.admin-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
@media (min-width: 1100px) { .admin-grid { grid-template-columns: minmax(280px, 0.6fr) minmax(280px, 0.6fr) minmax(0, 1.4fr); } }

.admin-flash { display: grid; gap: 6px; margin: var(--s-4) 0; }
.admin-flash .flash {
  border-left: 2px solid var(--ok);
  background: rgba(34,197,94,0.06);
  color: var(--ok-ink);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
}

/* "Last generated" banner reuses .spec but with semantic state */
.last-generated-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3);
  border: 1px solid var(--line); padding: 14px 16px; margin-top: var(--s-3);
}
.last-generated-banner.never { border-color: var(--warn); background: var(--warn-bg); color: var(--warn-ink); }
.last-generated-banner .lg-meta { display: flex; flex-direction: column; gap: 2px; }
.last-generated-banner .lg-meta strong { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.dashboard-quick-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dashboard-quick-stats span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); padding: 3px 7px; }
.host-note { color: var(--ink-3); font-family: var(--mono); font-size: 11px; line-height: 1.5; margin-top: 8px; }
.host-note code { color: var(--ink); }

/* Form styling using design tokens */
.admin-form { display: grid; gap: var(--s-3); }
.admin-form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.admin-form label > input,
.admin-form label > textarea,
.admin-form label > select {
  background: var(--bg-1); border: 1px solid var(--line-2); padding: 10px 12px;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  outline: 0;
}
.admin-form label > textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.admin-form label > input:focus,
.admin-form label > textarea:focus,
.admin-form label > select:focus { border-color: var(--ink); }
.admin-form label > input[type="file"] { padding: 8px 10px; cursor: pointer; }
.admin-form label .sub { display: block; color: var(--ink-3); font-size: 10px; text-transform: none; letter-spacing: 0; }
.admin-form-section { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 720px) { .admin-form-section { grid-template-columns: 1fr 1fr; } }
.admin-form-section[hidden] { display: none !important; }
.admin-form-span { grid-column: 1 / -1; }

.image-input-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: stretch; }
.image-input-row input { width: 100%; }
.image-input-row .btn { padding: 0 10px; font-size: 11px; }

.image-preview { margin-top: 8px; padding: 8px; border: 1px dashed var(--line-loud); background: var(--bg); }
.image-preview[hidden] { display: none !important; }
.image-preview img { display: block; max-width: 100%; max-height: 96px; margin: 0 auto; }

.brand-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--bg); }
.brand-preview .brand-mark { width: 36px; height: 36px; flex: 0 0 auto; }
.brand-preview strong { display: block; font-family: var(--display); font-size: 16px; text-transform: uppercase; }
.brand-preview span:not(.brand-mark) { display: block; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-3); }
.form-error { color: var(--bad-ink); border-left: 2px solid var(--bad); background: var(--bad-bg); padding: 10px 14px; font-family: var(--mono); font-size: 12px; margin: 0 0 var(--s-3); }

/* Admin tabs (product form) */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); background: var(--bg-1); margin-bottom: var(--s-4); }
.admin-tab { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); padding: 8px 12px; }
.admin-tab.active { background: var(--ink); color: var(--bg); }
.admin-tab:hover { color: var(--ink); }
.admin-tab.active:hover { color: var(--bg); }

.admin-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-3); }

/* Admin lists (categories / products) */
.admin-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.admin-list[data-empty] { background: transparent; border-style: dashed; }
.admin-list-item { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: 14px 16px; background: var(--bg); }
.admin-list-item:hover { background: var(--bg-1); }
.admin-list-item h3 { font-family: var(--display); font-size: 16px; text-transform: uppercase; margin: 0 0 4px; line-height: 1; }
.admin-list-item p { color: var(--ink-3); font-size: 12px; margin: 0; }
.list-actions { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }

/* Admin section heading row */
.admin-section { border: 1px solid var(--line); }
.admin-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-1);
}
.admin-section-head .label { color: var(--ink-2); }
.admin-section-body { padding: var(--s-4); }

/* Image picker modal */
.image-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.image-picker-empty { color: var(--ink-3); font-family: var(--mono); font-size: 12px; padding: var(--s-4); text-align: center; }
.image-picker-empty[hidden] { display: none !important; }
.image-picker-item {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); padding: 6px; cursor: pointer;
  background: var(--bg); transition: border-color .12s, background .12s;
}
.image-picker-item:hover { border-color: var(--ink); background: var(--bg-1); }
.image-picker-item img { width: 100%; height: 90px; object-fit: contain; background: var(--bg-1); }
.image-picker-item span { font-family: var(--mono); font-size: 10px; color: var(--ink-3); text-align: center; word-break: break-all; }

.modal[role="dialog"] { /* sizing override on the picker — wider */ }
.modal-backdrop.image-picker .modal { max-width: 720px; }

/* ---------- LOGIN ---------- */
.login-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - 56px - 70px);
  padding: var(--s-7) var(--s-4);
  text-align: center;
}
.login-title { font-family: var(--display); font-size: 56px; text-transform: uppercase; line-height: 0.95; margin: 8px 0 var(--s-5); }
@media (min-width: 800px) { .login-title { font-size: 80px; } }
.login-form { display: flex; flex-direction: column; gap: var(--s-3); width: min(360px, 100%); }
.login-form input {
  height: 64px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 0.4em;
  text-align: center;
  color: var(--ink);
  outline: 0;
}
.login-form input:focus { border-color: var(--ink); }
.login-form .btn { height: 48px; }

