/* Mizani Yard: the look (2026-12-03). Concrete, steel and hi-vis amber, the colours of a yard; amber marks the one action
   that moves a ticket on. Instrument Sans for the interface, IBM Plex Mono for weights, money and ticket numbers (both OFL, in fonts/). */
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --bg: #eceeed; --panel: #fbfbfa; --box: #e1e4e3; --line: #cfd4d2;
  --ink: #161b1e; --mute: #4a5357; --soft: #677075;            /* mute on bg 7.4:1, soft 4.9:1 */
  --steel: #1f272b; --steel-2: #2c363b;                         /* dark surfaces */
  --amber: #f0b114; --amber-ink: #161b1e; --amber-2: #d99c05;    /* ink on amber 10.6:1 */
  --btn: var(--steel); --btn-ink: #fff; --btn2: #dde1df;
  --warn: #6e4304; --warn-bg: #f8e6bd; --bad: #8f2414; --bad-bg: #f6dcd5; --ok: #1d5733; --ok-bg: #d7eadb;
  --r: 6px; --focus: #0b63ce;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  font: 16px/1.45 "Instrument Sans", "Segoe UI", system-ui, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; letter-spacing: -.01em; } h2 { font-size: 19px; } h3 { font-size: 16px; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--mute); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.brandmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; }
