:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b1f24; --muted: #5e6875; --line: #dde1e6;
  --brand: #bf5700; --brand-ink: #ffffff; --on: #e07a10; --off: #d5d9de; --ok: #1e7f4f; --bad: #b3261e; --warn: #8a5a00;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171b; --surface: #1d2126; --text: #e8eaed; --muted: #a3acb6; --line: #333a42;
    --off: #3c434b; --on: #f39a3c; --ok: #5cc28d; --bad: #ff8a80; --warn: #f2c14e; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.4; }
h1 { font-size: 22px; margin: 0 0 12px; } h2 { font-size: 18px; margin: 0 0 6px; } h3 { font-size: 15px; margin: 18px 0 6px; }
a { color: var(--brand); }
.muted { color: var(--muted); } .small { font-size: 13px; } .warn { color: var(--warn); }
button { font: inherit; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button.link { border: 0; background: none; color: var(--brand); padding: 7px 4px; }
input, select, textarea { font: inherit; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
label input, label select, label textarea { display: block; width: 100%; margin-top: 4px; color: var(--text); }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; } .brand span { color: var(--brand); }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav button { border: 0; background: none; padding: 6px 10px; }
nav button.active { background: var(--bg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 6px 6px 0 0; }
.who { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; }
.signin { max-width: 420px; margin: 40px auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { text-align: left; padding: 14px; border-radius: 12px; background: var(--surface); }
.tile b { display: block; font-size: 26px; } .tile span { color: var(--muted); font-size: 13px; }

.bar { display: flex; align-items: baseline; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.filters input[type=search] { flex: 1 1 260px; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; margin-bottom: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--brand); position: sticky; top: 52px; z-index: 4; }
.items { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; }
.items th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.items td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.items td.t a { color: var(--text); text-decoration: none; font-weight: 600; } .items td.t a:hover { color: var(--brand); }
.thumb img, .noimg { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--bg); display: block; }
.price s { display: block; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.chip.sugg { border-style: dashed; color: var(--muted); }
.items td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.items th .sorth { border: 0; background: none; padding: 0; font: inherit; color: inherit; font-weight: 600; cursor: pointer; }
.items th .sorth.on { color: var(--brand); }
.items th .sorth:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.pill.approved { color: var(--ok); border-color: var(--ok); } .pill.rejected, .pill.retired { color: var(--bad); border-color: var(--bad); }
a.btn { display: inline-block; padding: 7px 12px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 600; }
.items td.t a.live { color: var(--brand); font-weight: 400; }
.actions { align-items: center; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }

.alarms { display: inline-flex; align-items: center; gap: 1px; white-space: nowrap; }
.alarms .num { margin-left: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.alarms.none { font-size: 12px; color: var(--muted); }
svg.alarm { width: 17px; height: 17px; } svg.alarm.big { width: 26px; height: 26px; }
svg.alarm .off { fill: var(--off); } svg.alarm .on { fill: var(--on); }
svg.alarm .hands { fill: none; stroke: var(--surface); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.drawer { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 10; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.panel { width: min(620px, 100%); height: 100%; overflow-y: auto; background: var(--surface); padding: 20px; position: relative; }
.panel .close { position: absolute; top: 10px; right: 10px; font-size: 20px; line-height: 1; padding: 4px 10px; }
.panel .head { display: flex; gap: 14px; padding-right: 30px; }
.panel .head img, .noimg.big { width: 120px; height: 120px; object-fit: contain; border-radius: 10px; background: var(--bg); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hist { padding-left: 18px; }
svg.chart { width: 100%; height: auto; background: var(--bg); border-radius: 10px; }
svg.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.2; }
svg.chart .orig { stroke: var(--muted); stroke-dasharray: 4 4; }
svg.chart text { fill: var(--muted); font-size: 11px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 20; }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 700px) {
  .items th:nth-child(2), .items td.thumb, .items th:nth-child(8), .items td.price { display: none; }
  .panel .head { flex-direction: column; }
  .who { margin-left: 0; }
}

/* Authenticator app setup (2026-11-26) */
.signin .qr { display: block; margin: 0.75rem 0; background: #fff; padding: 8px; border-radius: 8px; }
.signin code { word-break: break-all; }

/* Product panel (2026-11-27): the photo was shown at full size and pushed the panel off screen. */
.panel img { max-width: 100%; }
.panel .hero { display: block; width: 100%; max-height: 240px; object-fit: contain; background: var(--bg); border-radius: 10px; margin: 8px 0 12px; }
.panel h2 { margin: 0 0 4px; padding-right: 40px; }
.panel label { display: block; margin: 12px 0 0; }
.panel label select, .panel label input { display: block; width: 100%; margin-top: 4px; }
.bulk[hidden] { display: none; }
