:root {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1f232c; --line: #2a2f3a;
  --ink: #e8ebf0; --muted: #9aa3b2; --brand: #ff5a1f; --brand-2: #ffb020;
  --ok: #34d17a; --warn: #ffb020; --bad: #ff5468; --info: #4aa8ff;
  --radius: 14px; --gap: 16px; --on-brand: #1a1205; --btn-radius: 10px; --photo-bg: #f3f5f8;
  --bad-solid: #d92d3f; --focus: #4aa8ff; --field-line: #6e7789;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", Roboto, sans-serif; }
body { -webkit-text-size-adjust: 100%; }
a { color: var(--info); text-decoration: none; }

/* Top bar */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  gap: 12px; padding: 12px 16px; background: var(--header-bg, linear-gradient(180deg,#141821,#10131a));
  border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; }
.logo .mark { width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center;
  color: var(--on-brand); font-weight: 900; }
/* SK PrintFlow logo (public/brand, tools/brand/make.py): the SK mark in colour + the two lines drawn in the text colour
   through a mask, so they follow light and dark themes. --lg-h = the mark's height; the lines are as tall as the mark. */
.logo:has(> .skmark) { --lg-h: 30px; gap: calc(var(--lg-h) * .3); }
.logo .mark.skmark, .auth .brand .logo .mark.skmark { width: auto; height: var(--lg-h); background: none; border-radius: 0; }
.logo .mark.skmark img, .auth .brand .logo .mark.skmark img { height: var(--lg-h); width: auto; max-width: none; display: block; }
.skwords { display: block; flex: none; height: var(--lg-h, 30px); aspect-ratio: 4.4404; background: currentColor;
  -webkit-mask: url(/brand/sk-printflow-words.svg) center / contain no-repeat; mask: url(/brand/sk-printflow-words.svg) center / contain no-repeat; }
.skwords[hidden] { display: none; }
@media (forced-colors: active) { .skwords { background: CanvasText; } }
.spacer { flex: 1; }
.whoami { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.whoami .shopname { font-weight: 800; }
.whoami .uname { font-weight: 600; }
/* long shop or person names (up to 60 characters) never push the header off-screen */
.whoami { min-width: 0; } .whoami .shopname, .whoami .uname { min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbtn { background: transparent; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
@media (max-width: 560px) { .whoami .uname { display: none; } }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; color: var(--muted); border: 0; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.lang button.active { background: var(--brand); color: var(--on-brand); }

/* Nav */
nav.tabs { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 53px; z-index: 19; }
nav.tabs a { white-space: nowrap; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; }
nav.tabs a.active { background: var(--panel-2); color: var(--ink); }
/* arrows at the ends of a menu wider than the window (app.js navArrows) */
nav.tabs .tabarrow { position: sticky; z-index: 1; flex: none; display: inline-flex; align-items: center; border: 0; color: var(--ink); cursor: pointer; padding: 0 6px; }
nav.tabs .tabarrow[hidden] { display: none; }
nav.tabs .tabarrow.l { left: -12px; margin-right: -6px; padding-right: 22px; background: linear-gradient(to left, transparent, var(--panel) 45%); }
nav.tabs .tabarrow.r { right: -12px; margin-left: auto; padding-left: 22px; background: linear-gradient(to right, transparent, var(--panel) 45%); }

main { padding: var(--gap); max-width: 1100px; margin: 0 auto; }
/* One-line tip above each screen (help.js); hidden when the person turns tips off. */
.tipbar { max-width: 1100px; margin: 0 auto; padding: var(--gap) var(--gap) 0; }
.tipbar:empty { display: none; }
.tipbar .skh-tip { margin: 0; }
h1 { font-size: 1.25rem; margin: 2px 0 14px; }
h2 { font-size: 1.05rem; margin: 18px 0 10px; }

.sharecard { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--gap); flex-wrap: wrap; }
.sharelink { display: block; font-weight: 700; word-break: break-all; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--gap); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .n { font-size: 2rem; font-weight: 800; line-height: 1; }
.kpi .l { color: var(--muted); font-size: .85rem; font-weight: 600; }
.kpi.rush .n { color: var(--brand); }
.kpi.done .n { color: var(--ok); }
.kpi.hold .n { color: var(--warn); }
.card img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.qrcard { display: flex; flex-direction: column; align-items: center; gap: 8px; width: fit-content; background: #fff; }
.qrcard .muted { color: #333; font-weight: 700; }
.artgrid { display: flex; flex-wrap: wrap; gap: 14px; }
.artgrid figure { margin: 0; }
.artgrid figcaption { color: var(--muted); font-size: .8rem; font-weight: 700; margin-top: 4px; text-transform: capitalize; }
.artcard img { width: 100%; max-width: 220px; border-radius: 8px;
  background-image: linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%);
  background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; background-color: #fff; }

.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; }
.station { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.station .c { font-size: 1.6rem; font-weight: 800; }
.station .l { color: var(--muted); font-weight: 700; font-size: .85rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { color: var(--muted); font-weight: 700; }
tr.rush td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge.queued { background: #223; color: var(--info); }
.badge.in_progress { background: #2a2416; color: var(--warn); }
.badge.done { background: #16271d; color: var(--ok); }
.badge.hold { background: #2a1a1d; color: var(--bad); }
.badge.cancelled { background: #222; color: var(--muted); }
:root[data-theme] .badge.cancelled { background: #eef1f5; color: #3d4a5c; }
.pill { background: var(--brand); color: var(--on-brand); padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; }

form { display: grid; gap: 12px; max-width: 560px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-weight: 600; font-size: .9rem; color: var(--muted); }
/* min-width 0 + max-width 100%: a select with a long option or a date box never pushes a phone screen wider */
input, select, textarea { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 12px; font-size: 1rem; font-family: inherit; min-width: 0; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.btn { display: inline-block; background: var(--brand); color: var(--on-brand); border: 0; border-radius: var(--btn-radius); padding: 13px 18px;
  font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.check input { width: 20px; height: 20px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px;
  font-weight: 700; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.ok { border-color: var(--ok); } .toast.bad { border-color: var(--bad); }

/* Scanner */
.scanwrap { display: grid; gap: 14px; max-width: 520px; }
#reader { width: 100%; aspect-ratio: 1; background: #000; border-radius: var(--radius); object-fit: cover; }
.scanctl { display: flex; gap: 10px; align-items: center; }
.station-select { font-size: 1.1rem; font-weight: 800; }
.result { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; }

/* Printers */
.printers { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.printer { display: flex; flex-direction: column; gap: 12px; }
.printer-head { display: flex; justify-content: space-between; align-items: flex-start; }
.printer .pname { font-weight: 800; font-size: 1.05rem; }
.inks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.ink-h { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.ink-track { height: 7px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.ink-track > span { display: block; height: 100%; border-radius: 999px; }
.printer-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; font-size: .85rem; }

/* Pricing */
.example-result { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.price-big { font-size: 1.8rem; font-weight: 800; color: var(--brand); }

@media (max-width: 560px) { .row { grid-template-columns: 1fr; } main { padding: 12px; } }

/* Products (merchandise profile) */
.prodcard { display: grid; grid-template-columns: 160px 1fr; gap: 16px; margin-bottom: var(--gap); max-width: 820px; align-items: start; }
.prodphoto { display: grid; place-items: center; background: var(--photo-bg); border-radius: var(--radius); min-height: 160px; text-align: center; padding: 8px; font-size: .85rem; }
.prodphoto img { max-width: 100%; max-height: 200px; }
.prodfields { display: grid; gap: 12px; }
.prodbtns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .prodcard { grid-template-columns: 1fr; } }

/* Product builder */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pagehead h1 { margin-bottom: 2px; }
.prodgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--gap); }
.prodtile { color: var(--ink); display: grid; gap: 6px; }
.prodtile:hover { border-color: var(--brand); }
.prodtile .prodphoto { min-height: 200px; }
.pt-name { font-weight: 800; }
.pt-meta { font-size: .82rem; }
.pt-locs { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.pbtee { width: 80%; height: auto; }
.pbform { max-width: 980px; gap: var(--gap); }
.pbform section.card { display: grid; gap: 12px; }
.pbform h2 { margin: 0; }
.pbform h3 { margin: 0 0 6px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.check input { width: auto; }
.platchecks { display: grid; gap: 4px; }
.ptag { display: inline-block; font-size: .75rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--info, #2459c9); color: #fff; vertical-align: 1px; }
.mocktable { display: grid; gap: 8px; overflow-x: auto; }
.mockrow { display: grid; grid-auto-flow: column; grid-auto-columns: 110px; gap: 8px; align-items: start; }
.mockrow.head { font-weight: 800; font-size: .8rem; color: var(--muted); }
.mocklabel { font-weight: 800; padding-top: 40px; }
.mockcell { display: grid; gap: 4px; justify-items: stretch; }
.mockswipe { display: none; margin: 0; }
@media (max-width: 600px) {
  /* phones: the Front / Back label stays put while the size columns scroll under it */
  .mockrow { grid-template-columns: 56px; grid-auto-columns: 104px; }
  .mockrow > :first-child { position: sticky; left: 0; z-index: 2; align-self: stretch; background: var(--panel); }
  .mockswipe { display: block; }
}
.mockthumb { height: 110px; display: grid; place-items: center; background: var(--photo-bg); border-radius: 10px; overflow: hidden; }
.mockthumb img { max-width: 100%; max-height: 100%; }
.btn.small { padding: 5px 8px; font-size: .78rem; text-align: center; cursor: pointer; }
.locblock { margin-bottom: var(--gap); }
.locblock.off .pbpreview { opacity: .35; }
.locgrid { display: grid; grid-template-columns: 1fr 280px; gap: 18px; }
.locgrid > div:first-child { display: grid; gap: 8px; align-content: start; }
.pbpreview { position: relative; background: var(--photo-bg); border-radius: 12px; aspect-ratio: 1 / 1.12; display: grid; place-items: center; overflow: hidden; }
.pbpreview img, .pbpreview .pbtee { width: 100%; height: 100%; object-fit: contain; }
.pbbox { position: absolute; transform: translateX(-50%); border: 2px dashed #e0b23a; background: rgba(224,178,58,.12); }
@media (max-width: 720px) { .locgrid { grid-template-columns: 1fr; } }

/* Dashboard */
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpis .card { padding: 12px 14px; } }
.kpi .n.sm { font-size: 1.5rem; }
.kpi.bad .n { color: var(--bad); }
.dashgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.dashgrid h2 { margin-top: 0; }
table.flow { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.flow th { text-align: left; color: var(--muted); font-weight: 700; font-size: .75rem; padding: 4px 6px; }
table.flow td { padding: 6px; border-top: 1px solid var(--line); }
table.flow td:nth-child(n+3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.flow tr.neck td { background: rgba(255,176,32,.08); }
.bar { position: relative; height: 20px; background: var(--panel-2); border-radius: 6px; min-width: 90px; overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; background: var(--brand); opacity: .55; border-radius: 6px; }
.bar b { position: relative; padding-left: 6px; font-size: .8rem; line-height: 20px; }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chip.bad { color: var(--bad); border-color: var(--bad); }
.tp { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 170px; align-items: end; }
.tpcol { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 4px; }
.tpcol span { align-self: end; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.tpcol b { font-size: .8rem; } .tpcol i { font-style: normal; color: var(--muted); font-size: .75rem; }
.duelist, .acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.duelist li.late a { color: var(--bad); }
.duelist .muted { display: block; font-size: .76rem; }
.dashgrid > * { min-width: 0; }   /* a very long name wraps inside its card instead of stretching it */
.duelist li, .acts li { overflow-wrap: anywhere; }
a.nowrap, .nowrap { white-space: nowrap; }
@media (min-width: 641px) { td.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.minis div { background: var(--panel-2); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.minis b { font-size: 1.2rem; } .minis span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.minis span.owe { color: var(--warn); }
.sharebox { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.sharebox .sharelink { word-break: break-all; font-size: .85rem; }

/* ---- Per-shop themes. The shop's theme is set on <html data-theme="..."> ---- */
.logo .shoplogo { display: none; }
:root[data-theme="tshirt-master"] {
  /* T-Shirt Master (tshirt-master.com): white, black, pill buttons, RunBoy gold accent */
  --bg: #f4f4f2; --panel: #ffffff; --panel-2: #f1f1ef; --line: #e3e3df;
  --ink: #111111; --muted: #6b6b6b; --brand: #111111; --brand-2: #e0b23a; --on-brand: #ffffff;
  --ok: #1f9d55; --warn: #c98a00; --bad: #d9534f; --info: #111111;
  --btn-radius: 999px; --header-bg: #ffffff; --photo-bg: #f4f4f2;
}
:root[data-theme="tshirt-master"] body { font-family: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif; }
:root[data-theme="tshirt-master"] h1, :root[data-theme="tshirt-master"] h2 { font-family: "Unbounded", "Noto Sans Thai", sans-serif; letter-spacing: -.01em; }
:root[data-theme="tshirt-master"] .kpi .n { font-weight: 800; letter-spacing: -.02em; }
:root[data-theme="tshirt-master"] .logo .mark, :root[data-theme="tshirt-master"] .logo .pfname { display: none; }
:root[data-theme="tshirt-master"] .logo .shoplogo { display: inline; font-family: "Permanent Marker", cursive; font-size: 1.7rem; letter-spacing: .02em; color: #111; }
:root[data-theme="tshirt-master"] .logo .shoplogo small { font-family: "Noto Sans Thai", sans-serif; font-size: .75rem; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
:root[data-theme="tshirt-master"] nav.tabs a.active { background: #111; color: #fff; }
:root[data-theme="tshirt-master"] .card { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
:root[data-theme="tshirt-master"] .badge.queued { background: #eef2f7; color: #335; }
:root[data-theme="tshirt-master"] .badge.in_progress { background: #fff4d6; color: #8a5a00; }
:root[data-theme="tshirt-master"] .badge.done { background: #e3f5ea; color: #1f7a44; }
:root[data-theme="tshirt-master"] .badge.hold { background: #fbe6e5; color: #b23a36; }
:root[data-theme="tshirt-master"] .bar span, :root[data-theme="tshirt-master"] .tpcol span { background: var(--brand-2); opacity: 1; }
:root[data-theme="tshirt-master"] .kpi.rush .n { color: var(--bad); }
:root[data-theme="tshirt-master"] .pill { background: var(--brand-2); color: #111; }
:root[data-theme="tshirt-master"] .toast { background: #111; color: #fff; border-color: #111; }

/* Shop settings */
.themepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.themeopt { border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; display: grid; gap: 6px; font-weight: 700; }
.themeopt:has(input:checked) { border-color: var(--brand-2); }
.themeopt input { justify-self: start; width: auto; }
.themeopt .sw { height: 46px; border-radius: 10px; display: flex; overflow: hidden; border: 1px solid var(--line); }
.themeopt .sw i { flex: 1; }
.th-default .sw i:nth-child(1) { background: #0f1115; } .th-default .sw i:nth-child(2) { background: #1f232c; } .th-default .sw i:nth-child(3) { background: #ff5a1f; }
/* Studio look on phones (Shop settings): a phone picture per look */
.lookpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 720px; }
@media (max-width: 600px) { .lookpick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lookopt { display: grid; gap: 6px; align-content: start; }
.lookopt label { display: grid; gap: 4px; min-width: 0; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 700; }
.lookopt label:has(input:checked) { border-color: var(--brand-2); }
.lookopt input { justify-self: start; width: auto; }
.lookopt img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
.lookopt small { font-weight: 400; line-height: 1.35; }
.lookopt a { justify-self: start; font-size: 14px; }
.th-tshirt-master .sw i:nth-child(1) { background: #fff; } .th-tshirt-master .sw i:nth-child(2) { background: #15233c; } .th-tshirt-master .sw i:nth-child(3) { background: #d9534f; }

/* Station screen (job card shown after a scan) */
.jobcard { margin-top: var(--gap); display: grid; gap: 8px; }
#jobCard { scroll-margin-top: 130px; }
.jobcard h2 { margin: 8px 0 2px; }
.jobhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.jobcode { font-size: 1.6rem; font-weight: 800; }
.jobbig { text-align: right; } .jobbig b { font-size: 2.2rem; line-height: 1; display: block; } .jobbig span { color: var(--muted); font-weight: 700; }
.jobmeta { display: flex; gap: 6px; flex-wrap: wrap; }
.jobhints { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; }
.jobhints li { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-weight: 700; border-left: 4px solid var(--info); }
.jobhints li.h-rush { border-color: var(--bad); color: var(--bad); }
.jobhints li.h-dark { border-color: var(--warn); }
.jobsteps { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 1.05rem; }
.jobart { display: flex; flex-wrap: wrap; gap: 14px; }
.jobart figure { margin: 0; display: grid; gap: 6px; max-width: 260px; }
.jobart img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; }
.printstation .jobart figure { max-width: 420px; } .printstation .jobart img { max-height: 460px; }
.jobart figcaption { display: grid; gap: 3px; font-size: .85rem; }
/* the customer's design moved the print area: the shirt goes on the platen lower (or higher) than usual */
.jobart figcaption .loadoff { padding: 4px 8px; border-left: 4px solid var(--warn); border-radius: 6px; background: var(--panel-2); font-weight: 700; }
.jobart figcaption > b { text-transform: capitalize; }
/* picture detail on print files (staff only): soft = amber, blurry = red */
.res-ok { color: var(--warn); } .res-bad { color: var(--bad); }
.artgrid figcaption .res-ok, .artgrid figcaption .res-bad { text-transform: none; }
video[hidden] { display: none !important; }
img.checker { background-color: #fff; background-image: linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%);
  background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.gtxnote { border-left: 3px solid var(--brand-2); padding-left: 10px; }

/* Staff badge on the scanner */
.whobox .who { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); border: 2px dashed var(--line); }
.whobox .who.on { border: 2px solid var(--ok); }
.whobox .who.off { border-color: var(--warn); }
.whobox .who.off .btn { margin-top: 6px; }
.sc-res .sc-nobody { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 600; }
.sc-res .sc-nobody span { flex: 1 1 200px; }
.sc-res .sc-marks { margin-top: 6px; }
.whobox .who > div { flex: 1; }
.whobox .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--brand); color: var(--on-brand); flex: none; }
.small { font-size: .78rem; }
details.typename { margin: 4px 0; } details.typename summary { cursor: pointer; font-size: .85rem; }

/* Staff screen */
/* add / edit form: the fields fill their column (an input's own width made them overlap before) */
form.staffadd { max-width: 820px; display: grid; gap: 14px; }
.sa-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.sa-row input, .staffedit input { width: 100%; min-width: 0; }
.staffedit { max-width: none; display: grid; gap: 12px; }
.staffcard.editing { grid-column: 1 / -1; }
@media (max-width: 600px) { .staffcard.editing .badgeqr { display: none; } }     /* phones: the form gets the whole card */
.stchips { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 6px; }
.stchips legend { padding: 0; font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: 2px; }
.stchips .hint { margin: 0; }
.stchips-list { display: flex; flex-wrap: wrap; gap: 8px; }
label.stchip { position: relative; display: inline-flex; gap: 0; color: var(--ink); font-size: .95rem; }
.stchip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.stchip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--field-line); border-radius: 999px;
  background: var(--panel); font-weight: 700; line-height: 1.25; }
.stchip span .ic { display: none; }
.stchip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.stchip input:checked + span .ic { display: inline-block; }
.stchip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.stchip.all input:checked + span { background: color-mix(in srgb, var(--ok) 16%, var(--panel)); border-color: var(--ok); color: var(--ok); }
.stbadges { display: flex; flex-wrap: wrap; gap: 6px; }
.stbadge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 700; color: var(--ink); }
.stbadge.all { color: var(--ok); border-color: currentColor; }
.stafflist { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--gap); }
.staffcard { display: flex; gap: 14px; align-items: flex-start; }
.staffcard.inactive { opacity: .6; }
.staffcard .badgeqr { background: #fff; padding: 4px; border-radius: 8px; flex: none; }
.staffmain { flex: 1; display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.staffname { font-weight: 800; font-size: 1.05rem; }
.staffmain .minis { grid-template-columns: repeat(2, 1fr); margin-bottom: 4px; }
.staffmain .minis b { font-size: 1.05rem; }

/* Shop settings: station instructions */
.stinstr { display: grid; gap: 10px; }
.stinstr textarea { min-height: 70px; }
.stcard { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line, #e3e6ea); border-radius: 12px; background: var(--card, #fff); }
.stcard.off { background: transparent; border-style: dashed; }
.stcard.off .sthead b { color: var(--muted, #6b7280); }
.sthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.stsw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; min-height: 44px; }
.stsw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stsw-t { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #c7ccd4; transition: background var(--dur-1, 220ms) var(--m-spring); flex: none; }
.stsw-t::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--dur-1, 220ms) var(--m-spring); }
.stsw input:checked + .stsw-t { background: #34c759; }
.stsw input:checked + .stsw-t::after { transform: translateX(18px); }
.stsw input:focus-visible + .stsw-t { outline: 2px solid var(--accent, #0068d6); outline-offset: 2px; }

/* Shop's own logo replaces the SK PrintFlow mark in the header */
:root.has-logo .logo .mark, :root.has-logo .logo .pfname { display: none; }
:root.has-logo .logo .shoplogo { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 1rem; }
.logo .shoplogo img { height: 34px; max-width: 160px; object-fit: contain; display: block; }
.logo .shoplogo small { color: var(--muted); font-size: .75rem; font-weight: 700; }
.logopick { display: grid; gap: 8px; margin-bottom: 8px; }
.logoprev { height: 80px; max-width: 320px; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 8px; background: var(--photo-bg); }
.logoprev img { max-height: 64px; max-width: 100%; object-fit: contain; }
.logo img.platformlogo { height: 34px; max-width: 180px; object-fit: contain; display: block; }
:root.has-logo .logo img.platformlogo { display: none; }
.pbgallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.pbgallery figure { margin: 0; width: 120px; display: grid; gap: 4px; }
.pbgallery img { width: 120px; height: 150px; object-fit: cover; border-radius: 10px; background: var(--photo-bg); }
.pbgallery figcaption { font-size: .75rem; color: var(--muted); min-height: 1em; }

/* ---- Menus: group separators on PC; bottom bar + "More" sheet on phones ---- */
.navsep { flex: none; width: 1px; margin: 6px 4px; background: var(--line); }
.bottombar { display: none; }
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.sheet[hidden] { display: none; }
.sheetbody { width: 100%; max-height: 80vh; overflow-y: auto; background: var(--panel); border-radius: 18px 18px 0 0;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.sheethead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1.05rem; }
.sheetlinks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheetlinks a { padding: 15px 14px; border-radius: 12px; background: var(--panel-2); color: var(--ink); font-weight: 700; }
.sheetlinks a.active { box-shadow: inset 0 0 0 2px var(--brand); }
.sheetfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  nav.tabs { display: none; }
  header.top { padding: 10px 12px; }
  .whoami { display: none; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottombar a, .bottombar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 58px; padding: 6px 0; background: none; border: 0; color: var(--muted); font-family: inherit; font-size: .75rem; font-weight: 700; line-height: 1.2; cursor: pointer; }
  .bottombar b { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; }
  .bottombar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bottombar .active { color: var(--ink); }
  .bottombar .active b { background: var(--panel-2); }
  .bottombar .scanbtn b { width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; background: var(--brand); color: var(--on-brand);
    box-shadow: 0 6px 16px rgba(0,0,0,.3); border: 3px solid var(--panel); }
  .bottombar .scanbtn.active b { background: var(--brand); }
}

/* ---- Page header actions, order filters ---- */
.headacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.headacts .btn { padding: 10px 14px; font-size: .92rem; }
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.filterbar input[type="search"] { flex: 1 1 220px; max-width: 360px; padding: 10px 12px; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 12px;
  font-family: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fchip span { opacity: .7; margin-left: 2px; }
.fchip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
tr[hidden] { display: none !important; }

/* ---- Phones: tables become stacked cards; each cell shows its column name ---- */
@media (max-width: 640px) {
  .filterbar input[type="search"] { max-width: none; flex-basis: 100%; }
  .fchips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  table.resp, table.resp tbody { display: block; }
  table.resp thead { display: none; }
  table.resp tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 14px; margin-bottom: 10px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
  table.resp td { border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  table.resp td select { width: 100%; }
  table.resp td[data-l]::before { content: attr(data-l); display: block; color: var(--muted); font-size: .75rem; font-weight: 700; margin-bottom: 1px; }
  table.resp td[data-l=""]::before { display: none; }
  table.resp td:first-child { grid-column: 1 / -1; font-size: 1rem; font-weight: 800; }
  table.resp td:first-child::before { display: none; }
  table.resp tr.rush { border-left: 4px solid var(--brand); }
  table.resp tr.rush td:first-child { box-shadow: none; }
  .card table.resp tr { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: 12px 0; }
  .card table.resp tr:last-child { border-bottom: 0; }
  .card table.resp tr.rush { border-left: 0; }
}

/* ---- Order detail ---- */
.backlink { display: inline-block; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.odhead h1 { margin-bottom: 6px; }
.badge.big { font-size: .9rem; padding: 6px 14px; }
.odgrid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--gap); align-items: start; }
.odgrid > .card:not(:first-child):not(.qrcard) { grid-column: 1 / -1; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 18px; margin: 0 0 14px; }
.facts .wide { grid-column: span 2; }
.facts dt { color: var(--muted); font-size: .75rem; font-weight: 700; margin-bottom: 2px; }
.facts dd { margin: 0; font-size: .98rem; overflow-wrap: anywhere; }
.facts dd a { font-size: .85rem; font-weight: 700; }
.odnotes { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; white-space: pre-wrap; }
.odedit { margin: 0 0 14px; }
.odgrid [hidden] { display: none !important; }   /* the Edit order form swaps with the facts */
.actgroups { display: flex; flex-wrap: wrap; gap: 14px 28px; border-top: 1px solid var(--line); padding-top: 14px; }
.actgroup { display: grid; gap: 6px; }
.actlabel { color: var(--muted); font-size: .75rem; font-weight: 700; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acts .btn { padding: 10px 14px; font-size: .92rem; }
.acts select { padding: 10px 12px; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--panel-2); }
td a { font-weight: 700; }
@media (max-width: 640px) {
  .odgrid { grid-template-columns: minmax(0, 1fr); }
  .odgrid select { max-width: 100%; }
  .odgrid .row > label { min-width: 0; max-width: 100%; }
  .odgrid .row > label select { width: 100%; }
  .odgrid input[type=file] { max-width: 100%; }
  .odgrid .qrcard { justify-self: center; }
  .facts { grid-template-columns: 1fr 1fr; }
  .acts .btn, .acts select { flex: 1 1 auto; text-align: center; }
  table.resp tr[data-href]:hover td { background: none; }
}
table.resp td:first-child .muted { font-weight: 500; font-size: .85rem; }

/* ---- Staff sign-in and shop sign-up pages ---- */
.authtop { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 16px; }
.auth { width: 100%; max-width: 400px; margin: 2vh auto 40px; padding: 0 16px; }
.auth.wide { max-width: 440px; }
.auth .brand { display: grid; justify-items: center; gap: 6px; margin-bottom: 18px; text-align: center; }
.auth .brand .logo { font-size: 1.3rem; }
.auth .brand img { height: 56px; max-width: 240px; object-fit: contain; }
.auth .brand .tsm { font-family: "Permanent Marker", cursive; font-size: 2.3rem; line-height: 1; color: var(--ink); }
.auth .brand .bname { color: var(--muted); font-weight: 700; font-size: .9rem; }
.auth .brand, .auth .brand .logo { max-width: 100%; min-width: 0; } .auth .brand .bname, .auth .brand .logo > span:not(.mark), .auth .sub { overflow-wrap: anywhere; min-width: 0; }
.auth .card { padding: 26px 24px; }
.auth h1 { text-align: center; margin: 0 0 4px; }
.auth .sub { text-align: center; color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.auth form { max-width: none; gap: 14px; }
.auth [hidden] { display: none !important; }   /* sign-in steps (password, then the code) and the reset page swap forms with hidden */
.auth input { width: 100%; min-width: 0; }
.auth .fld { display: grid; gap: 6px; }
.auth .fld > label { display: block; }
.auth .fieldhint { color: var(--muted); font-size: .8rem; }
.pwwrap { position: relative; }
.pwwrap input { padding-right: 78px; }
.pwwrap .pwbtn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted);
  font-family: inherit; font-weight: 700; font-size: .82rem; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pwwrap .pwbtn:hover { color: var(--ink); background: var(--panel); }
.auth .err { color: var(--bad); font-weight: 700; }
.auth .err:empty { display: none; }
.auth .btn[disabled] { opacity: .65; cursor: progress; }
.auth .alt { text-align: center; margin-top: 16px; color: var(--muted); font-size: .92rem; }
.auth .custnote { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 18px; }
.perks { list-style: none; margin: 0 0 18px; padding: 12px 14px; display: grid; gap: 6px; background: var(--panel-2); border-radius: 12px; font-size: .88rem; }
.perks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 8px; }
:lang(th) .auth h1 { letter-spacing: 0; }
.auth .brand .logo .mark { width: 34px; height: 34px; font-size: 1rem; }
.auth .brand .logo:has(> .skmark) { --lg-h: 46px; }
@media (max-width: 360px) { .auth .brand .logo:has(> .skmark) { --lg-h: 38px; } }
.perks li { display: flex; gap: 8px; } .perks li::before { margin-right: 0; }

/* Product photos: drawn tee when there is no photo or it will not load */
.prodphoto { position: relative; }
.prodphoto .pbtee, .photofail .pbtee { width: 70%; max-width: 170px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.08)); }
.photofail { display: grid; justify-items: center; gap: 8px; width: 100%; }
.prodphoto .chip, .photofail .chip { font-size: .75rem; }
.blankmock { position: relative; display: block; width: 72%; max-width: 180px; margin: 0 auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.08)); }
.prodphoto .blankmock img { display: block; width: 100%; height: auto; max-height: none; }
.blankmock i, .prodphoto .blankmock .shine { position: absolute; inset: 0; width: 100%; height: 100%; }
.blankmock i { mix-blend-mode: multiply; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.blankmock .shine { mix-blend-mode: screen; opacity: .16; }
.pt-dots { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.pt-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.mockthumb .photofail .pbtee { width: 56px; }
.mockthumb .photofail .chip { white-space: normal; text-align: center; }
.pbgallery .photofail { width: 120px; height: 150px; align-content: center; background: var(--photo-bg); border-radius: 10px; }
.pbgallery .photofail .pbtee { width: 60px; }

/* ---- Pricing: grouped settings + live price preview ---- */
.helppanel { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.helppanel ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
/* One question per screen: the step on the left, the example price beside it (steps 1 to 3), the save bar under the step */
.prwiz { max-width: 1120px; }
.prgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: var(--gap); align-items: start; max-width: none; }
.prmain { display: grid; gap: 12px; min-width: 0; grid-column: 1; grid-row: 1; }
.prsample { grid-column: 2; grid-row: 1; position: sticky; top: 118px; }
.prgrid > .savebar { grid-column: 1; grid-row: 2; }
.prgrid.s4 { grid-template-columns: minmax(0, 1fr); }
.prgrid.s4 .prsample { display: none; }
.prsec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.3rem; line-height: 1.3; }
.prsec > .hint { margin: 0 0 12px; }
.secno { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--ink); color: var(--bg); display: inline-grid; place-items: center;
  font-family: "Noto Sans Thai", system-ui, sans-serif; font-size: .78rem; font-weight: 800; }
.fld { display: grid; gap: 6px; align-content: start; }
.fld > label, .fld .lbl { font-weight: 600; font-size: .9rem; color: var(--muted); }
.fieldhint { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.unitin { position: relative; display: flex; align-items: center; }
.unitin input { width: 100%; padding-right: 66px; font-variant-numeric: tabular-nums; }
.unitin .unit { position: absolute; right: 12px; color: var(--muted); font-size: .8rem; font-weight: 700; pointer-events: none; }
.fld.bad input { outline: 2px solid var(--bad); border-color: transparent; }
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.advbox { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.advbox summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.alfail { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 24px; text-align: center; background: var(--panel-2); color: var(--ink); font-weight: 600; }
.pben { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pben summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.pben[open] summary { margin-bottom: 6px; }
.advbox > .hint { margin: 8px 0 10px; }
.marginex { align-self: center; margin: 22px 0 0; font-weight: 700; }
.prnote { margin: 14px 0 0; }
.locknote { margin: 12px 0 0; font-size: .85rem; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; }
.savebar { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.savestate { color: var(--muted); font-weight: 700; font-size: .88rem; }
.saveex { flex: 1; color: var(--muted); font-size: .85rem; text-align: right; }
.saveex b { color: var(--ink); font-variant-numeric: tabular-nums; }
.savebar.dirty .savestate { color: var(--warn); }
.savebar.dirty .savestate::before { content: '●'; margin-right: 6px; }
/* a form with changes not saved yet (Shop settings sections, station instructions) */
.unsaved:empty { display: none; }
.unsaved { color: var(--warn); font-weight: 700; font-size: .9rem; }
.unsaved::before { content: '●'; margin-right: 6px; }
form.dirty button[type=submit] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 45%, transparent); }
.savebar .btn { padding: 10px 16px; }
.savebar .btn:disabled { opacity: .45; cursor: default; }
.prhead { display: grid; gap: 2px; margin-bottom: 12px; }
.prhead h2 { margin: 0; font-size: 1.05rem; }
.pvctl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.pvctl .fld { min-width: 0; }
.pvctl select { width: 100%; min-width: 0; }
.savebar [hidden] { display: none; }
.seg { display: flex; gap: 3px; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .8rem; padding: 7px 4px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.fld input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--brand); }
.pvtablewrap { overflow-x: auto; }
.pvtable { width: 100%; border-collapse: collapse; }
.pvtable th, .pvtable td { padding: 3px; border-bottom: 1px solid var(--line); font-size: .8rem; text-align: center; }
.pvtable thead th { color: var(--muted); font-weight: 700; padding-bottom: 6px; }
.pvtable tbody th { text-align: left; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pvtable tbody th small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; }
.pvcell { width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; padding: 9px 2px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.pvcell:hover { background: var(--panel-2); }
.pvcell.on { background: var(--ink); color: var(--bg); }
.pvbreak { background: var(--panel-2); border-radius: 12px; padding: 12px; }
.pvbreak .err { color: var(--bad); font-weight: 700; margin: 0; }
.pvsel { font-weight: 700; font-size: .84rem; margin-bottom: 8px; }
.stack { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; background: var(--line); }
.stack i { display: block; height: 100%; }
.s-cmyk { background: #2f80ed; } .s-white { background: #aab4bf; } .s-pre { background: #9b51e0; }
.s-hand { background: #f2994a; } .s-blank { background: #6b7280; } .s-margin { background: #27ae60; }
.pvlines { margin: 0; display: grid; gap: 5px; }
.pvlines div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .86rem; }
.pvlines dt { display: flex; align-items: center; gap: 6px; }
.pvlines dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pvlines .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.pvlines .sub { border-top: 1px dashed var(--line); padding-top: 5px; font-weight: 700; }
.pvlines .total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-weight: 800; }
.pvlines .total dd { font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.pvlines .total small { font-size: .75rem; color: var(--muted); font-weight: 600; }
@media (max-width: 1000px) {
  .prgrid { grid-template-columns: minmax(0, 1fr); }
  .prmain, .prsample, .prgrid > .savebar { grid-column: 1; grid-row: auto; }
  .prsample { position: static; }
}
@media (max-width: 760px) { .savebar { bottom: calc(66px + env(safe-area-inset-bottom)); } }
@media (max-width: 640px) { .qgrid { grid-template-columns: 1fr 1fr; } .pvctl { grid-template-columns: 1fr; } .saveex { flex-basis: 100%; text-align: left; order: 3; } }
/* Pricing: the step bar, the question on screen, Back / Next */
.prpage [hidden] { display: none !important; }
.prpage .vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prsteps { margin: 0 0 14px; scroll-margin-top: 90px; }
.prsteps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.prsteps li { display: flex; min-width: 0; }
.prstep { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 8px 12px; text-align: left; font: inherit; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.prstep:hover { border-color: var(--field-line); }
.prstep[aria-current] { background: var(--panel); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.prstep.done .secno { background: var(--ok); color: var(--bg); }
.prstep.bad .secno { background: var(--bad); color: var(--bg); }
.pst { display: grid; gap: 2px; min-width: 0; }
.pst > b { font-size: .92rem; line-height: 1.25; }
.pit { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.3; }
.pit > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pit .ic { flex: none; width: 14px; height: 14px; }
.prstep.done .pit .ic { color: var(--ok); }
.prstep.bad .pit { color: var(--bad); }
.prof { margin: 0 0 2px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.prsec > h2:focus { outline: none; }
.prsec > h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.prchg { margin: 0 0 14px; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.prnav { display: flex; align-items: center; gap: 8px; }
.prnav .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.prnav #prNext { margin-left: auto; }
@media (max-width: 760px) {
  .prsteps ol { gap: 4px; }
  .prstep { flex-direction: column; justify-content: center; gap: 4px; min-height: 58px; padding: 6px 4px; text-align: center; }
  .pst > b { font-size: .78rem; }
  .pit { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prsec h2 { font-size: 1.15rem; }
}
/* the example price beside steps 1 to 3 */
.prsample h2 { margin: 0 0 6px; font-size: 1rem; }
.smsel { margin: 0 0 4px; color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.4; }
.smprice { margin: 0 0 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.smprice b { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.smprice small { color: var(--muted); font-size: .8rem; font-weight: 700; }
.prsample .stack { margin-bottom: 6px; }
.smsplit { margin: 0 0 12px; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.smtodo, .smok { border-top: 1px solid var(--line); padding-top: 10px; margin: 0 0 10px; }
.smtodo p { margin: 0 0 6px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.smtodo ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.smtodo .linkbtn { font-size: .82rem; }
.smok { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: .85rem; font-weight: 700; }
.smsee { display: inline-flex; align-items: center; gap: 4px; }
.prsample .err { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--bad); font-weight: 700; }
/* step 3: cost + profit %, or the shop's own price per print */
#prMode { max-width: 440px; }
.modehint { display: block; margin: 6px 0 14px; }
.ownpane { display: grid; gap: 8px; margin-bottom: 14px; }
.ownpane h3 { margin: 4px 0 0; font-size: 1rem; }
.ownpane .hint { margin: 0; }
.ownstart { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.ownstart .ic { color: var(--info); flex: none; }
.owntablewrap { overflow-x: auto; }
.owntable { width: 100%; max-width: 560px; border-collapse: collapse; }
.owntable th, .owntable td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.owntable thead th { color: var(--muted); font-size: .8rem; font-weight: 700; }
.owntable thead small, .owntable tbody th small { display: block; color: var(--muted); font-size: .75rem; font-weight: 500; }
.owntable tbody th { font-weight: 700; font-size: .9rem; white-space: nowrap; padding-top: 14px; }
.owntable td.fld { display: table-cell; min-width: 120px; }   /* .fld is a grid elsewhere: keep the cell a cell */
.owntable .owncost { display: block; margin-top: 3px; }
.owntable .unitin input { padding-right: 58px; }
.owncost { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.owncost.below { color: var(--bad); font-weight: 700; }
.owntable td.chg input { border-color: var(--warn); }
.ownwarn { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--bad); font-weight: 700; font-size: .85rem; }
.ownlv { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
.ownlv .fld.chg input { border-color: var(--warn); }
.ownfill { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ownfill .btn { display: inline-flex; align-items: center; gap: 6px; }
.smsplit.neg { color: var(--bad); }
@media (max-width: 480px) { .ownlv { grid-template-columns: minmax(0, 1fr); } .owntable td.fld { min-width: 0; } }
/* folded parts: making ink exact (step 1) and More settings (step 4) */
.inkmore, .prextra { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.inkmore > summary, .prextra > summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 44px;
  padding: 12px 40px 12px 14px; cursor: pointer; list-style: none; }
.inkmore > summary::-webkit-details-marker, .prextra > summary::-webkit-details-marker { display: none; }
.inkmore > summary::after, .prextra > summary::after { content: ''; position: absolute; right: 18px; top: 22px; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .28s var(--m-spring); }
.inkmore[open] > summary::after, .prextra[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
.inkmore[open] > summary, .prextra[open] > summary { border-bottom: 1px solid var(--line); }
.imt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.imt .ic, .prextra > summary .ic { color: var(--info); }
.inkmore > summary small, .prextra > summary small { flex-basis: 100%; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.optag { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.inkmore > .inkuse { margin: 0; padding: 12px 14px 14px; border-top: 0; }
.prextra { padding: 0; }
.prextra > :not(summary) { margin-inline: 14px; }
.prextra > :last-child { margin-bottom: 14px; }
.prextra h3 { margin: 16px 14px 4px; font-size: .98rem; }
.prextra > .hint { margin: 0 14px 10px; }
@media (prefers-reduced-motion: reduce) { .inkmore > summary::after, .prextra > summary::after { transition: none; } }
.starthint { color: var(--muted); }
.prpage .fld > label:not(.check) { display: block; }
.chgtag { margin-left: 6px; font-size: .75rem; font-weight: 800; color: var(--warn); }
.chgtag::before { content: '· '; }
.fld.chg input, .fld.chg select { border-color: var(--warn); }
/* step 1: ink by the pack (or per ml behind a link) */
.waypane > .fieldhint { display: block; margin-top: 8px; }
.wayswap { margin-top: 10px; }
.inkdots { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: 0; }
.inkdots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2); }
.calnudge { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 8px; font-size: .85rem; line-height: 1.45; }
.calnudge > .ic { color: var(--info); margin-top: .2em; }
.calnudge > .linkbtn { grid-column: 2; justify-self: start; }
.techbox h4 { margin: 6px 0 0; font-size: .92rem; }
.profitex { margin: 12px 0 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; }
.profitex:empty { display: none; }
.profitex.loss { color: var(--bad); }
/* step 4: coverage pictures, labelled axes, cost + profit = price */
.pvwide { grid-column: 1 / -1; }
.covpics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.covpic { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 6px; min-height: 44px; padding: 5px 6px; text-align: left;
  font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.covpic .covsvg { grid-row: 1 / span 2; width: 28px; height: 28px; }
.covpic[aria-pressed="true"] { background: var(--panel); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.covpic b { font-size: .85rem; line-height: 1.2; } .covpic small { color: var(--muted); font-size: .75rem; line-height: 1.2; }
.covsvg { display: block; }
.cv-area { fill: var(--panel); stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 2; }
.cv-ink { fill: var(--info); }
.pvtable thead .pvcorner { text-align: left; font-weight: 800; font-size: .9rem; color: var(--ink); border-bottom: 0; padding: 0 0 4px; }
.pvtable thead .axl { text-align: left; color: var(--ink); white-space: nowrap; }
.pvtable thead .axt { color: var(--ink); border-bottom: 0; padding: 0 0 2px; text-align: right; font-size: .78rem; }
.pvcovl { display: flex; align-items: baseline; gap: 6px; }
.pvtable thead .ic { vertical-align: -2px; color: var(--muted); }
.pvaxd { display: block; margin: 10px 0 0; }
.pvtablewrap { margin-bottom: 6px; }
/* step 4: Normal only until "Show every ink level" */
.pvtable:not(.all) .q-eco, .pvtable:not(.all) .q-high, .pvtable:not(.all) .q-ultra, .pvtable:not(.all) .pvaxrow { display: none; }
.pvtable.all .qone, .pvtable:not(.all) .qall { display: none; }
.pvtable:not(.all) { max-width: 440px; }
.qone { display: grid; gap: 1px; color: var(--ink); } .qone small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.pvall { margin: 4px 0 12px; }
/* PC: the prices on the left, how the chosen one adds up on the right */
@media (min-width: 1001px) { .pvtwo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; } .pvtable:not(.all) { max-width: none; } }
.pvmore { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.pvmore > summary { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; font-weight: 700; font-size: .85rem; list-style: none; }
.pvmore > summary::-webkit-details-marker { display: none; }
.pvmore > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.pvmore[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.pvmore[open] > summary { margin-bottom: 8px; }
@media (max-width: 1000px) { #saveBar:not(.dirty) .savestate { display: none; } #saveBar .savebtns { justify-content: flex-end; } }
.pveq { display: flex; align-items: stretch; gap: 6px; margin: 0 0 6px; }
.eqbox { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; align-content: start; padding: 6px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.eqbox small { color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.25; }
.eqbox b { font-size: 1.02rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eqpay { border-color: var(--ink); } .eqpay b { font-size: 1.2rem; }
.eqop { align-self: center; font-weight: 800; color: var(--muted); }
.eqround { display: block; margin: 0 0 8px; }
.pvbreak .stack { margin-bottom: 4px; }
.stacklab { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.pvcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pvcols .pvlines { align-content: start; gap: 4px; }
.pvcols .pvlines div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px; font-size: .82rem; }
.pvcols .pvlines dt { display: block; min-width: 0; line-height: 1.35; }
.pvcols .pvlines dt .dot { margin-right: 5px; vertical-align: 0; }
.pvlines .grp { font-weight: 800; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.eqpay small:last-child { font-weight: 600; }
.s-round { background: #8fd3a8; }
.pvnote { margin: 10px 0 0; }
.pvbreak .err { display: flex; align-items: center; gap: 6px; }
/* save bar: what is not saved yet, or what was saved; on phones a jump to the prices */
#saveBar .savestate { flex: 1 1 160px; min-width: 0; margin: 0; display: flex; align-items: center; gap: 6px; }
#saveBar:not(.dirty) .savestate .ic { color: var(--ok); }
#saveBar .saveex { flex: 0 1 auto; }
#saveBar .savebtns { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#saveBar .seeprice { display: none; }
@media (max-width: 1000px) {
  #saveBar .saveex { display: none; }
  #saveBar .seeprice { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
  #saveBar .savestate, #saveBar .savebtns { flex-basis: 100%; }
}
@media (max-width: 600px) {
  #saveBar #undoBtn { min-width: 44px; padding-inline: 10px; }
  #saveBar .undolbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .covpic { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 6px 4px; }
  .covpic .covsvg { grid-row: auto; }
}
@media (max-width: 480px) { .pvcols { grid-template-columns: minmax(0, 1fr); } .eqbox b { font-size: .95rem; } .eqpay b { font-size: 1.1rem; } }
.prsec .row + .row { margin-top: 12px; }

/* ---- payments: bill panel, payment chips, deposit tiers, alerts ---- */
.paychip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.paychip.p-unpaid, .paychip.p-part_paid { color: var(--warn); border-color: var(--warn); }
.paychip.p-checking, .paychip.ps-submitted { color: var(--info); border-color: var(--info); background: rgba(74,168,255,.1); }
.paychip.p-deposit_paid { color: var(--ok); border-color: var(--ok); }
.paychip.p-paid, .paychip.ps-confirmed { color: var(--bg); background: var(--ok); border-color: var(--ok); }
.paychip.ps-rejected { color: var(--bad); border-color: var(--bad); }
h2 .paychip { vertical-align: middle; margin-left: 6px; }
.fchip.alert:not(.on) { border-color: var(--info); color: var(--info); }
.alerts { display: grid; gap: 8px; margin: 0 0 var(--gap); }
.alertbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--warn); color: var(--ink); font-weight: 700; }
.alertbar.info { border-color: var(--info); background: rgba(74,168,255,.08); }
.alertbar b { color: var(--info); white-space: nowrap; }
.billcard .pagehead { margin-bottom: 10px; }
.billgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.billgrid .facts { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 0; }
.facts .owe { color: var(--warn); }
.minih { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px; }
:lang(th) .minih { letter-spacing: 0; }
.billjobs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.billjobs li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-size: .88rem; }
.billjobs li.here { outline: 2px solid var(--brand); }
.billjobs li span:first-of-type { flex: 1; color: var(--muted); }
.billjobs li .q { white-space: nowrap; color: var(--ink); }
.paytable input.pamt { width: 120px; padding: 6px 8px; }
.slipthumb { width: 48px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: block; }
.payform { align-items: end; flex-wrap: wrap; }
.payform label { flex: 1 1 140px; }
.payset { max-width: 760px; }
.tiertable { width: 100%; max-width: 720px; margin-bottom: 8px; }
.tiertable th:nth-child(1) { width: 110px; } .tiertable th:nth-child(3) { width: 120px; } .tiertable th:nth-child(4) { width: 84px; }
.tiertable select { min-width: 230px; }
@media (max-width: 640px) {
  .tiertable thead { display: none; }
  .tiertable tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: end; }
  .tiertable td { display: block; padding: 0; border: 0; }
  .tiertable td:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .tiertable td[data-l]::before { content: attr(data-l); display: block; font-size: .75rem; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
  .tiertable select { min-width: 0; }
}
.tiertable input, .tiertable select { width: 100%; }
.tiertable input[readonly] { opacity: .7; }
.jobsizes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 60%; }
.jobsizes span { background: var(--panel-2); border-radius: 8px; padding: 4px 8px; font-weight: 700; color: var(--muted); }
.jobsizes span b { font-size: 1.3rem; display: inline; color: var(--ink); margin-right: 2px; }
.jobsizes .jt { background: transparent; color: var(--ink); font-size: 1.1rem; }
.jobhints li.h-unpaid, .jobhints li.h-balance { border-color: var(--warn); color: var(--warn); }
@media (max-width: 760px) { .billgrid { grid-template-columns: 1fr; } }

/* Coupons for chosen customers */
.cowho { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 12px 0; }
.cowho legend { font-weight: 800; padding: 0 6px; }
.pickl { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 8px; display: grid; gap: 6px; }
.pickl .check[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Pricing: ink bought by the pack (size picker, other size in ml, price of one pack) */
.packrow { display: grid; gap: 6px; padding: 12px 0; border-top: 1px dashed var(--line); }
.packrow:first-child { border-top: 0; padding-top: 0; }
.packttl { margin: 0; font-weight: 800; font-size: .95rem; }
.packterm { margin: -2px 0 2px; }
.packin { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "size price" "ml ."; gap: 8px 12px; align-items: start; }
.packin > .fld:first-child { grid-area: size; } .packin > .pkml { grid-area: ml; } .packin > .fld:last-child { grid-area: price; }
.packin select { width: 100%; min-width: 0; }
.packeq { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; }
.packeq .ski-check { color: var(--ok); } .packeq .ski-warn { color: var(--warn); }
@media (max-width: 480px) { .packin { grid-template-columns: minmax(0, 1fr); grid-template-areas: "size" "ml" "price"; } }
/* GTX connection: print files, send-to-GTX status, print PCs (public/gtx.js) */
.badge.gtx-queued, .badge.gtx-sending { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge.gtx-delivered { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge.gtx-failed { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.badge.gtx-cancelled { background: var(--panel-2); color: var(--muted); }
.ripfiles { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 6px; }
.ripfiles li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.ripfiles li b { word-break: break-all; }
.gtxup { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.gtxup input[type=file] { display: block; margin-top: 6px; max-width: 100%; width: 100%; }
.gtxsend { align-items: end; gap: 10px; margin: 10px 0; }
.gtxstatus { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.gtxjobs { width: 100%; }
.gtxjobs td, .gtxjobs th { vertical-align: top; }
.gtxkey { margin: 12px 0; border: 2px solid var(--brand-2); }
.gtxkey .keyval { display: block; margin: 8px 0; padding: 10px; background: var(--panel-2); border-radius: 8px; font-size: .95rem; word-break: break-all; user-select: all; }
.gtxkey ol { padding-left: 20px; } .gtxkey li { margin: 4px 0; }
.gtxkey .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gtxpc { display: grid; gap: 4px; }
@media (max-width: 640px) { .gtxjobs thead { display: none; } .gtxjobs tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); } .gtxjobs td { border: 0; padding: 0; } }
.gtxpc .linkbtn { justify-self: start; width: auto; }

/* Product builder: size chart, true-size print preview, photo guides */
.pbchartcard { margin-bottom: var(--gap); }
.pbchart { display: grid; gap: 6px; max-width: 380px; margin: 8px 0 12px; }
.pbcrow { display: grid; grid-template-columns: 56px 1fr 1fr; gap: 8px; align-items: center; }
.pbcrow.head span { font-size: .78rem; font-weight: 700; color: var(--muted); }
.pbcrow input { min-width: 0; }
.pbcrow input::placeholder { color: var(--muted); opacity: .7; }
.pvsize select { margin-left: 6px; width: auto; }
.pbpic { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform .28s var(--m-spring); }
.pbpic img, .pbpic .pbtee { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pbpic .photofail { position: absolute; inset: 0; display: grid; place-items: center; }
.pbpic .photofail .blankmock { position: absolute; inset: 0; width: 100%; max-width: none; margin: 0; }
.pbpic .gl { position: absolute; display: none; pointer-events: none; }
.locblock.guides .gl { display: block; }
.pbpic .gl-l, .pbpic .gl-r { top: 0; bottom: 0; width: 0; border-left: 2px solid #2f6fed; }
.pbpic .gl-n { left: 0; right: 0; height: 0; border-top: 2px solid #e5484d; }
.pbfit { margin: 0; }
.pbfit.warn { color: var(--warn); font-weight: 600; }

/* ---- Bold shop back end (matches the design studio): hero banner, coloured KPI tiles, navy menu ---- */
:root { --hero-bg: linear-gradient(118deg, #1b2130 0%, #252b3b 55%, #3a2a1f 100%); --hot: linear-gradient(135deg, #ff6a3d, #e2401c);
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.18); }
:root[data-theme="tshirt-master"] {
  /* navy + red like the design studio; gold stays the RunBoy accent */
  --bg: #eef1f6; --panel: #ffffff; --panel-2: #f2f4f8; --line: #e3e7ee;
  --ink: #1b2432; --muted: #596270; --brand: #15233c; --brand-2: #e0b23a; --on-brand: #ffffff;
  /* status colours dark enough to read as text on every light surface (4.5:1) */
  --ok: #13723f; --warn: #945800; --bad: #c0392b; --info: #2459c9;
  --bad-solid: #c0392b; --focus: #1366e5; --field-line: #808c9e;
  --hero-bg: linear-gradient(118deg, #111c31 0%, #1c2d4f 55%, #33284f 100%); --hot: linear-gradient(135deg, #e5615d, #c8403c);
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.07);
}
:root[data-theme="tshirt-master"] header.top { border-bottom: 0; box-shadow: inset 0 3px 0 #d9534f; }
:root[data-theme="tshirt-master"] .logo .shoplogo { color: #15233c; }
:root[data-theme="tshirt-master"] nav.tabs { background: linear-gradient(90deg, #15233c, #1c2d4f); border-bottom: 0; top: 64px; padding: 8px 12px; box-shadow: 0 4px 14px rgba(16,24,40,.18); }
:root[data-theme="tshirt-master"] nav.tabs a { color: rgba(255,255,255,.78); padding: 8px 14px; }
:root[data-theme="tshirt-master"] nav.tabs a:hover { color: #fff; background: rgba(255,255,255,.1); }
:root[data-theme="tshirt-master"] nav.tabs a.active { background: #fff; color: #15233c; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
:root[data-theme="tshirt-master"] .navsep { background: rgba(255,255,255,.2); }
:root[data-theme="tshirt-master"] nav.tabs .tabarrow { color: #fff; }
:root[data-theme="tshirt-master"] nav.tabs .tabarrow.l { background: linear-gradient(to left, transparent, #15233c 45%); }
:root[data-theme="tshirt-master"] nav.tabs .tabarrow.r { background: linear-gradient(to right, transparent, #1c2d4f 45%); }
:root[data-theme="tshirt-master"] .lang button.active { background: #15233c; }
:root[data-theme="tshirt-master"] .alertbar { background: #fff; box-shadow: var(--shadow); }
:root[data-theme="tshirt-master"] .alertbar.info { background: #f2f6ff; }
:root[data-theme="tshirt-master"] .card { border: 0; border-radius: 18px; box-shadow: var(--shadow); }
:root[data-theme="tshirt-master"] .btn { background: linear-gradient(135deg, #22365c, #15233c); box-shadow: 0 4px 12px rgba(21,35,60,.22); }
:root[data-theme="tshirt-master"] .btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
:root[data-theme="tshirt-master"] .btn.ghost:hover { border-color: #15233c; }
:root[data-theme="tshirt-master"] .fchip { background: #fff; }
:root[data-theme="tshirt-master"] .fchip.on { background: #15233c; border-color: #15233c; color: #fff; }
:root[data-theme="tshirt-master"] .tpcol span { background: linear-gradient(180deg, #2f4a7d, #15233c); }
:root[data-theme="tshirt-master"] .pill { background: var(--bad-solid); color: #fff; }
:root[data-theme="tshirt-master"] .toast { background: #15233c; border-color: #15233c; }
:root[data-theme="tshirt-master"] .skh-tip { background: #fff; border-color: transparent; box-shadow: var(--shadow); }
:root[data-theme="tshirt-master"] input, :root[data-theme="tshirt-master"] select, :root[data-theme="tshirt-master"] textarea { background: #fff; }
:root[data-theme="tshirt-master"] input:focus, :root[data-theme="tshirt-master"] select:focus, :root[data-theme="tshirt-master"] textarea:focus { outline-color: #2459c9; }
:root[data-theme="tshirt-master"] h1 { font-size: 1.5rem; }

.btn.hot, :root[data-theme] .btn.hot { background: var(--hot); color: #fff; border: 0; box-shadow: 0 6px 16px rgba(217,83,79,.32); }
.btn.hot:hover, .btn:hover { filter: brightness(1.06); }

/* Dashboard hero banner */
.dashhead { position: relative; overflow: hidden; background: var(--hero-bg); color: #fff; border-radius: 20px; padding: 22px 24px; margin-bottom: var(--gap); box-shadow: var(--shadow); }
.dashhead::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,178,58,.28), transparent 65%); pointer-events: none; }
.dashhead > * { position: relative; z-index: 1; }
.dashhead .hello { overflow-wrap: anywhere; }
.dashhead h1 { color: #fff; font-size: 1.7rem; margin: 2px 0 4px; }
.dashhead .muted { color: rgba(255,255,255,.75); }
.dashhead .hello { display: block; color: #e0b23a; font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
.dashhead .hello:empty { display: none; }
:root .dashhead .btn.ghost, :root[data-theme] .dashhead .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
:root[data-theme] .dashhead .btn.ghost:hover { background: rgba(255,255,255,.18); border-color: #fff; }

/* KPI tiles: a colour per number, an icon tile and a coloured edge */
.kpi { position: relative; overflow: hidden; padding: 16px 16px 16px 20px; min-height: 104px; justify-content: flex-end; --kc: var(--ink); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kc); }
.kpi .ki { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-style: normal; font-size: 1.2rem; background: color-mix(in srgb, var(--kc) 14%, transparent); }
.kpi .n { color: var(--kc); font-size: 2.2rem; }
.kpi .n.sm { font-size: 1.5rem; }
.kpi .l { padding-right: 46px; }
.kpi.k-active { --kc: #2459c9; } .kpi.k-rush { --kc: #d9534f; } .kpi.k-hold { --kc: #a35f00; } .kpi.k-wip { --kc: #7c4dcc; }
.kpi.k-new { --kc: #0b7a70; } .kpi.k-done { --kc: #13723f; } .kpi.k-cycle { --kc: #34507f; } .kpi.k-late { --kc: #c8403c; }
:root:not([data-theme="tshirt-master"]) .kpi.k-active { --kc: #4aa8ff; } :root:not([data-theme="tshirt-master"]) .kpi.k-cycle { --kc: #9aa3b2; }
:root:not([data-theme="tshirt-master"]) .kpi.k-wip { --kc: #a77bf3; } :root:not([data-theme="tshirt-master"]) .kpi.k-new { --kc: #2fc2b3; }
:root:not([data-theme="tshirt-master"]) .kpi.k-hold { --kc: #ffb020; } :root:not([data-theme="tshirt-master"]) .kpi.k-done { --kc: #34d17a; }
.dashgrid h2 { font-size: 1rem; }
table.flow td .chip { white-space: nowrap; }

/* Order lists sit on a white panel on PC */
@media (min-width: 641px) {
  #view > table.resp { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); border-collapse: separate; border-spacing: 0; overflow: hidden; }
  #view > table.resp th { background: var(--panel-2); font-size: .82rem; padding: 12px 10px; }
  #view > table.resp td { padding: 13px 10px; }
  #view > table.resp tbody tr:last-child td { border-bottom: 0; }
  #view > table.resp tbody tr[data-href] { cursor: pointer; }
  #view > table.resp tbody tr:hover td { background: color-mix(in srgb, var(--info) 5%, transparent); }
  #view > table.resp td a { font-weight: 800; }
}

/* Phones: hero shrinks, the bottom menu goes navy with a red scan button */
@media (max-width: 760px) {
  .dashhead { padding: 18px 16px; border-radius: 16px; }
  .dashhead h1 { font-size: 1.35rem; }
  .dashhead .headacts { width: 100%; }
  .dashhead .headacts .btn { flex: 1 1 auto; text-align: center; }
  :root[data-theme="tshirt-master"] .bottombar { background: #15233c; border-top: 0; box-shadow: 0 -4px 16px rgba(16,24,40,.2); }
  :root[data-theme="tshirt-master"] .bottombar a, :root[data-theme="tshirt-master"] .bottombar button { color: rgba(255,255,255,.7); }
  :root[data-theme="tshirt-master"] .bottombar .active { color: #fff; }
  :root[data-theme="tshirt-master"] .bottombar .active b { background: rgba(255,255,255,.16); }
  :root[data-theme="tshirt-master"] .bottombar .scanbtn b, :root[data-theme="tshirt-master"] .bottombar .scanbtn.active b { background: var(--hot); color: #fff; border-color: #15233c; }
  :root[data-theme="tshirt-master"] table.resp tr { border: 0; box-shadow: var(--shadow); }
}
@media (max-width: 640px) { .kpi { min-height: 92px; padding: 12px 12px 12px 16px; } .kpi .ki { width: 32px; height: 32px; font-size: 1rem; top: 10px; right: 10px; } .kpi .n { font-size: 1.8rem; } .kpi .l { padding-right: 0; } }
:root[data-theme="tshirt-master"] #view > h1, :root[data-theme="tshirt-master"] #view > .pagehead:not(.dashhead) h1 { border-left: 5px solid #d9534f; padding-left: 12px; line-height: 1.2; }
:root[data-theme="tshirt-master"] .prsample { top: 136px; }
:root[data-theme="tshirt-master"] #jobCard { scroll-margin-top: 140px; }
:root[data-theme="tshirt-master"] #view > form { background: var(--panel); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); max-width: 640px; }
@media (max-width: 560px) { :root[data-theme="tshirt-master"] #view > form { padding: 14px; } }

/* ---- Shop floor: priority badges, slip check, GTX status, Job Pack card ---- */
.urg { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; vertical-align: middle; line-height: 1.5; }
.urg.rush { background: #d92d20; color: #fff; box-shadow: 0 0 0 2px rgba(217,45,32,.18); letter-spacing: .02em; }
.urg.late { background: #fde8e7; color: #b42318; border: 1px solid #f4b4ae; }
.urg.today { background: #fff1e0; color: #b54708; border: 1px solid #fbc98e; }
.urg.tomorrow, .urg.soon { background: #fff8db; color: #8a6100; border: 1px solid #f1d98a; }
.urg.big { font-size: .95rem; padding: 4px 12px; }
h1 .urg { margin-left: 4px; }
tr.due-late td:first-child { box-shadow: inset 3px 0 0 #b42318; }
tr.rush.due-late td:first-child, tr.rush td:first-child { box-shadow: inset 4px 0 0 #d92d20; }
.fchip.alert span { background: var(--bad-solid); color: #fff; }
.jobhints li.h-rush { background: #d92d20; color: #fff; border-color: #a11b12; font-size: 1.05rem; }
.jobhints li.h-due-late, .jobhints li.h-due-today { border-color: #b42318; }
.jobhints li .urg { margin-left: 4px; }
.countpill { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--bad-solid); color: #fff; font-size: .85rem; vertical-align: middle; }
.owe { color: var(--warn); font-weight: 700; }
body.noscroll { overflow: hidden; }

/* Dashboard: slips to check */
.slipcard { margin-bottom: var(--gap); border-left: 5px solid var(--bad); }
.slipcard h2 { margin: 0 0 4px; }
.slipcard .hint { margin: 0 0 10px; }
.sliplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sliplist li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--panel-2); }
.sliplist li.dup { background: color-mix(in srgb, var(--bad) 9%, var(--panel-2)); outline: 2px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.slipthumbbtn { width: 64px; height: 80px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; display: block; }
.slipthumbbtn img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.slipthumbbtn.sm { width: 46px; height: 58px; }
.slipthumbbtn.sm img.slipthumb { max-width: none; max-height: none; }
.slipthumbbtn.noimg { display: grid; place-items: center; color: var(--muted); background: var(--panel); cursor: default; }
.slipacts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.slipacts .paychip { white-space: normal; }
.slipwho { min-width: 0; display: grid; gap: 3px; justify-items: start; }
.slipamt { display: grid; text-align: right; gap: 1px; }
.slipamt b { font-size: 1.35rem; line-height: 1.1; }
@media (max-width: 640px) {
  .sliplist li { grid-template-columns: 56px minmax(0, 1fr); gap: 8px 12px; }
  .sliplist .slipthumbbtn { width: 56px; height: 70px; grid-row: span 2; }
  .slipamt { text-align: left; }
  .sliplist li > .btn, .sliplist li > .slipacts { grid-column: 1 / -1; }
  .slipacts { justify-content: flex-start; }
  .slipacts .btn { flex: 1 1 auto; text-align: center; }
}
.paytable tr.dup td { background: color-mix(in srgb, var(--bad) 7%, transparent); }
@media (max-width: 760px) { .paytable tr.dup { background: color-mix(in srgb, var(--bad) 7%, transparent); border-radius: 12px; } .paytable tr.dup td { background: none; } }

/* Slip check dialog: the slip big on the left, what it must show and the checklist on the right */
.slipov { position: fixed; inset: 0; z-index: 60; background: rgba(10,16,28,.66); display: grid; place-items: center; padding: 16px; }
.slipbox { background: var(--panel); color: var(--ink); border-radius: 20px; width: min(1040px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
.sliphead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sliphead b { font-size: 1.1rem; }
.slipgrid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; padding: 16px 18px 18px; overflow: auto; }
.slipimg { margin: 0; display: grid; gap: 6px; align-content: start; justify-items: center; background: var(--panel-2); border-radius: 14px; padding: 10px; }
.slipzoom { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; max-width: 100%; }
.slipzoom img { display: block; max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); object-fit: contain; border-radius: 8px; background: #fff; }
.slipov.zoomed .slipgrid { grid-template-columns: 1fr; }
.slipov.zoomed .slipzoom { cursor: zoom-out; }
.slipov.zoomed .slipzoom img { max-height: none; width: auto; max-width: 100%; }
.slipside { display: grid; gap: 12px; align-content: start; }
.slipexp { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: #15233c; color: #fff; }
.slipexp span { font-size: .85rem; opacity: .8; font-weight: 700; }
.slipexp b { font-size: 2.4rem; line-height: 1.05; letter-spacing: -.02em; }
.slipexp small { opacity: .8; }
.slipsays { font-size: .95rem; }
.slipsays b { font-size: 1.1rem; }
.slipsays.off { color: var(--bad); font-weight: 700; }
.slipfacts { display: grid; gap: 8px; margin: 0; }
.slipfacts div { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
.slipfacts dt { color: var(--muted); font-size: .82rem; font-weight: 700; }
.slipfacts dd { margin: 0; font-weight: 600; }
.slipdup { padding: 12px 14px; border-radius: 12px; background: #b42318; color: #fff; font-size: .95rem; }
.slipdup ul { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }
.slipdup a { color: #fff; text-decoration: underline; }
.slipdup.soft { background: #fff1e0; color: #8a4a00; }
.slipchecks { border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0; display: grid; gap: 4px; }
.slipchecks legend { font-weight: 800; padding: 0 6px; }
.slipchecks label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.slipchecks label:hover { background: var(--panel-2); }
.slipchecks input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: #15a35b; }
.slipchecks label:has(input:checked) { color: #13723f; }
.slipchecks label.dupc { color: #b42318; }
.sliprecv { display: grid; gap: 4px; font-weight: 700; font-size: .85rem; max-width: 240px; }
.slipside .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.slipside .acts .btn[data-ok] { flex: 1 1 220px; font-size: 1.02rem; padding: 13px 18px; }
.slipside .acts .btn[data-ok]:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.slipside [data-why] { margin: 0; color: var(--warn); font-weight: 700; }
@media (max-width: 760px) {
  .slipov { padding: 0; place-items: stretch; }
  .slipbox { border-radius: 0; max-height: 100vh; max-height: 100dvh; height: 100%; }
  .slipgrid { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  /* on a phone the warning and the amount due come before the slip, so nobody scrolls past them */
  .slipside { display: contents; }
  .slipside .slipdup { order: -2; } .slipside .slipexp { order: -1; }
  .slipzoom img { max-height: 58vh; }
  .slipfacts div { grid-template-columns: 1fr; gap: 0; }
  .slipexp b { font-size: 2rem; }
}

/* Printers: status set by staff, busy / idle today, queue */
.alertbar.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); color: var(--ink); margin-bottom: var(--gap); }
.cards.printers { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.printer { position: relative; border-top: 5px solid #15a35b; }
.printer.ps-maintenance { border-top-color: #d98300; }
.printer.ps-off { border-top-color: #8a93a3; }
.printer.ps-off .putil, .printer.ps-off .pname { opacity: .7; }
.printer.best { box-shadow: 0 0 0 2px #e0b23a, var(--shadow); }
.pstat { padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .8rem; white-space: nowrap; }
.pstat.active { background: #e3f5ea; color: #13723f; } .pstat.maintenance { background: #fff1d6; color: #8a5a00; } .pstat.off { background: #e7eaef; color: #4b5563; }
.recbadge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 999px; background: #e0b23a; color: #1b2432; font-size: .75rem; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.pbest { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-2); }
.pseg button { border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font: inherit; font-weight: 700; font-size: .86rem; color: var(--muted); cursor: pointer; }
.pseg button:hover { background: var(--panel); color: var(--ink); }
.pseg button.on.k-active { background: #13723f; color: #fff; }
.pseg button.on.k-maintenance { background: #945800; color: #fff; }
.pseg button.on.k-off { background: #4b5563; color: #fff; }
.pnote { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pnote input { flex: 1 1 180px; min-width: 0; }
.putil { display: grid; gap: 6px; }
.putilbar { height: 14px; border-radius: 999px; background: repeating-linear-gradient(135deg, #e7eaef 0 6px, #f2f4f8 6px 12px); overflow: hidden; }
.putilbar span { display: block; height: 100%; background: linear-gradient(90deg, #2459c9, #15233c); border-radius: 999px; min-width: 2px; }
.putilnums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; align-items: center; }
.putilnums .pct { margin-left: auto; font-weight: 800; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot.busy { background: #2459c9; } .dot.idle { background: #cfd5df; }
.pnow a { font-weight: 800; }
.pqueue { display: flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--panel-2); }
.pqueue b { font-size: 1.4rem; }
.pqueue.has b { color: #2459c9; }
.psample summary { cursor: pointer; }
.psample .inks { margin-top: 8px; }
.addprinter { margin: var(--gap) 0; }
.addprinter form { margin-top: 12px; }

/* GTX send / station advice */
.gtxrec { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gtxwarn { margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: #fff1e0; color: #8a4a00; border: 1px solid #fbc98e; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
p.gtxwarn { display: block; }
tr.held td { background: #fff8ec; }
.heldnote { color: #8a4a00; }
.fileerr { margin: 6px 0; padding: 10px 12px; border-radius: 12px; background: #fde8e7; color: #b42318; border: 1px solid #f4b4ae; font-weight: 700; }
.fileerr[hidden] { display: none; }

/* Order screen: the next step, print the Job Pack */
.jpcard { border: 2px dashed color-mix(in srgb, #2459c9 45%, transparent); background: color-mix(in srgb, #2459c9 4%, var(--panel)); }
.jphead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.jphead > div { flex: 1 1 320px; }
.jphead h2 { margin: 0 0 4px; }
.jphead .hint { margin: 0; }
.jpstep { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #2459c9; color: #fff; font-weight: 800; font-size: 1.3rem; flex: none; }
.jpgo { font-size: 1.02rem; padding: 13px 22px; }
.jplist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.jplist li { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.jplist li > div { flex: 1 1 9em; min-width: 0; }
@media (max-width: 600px) {
  .jplist li { flex-wrap: wrap; }
  .jplist li > .btn { flex: 1 1 100%; text-align: center; }
}
.jplist li.ok { border-color: #9ad7b3; }
.jpic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-weight: 800; flex: none; }
.jplist li.ok .jpic { background: #13723f; color: #fff; }
.okt { color: var(--ok); font-weight: 700; }
/* ---- Products: pictures in the studio's frame, colour swatches, grid/list, hidden products ---- */
.gframe { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.12; overflow: hidden; }
.gf-in { position: absolute; inset: 0; transform-origin: 50% 50%; }
.gf-in > img, .prodphoto .gf-in > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.gf-in > i { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.gf-in > .shine { mix-blend-mode: screen; opacity: .16; }
.gf-in .photofail { position: absolute; inset: 0; display: grid; place-items: center; }
.gf-in .photofail .blankmock { position: absolute; inset: 0; width: 100%; max-width: none; margin: 0; }
.gf-in .photofail .chip { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.prodphoto .gframe { max-width: 240px; margin: 0 auto; }
.prodtile .prodphoto { min-height: 0; padding: 10px; }
.prodphoto .hidchip { position: absolute; top: 10px; left: 10px; }
.prodphoto .addph { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.en { color: var(--muted); font-weight: 500; font-size: .86em; }
.pt-name { color: var(--ink); }
.pt-sw { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 26px; }
.pt-sw .sw { width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); cursor: pointer; flex: none; }
.pt-sw .sw.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.pt-sw .swmore { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 999px; font: inherit; font-size: .75rem; font-weight: 800; padding: 2px 8px; cursor: pointer; }
.pt-sw .swname { color: var(--muted); font-size: .76rem; font-weight: 700; margin-left: 2px; }
.prodbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.prodbar .seg button { padding: 7px 12px; white-space: nowrap; }
.prodbar .prodn { margin-left: auto; font-size: .85rem; font-weight: 700; }
.prodlist { display: grid; gap: 10px; }
.prodrow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; }
.prodrow .pr-pic { display: block; background: var(--photo-bg); border-radius: 10px; padding: 4px; }
.prodrow .pr-main { display: grid; gap: 4px; min-width: 0; }
.prodrow .pr-main > .chip { justify-self: start; }
.prodrow .pr-side { display: grid; gap: 6px; justify-items: end; text-align: right; }
.prodrow .pr-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ishidden .prodphoto .gframe, .ishidden .pr-pic { opacity: .5; }
.ishidden { border: 1px dashed var(--warn) !important; }
:root[data-theme="tshirt-master"] #prodPage > .pagehead h1 { border-left: 5px solid #d9534f; padding-left: 12px; line-height: 1.2; }
@media (max-width: 640px) {
  .prodgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .prodtile { padding: 10px; }
  .prodtile .pt-sw .swname { display: none; }
  .prodrow { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .prodrow .pr-side { grid-column: 1 / -1; justify-items: start; text-align: left; }
  .prodbar .prodn { margin-left: 0; }
}

/* ---- Product builder: names, print sizes (counter, start, the shop's own sizes), next steps, align photos ---- */
:root[data-theme="tshirt-master"] #view > form.pbform { max-width: 980px; background: none; box-shadow: none; padding: 0; border-radius: 0; }
.pbform { display: grid; }
.colprev { display: flex; flex-wrap: wrap; gap: 5px; margin-top: -4px; }
.colprev i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); }
.hidbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: rgba(217,131,0,.08); border: 1px solid var(--warn); color: var(--ink);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 700; }
.platsec { display: grid; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.platsec .hint { margin: 0; }
.plathead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plathead .lbl { font-weight: 800; color: var(--ink); }
.platcount { font-size: .76rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--ok); color: var(--ok); white-space: nowrap; }
.platcount.bad { border-color: var(--bad); color: var(--bad); }
.platchecks .check { flex-wrap: wrap; }
.startb { display: none; margin-left: auto; font-size: .75rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--brand-2); color: #111; white-space: nowrap; }
.startb.on { display: inline-block; }
.ctag { display: inline-block; font-size: .75rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #6d4bd8; color: #fff; white-space: nowrap; vertical-align: 1px; }
.customs { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.customhead { display: flex; align-items: center; gap: 8px; }
.clist { display: grid; gap: 6px; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid #6d4bd8; border-radius: 10px; padding: 6px 8px; }
.crow input[type=checkbox] { width: auto; }
.crow .cname { flex: 1 1 130px; min-width: 0; padding: 7px 9px; }
.crow .cdims { display: flex; align-items: center; gap: 4px; }
.crow .unitin { width: 86px; }
.crow .unitin input { padding: 7px 30px 7px 8px; }
.crow .unitin .unit { right: 8px; }
.crow .cx { color: var(--muted); font-weight: 700; }
.crow .startb { margin-left: 0; }
.crow input.bad { outline: 2px solid var(--bad); border-color: transparent; }
.customs [data-addcustom] { justify-self: start; }
.customs [data-addcustom][hidden] { display: none; }
.platwarn { margin: 0; color: var(--bad); font-weight: 700; font-size: .88rem; }
.platwarn[hidden] { display: none; }
.iconbtn { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.iconbtn:hover { color: var(--ink); border-color: var(--ink); }
[data-alignloc] { justify-self: start; }
.mockthumb { position: relative; }
.mockthumb .gframe { width: auto; height: 100%; }
.alok { position: absolute; left: 4px; bottom: 4px; font-size: .75rem; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: var(--ok); color: #fff; }
.alok[hidden] { display: none; }
.pbbar { margin-top: 4px; }
.pbbar .savestate { flex: 1; }
.pbbar.saved { border-color: var(--ok); }
@media (max-width: 600px) {
  .pbbar .savestate { flex-basis: 100%; }
  .pbbar > .btn { flex: 1 1 0; text-align: center; }
}
.pbnext { flex-basis: 100%; display: grid; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.pbnext[hidden] { display: none; }
.nshead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.nshead b { color: var(--ok); font-size: 1rem; }
.nshead .iconbtn { margin-left: auto; }
.nsbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.nsbtns .btn { padding: 8px 14px; }
@keyframes pbflash { 0% { box-shadow: 0 0 0 0 rgba(21,163,91,.5); } 100% { box-shadow: 0 0 0 12px rgba(21,163,91,0); } }
.flash { animation: pbflash .9s var(--m-spring) 2; }
@media (max-width: 640px) {
  .nsbtns .btn { flex: 1 1 calc(50% - 8px); text-align: center; }
  .crow .cname { flex-basis: 100%; order: 3; }
  .crow .unitin { width: 74px; }
  .crow [data-rmcustom] { margin-left: auto; }
  .crow .startb { order: 4; }
}

/* Align a shop photo on the guides */
.aligndlg { border: 0; border-radius: 18px; padding: 0; width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto;
  background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.aligndlg::backdrop { background: rgba(10,14,22,.55); }
.alhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px 6px; }
.alhead h2 { margin: 0; font-size: 1.1rem; }
.alhead .hint { margin: 2px 0 0; }
.albody { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; padding: 8px 16px; align-items: start; }
.alstage { position: relative; width: 100%; max-width: min(100%, calc((100vh - 190px) / 1.12)); justify-self: center; aspect-ratio: 1 / 1.12; overflow: hidden;
  background: var(--photo-bg, #f4f4f2); border-radius: 12px; touch-action: none; cursor: grab; outline: none; }
.alstage:focus-visible { box-shadow: 0 0 0 3px var(--info); }
.alstage:active { cursor: grabbing; }
.alpic { position: absolute; inset: 0; transform-origin: 50% 50%; }
.alpic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-select: none; }
.alstage > i { position: absolute; pointer-events: none; }
.al-c { top: 0; bottom: 0; left: 50%; border-left: 1px dashed rgba(47,111,237,.55); }
.al-l, .al-r { top: 0; bottom: 0; border-left: 2px solid #2f6fed; }
.al-n { left: 0; right: 0; border-top: 2px solid #e5484d; }
.al-box { border: 2px dashed #e0b23a; background: rgba(224,178,58,.12); }
.altools { display: grid; gap: 10px; align-content: start; }
.altools .hint { margin: 0; }
.alauto { display: flex; flex-wrap: wrap; gap: 8px; }
.alpad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 38px); gap: 4px; }
.alpad .btn { padding: 0; font-size: 1rem; }
.alpad [data-al=up] { grid-area: 1 / 2; } .alpad [data-al=left] { grid-area: 2 / 1; } .alpad [data-al=reset] { grid-area: 2 / 2; }
.alpad [data-al=right] { grid-area: 2 / 3; } .alpad [data-al=down] { grid-area: 3 / 2; }
.alscale { display: flex; align-items: center; gap: 8px; }
.alscale .lbl { font-weight: 700; color: var(--muted); font-size: .88rem; }
.alscale .btn { width: 38px; padding: 6px 0; font-size: 1rem; }
.alscale b { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.alread { margin: 0; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.almsg { margin: 0; color: var(--warn); font-weight: 700; font-size: .85rem; }
.almsg:empty { display: none; }
.allegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .8rem; color: var(--muted); }
.allegend li { display: flex; align-items: center; gap: 8px; }
.allegend i { width: 20px; border-top: 2px solid; }
.allegend .lg-b { border-color: #2f6fed; } .allegend .lg-r { border-color: #e5484d; } .allegend .lg-y { border-top-style: dashed; border-color: #e0b23a; }
.alfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 16px; border-top: 1px solid var(--line); margin-top: 8px; }
@media (max-width: 720px) {
  .albody { grid-template-columns: 1fr; }
  .alstage { max-width: min(100%, calc(50vh / 1.12)); }
  .alfoot { position: sticky; bottom: 0; background: var(--panel); }
}

/* ---- Pricing: ink use presets + worked example, technician numbers, currency notes ---- */
.inkuse { display: grid; gap: 8px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.inkuse h3 { margin: 0; font-size: 1rem; }
.inkuse .hint { margin: 0; }
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.presets button { display: grid; gap: 2px; min-height: 44px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--ink); font: inherit; cursor: pointer; }
.presets button b { font-size: .92rem; }
.presets button small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.presets button.on { background: var(--panel); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.presets button.on b::before { content: '✓ '; color: var(--ok); }
.preown { margin: 0; color: var(--ok); font-weight: 700; font-size: .85rem; }
.preown[hidden] { display: none; }
.inkex { margin: 0; background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-size: .9rem; line-height: 1.5; }
.inkex:empty { display: none; }
.inkex b { font-variant-numeric: tabular-nums; }
.techbox { border-top: 1px dashed var(--line); padding-top: 8px; }
.techbox summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.techbox[open] { display: grid; gap: 8px; }
.techbox > .hint { margin: 6px 0 0; }
.calib { display: grid; gap: 6px; background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.calib .hint { margin: 0; }
.calrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.calrow .unitin input { padding-right: 38px; }
.calib #calUse { justify-self: start; }
/* Ink test pack (Pricing → measure your GTX): download blocks, type File Viewer readings, see the line */
.inktp h4 { margin: 0; }
.tpsteps { margin: 0; padding-left: 1.3em; display: grid; gap: 3px; font-size: .88rem; color: var(--muted); }
.tpdl { display: flex; flex-wrap: wrap; gap: 6px; }
.tpdl .btn { display: inline-flex; align-items: center; gap: 6px; }
.tpwrap { overflow-x: auto; }
.tptab { border-collapse: collapse; width: 100%; min-width: 0; font-size: .88rem; }
.tptab th, .tptab td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tptab thead th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.tptab td:nth-child(2) { color: var(--muted); }
.tptab input { width: 7em; max-width: 100%; min-width: 0; font: inherit; padding: 5px 7px; border: 1px solid var(--field-line, var(--line)); border-radius: 8px; background: var(--panel); color: inherit; }
.tpres p { margin: 2px 0; font-size: .9rem; }
.tpres p.muted { color: var(--muted); font-size: .84rem; }
.tpres .tpodd { color: var(--warn); display: flex; gap: 6px; align-items: flex-start; }
.tpst { min-height: 1em; font-size: .8rem; }
.tpchart svg { width: 100%; max-width: 460px; height: auto; display: block; }
.tpchart text { font-size: 9px; fill: var(--muted); }
.tpchart .ax { font-size: 9.5px; }
.tpchart .g { stroke: var(--line); stroke-width: 1; }
.tpchart .lc { stroke: var(--brand); stroke-width: 2; }
.tpchart .dc { fill: var(--brand); }
.tpchart .lw { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.tpchart .dw { fill: var(--panel); stroke: var(--muted); stroke-width: 2; }
.inktp #tpUse { justify-self: start; }
.tpleg { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.tpleg .k { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tpleg .k.c { background: var(--brand); }
.tpleg .k.w { border: 2px solid var(--muted); margin-left: 10px; }
@media (hover: none) and (pointer: coarse) { .tptab input { min-height: 44px; font-size: 16px; } .tpdl .btn { min-height: 44px; } }
.cursug { display: block; font-size: .8rem; color: var(--muted); }
.cursug:empty { display: none; }
.cursug .linkbtn { padding: 2px 10px; margin-left: 4px; font-size: .78rem; font-weight: 700; cursor: pointer; }
.curnote { margin: 10px 0 0; font-size: .85rem; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; }
.curnote[hidden] { display: none; }
.curnote.warn { color: var(--ink); border: 1px solid var(--warn); background: rgba(217,131,0,.08); font-weight: 600; }
@media (max-width: 640px) {
  .presets { grid-template-columns: 1fr; }
  .presets button { grid-template-columns: auto 1fr; align-items: baseline; gap: 8px; }
  .calrow { grid-template-columns: 1fr 1fr; }
}

/* ---- Accessibility and touch: one focus ring, room under the sticky bars, 44 px taps on phones ---- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-within { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
:root[data-theme="tshirt-master"] :is(nav.tabs, .bottombar, .dashhead) :focus-visible { outline-color: #fff; }
input, select, textarea { border-color: var(--field-line); }
button, .btn, .linkbtn, .fchip, summary, a { touch-action: manipulation; }
.btn:active, .linkbtn:active, .fchip:active, .seg button:active, .pseg button:active { transform: translateY(1px); }
.btn:disabled, .linkbtn:disabled { cursor: default; }
/* The bars that stay on screen: the focused field scrolls clear of them. */
html { scroll-padding-top: 132px; }
html:has(.savebar) { scroll-padding-bottom: 96px; }
@media (max-width: 760px) {
  html { scroll-padding-top: 80px; scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html:has(.savebar) { scroll-padding-bottom: calc(200px + env(safe-area-inset-bottom)); }
}
/* Nothing smaller than 24 px to tap, at any width */
td a:not(.btn), .facts dd a, .billjobs li a { display: inline-block; min-height: 24px; padding-block: 2px; }
details > summary { min-height: 24px; padding-block: 2px; }
code { font-size: max(12px, .9em); }
input[type=file] { max-width: 100%; min-width: 0; }
.cursug .linkbtn:not([hidden]) { min-height: 24px; display: inline-flex; align-items: center; }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { min-height: 24px; }
input[type=range] { min-height: 24px; }
.pt-sw { gap: 2px; }
.pt-sw .sw { position: relative; width: 28px; height: 28px; background: transparent; border: 0; border-radius: 50%; }
.pt-sw .sw::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); }
.pt-sw .sw.on { outline: 0; }
.pt-sw .sw:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pt-sw .sw.on::before { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.pt-sw .swmore { min-height: 28px; }
/* Line icons in place of emoji (SKIcons): sit on the text line, take the text colour */
.ic { display: inline-block; vertical-align: -.2em; flex: none; }
.kpi .ki { color: var(--kc); }
.kpi .ki .ic { vertical-align: 0; }
.startb.on { display: inline-flex; align-items: center; gap: 3px; }
.slipdup .ic, .gtxwarn > .ic, .hidbar > .ic { color: currentColor; }
/* Labels on the scan screen, the photo caption and the customer search */
#manualForm { align-items: flex-end; }
.scanctl .codein { flex: 1; min-width: 0; } .scanctl .codein input { width: 100%; min-width: 0; }
details.typename .typein { margin-top: 8px; }
.cuq { max-width: 360px; margin: 8px 0 14px; }
/* Phones: every tap target at least 44 x 44 */
@media (max-width: 600px) {
  input, select, textarea, select.small { font-size: 16px; }
  .btn, .btn.small, .linkbtn, .fchip, .backlink, .swmore { min-height: 44px; }
  :is(.btn.small, .linkbtn, .fchip, .backlink, .swmore):not([hidden]) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .btn.small { padding: 8px 12px; font-size: .85rem; }
  .linkbtn, .lang button { min-width: 44px; }
  .lang button { min-height: 44px; padding: 6px 10px; }
  .seg button, .pseg button, .pvcell { min-height: 44px; }
  details > summary { min-height: 44px; padding-block: 10px; box-sizing: border-box; }
  label:has(> input[type=checkbox]), label:has(> input[type=radio]) { min-height: 44px; align-items: center; align-content: center; }
  input[type=range] { min-height: 44px; }
  a.sharelink { min-height: 44px; display: flex; align-items: center; }
  /* links in tables and contact lines: a taller hit area, same look */
  td a:not(.btn), .facts dd a, .billjobs li a { padding-block: 12px; margin-block: -12px; }
  .pt-name { display: block; min-height: 44px; padding-block: 8px; }
  .pt-sw { gap: 0; min-height: 44px; }
  .prodtile .pt-sw { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; }
  .prodtile .pt-sw::-webkit-scrollbar { display: none; }
  .pt-sw .sw { width: 44px; height: 44px; }
  .pt-sw .sw::before { inset: 9px; }
  header.top { gap: 8px; }
  .iconbtn { width: 44px; height: 44px; }
  .cursug .linkbtn:not([hidden]) { min-height: 44px; }
  .alpad { grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 44px); gap: 8px; }
  .kpi .ki .ic { width: 16px; height: 16px; }
}
@media (max-width: 380px) { header.top { padding-left: 10px; padding-right: 10px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flash { animation: none; }
  .btn:active, .linkbtn:active, .fchip:active, .seg button:active, .pseg button:active { transform: none; }
}

/* ---- Customers: list (accounts, guest buyers) and one customer's profile (app.js viewCustomers / viewCustomer) ---- */
.cukpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 8px; }
.kpi .ks { color: var(--muted); font-size: .78rem; font-weight: 600; }
.cukpis .kpi { justify-content: flex-start; }
.cukpis .kpi .n { min-height: 40px; display: flex; align-items: center; padding-right: 46px; margin-bottom: 4px; }
.cukpis .kpi .l { padding-right: 0; }
.cukpis .kpi .n.xs { font-size: 1.2rem; }
.cuhow { margin: 0 0 12px; }
.cuhow summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: .88rem; }
.cuhow p { max-width: 75ch; margin: 4px 0 0; font-size: .9rem; }
.cunote { display: flex; gap: 8px; align-items: flex-start; max-width: 75ch; }
.cunote .ic { margin-top: 2px; }
.cufilters .cuqf { flex: 2 1 260px; }
.cufilters input[type=search] { width: 100%; }
.cufmore { flex: 1 1 100%; order: 3; }
.cufmore summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--ink); cursor: pointer; }
.cufmore summary::-webkit-details-marker { display: none; }
.cufchev { margin-left: auto; display: inline-flex; transition: transform .28s var(--m-spring); }
.cufmore[open] .cufchev { transform: rotate(180deg); }
.cufgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding-top: 6px; }
.cufgrid label:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cufgrid select { width: 100%; }
.cubar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; margin: 0 0 8px; }
.cubar p { margin: 0; }
.cutable td { vertical-align: top; }
.cutable td:first-child { min-width: 180px; }
.cuacts { white-space: nowrap; }
.cuacts .btn + .btn { margin-left: 6px; }
.cutagrow { margin-top: 6px; gap: 4px; }
.cutagchip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.cutable .cucontact a { display: flex; align-items: center; gap: 6px; min-height: 24px; overflow-wrap: anywhere; }
.curefs { max-width: 220px; }
.cutable .curefs a, .curefs span.ocode { display: inline-block; margin: 0 6px 4px 0; }
.cumore { display: flex; margin: 4px auto var(--gap); min-height: 44px; align-items: center; gap: 6px; }
.cuhead { align-items: flex-start; }
.cuwho { min-width: 0; }
.cuwho h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.cualert { justify-content: flex-start; margin: 0 0 var(--gap); }
.cugrid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; margin: 0 0 var(--gap); }
.cucol { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.cugrid h2, .cusec h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.cusec { margin-bottom: var(--gap); }
.cufacts { margin: 0; }
.cutags { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.cutag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 2px 2px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
.cutagx { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.cutagx:hover { background: var(--line); }
.cuqh { margin: 0 0 6px; }
.cuquick { margin-bottom: 12px; }
.cuquick .fchip { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
form.cutagform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; max-width: none; }
.cutagform label { flex: 1 1 180px; }
.cutagform .btn { min-height: 46px; display: inline-flex; align-items: center; gap: 6px; }
.cutagform + .oerr, .cunoteform .oerr { margin-top: 8px; }
form.cunoteform { max-width: none; gap: 8px; margin-bottom: 14px; }
.cunoteform label { display: block; color: var(--ink); }
.cunoteform textarea { width: 100%; min-height: 84px; resize: vertical; }
.cunoteform .btn { display: inline-flex; align-items: center; gap: 6px; }
.cunotes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cunotes li { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border-left: 3px solid var(--line); }
.cunotes p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cubuys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 18px; }
.cubuys .minih { margin-top: 4px; }
.cutally { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cutally li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; font-size: .9rem; }
.cutally .cutn { overflow-wrap: anywhere; }
.cutally b { font-variant-numeric: tabular-nums; }
.cutbar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.cutbar span { display: block; height: 100%; border-radius: inherit; background: var(--info); }
.culist { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.culist li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.cubillorders { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cubillorders li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .88rem; }
@media (max-width: 1000px) { .cukpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cugrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .cukpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cukpis .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cutable td:first-child { min-width: 0; }
  .cutable td.cuacts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; white-space: normal; }
  .cutable table.resp td.cuacts::before { display: none; }
  .cutable table.resp td.num { text-align: left; }
  .cutable td.cuacts .btn { flex: 1 1 140px; margin: 0; }
  .curefs { max-width: none; }
  .cuhead .headacts { width: 100%; }
  .cuhead .headacts .btn { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .cubar { flex-direction: column; }
}
@media (max-width: 600px) {
  .cutagx { width: 44px; height: 44px; }
  .cuhow summary { min-height: 44px; }
  .cutable .cucontact a, .cutable .curefs a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; margin-block: 0; }
  .cutable .cucontact a { display: flex; }
  .cutable a.ocode, .culist a.ocode { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; margin-block: 0; }
  .cutable table.resp td:first-child > a { display: flex; align-items: center; min-height: 44px; padding-block: 0; margin-block: 0; }
  .cutable td.cuacts .btn { min-height: 44px; }
  .cutagform .btn, .cunoteform .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}
/* ---- Station screen (#/scan): station strip with the bottleneck, scan panel, queue, job card ---- */
.sc-head { margin-bottom: 8px; }
.sc-sound { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; }
.sc-sound[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.sc-flow { display: grid; gap: 10px; padding: 14px; }
.sc-flowhead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.sc-flowhead h2 { margin: 0; }
.sc-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.sc-st { position: relative; display: grid; gap: 4px; align-content: start; min-height: 44px; padding: 10px 10px 9px; text-align: left; cursor: pointer;
  background: var(--panel); color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; font: inherit; }
.sc-st:hover { border-color: var(--field-line); }
.sc-st.on { border-color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); background: var(--panel-2); }
.sc-stn { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: .92rem; line-height: 1.2; }
.sc-stc { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.sc-stc b { font-size: 1.25rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-sto { display: flex; align-items: center; gap: 4px; min-height: 1.2em; font-size: .8rem; color: var(--muted); font-weight: 600; }
.sc-sto.late { color: var(--warn); font-weight: 800; }
.sc-st.neck { border-color: var(--warn); }
.sc-st.neck.on { box-shadow: inset 0 0 0 1.5px var(--warn); }
.sc-necktag { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800;
  color: #7a4e00; background: #fff4d6; border: 1px solid #e0b23a; }
.sc-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; background: var(--panel-2); }
.sc-hint:empty { display: none; }
.sc-hint.neck { color: #7a4e00; background: #fff4d6; border: 1px solid #e0b23a; }
.sc-hint.calm { color: var(--ok); }
.sc-hint .ic { flex: none; margin-top: .15em; }
.sc-grid { display: grid; gap: var(--gap); margin-top: var(--gap); grid-template-columns: minmax(0, 1fr); grid-template-areas: "scan" "job" "queue"; align-items: start; }
.sc-scan { grid-area: scan; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.sc-queue { grid-area: queue; min-width: 0; }
.sc-job { grid-area: job; min-width: 0; }
.sc-job .jobcard { margin-top: 0; }
@media (min-width: 900px) {
  /* the scan panel stays in view on the left (results and the code box); the job card and the queue share the right */
  .sc-grid { grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "scan job" "scan queue"; }
  .sc-scan { position: sticky; top: 136px; max-height: calc(100vh - 148px); overflow-y: auto; overscroll-behavior: contain; }
}
.sc-here { display: grid; gap: 2px; }
.sc-here b { font-size: 1.6rem; line-height: 1.15; }
.sc-modes { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 6px; }
.sc-modes legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.sc-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sc-seg label { position: relative; display: block; }
.sc-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sc-seg span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; text-align: center;
  border: 1.5px solid var(--field-line); border-radius: 10px; background: var(--panel); color: var(--ink); font-weight: 700; font-size: .85rem; line-height: 1.2; }
.sc-seg input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.sc-seg input[value="hold"]:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
.sc-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-modehint { margin: 0; }
form.sc-code { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-width: none; }
.sc-codehead { display: flex; align-items: center; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.sc-codehead label { font-weight: 700; }
.sc-modechip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.sc-modechip:is(.reach, .complete) { color: var(--info); border-color: currentColor; }
.sc-modechip.hold { color: var(--warn); border-color: currentColor; }
.sc-codeline { display: flex; gap: 8px; }
.sc-codeline input { flex: 1; min-width: 0; min-height: 54px; font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; }
.sc-codeline input::placeholder { font-weight: 500; font-size: 1rem; letter-spacing: 0; }
.sc-codeline .btn { min-height: 54px; }
/* the QR scanner's ready line: a green dot while this page takes the scanner's keys, amber when another window has
   the focus (the scanner types into that one); the dot springs when a scan arrives */
.sc-ready { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.sc-ready[hidden] { display: none; }
.sc-dot { flex: none; align-self: flex-start; margin-top: .4em; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.sc-ready.away { cursor: pointer; }
.sc-ready.away .sc-dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.sc-ready.got .sc-dot { animation: scdot .4s var(--m-spring); }
@keyframes scdot { from { transform: scale(1.8); } to { transform: none; } }
/* on a computer the camera is the second choice: a smaller button under the code box */
.sc-cambtn.alt { width: auto; min-height: 44px; justify-self: start; }
/* each scan flashes the whole scan card: green done or arrived, red refused, amber hold, seen from across the room */
.sc-scan.hit-ok { animation: schit-ok .8s var(--m-in); }
.sc-scan.hit-bad { animation: schit-bad .8s var(--m-in); }
.sc-scan.hit-warn { animation: schit-warn .8s var(--m-in); }
@keyframes schit-ok { from { outline: 4px solid var(--ok); outline-offset: 0; } to { outline: 4px solid transparent; outline-offset: 10px; } }
@keyframes schit-bad { from { outline: 4px solid var(--bad); outline-offset: 0; } to { outline: 4px solid transparent; outline-offset: 10px; } }
@keyframes schit-warn { from { outline: 4px solid var(--warn); outline-offset: 0; } to { outline: 4px solid transparent; outline-offset: 10px; } }
.sc-resc .ocode { font-size: 1.5rem; letter-spacing: .02em; }
.sc-cambtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; }
.sc-cambtn[aria-pressed="true"] { border-color: var(--bad); color: var(--bad); }
:root .sc-scan .sc-cambtn[hidden] { display: none; }   /* beats hig.css's button display */
.sc-cam { position: relative; }
.sc-cam[hidden] { display: none; }
.sc-cam #reader { aspect-ratio: 4 / 3; max-height: 52vh; }
.sc-camhit { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; border-radius: var(--radius); color: #fff;
  font-size: 1.35rem; font-weight: 800; text-align: center; padding: 12px; }
.sc-camhit[hidden] { display: none; }
.sc-camhit.ok { background: rgb(19 114 63 / .72); } .sc-camhit.bad { background: rgb(192 57 43 / .78); }
.sc-res { display: grid; gap: 4px; min-height: 64px; padding: 14px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--panel); }
.sc-res.ok { border-color: var(--info); background: color-mix(in srgb, var(--info) 7%, var(--panel)); }
.sc-res.done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--panel)); }
.sc-res.hold, .sc-res.info { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.sc-res.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); }
.sc-resh { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.sc-res.ok .sc-resh .ic { color: var(--info); } .sc-res.done .sc-resh .ic { color: var(--ok); }
.sc-res:is(.hold, .info) .sc-resh .ic { color: var(--warn); } .sc-res.bad .sc-resh .ic { color: var(--bad); }
.sc-resc { font-size: 1.05rem; }
.sc-resn { color: var(--muted); font-size: .9rem; }
.sc-res .oblocked, .sc-res .ipc-blocked { margin: 0; }
/* the rights hold refusal (public/compliance.js) sits in the red result box: no second box inside it */
.sc-res .ipc-blocked { padding: 0; background: none; border: 0; border-radius: 0; }
.sc-res .ipc-blocked b { font-size: 1.15rem; line-height: 1.3; margin-bottom: 6px; }
.sc-res.flash { animation: scflash .45s var(--m-spring); }
@keyframes scflash { from { transform: scale(.985); box-shadow: 0 0 0 6px color-mix(in srgb, var(--focus) 25%, transparent); } to { transform: none; box-shadow: none; } }
.sc-qhead h2 { margin: 0 0 4px; }
.sc-queue > .hint { margin: 0 0 10px; }
.sc-qh { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: .95rem; }
.sc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sc-item { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.sc-item.rush { box-shadow: inset 4px 0 0 var(--bad); }
.sc-item.open { border-color: var(--field-line); }
.sc-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 12px; border: 0; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer; }
.sc-row > .ic:last-child { flex: none; color: var(--muted); }
.sc-item.open .sc-row > .ic:last-child { transform: rotate(180deg); }
.sc-thumb { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: contain; background: var(--photo-bg); border: 1px solid var(--line); }
.sc-thumb.none { display: grid; place-items: center; color: var(--muted); }
.sc-rmain { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sc-rtop { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-rdesign { color: var(--muted); }
.sc-rmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8rem; font-weight: 600; }
.sc-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); font-weight: 700; }
.sc-tag.warn, .sc-tag.hold { color: #7a4e00; background: #fff4d6; } .sc-tag.bad { color: #b4142b; background: #fdecee; }
.sc-age { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.sc-mini { display: grid; gap: 10px; padding: 12px; border-top: 1px dashed var(--line); background: var(--panel-2); }
.sc-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .9rem; }
.sc-warnline { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-weight: 700; }
.sc-warnline.bad { color: var(--bad); } .sc-warnline.warn { color: var(--warn); }
.sc-marks { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-marks .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; font-size: .95rem; }
form.sc-holdform { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; max-width: none; }
.sc-holdform label { flex: 1 1 220px; }
.sc-holdform input { width: 100%; min-width: 0; }
.sc-holdform .btn { min-height: 46px; }
.sc-qempty, .sc-jobempty { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; }
.sc-qempty p, .sc-jobempty p { margin: 0; }
.sc-qempty .ic { color: var(--ok); flex: none; } .sc-jobempty .ic { color: var(--muted); flex: none; }
@media (max-width: 899px) {
  .sc-jobempty { display: none; }     /* phones: the queue comes straight after the scan panel */
  .sc-strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; margin-inline: -4px; padding-inline: 4px; }
  .sc-st { flex: 0 0 auto; min-width: 116px; scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .sc-flow { padding: 12px; }
  .sc-here b { font-size: 1.4rem; }
  .sc-seg span { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-res.flash, .sc-ready.got .sc-dot, .sc-scan:is(.hit-ok, .hit-bad, .hit-warn) { animation: none; }
  .sc-item.open .sc-row > .ic:last-child { transform: none; }
}
/* the dark default look: the same warnings on dark panels */
:root:not([data-theme="tshirt-master"]) :is(.sc-necktag, .sc-hint.neck, .sc-tag.warn, .sc-tag.hold) { color: #f5c35b; background: #33280f; border-color: #6b5214; }
:root:not([data-theme="tshirt-master"]) .sc-tag.bad { color: #ff8a94; background: #3a1519; }
/* ---- Setup guide on the dashboard (owners and managers) ---- */
.setupcard { margin: 0 0 var(--gap); padding: 18px; border-left: 4px solid var(--brand-2); }
.setupcard.alldone { border-left-color: var(--ok); }
.setuphead { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 14px; align-items: start; }
.setupic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel-2); color: var(--ink); }
.setupcard.alldone .setupic { background: var(--ok); color: var(--panel); }
.setupsum h2 { margin: 2px 0 4px; }
.setupsum .hint { margin: 0 0 10px; max-width: 70ch; }
.setupmeter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.setupbar { flex: 1 1 180px; max-width: 420px; height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.setupbar span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.setupleft { font-size: .9rem; }
.setupbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.setupcard .btn.small { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.setlist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.setlist[hidden] { display: none; }   /* "Hide steps": display:grid above would otherwise beat the hidden attribute */
.setitem { display: grid; grid-template-columns: 32px 1fr auto; gap: 6px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.setitem.done { background: var(--panel-2); }
.setmark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 2px solid var(--line); font-weight: 800; font-size: .9rem; color: var(--ink); align-self: start; }
.setitem.done .setmark { background: var(--ok); border-color: var(--ok); color: var(--panel); }
.setbody h3 { margin: 0 0 2px; font-size: .98rem; line-height: 1.35; }
.setbody p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; max-width: 75ch; }
.setbody .setdetail { margin-top: 4px; color: var(--ink); font-weight: 600; font-size: .85rem; }
.setbody .chip { vertical-align: middle; font-weight: 700; }
.setacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.setitem.done .setbody h3 { color: var(--muted); }
#setupRestore:empty { display: none; }
@media (max-width: 760px) {
  .setuphead { grid-template-columns: auto 1fr; }
  .setupbtns { grid-column: 1 / -1; justify-content: flex-start; }
  .setitem { grid-template-columns: 32px 1fr; }
  .setacts { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 599px) {
  .setupcard { padding: 14px; }
  .setupcard .btn.small { min-height: 44px; }
  .setupbtns .btn { flex: 1 1 auto; justify-content: center; }
}
/* Coupons editor: the preview before a code is typed is a grey stand-in */
#cpPrev.cpghost { opacity: .55; filter: grayscale(1); }

/* SK support view is read only (the server refuses every change): the "new order" entries are not offered */
body.support-ro a[href="#/new"] { display: none !important; }