.brandmark svg { width: 26px; height: 26px; flex: none; }
.row { display: flex; gap: 12px; align-items: center; } .grow { flex: 1; } .wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 0; background: var(--btn); color: var(--btn-ink); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--steel-2); }
.btn.go { background: var(--amber); color: var(--amber-ink); } .btn.go:hover { background: var(--amber-2); }
.btn.sec { background: var(--btn2); color: var(--ink); } .btn.sec:hover { background: #d0d5d3; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #b9c0bd; } .btn.ghost:hover { background: var(--box); }
.btn.big { min-height: 64px; font-size: 18px; padding: 0 28px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select {
  min-height: 44px; padding: 0 12px; border: 1px solid #a3aba8; border-radius: var(--r); background: #fff; width: 100%;
}
label.f { display: block; } label.f > span { display: block; font-weight: 600; margin-bottom: 6px; }
.err { color: var(--bad); font-weight: 600; } .field-err input { border-color: var(--bad); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: 4px; }
.box { background: var(--box); border-radius: var(--r); padding: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 4px; font-size: 13px; font-weight: 600; background: var(--box); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.owed { background: var(--warn-bg); color: var(--warn); } .chip.paid { background: var(--ok-bg); color: var(--ok); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: 12px 16px; border-radius: var(--r); background: var(--box); }
.note.warn { background: var(--warn-bg); color: var(--warn); } .note.bad { background: var(--bad-bg); color: var(--bad); } .note.ok { background: var(--ok-bg); color: var(--ok); }

/* Hub */
.hub { max-width: 980px; margin: 0 auto; padding: 32px 16px 80px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.hub-grid .card { display: flex; flex-direction: column; gap: 8px; }
.hub-grid .card .btn { margin-top: auto; }

/* Counter tablet */
.tab { min-height: 100vh; display: flex; flex-direction: column; background: var(--panel); }
.tbar { display: flex; align-items: center; gap: 16px; padding: 0 24px; height: 64px; background: var(--steel); color: #fff; }
.tbar a, .tbar .muted, .tbar .sync { color: #c9d0cd; }
.tbar .site { font-weight: 700; } .tbar .btn.sec { background: var(--steel-2); color: #fff; } .tbar .btn.ghost { color: #fff; border-color: #56626a; }
.sync { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.offbar { display: flex; gap: 16px; align-items: center; padding: 12px 24px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.steps { display: flex; gap: 4px; padding: 0 24px; height: 56px; align-items: center; border-bottom: 1px solid var(--line); overflow-x: auto; }
.steps span { padding: 6px 12px; border-radius: 99px; color: var(--soft); white-space: nowrap; }
.steps span.on { background: var(--amber); color: var(--amber-ink); font-weight: 700; }
.steps span.done { color: var(--ink); }
.steps button.done { padding: 6px 12px; min-height: 44px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; white-space: nowrap; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.steps button.done:hover { background: var(--box); }
.steps i { color: var(--soft); font-style: normal; }
.tmain { flex: 1; padding: 24px; }
.sel-row { display: flex; width: 100%; text-align: left; align-items: center; gap: 16px; min-height: 72px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; margin-bottom: 10px; }
.sel-row:hover { border-color: var(--steel); }
.sel-row:hover { background: var(--bg); }
.weigh { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr); gap: 24px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: start; }
.tile { position: relative; min-height: 110px; padding: 16px 16px 16px 26px; border-radius: var(--r); border: 2px solid var(--line); background: #fff; text-align: left; cursor: pointer; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--metal, var(--box)); }
.tile:hover { border-color: #9aa3a0; }
.tile .num { font-family: var(--mono); font-size: 15px; color: var(--mute); }
.tile[data-id=copper] { --metal: #b5612f; } .tile[data-id=brass] { --metal: #c9a13c; } .tile[data-id=alu] { --metal: #aeb7bb; }
.tile[data-id=cans] { --metal: #8fa3ad; } .tile[data-id=lead] { --metal: #5d666b; } .tile[data-id=steel] { --metal: #3e4a52; }
.tile b { display: block; font-size: 19px; margin-bottom: 2px; } .tile.on { border-color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); }
.tile.on::after { content: "Selected"; position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 700; background: var(--amber); color: var(--amber-ink); padding: 2px 8px; border-radius: 4px; }
.lines { width: 100%; border-collapse: collapse; }
.lines td, .lines th { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.lines td.r, .lines th.r { text-align: right; }
.totals { display: flex; gap: 32px; align-items: center; padding: 18px 22px; border-radius: var(--r); background: var(--steel); color: #c9d0cd; }
.totals b { display: block; font-family: var(--mono); font-size: 30px; color: #fff; letter-spacing: -.02em; } .totals .grow b { color: var(--amber); }
canvas.sig { width: 100%; height: 380px; border: 2px dashed #8e9894; border-radius: var(--r); background: #fff; touch-action: none; display: block; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice button { min-height: 100px; font-size: 20px; font-weight: 700; border-radius: var(--r); border: 2px solid var(--line); background: #fff; cursor: pointer; }
.choice button:hover:not([disabled]) { border-color: #9aa3a0; }
.choice button.on { border-color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); background: #fff; }
.receipt { font-family: var(--mono); font-size: 14px; background: #fff; border: 1px solid var(--line); padding: 20px; border-radius: var(--r); }
.tfoot { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; }
.tfoot .btn.big:not(.sec):not(.ghost) { background: var(--amber); color: var(--amber-ink); } .tfoot .btn.big:not(.sec):not(.ghost):hover { background: var(--amber-2); }

/* Office */
.off { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.off > div, .dash2 > *, .grid2 > *, .weigh > * { min-width: 0; }
.side { background: var(--steel); color: #dfe4e2; padding: 20px 12px; }
.side .brand { padding: 0 12px 24px; color: #fff; }
.side a { display: block; padding: 10px 12px; border-radius: var(--r); text-decoration: none; margin-bottom: 2px; }
.side a:hover { background: var(--steel-2); }
.side a.on { background: var(--steel-2); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--amber); }
.side a.small.muted { color: #9aa5a1; }
.obar { display: flex; gap: 12px; align-items: center; height: 64px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.obar select { width: auto; } .obar input { max-width: 320px; }
.omain { padding: 24px; }
.menu-btn { display: none; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
a.stat:hover { border-color: var(--steel); }
.stat b { display: block; font-family: var(--mono); font-size: 28px; margin: 6px 0 2px; letter-spacing: -.02em; }
.dash2 { display: grid; grid-template-columns: 1.8fr 1fr; gap: 16px; margin-top: 16px; }
.bar { display: grid; grid-template-columns: 140px 1fr 70px; gap: 10px; align-items: center; margin: 8px 0; }
.bar .track { height: 14px; background: var(--box); border-radius: 3px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--steel-2); }
table.t { width: 100%; border-collapse: collapse; background: #fff; font-variant-numeric: tabular-nums; }
table.t th, table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); font-weight: 700; background: #f3f4f3; position: sticky; top: 0; }
table.t th button { background: none; border: 0; padding: 0; font-weight: 600; color: inherit; cursor: pointer; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #f4f6f5; }
table.t td a { font-family: var(--mono); font-size: 14px; }
table.t td.r, table.t th.r { text-align: right; white-space: nowrap; }
table.t input[type=checkbox] { width: 20px; height: 20px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.filters select { width: auto; }
.bulk { display: flex; gap: 12px; align-items: center; padding: 10px 16px; background: var(--steel); color: #fff; border-radius: var(--r); margin-bottom: 12px; flex-wrap: wrap; }
.bulk .btn { background: #fff; color: var(--ink); min-height: 36px; }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.audit li { margin-bottom: 8px; } .audit { padding-left: 18px; margin: 8px 0 0; }
.pcell { display: block; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.pcell:hover { border-color: var(--line); background: var(--bg); }
.pcell b { font-size: 17px; }
.skel { background: linear-gradient(90deg, var(--box), #f1f3f2, var(--box)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* Panel and modal */
.scrim { position: fixed; inset: 0; background: rgba(22,27,30,.5); z-index: 20; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 21; padding: 24px; overflow-y: auto; box-shadow: -8px 0 24px rgba(0,0,0,.15); }
.modal { position: fixed; z-index: 22; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); background: #fff; border-radius: 8px; padding: 24px; }
.opts label { display: flex; gap: 10px; align-items: center; min-height: 40px; }
.opts input { width: 20px; height: 20px; }
.opts input[type=datetime-local] { width: calc(100% - 30px); height: auto; margin-left: 30px; }

/* Setup */
.setup { min-height: 100vh; background: var(--bg); padding: 40px 16px; }
.setup .inner { max-width: 700px; margin: 0 auto; }
.ssteps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.ssteps span { flex: 1; min-width: 90px; padding: 8px; text-align: center; border-radius: 6px; background: var(--box); font-size: 14px; color: var(--soft); }
.ssteps span.on { background: var(--steel); color: #fff; font-weight: 600; box-shadow: inset 0 -3px 0 var(--amber); } .ssteps span.done { color: var(--ink); }
.snav { display: flex; justify-content: space-between; margin-top: 20px; gap: 12px; }
.matrow { display: grid; grid-template-columns: 28px 1fr 160px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.matrow input[type=checkbox] { width: 22px; height: 22px; }
.pricing { max-width: 1100px; margin: 0 auto; padding: 40px 16px; }
.progress { height: 14px; background: var(--box); border-radius: 99px; overflow: hidden; } .progress div { height: 100%; background: var(--amber); }

/* Test panel (moderator only) */
#test .tbtn { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 40; writing-mode: vertical-rl; padding: 12px 4px; border-radius: 0 8px 8px 0; background: #111827; color: #fff; border: 0; font-size: 12px; cursor: pointer; opacity: .7; }
#test .tp { position: fixed; left: 28px; top: 50%; transform: translateY(-50%); z-index: 40; width: 280px; background: #111827; color: #fff; border-radius: 12px; padding: 16px; font-size: 14px; }
#test .tp label { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
#test .tp select { min-height: 32px; color: #111827; }
#test .tp .btn { min-height: 32px; font-size: 13px; background: #fff; color: #111827; margin-top: 6px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; }
#toast div { background: #111827; color: #fff; padding: 12px 18px; border-radius: var(--r); margin-top: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.phone-frame { width: 390px; height: 844px; border: 10px solid #111827; border-radius: 36px; overflow: hidden; background: #fff; margin: 0 auto; display: block; }

@media (max-width: 900px) {
  .weigh, .grid2, .dash2 { grid-template-columns: 1fr; }
  .cards4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .off { grid-template-columns: 1fr; }
  .side { display: none; } .side.open { display: block; position: fixed; inset: 64px 0 0 0; z-index: 15; }
  .menu-btn { display: inline-flex; }
  .obar { padding: 0 12px; } .hide-s { display: none; }
  .omain { padding: 16px; }
  .cards4 { gap: 10px; } .stat b { font-size: 20px; letter-spacing: -.03em; }
  .bar { grid-template-columns: 100px 1fr 60px; }
  .tmain, .tbar { padding-left: 16px; padding-right: 16px; }
}
