:root {
  --ink: #1c3934;      /* deep green: text, dark buttons */
  --paper: #f9edf0;    /* blush: page background */
  --card: #ffffff;
  --muted: #56665f;
  --line: #ead3d9;
  --accent: #c3955b;   /* gold: highlight buttons, borders */
  --on-accent: #1c3934;
  --soft: #f3e0e5;     /* blush, one step darker: pills, tags */
  --ok: #2d7a55;
  --warn: #c98a00;
  --radius: 16px;
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Archivo', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* Keyboard focus: dark green ring (gold is too light against blush/white for 3:1) */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--paper); color: var(--ink); line-height: 1.45; }
body.big { font-size: 125%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 64px; }
.wide { max-width: 1280px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 18px; margin-bottom: 20px; }
.brand img { max-height: 40px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }

/* Forms */
label.field { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
textarea { min-height: 96px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--ink); flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 16px; padding: 12px 20px;
  border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; }
.btn.accent { background: var(--ink); border-color: var(--ink); color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { font-size: 13px; padding: 7px 12px; }
.btn.block { width: 100%; padding: 16px; font-size: 18px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Choice chips (radio cards) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.chip input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); }
.tabs { display: grid; grid-auto-flow: column; gap: 8px; margin-bottom: 8px; }
.tabs .chip span { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.preview { font-size: 28px; padding: 14px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; margin-top: 8px; min-height: 64px; word-break: break-word; }
.error { background: #fde8e3; border: 2px solid var(--accent); color: #7a1e05; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }

/* Status page */
.ticket { text-align: center; padding: 28px 18px; }
.ticket .code { font-family: var(--display); font-size: 64px; font-weight: 900; letter-spacing: -.02em; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; background: var(--line); }
.pill.waiting { background: var(--soft); }
.pill.in_progress { background: #fff1c7; color: #6b4a00; }
.pill.ready { background: var(--ok); color: #fff; }
.pill.picked_up, .pill.cancelled { background: #ddd; color: #555; }
.bigstat { font-family: var(--display); font-size: 48px; font-weight: 900; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stats .card { margin: 0; text-align: center; }
.ready-banner { background: var(--ok); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; font-family: var(--display); font-size: 28px; font-weight: 900; margin-bottom: 16px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .ready-banner { animation: none; } }

/* Admin */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col h2 { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; text-transform: uppercase; letter-spacing: .05em; }
.col h2 .count { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.order { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.order.new { border-color: var(--accent); }
.order .code { font-family: var(--display); font-size: 26px; font-weight: 900; }
.order .who { font-size: 18px; font-weight: 700; }
.order .what { font-size: 16px; margin: 6px 0; }
.order .note { background: #f8eedf; padding: 6px 10px; border-radius: 8px; font-size: 14px; margin: 6px 0; }
.order .meta { font-size: 12px; color: var(--muted); }
.order .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--soft); vertical-align: middle; }
.tag.dtf { background: #dceeff; } .tag.embroidery { background: #f6e0ff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
dialog { border: none; border-radius: var(--radius); padding: 20px; width: min(480px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }

/* TV board */
.tv { background: var(--ink); color: #fff; min-height: 100vh; padding: 32px; }
.tv h1 { font-size: 40px; }
.tv .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.tv .item { font-family: var(--display); font-size: 44px; font-weight: 900; padding: 8px 0; border-bottom: 1px solid #333; }
.tv .item small { font-size: 24px; font-weight: 600; color: #bbb; margin-left: 12px; }
.tv .ready .item { color: #6ee7a0; }
