:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16233f;
  --muted: #5d6779;
  --line: #dfe3ea;
  --accent: #1f4fd1;
  --accent-ink: #ffffff;
  --tag: #ffd23f;
  --ok: #157f3b;
  --warn: #a15c00;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 35, 63, .06), 0 2px 8px rgba(22, 35, 63, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522;
    --card: #182133;
    --ink: #e8ecf4;
    --muted: #9aa5b8;
    --line: #2a3550;
    --accent: #6d95ff;
    --accent-ink: #0b1220;
    --tag: #ffd23f;
    --ok: #4ccb7a;
    --warn: #f0b04a;
    --danger: #ff7b6e;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: .2em 0 .4em; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 1em 0 .5em; }
h3 { font-size: 1rem; margin: 1.1em 0 .4em; }
h2.section { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 1.6em; }
p { margin: .4em 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.warn { color: var(--warn); }
.err { color: var(--danger); min-height: 1.2em; }
.empty { color: var(--muted); padding: 1em 0; text-align: center; }
.row { display: flex; align-items: center; }
.gap { gap: .6rem; }
.wrap { flex-wrap: wrap; }
.right { text-align: right; }
.stack { display: grid; gap: .9rem; }
[hidden] { display: none !important; }

main { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 7rem; }

/* ---------------- header + menu */
header.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem; padding-top: max(.55rem, env(safe-area-inset-top));
  background: var(--ink); color: var(--bg);
}
@media (prefers-color-scheme: dark) { header.top { background: #0a0f19; color: var(--ink); border-bottom: 1px solid var(--line); } }
header.top .logo { display: flex; }
.top-title { flex: 1 0 auto; min-width: 0; max-width: 50%; }
.top-who { display: grid; flex: 0 1 auto; min-width: 0; line-height: 1.15; color: inherit; text-decoration: none; padding: 0 .7rem 0 .1rem;
  border-right: 1px solid rgba(255, 255, 255, .25); max-width: 40vw; }
.top-who .who-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-who .who-role { font-size: .72rem; opacity: .7; }
.top-who:hover .who-name { text-decoration: underline; }
.top-who .who-first { display: none; }
@media (max-width: 600px) { .top-who { max-width: none; padding-right: .5rem; } .top-who .who-name { font-size: .88rem; } }
@media (max-width: 600px) { .top-who .who-full { display: none; } .top-who .who-first { display: inline; } }
.top-title .t1 { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title .t2 { font-size: .75rem; opacity: .75; }
header.top .icon-btn, header.top .linklike { color: inherit; }
nav.menu {
  display: none; position: sticky; top: 52px; z-index: 19; background: var(--card); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); padding: .4rem 0;
}
nav.menu.open { display: grid; }
nav.menu a, nav.menu button { padding: .75rem 1.2rem; text-decoration: none; color: var(--ink); text-align: left; font-size: 1rem; }
nav.menu a:hover, nav.menu button:hover { background: var(--bg); }
@media (min-width: 900px) {
  nav.menu { display: flex !important; flex-wrap: wrap; justify-content: center; padding: 0; position: static; }
  nav.menu a, nav.menu button { padding: .6rem .9rem; font-size: .92rem; }
  header.top > .icon-btn[aria-label="Menu"] { display: none; }
}

/* ---------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn.big { width: 100%; min-height: 58px; font-size: 1.1rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  background: none; border: 0; font: inherit; font-size: 1.35rem; line-height: 1; padding: .35rem .5rem;
  min-width: 40px; min-height: 40px; color: var(--ink); cursor: pointer; text-decoration: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.linklike { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: .3rem 0; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; min-height: 44px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; }
input[type=file] { padding: .5rem; }
label { display: grid; gap: .3rem; font-weight: 550; font-size: .95rem; }
label.radio, label.switch, label.check-card, label.inline { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
label.inline input { width: 6.5rem; min-height: 36px; padding: .35rem .5rem; }
.radios { display: grid; gap: .5rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
.check-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .75rem; cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------------- cards + lists */
.list { display: grid; gap: .55rem; }
.card {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; text-align: left; font: inherit; width: 100%;
}
button.card { cursor: pointer; }
a.card:hover, button.card:hover { border-color: var(--accent); }
.card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card.off { opacity: .55; }
.card.block { display: block; }
.card.draft { display: block; margin-top: .7rem; border-style: dashed; }
.card.tools { display: grid; gap: .6rem; margin: .6rem 0 1rem; }
.req-main { min-width: 0; }
.req-title { font-weight: 650; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.chip {
  display: inline-block; white-space: nowrap; font-size: .78rem; font-weight: 650; padding: .2rem .55rem;
  border-radius: 999px; background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--ink);
}
.st-submitted { background: var(--tag); color: #3a2c00; }
.st-in_progress { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.st-tags_made, .st-printed { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--ink); }
.st-delivered { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.st-cancelled { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

dl.summary { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: .6rem 0 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
dl.summary dt { color: var(--muted); font-size: .9rem; }
dl.summary dd { margin: 0; }

ol.timeline { list-style: none; padding: 0 0 0 1.1rem; margin: 0; border-left: 2px solid var(--line); }
ol.timeline li { position: relative; padding: 0 0 .9rem .6rem; }
ol.timeline li::before { content: ""; position: absolute; left: -1.53rem; top: .35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }

/* ---------------- new request */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; list-style: none; padding: 0; margin: 0 0 .6rem; }
.stepper button { width: 100%; background: none; border: 0; border-bottom: 3px solid var(--line); padding: .5rem .2rem;
  font: inherit; font-size: .85rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; justify-content: center; cursor: pointer; }
.stepper button:disabled { cursor: default; opacity: .6; }
.stepper .n { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); font-size: .75rem; font-weight: 700; color: var(--ink); }
.stepper li.on button { color: var(--ink); border-color: var(--accent); font-weight: 650; }
.stepper li.on .n { background: var(--accent); color: var(--accent-ink); }
.stepper li.done .n { background: var(--ok); color: #fff; }
.step-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; gap: .3rem; justify-items: center;
  padding: .7rem 1rem; padding-bottom: max(.7rem, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.step-foot:empty { display: none; }
.step-foot > * { max-width: 728px; }
.add-store { margin-top: 1.4rem; padding-top: .4rem; border-top: 1px dashed var(--line); }
.add-store .row input { flex: 1; }
@media (max-width: 480px) { .add-store .row { flex-direction: column; align-items: stretch; } }
.scan-row { display: flex; gap: .5rem; }
.scan-row input.scan { font-size: 1.05rem; min-height: 50px; }
.scan-row .btn { white-space: nowrap; }
@media (max-width: 480px) { .scan-row { flex-direction: column; } .scan-row .btn { min-height: 50px; } }
.results { display: grid; gap: .4rem; margin: .6rem 0; }
.item-line { min-width: 0; }
.cart { margin-top: 1rem; }
.cart-row { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .6rem .7rem; margin-bottom: .45rem; }
.cart-info { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.qty { display: flex; align-items: center; gap: .1rem; font-weight: 700; }
.qty span { min-width: 1.4rem; text-align: center; }
.icon-btn.del { font-size: 1.05rem; opacity: .7; }

.cam { position: relative; margin: .7rem 0; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 55vh; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame { position: absolute; inset: 28% 10%; border: 3px solid var(--tag); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
.cam-msg { position: absolute; top: .6rem; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px #000; padding: 0 .8rem; }
.cam-bar { position: absolute; bottom: .6rem; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; }

.done { text-align: center; padding: 2rem 0; }
.big-check { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--ok); color: #fff; font-size: 2.4rem; display: grid; place-items: center; }

/* ---------------- admin */
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: .7rem; padding-bottom: .2rem; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .4rem .85rem; font: inherit; font-size: .9rem; cursor: pointer; }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.row.gap.wrap > input[type=search] { flex: 1 1 220px; width: auto; }
.row.gap.wrap > select { flex: 0 1 220px; width: auto; }
.dist-pick { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.dist-pick select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; width: 100%; }
.stats div { display: grid; }
.stats b { font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: .85rem; }
.card.person { align-items: flex-start; }
progress { width: 100%; height: 10px; margin: .6rem 0; }

/* ---------------- login */
.login { max-width: 420px; margin: 0 auto; padding: 12vh 1.2rem 2rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.35rem; margin-bottom: 1.4rem; }
.brand svg.logo-icon { width: 38px; height: 38px; }
.login form { display: grid; gap: .9rem; margin-top: 1.2rem; }
input.code { font-size: 1.8rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------------- sheet + toast + spinner */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 20, .45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .18s; }
.sheet-back.open { opacity: 1; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 88vh; overflow: auto; border-radius: 16px 16px 0 0; padding: .4rem 1rem 1.4rem; padding-bottom: max(1.4rem, env(safe-area-inset-bottom)); transform: translateY(20px); transition: transform .18s; }
.sheet-back.open .sheet { transform: none; }
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 16px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg); }
.sheet-head h2 { margin: .6em 0; }
.sheet-body { display: grid; gap: .6rem; }
.toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 60; transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: .65rem 1rem; border-radius: 10px; max-width: calc(100vw - 2rem); transition: all .2s; font-weight: 550; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }
.toast.scan { background: #39ff14; color: #062b00; font-weight: 750; box-shadow: 0 0 0 2px #1fd400, 0 0 18px rgba(57, 255, 20, .75); }   /* found: neon green */
.toast.scan-miss { background: #e01b1b; color: #fff; font-weight: 750; box-shadow: 0 0 0 2px #b31212, 0 0 18px rgba(224, 27, 27, .6); }   /* not found: red */
.center-msg { display: grid; justify-items: center; gap: .8rem; padding: 3rem 1rem; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .toast, .sheet, .sheet-back { transition: none; } }

dd .linklike { margin-left: .5rem; }

/* store templates */
.chip.tmpl { background: color-mix(in srgb, var(--tag) 70%, transparent); color: #3a2c00; }
.check-card.tmpl { border-color: var(--tag); background: color-mix(in srgb, var(--tag) 14%, var(--card)); }
.tmpl-note { margin-bottom: .5rem; }
.store-picks { display: grid; gap: .35rem; max-height: 40vh; overflow: auto; padding: .2rem; }
.takeover { display: grid; gap: .5rem; border-style: dashed; margin-bottom: .4rem; }
.logo-prev img { max-width: 220px; max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.templates a { font-weight: 600; }
ul.small { margin: 0; padding-left: 1.2rem; }
.by-box { border-color: var(--tag); background: color-mix(in srgb, var(--tag) 10%, var(--card)); margin-top: .8rem; }
.by-line { display: grid; gap: .3rem; padding-top: .2rem; }
.by-line input.price { width: 5.5rem; }

/* tag maker */
.sheet.wide { max-width: 760px; }
.tm-line { display: flex; flex-direction: column; gap: .4rem; padding: .6rem .7rem; }
.tm-prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.tm-price { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); gap: .15rem; }
.tm-price input { min-height: 36px; padding: .3rem .45rem; font-size: .95rem; width: 100%; }
.tm-opts { gap: .35rem; }
@media (max-width: 420px) { .tm-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tm-busy { display: grid; gap: .45rem; padding: .75rem .9rem; border-color: var(--accent); }
.tm-busy[hidden] { display: none; }
.tm-busy .row { align-items: center; }
.tm-busy progress { width: 100%; max-width: none; justify-self: stretch; height: 10px; accent-color: var(--accent); }
.tm-step { font-size: .9rem; color: var(--muted); }
.tm-clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; }
.row.between { justify-content: space-between; gap: .6rem; }
.row.between h2.section { margin-bottom: .6em; }
.list.finished .card.req { opacity: .75; }
/* logo */
.brand svg.logo-lockup { width: min(280px, 80vw); height: auto; }
header.top .logo svg.logo-icon { width: 32px; height: 32px; display: block; }
.chip.printer { background: color-mix(in srgb, #ffd23f 45%, transparent); color: inherit; }
.printer-pick { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.printer-pick select { width: auto; flex: 1 1 200px; }
li.ok { color: #1c7c3c; font-weight: 600; }
/* new request steps */
.foot-row { align-items: stretch; }
.foot-row > .btn.back { flex: 0 0 auto; }
.foot-row > .btn.primary.wide, .foot-row > .btn.wide { flex: 1 1 auto; }
.picked-store { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; margin-bottom: .4rem; }
.picked-store .linklike { margin-left: auto; }
.special-box { margin-top: .6rem; }
label.switch.inline { display: inline-flex; margin-right: .8rem; }
details.tm-more { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; background: var(--card); }
details.tm-more > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.tm-more[open] > summary { margin-bottom: .6rem; }
.tm-summary { margin: .3rem 0 0; }
.tm-formula { border-left: 3px solid var(--line); padding-left: .7rem; }
.type-hint { text-align: center; padding: 1.2rem .5rem; }
/* distributor band (top of My requests / Request queue) */
.dist-band { display: flex; align-items: center; gap: .9rem; background: #16233f; color: #fff; border-radius: 14px; padding: .8rem .9rem; margin-bottom: .9rem; }
.dist-band[hidden] { display: none; }
.dist-logo { background: #fff; border-radius: 10px; padding: .35rem .5rem; flex: 0 0 auto; display: flex; }
.dist-logo img { height: 46px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.dist-info { min-width: 0; font-size: .88rem; line-height: 1.35; }
.dist-info b { font-size: 1rem; display: block; }
.dist-links { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .15rem; }
.dist-links a { color: #ffd23f; text-decoration: none; font-weight: 600; }
.dist-links a:hover { text-decoration: underline; }
label.switch.inline input[type=checkbox] { width: 20px !important; height: 20px !important; min-height: 0 !important; }
@media (max-width: 520px) {
  .stepper button { flex-direction: column; gap: .15rem; font-size: .72rem; padding: .35rem .1rem; }
}
.stepper { align-items: stretch; } .stepper li { display: flex; margin: 0; } .stepper li button { align-self: stretch; }
a.card.pdf-link { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.pdf-ic { flex: none; background: #c62828; color: #fff; font-weight: 800; font-size: .7rem; border-radius: 6px; padding: .45rem .4rem; letter-spacing: .03em; }

/* PrintATag admin: "Working as" bar under the header */
.working-as { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--card, #f3f5fa);
  border-bottom: 1px solid var(--line); font-size: 14px; }
.working-as span { color: var(--muted); white-space: nowrap; }
.working-as select { flex: 1; min-width: 0; max-width: 420px; padding: 6px 8px; font-weight: 600; }
.working-as.on { background: #fff4c7; }
.working-as.on span { color: #5a4600; }
@media (prefers-color-scheme: dark) { .working-as.on { background: #3a3210; } .working-as.on span { color: #ffe08a; } }
.btn.download { margin: 4px 0 8px; }
.bill .bill-amt { font-size: 1.15rem; }
.bill .chip { font-size: .72rem; vertical-align: middle; }
.tm-file { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.tm-file .tm-file-info { flex: 1; min-width: 10rem; }
.tm-file .tm-file-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.tm-send { margin-top: .4rem; }

/* camera scanner: a red laser line sweeping up and down inside the frame */
.cam-frame { overflow: hidden; }
.cam-laser { position: absolute; left: 4%; right: 4%; height: 3px; top: 0; border-radius: 2px;
  background: #ff2a2a; box-shadow: 0 0 8px 2px rgba(255, 42, 42, .85), 0 0 18px 6px rgba(255, 42, 42, .35);
  animation: laser 1.8s ease-in-out infinite alternate; }
@keyframes laser { from { top: 4%; } to { top: calc(96% - 3px); } }
@media (prefers-reduced-motion: reduce) { .cam-laser { animation-duration: 4s; } }
/* billing v2 */
.chip.bs-active { background: color-mix(in srgb, #2e9d4f 22%, transparent); }
.chip.bs-due { background: color-mix(in srgb, #ffb020 35%, transparent); }
.chip.bs-paused { background: #c62828; color: #fff; }
.chip.bs-cancelled, .chip.bs-not_billing { opacity: .75; }
.terms ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.terms li { margin: .2rem 0; }
.ledger.pay b { color: #2e9d4f; }
.paused-band { background: #fdecea; border: 1px solid #f5b5ae; color: #8a1c13; border-radius: 12px; padding: .7rem .9rem; margin: 0 0 .8rem; }
@media (prefers-color-scheme: dark) { .paused-band { background: #3a1512; border-color: #6e2a24; color: #ffb4ab; } }
/* My requests: delete a request the rep printed himself */
.req-wrap { display: flex; align-items: stretch; gap: .4rem; }
.req-wrap > .card.req { flex: 1; min-width: 0; }
.req-wrap > .req-del { align-self: center; flex: none; width: 2.6rem; height: 2.6rem; border: 1px solid var(--line, #d8dde6); border-radius: 10px; background: transparent; }
.req-wrap > .req-del:hover { border-color: #c62828; background: color-mix(in srgb, #c62828 10%, transparent); }
.list.finished .req-wrap > .card.req { opacity: .75; }

/* ---------------- sign-in page links */
.login-more { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .95rem; }
.login-more > a { font-weight: 650; font-size: 1.05rem; }
.login-more p { margin: .7rem 0 0; }

/* ---------------- public pages (How it works, Get in touch) */
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 980px; margin: 0 auto; padding: .9rem 1rem; }
.pub-logo svg { height: 40px; width: auto; display: block; }
main.pub { max-width: 980px; margin: 0 auto; padding: 0 1rem 3rem; }
.hw-hero h1 { margin: .6rem 0 .3rem; font-size: clamp(1.6rem, 5vw, 2.3rem); }
.hw-hero p { max-width: 40rem; }
.hw-demo { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; justify-content: center; margin: 1.4rem 0 1rem; }
.hw-side { flex: 1 1 16rem; max-width: 26rem; }
.hw-cap h2 { margin: .2rem 0 .3rem; }
.hw-cap p { margin: 0 0 .8rem; min-height: 3em; }
.hw-num { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.hw-dots { display: flex; gap: .45rem; margin-bottom: .9rem; }
.hw-dot { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.hw-dot.on { background: var(--accent); width: 28px; border-radius: 6px; transition: width .25s; }
.hw-list { padding-left: 1.3rem; } .hw-list li { margin: .45rem 0; }
.hw-cta { text-align: center; margin-top: 2rem; padding: 1.4rem 1rem; }
.hw-cta h2 { margin: 0 0 .3rem; }

/* the phone */
.hw-phone { position: relative; width: 250px; height: 440px; flex: none; border-radius: 34px; background: var(--card);
  border: 8px solid #16233f; box-shadow: 0 12px 40px rgba(22, 35, 63, .25); overflow: hidden; }
.hw-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 90px; height: 18px; background: #16233f; border-radius: 0 0 12px 12px; z-index: 3; }
.hw-scene { position: absolute; inset: 0; padding: 34px 14px 14px; display: none; font-size: .82rem; }
.hw-scene.on { display: block; animation: hw-in .35s ease-out; }
@keyframes hw-in { from { opacity: 0; transform: translateX(14px); } }
.hw-scene.on * { animation-fill-mode: both; }

/* 1 - store search */
.hw-search { display: flex; align-items: center; gap: .4rem; border: 2px solid var(--accent); border-radius: 10px; padding: .45rem .6rem; margin-bottom: .7rem; }
.hw-typed { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--accent); width: 0; }
.hw-scene.on .hw-typed { animation: hw-type .8s steps(7) .2s forwards, hw-caret .6s step-end 1s 4; }
@keyframes hw-type { to { width: 7.5ch; } }
@keyframes hw-caret { 50% { border-color: transparent; } }
.hw-row { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .6rem; margin-bottom: .45rem; opacity: 0; }
.hw-scene.on .hw-row { animation: hw-up .3s ease-out var(--d) forwards; }
.hw-scene.on .hw-pick { animation: hw-up .3s ease-out var(--d) forwards, hw-tap .5s ease-out 2.4s forwards; }
@keyframes hw-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hw-tap { 40% { transform: scale(.96); } 100% { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); } }

/* 2 - tag checkboxes */
.hw-check { display: flex; align-items: center; gap: .6rem; padding: .7rem .6rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; }
.hw-box { width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 5px; flex: none; position: relative; }
.hw-scene.on .hw-on .hw-box { animation: hw-checked .25s ease-out var(--d) forwards; }
.hw-scene.on .hw-on { animation: hw-row-on .25s ease-out var(--d) forwards; }
@keyframes hw-checked { to { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); } }
@keyframes hw-row-on { to { border-color: var(--accent); } }

/* 3 - scanning */
.hw-cam { position: relative; height: 230px; border-radius: 14px; background: #1b1f27; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.hw-bottle { width: 80px; height: 210px; background: linear-gradient(90deg, #2d4a2a, #4c7a46 45%, #2d4a2a); border-radius: 30px 30px 8px 8px; position: relative; }
.hw-bottle::before { content: ''; position: absolute; left: 30px; top: -30px; width: 20px; height: 40px; background: #2d4a2a; border-radius: 6px 6px 0 0; }
.hw-label { position: absolute; left: 8px; right: 8px; top: 80px; background: #f4ecd8; border-radius: 4px; padding: 8px 6px 4px; }
.hw-bars { height: 34px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 12px); }
.hw-upc { font: 600 7px/1.4 ui-monospace, monospace; color: #111; text-align: center; }
.hw-laser { position: absolute; left: 10%; right: 10%; top: 20%; height: 3px; background: #ff2b2b; box-shadow: 0 0 10px 3px rgba(255, 43, 43, .7); border-radius: 2px; }
.hw-scene.on .hw-laser { animation: hw-laser 1.1s ease-in-out infinite alternate; }
@keyframes hw-laser { to { top: 75%; } }
.hw-pop { margin-top: .7rem; background: #39ff14; color: #062b00; box-shadow: 0 0 14px rgba(57, 255, 20, .7); font-weight: 700; border-radius: 10px; padding: .55rem .6rem; opacity: 0; }
.hw-scene.on .hw-pop { animation: hw-pop .35s cubic-bezier(.3, 1.6, .5, 1) 1.6s forwards; }
@keyframes hw-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.hw-cart { margin-top: .6rem; color: var(--muted); }
.hw-count::after { content: '3'; }
.hw-scene.on .hw-count::after { animation: hw-count 0s 1.6s forwards; }
@keyframes hw-count { to { content: '4'; } }

/* 4 - send */
.hw-field { margin-bottom: .9rem; }
.hw-lbl { font-weight: 650; margin-bottom: .35rem; }
.hw-select { position: relative; border: 1px solid var(--line); border-radius: 10px; height: 2.4rem; overflow: hidden; }
.hw-select span { position: absolute; left: .6rem; right: .6rem; top: .6rem; }
.hw-sel-b { opacity: 0; font-weight: 650; }
.hw-scene.on .hw-sel-a { animation: hw-fade-out .2s .9s forwards; }
.hw-scene.on .hw-sel-b { animation: hw-fade-in .2s 1s forwards; }
.hw-scene.on .hw-select { animation: hw-row-on .2s .9s forwards; }
@keyframes hw-fade-out { to { opacity: 0; } }
@keyframes hw-fade-in { to { opacity: 1; } }
.hw-send { background: var(--accent); color: var(--accent-ink); text-align: center; font-weight: 700; padding: .7rem; border-radius: 10px; }
.hw-scene.on .hw-send { animation: hw-press .3s 1.8s; }
@keyframes hw-press { 50% { transform: scale(.94); filter: brightness(.85); } }
.hw-done { margin-top: 1.4rem; text-align: center; font-size: 1.2rem; font-weight: 750; color: var(--ok); opacity: 0; }
.hw-scene.on .hw-done { animation: hw-pop .4s cubic-bezier(.3, 1.6, .5, 1) 2.2s forwards; }
.hw-tick { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ok); color: #fff; margin-right: .4rem; }
.hw-tick.big { width: 3.2rem; height: 3.2rem; font-size: 1.6rem; margin: 0 auto .4rem; display: grid; }

/* 5 - print */
.hw-sheet { background: #fff; border-radius: 6px; padding: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.hw-tag { background: #ffd23f; border-radius: 3px; height: 50px; padding: 4px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; color: #16233f; }
.hw-tag i { display: block; height: 4px; width: 80%; background: rgba(22, 35, 63, .35); border-radius: 2px; }
.hw-tag b { font-size: .78rem; text-align: right; }
.hw-scene.on .hw-tag { animation: hw-up .25s ease-out var(--d) forwards; }
.hw-printer { position: relative; margin: 1rem auto 0; width: 170px; height: 64px; background: #2b3447; border-radius: 10px; overflow: visible; }
.hw-printer::before { content: ''; position: absolute; left: 20px; right: 20px; top: 26px; height: 6px; background: #0e131c; border-radius: 3px; }
.hw-paper { position: absolute; left: 30px; right: 30px; top: 30px; height: 0; background: repeating-linear-gradient(#fff 0 10px, #ffe9a3 10px 14px); border-radius: 0 0 3px 3px; }
.hw-scene.on .hw-paper { animation: hw-paper 1.4s ease-in-out 1.9s forwards; }
@keyframes hw-paper { to { height: 70px; } }

@media (prefers-reduced-motion: reduce) {
  .hw-scene.on, .hw-scene.on * { animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}

/* ---------------- Get in touch */
.contact-form { max-width: 34rem; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { text-align: center; max-width: 34rem; }
.inq.is-new { border-left: 4px solid var(--accent); }
.inq-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip.inq-new { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.chip.inq-won { background: color-mix(in srgb, #2e9d4f 22%, transparent); }
.chip.inq-lost { opacity: .7; }
/* Deep Deal option under the tag boxes */
.deep-wrap:empty { display: none; }
.deep-opt { margin-top: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); display: flex; gap: .6rem; align-items: center; }
.hw-check { padding: .55rem .6rem; margin-bottom: .4rem; }
.hw-more { color: var(--muted); text-align: center; font-style: italic; margin-top: .3rem; opacity: 0; }
.hw-scene.on .hw-more { animation: hw-fade-in .3s 2.8s forwards; }
.hw-kinds { display: flex; flex-wrap: wrap; gap: .5rem; }
.hw-kind { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem; font-weight: 600; }
.hw-kind::before { content: ''; display: inline-block; width: .7em; height: .7em; border-radius: 2px; background: var(--tag); margin-right: .45em; vertical-align: -.05em; }
.hw-kind.more { color: var(--muted); font-weight: 500; font-style: italic; }
.hw-kind.more::before { display: none; }
.hw-tag { height: 56px; padding: 4px 5px; }
.hw-tag-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 3px; }
.hw-img { display: block; width: 14px; height: 34px; background: center bottom / contain no-repeat; flex: none; }
.hw-img.wine { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2012%2032%22%3E%3Cpath%20d%3D%22M4.5%200h3v9c0%202%203.5%203%203.5%207v14.5c0%20.8-.7%201.5-1.5%201.5h-7C1.7%2032%201%2031.3%201%2030.5V16c0-4%203.5-5%203.5-7z%22%20fill%3D%22%235b1a2b%22/%3E%3Crect%20x%3D%222%22%20y%3D%2218%22%20width%3D%228%22%20height%3D%228%22%20rx%3D%221%22%20fill%3D%22%23f4ecd8%22/%3E%3Crect%20x%3D%223.3%22%20y%3D%2220%22%20width%3D%225.4%22%20height%3D%221.2%22%20fill%3D%22%235b1a2b%22/%3E%3Crect%20x%3D%224%22%20y%3D%220%22%20width%3D%224%22%20height%3D%223%22%20fill%3D%22%23c9a227%22/%3E%3C/svg%3E"); }
.hw-img.beer { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2012%2032%22%3E%3Cpath%20d%3D%22M4.6%200h2.8v8c0%202%203.6%203.5%203.6%206.5v16c0%20.8-.7%201.5-1.5%201.5h-7C1.7%2032%201%2031.3%201%2030.5v-16C1%2011.5%204.6%2010%204.6%208z%22%20fill%3D%22%238a4b12%22/%3E%3Cellipse%20cx%3D%226%22%20cy%3D%2222%22%20rx%3D%224%22%20ry%3D%224.5%22%20fill%3D%22%23f2c94c%22/%3E%3Crect%20x%3D%224.4%22%20y%3D%220%22%20width%3D%223.2%22%20height%3D%222%22%20fill%3D%22%23333%22/%3E%3C/svg%3E"); }
.hw-img.can { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2028%22%3E%3Crect%20x%3D%221%22%20y%3D%222%22%20width%3D%2214%22%20height%3D%2225%22%20rx%3D%222.5%22%20fill%3D%22%23c62828%22/%3E%3Crect%20x%3D%222%22%20y%3D%220.5%22%20width%3D%2212%22%20height%3D%223%22%20rx%3D%221.2%22%20fill%3D%22%23b0b7c3%22/%3E%3Cpath%20d%3D%22M1%2013c4-3%2010%203%2014%200v4c-4%203-10-3-14%200z%22%20fill%3D%22%23fff%22/%3E%3C/svg%3E"); width: 17px; height: 28px; }
/* Why PrintATag */
.hw-why { margin: 1.6rem 0 1rem; }
.hw-why h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); margin: 0 0 .3rem; }
.hw-why-lead { font-size: 1.08rem; max-width: 46rem; margin: 0 0 1rem; }
.hw-why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.hw-why-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.hw-why-card b { display: block; font-size: 1.02rem; margin: .25rem 0 .2rem; }
.hw-why-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.hw-why-ic { font-size: 1.5rem; line-height: 1; }
.hw-why-end { margin: 1rem 0 0; font-size: 1.05rem; }
.hw-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 6px; }
.hw-tag b { font-size: .72rem; white-space: nowrap; }
.hw-label { top: 70px; }
.hw-wine { font: 700 9px/1.1 Georgia, serif; color: #5b1a2b; text-align: center; }
.hw-ml { font: 600 6px/1.2 system-ui, sans-serif; color: #333; text-align: center; margin-bottom: 3px; }
.hw-upc { white-space: nowrap; font-size: 6px; letter-spacing: -.02em; }
/* step 5: realistic shelf tags (2 x 3 on a letter sheet) */
.hw-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 7px; border-radius: 2px;
  background: #fdfdfb; box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.18); }
.hw-tag { height: 78px; padding: 3px 3px 3px 2px; display: flex; flex-direction: row; justify-content: flex-start; gap: 2px;
  background: linear-gradient(#fff, #fbfbf8); border: .5px dashed #c9c9c4; border-radius: 0; color: #111; font-family: Arial, Helvetica, sans-serif; }
.hw-pic { flex: none; width: 21px; display: flex; align-items: flex-end; padding-bottom: 2px; }
.hw-pic svg { width: 100%; height: auto; max-height: 70px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.hw-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hw-name { font-weight: 800; font-size: 8.5px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-size { font-size: 6.5px; color: #444; font-weight: 600; }
.hw-price { margin-top: 2px; background: #ffd23f; border-radius: 1.5px; padding: 1px 3px 0; text-align: center;
  font: 900 17px/1.05 Rockwell, "Rockwell Extra Bold", "Roboto Slab", Georgia, serif; color: #111; white-space: nowrap; }
.hw-dollar, .hw-price sup { font-size: 9px; vertical-align: 6px; }
.hw-save { font-size: 5.6px; font-weight: 700; color: #c62828; margin-top: 1.5px; white-space: nowrap; }
.hw-code { margin-top: auto; display: flex; align-items: flex-end; gap: 2px; font-size: 5px; color: #333; }
.hw-mini-bars { display: block; width: 30px; height: 7px;
  background: repeating-linear-gradient(90deg, #111 0 1px, transparent 1px 2px, #111 2px 2.5px, transparent 2.5px 4px, #111 4px 5.5px, transparent 5.5px 6px); }
.hw-printer { margin-top: .7rem; height: 48px; }
.hw-printer::before { top: 20px; }
.hw-paper { top: 24px; }
@keyframes hw-paper { to { height: 54px; } }
/* Nothing to buy, nothing to install */
.hw-easy { margin: 1.8rem 0 1rem; }
.hw-easy h2 { font-size: clamp(1.25rem, 3.6vw, 1.6rem); margin: 0 0 .8rem; }
.hw-easy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; }
.hw-easy-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tag); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.hw-easy-card b { display: block; font-size: 1.02rem; margin-bottom: .25rem; }
.hw-easy-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.hw-devices { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.hw-device { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .65rem; font-size: .88rem; white-space: nowrap; }
/* scan step: the realistic bottle */
.hw-bottle { width: 72px; height: 226px; background: none; border-radius: 0; margin-bottom: -6px; }
.hw-bottle::before { display: none; }
.hw-bottle > svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.hw-bottle .hw-label { left: 13%; right: 13%; top: 57%; padding: 5px 3px 3px; border-radius: 2px; background: linear-gradient(90deg, #e4d8bd, #fbf6ea 50%, #e4d8bd); z-index: 1; }
.hw-cam { background: radial-gradient(ellipse at 50% 30%, #3a3f4a, #15181e 75%); }
.hw-bottle .hw-upc { font-size: 5px; letter-spacing: -.04em; overflow: hidden; }
/* Home links on the public pages */
.pub-nav { display: flex; align-items: center; gap: 1rem; }
.pub-nav > a:not(.btn) { font-weight: 600; text-decoration: none; }
.pub-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; max-width: 980px; margin: 0 auto; padding: 1.2rem 1rem 2rem; border-top: 1px solid var(--line); font-size: .95rem; }
main .pub-foot { margin-top: 2rem; }
/* line icons */
svg.ic { width: 1.05em; height: 1.05em; vertical-align: -.17em; flex: none; }
.btn svg.ic, a svg.ic { margin-right: .4em; }
.icon-btn svg.ic { margin: 0; width: 1.15em; height: 1.15em; }
/* How it works: the phone on the left edge, the steps beside it */
.hw-demo { flex-direction: row; justify-content: flex-start; gap: 2.5rem; }
.hw-side { max-width: 30rem; }
@media (max-width: 640px) { .hw-demo { justify-content: flex-start; } }
.hw-why-ic { color: var(--accent); }
.hw-why-ic svg.ic { width: 1.5rem; height: 1.5rem; }
.hw-device { display: inline-flex; align-items: center; gap: .35rem; }
.hw-device svg.ic { color: var(--accent); }
.hw-mag svg.ic { color: var(--muted); }
.pub-nav a svg.ic, .pub-foot a svg.ic { margin-right: .3em; }
nav.menu a svg.ic { margin-right: .45em; }
.chip svg.ic { margin-right: .25em; width: .95em; height: .95em; }
/* sign-in: saved emails + keep me signed in */
.saved-emails { display: grid; gap: .4rem; }
.saved-email { display: flex; gap: .4rem; align-items: stretch; }
.saved-email .linkcard { flex: 1; text-align: left; font: inherit; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .7rem .9rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.saved-email .linkcard:hover { border-color: var(--accent); }
.saved-email .icon-btn { width: 2.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 1.2rem; }
label.switch.keep { font-size: .95rem; color: var(--muted); }
.make-problem { border-left: 4px solid var(--danger); }
.pdf-expiry { background: color-mix(in srgb, #ffb020 22%, transparent); border-left: 4px solid #e0a000; border-radius: 8px; padding: .55rem .75rem; font-size: .92rem; margin: .4rem 0; }
.fresh-band { background: color-mix(in srgb, #ffb020 18%, var(--card)); border: 1px solid color-mix(in srgb, #e0a000 50%, transparent); border-radius: var(--radius); padding: .7rem .9rem; margin: 0 0 .8rem; } .fresh-band ul { margin: .3rem 0; padding-left: 1.2rem; }

/* ---------------- sign-in page: on a computer or tablet it sits inside a phone frame (on a phone it's the phone) */
@media (min-width: 700px) and (min-height: 640px) {
  body:has(> #app > .login) { min-height: 100vh; background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg) 70%); }
  .login {
    position: relative; max-width: 410px; min-height: min(820px, 92vh); margin: 4vh auto; padding: 64px 26px 28px;
    background: var(--bg); border: 12px solid #16233f; border-radius: 48px;
    box-shadow: 0 2px 0 1px #2b3a5c inset, 0 24px 60px rgba(22, 35, 63, .28), 0 0 0 2px #0b1220;
  }
  .login::before {                       /* the notch */
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 120px; height: 26px; background: #16233f; border-radius: 0 0 16px 16px;
  }
  .login::after {                        /* the home bar */
    content: ''; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    width: 120px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 25%, transparent);
  }
}
@media (min-width: 700px) and (min-height: 640px) and (prefers-color-scheme: dark) {
  .login { border-color: #2b3a5c; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
  .login::before { background: #2b3a5c; }
}
/* sign-in page: the PrintATag logo spans the same width as the sign-in button */
.login .brand { display: block; width: 100%; }
.login .brand svg.logo-lockup { display: block; width: 100%; height: auto; max-height: none; }
/* Statistics console */
.sc-tiles { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.sc-tiles > div { display: flex; flex-direction: column; }
.sc-chart { position: relative; }
.sc-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; margin: .6rem 0 .3rem; border-bottom: 1px solid var(--line); }
.sc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: pointer; outline: none; }
.sc-bar { width: 100%; min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; }
.sc-bar.zero { height: 2px !important; background: var(--line); border-radius: 0; }
.sc-col:hover .sc-bar, .sc-col:focus .sc-bar { filter: brightness(1.25); }
.sc-tip { position: absolute; top: .5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .25rem .6rem; border-radius: 6px; font-size: .85rem; white-space: nowrap; }
.sc-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.sc-two > div { display: grid; gap: .4rem; align-content: start; }
.sc-one { display: grid; gap: .4rem; margin: 1rem 0; }
.sc-table-wrap { overflow-x: auto; }
.sc-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sc-table th, .sc-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sc-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sc-table tr:last-child td { border-bottom: 0; }
/* the tagline */
.tagline { display: inline-block; margin: 0 0 .2rem; padding: .2rem .7rem; border-radius: 999px; background: var(--tag); color: #16233f;
  font-weight: 800; letter-spacing: .02em; font-size: .95rem; }
.login .tagline { margin: -.6rem 0 .4rem; }
.stats-filter { display: grid; gap: .7rem; }
.stats-filter label { flex: 1 1 11rem; display: grid; gap: .25rem; }

/* ---------------- Proposals (PrintATag admin) */
.prop-row { text-decoration: none; color: inherit; }
.chip.prop-draft { background: #eef1f6; } .chip.prop-sent { background: #dbe7ff; } .chip.prop-accepted { background: #d6f5df; } .chip.prop-declined { background: #fde2e2; }
.prop-logo-row { align-items: center; }
img.prop-logo { max-height: 64px; max-width: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.prop-item { align-items: end; border-bottom: 1px dashed var(--line); padding-bottom: .5rem; }
.prop-item label { display: grid; gap: .2rem; font-size: .85rem; }
.prop-item input { min-width: 0; }
table.prop-quote td.r, table.prop-analysis td.r { text-align: right; white-space: nowrap; }
table.prop-quote, table.prop-analysis { width: 100%; }
.prop-analysis-wrap { overflow-x: auto; }
.prop-mock { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); display: grid; gap: .6rem; padding-bottom: .7rem; }
.prop-mock-top { display: flex; gap: 1rem; align-items: center; background: #16233f; color: #fff; padding: .55rem .8rem; }
.prop-mock-top span { opacity: .8; font-size: .85rem; }
.prop-mock > .small { padding: 0 .8rem; }
.prop-band { display: flex !important; gap: .8rem; align-items: center; margin: 0 .8rem; }
.prop-band img { max-height: 48px; max-width: 160px; object-fit: contain; }
.prop-nologo { width: 120px; height: 44px; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; font-size: .8rem; color: var(--muted, #667); }
.prop-foot { position: sticky; bottom: 0; background: var(--bg); padding: .7rem 0; border-top: 1px solid var(--line); }
.prop-quote td:first-child { white-space: normal; }

/* ---------------- Warehouse Location Tags */
.wh-table-wrap { overflow-x: auto; max-height: 70vh; overflow-y: auto; }
table.wh-table th, table.wh-table td { padding: .25rem .3rem; vertical-align: middle; }
table.wh-table th { position: sticky; top: 0; background: var(--card); z-index: 1; }
table.wh-table input:not([type=checkbox]) { min-width: 7rem; width: 100%; padding: .3rem .4rem; font: inherit; font-size: .88rem; }
table.wh-table input.wh-copies { min-width: 3.5rem; width: 4rem; }
table.wh-table tr.on td { background: #eef4ff; }
.wh-colhead { display: flex; gap: .2rem; align-items: center; }
.wh-colhead input { font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); }
.wh-person { padding: .3rem 0; }
main > *, main section { min-width: 0; max-width: 100%; }
.wh-table-wrap { width: 100%; }
.tax-box { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.tax-box legend { font-weight: 700; padding: 0 .3rem; }
.tax-table td input[type=number] { width: 4.5rem; padding: .3rem .4rem; }
.tax-table td.wrap { white-space: normal; min-width: 24rem; }
.chip.tax-yes { background: #fde8d7; color: #8a3b00; }
.tax-table tr.on td { background: #eef7ee; }
.bills-box { border: 1px solid var(--line); border-radius: 12px; padding: .7rem; }

/* Distributors or Wholesalers - click here (sign-in page) + the public list and form */
.dist-cta { margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: 12px; background: #eef3ff; border: 1px solid #cfdcfb; }
.dist-cta p { margin: 0 0 .7rem; }
.dist-cta p b { display: block; font-size: 1.08rem; margin-bottom: .2rem; }
.dist-go { display: inline-flex; align-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 99px;
  padding: .55rem 1.1rem; text-decoration: none; }
.dist-go:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .dist-cta { background: #1a2742; border-color: #2f4170; } }
.dir-hero h1 { color: #c62828; }
.dir-tools { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1rem 0 .3rem; }
.dir-tools label { flex: 1 1 10rem; min-width: 0; }
.dir-state { margin-top: 1.4rem; }
.dir-state h2 { font-size: 1.05rem; margin: 0 0 .5rem; padding-bottom: .3rem; border-bottom: 2px solid var(--line); }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .5rem; }
.dir-co { display: flex; flex-direction: column; gap: .1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: inherit; text-decoration: none; min-width: 0; }
.dir-co b { overflow-wrap: anywhere; }
.dir-co:hover, .dir-co:focus-visible { border-color: var(--accent); box-shadow: 0 2px 10px rgba(31, 79, 209, .15); }
.dir-closed { font-style: italic; }
.dir-picked { border-left: 4px solid #c62828; }
.dir-picked-name { display: block; font-size: 1.2rem; margin: .1rem 0; }
.dir-tagmaker { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem 1rem; }
.dir-tagmaker legend { font-weight: 700; padding: 0 .3rem; }
.dir-or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; }
.dir-or::before, .dir-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.dir-letter { white-space: pre-wrap; font: inherit; font-size: .88rem; background: var(--bg, #f5f7fb); border: 1px solid var(--line);
  border-radius: 8px; padding: .7rem; margin: .5rem 0 0; overflow-wrap: anywhere; }
.dir-row.off { opacity: .6; }
.dir-row > div:first-child { min-width: 0; }
.rights-note { border-left: 3px solid var(--accent); padding: .5rem .7rem; background: var(--card); border-radius: 6px; }
/* "What tags do you need?": the Deep Deal box drops down under a ticked EDLP card */
.tag-pick { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.deep-slot:empty { display: none; }
.deep-sub { display: flex; align-items: flex-start; gap: .55rem; margin: 0 0 0 .9rem; padding: .45rem .6rem; border-left: 3px solid var(--accent);
  background: var(--card); border-radius: 0 8px 8px 0; font-size: .92rem; cursor: pointer; }
.deep-sub input { margin-top: .2rem; }
.prop-afield { flex: 1 1 9rem; }
.prop-legend .lg-reg { color: #1f4fd1; } .prop-legend .lg-sale { color: #15803d; } .prop-legend .lg-cost { color: #c62828; }
.prop-legend span { margin-right: .8rem; font-weight: 600; }

.prop-grid { margin-top: .4rem; }
.prop-grid-title { font-size: .85rem; margin-bottom: .4rem; }
.prop-grid table.heat { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: .85rem; font-variant-numeric: tabular-nums; }
.prop-grid table.heat th { color: var(--muted, #5d6779); font-weight: 600; font-size: .75rem; padding: .3rem; text-align: right; white-space: nowrap; }
.prop-grid table.heat tbody th { text-align: left; }
.prop-grid table.heat td { padding: .5rem .45rem; text-align: right; border-radius: 6px; font-weight: 650; white-space: nowrap; }
.prop-grid table.heat td.neg { background: #fde2e2; color: #c62828; }
.prop-grid table.heat td.mine { outline: 3px solid #ffd23f; outline-offset: -1px; }

/* ---------------- branded sites (update 43): their logo + color */
body.branded header.top { background: #fff; color: #16233f; border-bottom: 4px solid var(--brand, var(--accent)); }
body.branded .top-who { border-right-color: var(--line); }
@media (prefers-color-scheme: dark) { body.branded header.top { background: #0a0f19; color: var(--ink); } }
.brand-logo { display: flex; align-items: center; background: #fff; border-radius: 8px; padding: 2px 6px; }
.brand-logo img { height: 34px; width: auto; max-width: 140px; object-fit: contain; display: block; }
body.branded .dist-band { background: var(--brand, #16233f); }
.login .brand.brand-img { display: flex; justify-content: center; background: #fff; border-radius: 14px; padding: .6rem; border-bottom: 4px solid var(--brand, var(--accent)); }
.login .brand.brand-img img { display: block; max-width: 100%; max-height: 110px; object-fit: contain; }
.site-pill { display: inline-block; margin: 0 0 .3rem; padding: .25rem .8rem; border-radius: 999px; background: var(--brand, var(--accent)); color: #fff;
  font-weight: 800; font-size: .85rem; letter-spacing: .02em; }
.login-steps { margin: 1.4rem 0 0; padding-left: 1.3rem; color: var(--muted); display: grid; gap: .35rem; font-size: .92rem; }
footer.powered { text-align: center; font-size: .78rem; color: var(--muted); padding: 1.4rem 0 1.8rem; }
footer.powered a { color: inherit; text-decoration: none; }
footer.powered a:hover b { text-decoration: underline; }
/* Super Admin -> Distributors: the brand preview */
.brand-prev { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.brand-prev .bp-top { display: flex; align-items: center; gap: .6rem; background: #fff; padding: .45rem .7rem; border-bottom: 4px solid var(--bp, #16233f); }
.brand-prev .bp-top img { height: 30px; max-width: 120px; object-fit: contain; }
.brand-prev .bp-top span { font-size: .78rem; color: #5d6779; }
.brand-prev .bp-body { padding: .6rem .7rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.brand-prev .bp-btn { background: var(--bp, #1f4fd1); color: #fff; border-radius: 8px; padding: .4rem .8rem; font-weight: 700; font-size: .85rem; }
.slug-row { display: flex; align-items: center; gap: .3rem; }
.slug-row input { flex: 1; min-width: 0; }
.color-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.color-row input[type=color] { width: 3rem; height: 2.4rem; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.dist-site { font-size: .8rem; }

/* ---------------- Our account (update 44: the customer's account owner) */
.acct-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; }
.acct-tile { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; display: grid; gap: .15rem; }
.acct-tile b { font-size: 1.15rem; }
.acct-balance { font-size: 1.6rem; font-weight: 800; color: var(--ok); }
.acct-balance.due { color: var(--danger); }
.acct-ledger td.r { text-align: right; } .acct-ledger td.ok { color: var(--ok); }
.chip.owner { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--ink); font-weight: 700; }
/* Managers' Tag types page */
.card.block.tag-choice { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tag-choice.off { opacity: .65; }
.tag-choice .chip { margin-left: .4rem; }
/* Super Admin "View as" */
.working-as { flex-wrap: wrap; }
.working-as.viewing { background: #ede4ff; }
.working-as.viewing span { color: #4b2a8f; }
.working-as .as-note { flex-basis: 100%; font-size: .82rem; color: #4b2a8f; }
@media (prefers-color-scheme: dark) { .working-as.viewing { background: #2c2147; } .working-as.viewing span, .working-as .as-note { color: #d5c4ff; } }
/* ---------------- Tasks (update 47) */
.task-link { position: relative; }
.badge { display: inline-block; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; margin-left: .35rem; border-radius: 999px;
  background: #d92d20; color: #fff; font-size: .75rem; font-weight: 800; line-height: 1.25rem; text-align: center; vertical-align: 1px; }
.task-band { display: block; background: color-mix(in srgb, #d92d20 12%, var(--card)); border: 1px solid color-mix(in srgb, #d92d20 40%, transparent);
  color: var(--ink); border-radius: var(--radius); padding: .7rem .9rem; margin: 0 0 .8rem; font-weight: 700; text-decoration: none; }
.card.block.task { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.task-main { display: grid; gap: .25rem; min-width: 0; }
.task-what { white-space: pre-wrap; }
.task-btns { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; flex: none; }
.task.late { border-left: 4px solid #d92d20; }
.task.done { opacity: .75; }
.task-note { color: var(--ok); }
.task-chip-done { background: #d6f5df; } .task-chip-late { background: #fde2e2; color: #b42318; }
.task-done summary { cursor: pointer; color: var(--muted); margin: .4rem 0; }
@media (max-width: 600px) { .card.block.task { flex-direction: column; } .task-btns { flex-direction: row; align-items: center; } }
/* Distributors page: pick a state first */
.dir-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .5rem; }
.dir-st { display: flex; flex-direction: column; gap: .1rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); text-decoration: none; }
.dir-st:hover, .dir-st:focus-visible { border-color: var(--accent); box-shadow: 0 2px 10px rgba(31, 79, 209, .15); }
.dir-st.closed { opacity: .6; }
.dir-back { font-weight: 650; text-decoration: none; }
.task-from { font-size: .82rem; font-weight: 700; color: var(--accent); }
.task-req { display: inline-block; font-size: .88rem; font-weight: 650; }
.task-req-pick { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; }
.task-req-pick input { margin-top: .2rem; }
.badge.badge-done { background: #15803d; }
.task-band.all-done { background: color-mix(in srgb, #15803d 12%, var(--card)); border-color: color-mix(in srgb, #15803d 40%, transparent); }
.task.just-done { border-left: 4px solid #15803d; opacity: 1; }
/* "This month" on the home page */
.month-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; margin: .2rem 0 .9rem; display: grid; gap: .55rem; }
.month-title { font-weight: 800; }
.month-line { display: grid; gap: .25rem; }
.month-who { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.month-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.month-num { background: var(--bg); border-radius: 10px; padding: .45rem .6rem; display: grid; }
.month-num b { font-size: 1.3rem; color: var(--accent); }
.month-num span { font-size: .78rem; color: var(--muted); }
