/* Phase 22 shared design for the 4 internal ops pages. Deliberately plain and
   dense, not decorative -- built for scanning 100+ rows/day, not for looks. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.4 -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

:root {
  --bg: #f4f5f7;
  --text: #1a1d21;
  --line: #d9dce1;
  --panel: #ffffff;
  --muted: #6b7280;
  --accent: #2456d6;
  --accent-ink: #ffffff;
  --ok: #1a7f37;
  --ok-bg: #e6f6ea;
  --warn: #9a6700;
  --warn-bg: #fff3cf;
  --err: #c0282d;
  --err-bg: #fbe4e4;
  --info: #205493;
  --info-bg: #e3edfa;
  --hover: #f0f2f5;
}

:root[data-theme="dark"] {
  --bg: #16181c;
  --text: #e4e6eb;
  --line: #33363c;
  --panel: #1f2126;
  --muted: #9a9fa6;
  --accent: #5b8dfb;
  --accent-ink: #0b0d10;
  --ok: #3ddc6f;
  --ok-bg: #123a22;
  --warn: #e3b341;
  --warn-bg: #3a2f0c;
  --err: #ff6b6b;
  --err-bg: #3a1414;
  --info: #6fa8ff;
  --info-bg: #122a44;
  --hover: #292c32;
}

a { color: var(--accent); }

/* ---- Layout shell ---- */
.app-shell { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: #14161a; color: #fff; flex: 0 0 auto;
}
.topbar .title { font-weight: 600; font-size: 15px; }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #cfd3da; }
.topbar button.linklike { background: none; border: 0; color: #cfd3da; cursor: pointer; text-decoration: underline; font-size: 13px; }

.body-row { flex: 1 1 auto; display: flex; min-height: 0; }
.col-list { flex: 0 0 420px; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.col-detail { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px; }

.list-toolbar { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.list-toolbar input, .list-toolbar select {
  font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--text);
}
.list-scroll { flex: 1 1 auto; overflow-y: auto; }

.row-item {
  padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.row-item:hover { background: var(--hover); }
.row-item.active { background: var(--info-bg); border-left: 3px solid var(--accent); }
.row-item .ref { font-weight: 600; font-size: 13px; }
.row-item .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.empty-state { padding: 24px; text-align: center; color: var(--muted); }

/* ---- Badges / pills ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--hover); color: var(--text); }
.badge.st-ok { background: var(--ok-bg); color: var(--ok); }
.badge.st-warn { background: var(--warn-bg); color: var(--warn); }
.badge.st-err { background: var(--err-bg); color: var(--err); }
.badge.st-info { background: var(--info-bg); color: var(--info); }

/* ---- Buttons ---- */
button { font: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 13px; font-weight: 500;
}
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .9; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---- Forms ---- */
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--text);
}
textarea { resize: vertical; min-height: 80px; }

/* ---- Tables (Admin analytics: deliberately plain/Excel-like) ---- */
table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain th, table.plain td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.plain th { background: var(--hover); font-weight: 600; position: sticky; top: 0; }
table.plain tr:hover td { background: var(--hover); }

/* ---- Timeline ---- */
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 10px; }
.timeline-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .tl-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.timeline-item .tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timeline-item .tl-note { margin-top: 6px; font-size: 13px; white-space: pre-wrap; background: var(--hover); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.timeline-item .tl-files { margin-top: 6px; font-size: 12px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal {
  background: var(--panel); color: var(--text); border-radius: 6px; padding: 20px; width: 480px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.modal h3 { margin: 0 0 12px; font-size: 16px; }

/* ---- Toast ---- */
.toast {
  background: #1a1d21; color: #fff; padding: 10px 14px; border-radius: 4px; font-size: 13px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: opacity .3s; max-width: 320px;
}
.toast-error { background: var(--err); }
.toast-success { background: var(--ok); }

/* ---- Login ---- */
.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--bg); }
.login-box { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 28px; width: 340px; }
.login-box h1 { font-size: 18px; margin: 0 0 4px; }
.login-box .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.err-text { color: var(--err); font-size: 13px; margin-top: 10px; }

/* ---- KPI cards (Admin) ---- */
.kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kpi-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; min-width: 140px; }
.kpi-card .num { font-size: 22px; font-weight: 700; }
.kpi-card .label { font-size: 12px; color: var(--muted); }

/* ---- Chat (Support Agent + Admin read-only viewer) ---- */
.chat-scroll { flex: 1 1 auto; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.msg.customer { align-self: flex-start; background: var(--hover); }
.msg.agent { align-self: flex-end; background: var(--info-bg); }
.msg .msg-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.composer { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1 1 auto; min-height: 38px; }

.hidden { display: none !important; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 16px; background: var(--panel); }
.tab-btn { padding: 10px 14px; border: none; background: none; font: inherit; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.pager { display: flex; gap: 8px; align-items: center; padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* Product Developer: Customer jobs tab */
.jobs-pane { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.jobs-pane .list-toolbar label { margin: 0; }
.jobs-summary { padding: 6px 16px; font-size: 13px; color: var(--muted); }
.jobs-scroll { flex: 1 1 auto; overflow: auto; padding: 0 16px 16px; }
.jobs-scroll td.orders { max-width: 220px; font-size: 12px; color: var(--muted); }
.jobs-scroll td.times { font-size: 12px; white-space: nowrap; }
.jobs-table td { vertical-align: top; }
#jobsPager { justify-content: center; border-top: 1px solid var(--line); }
.jobs-scroll td.err { color: var(--err); font-size: 12px; max-width: 280px; }
.jobs-scroll .btn-row-inline { display: flex; gap: 6px; white-space: nowrap; }
.jobs-scroll .btn-copy { margin-top: 4px; padding: 2px 8px; font-size: 12px; }

/* Manage products: progress of uploads / Dropbox copies */
.pm-progress { padding: 0 16px; }
.pm-task { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: 13px; display: grid; gap: 6px; }
.pm-task .err { color: var(--err); font-size: 12px; }
.pm-bar { height: 8px; background: var(--hover); border-radius: 4px; overflow: hidden; }
.pm-bar > div { height: 100%; background: var(--accent); transition: width .4s; }

/* Ankh: Amazon customization watch (its own purple look) */
:root { --ankh: #6d28d9; --ankh-soft: #f3efff; --ankh-ink: #ffffff; }
:root[data-theme="dark"] { --ankh: #a78bfa; --ankh-soft: #241c3a; --ankh-ink: #140d24; }
.tab-btn.tab-ankh { color: var(--ankh); font-weight: 700; }
.ankh-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.ankh-pane { background: var(--bg); }
.ankh-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; background: linear-gradient(90deg, #2e1065, #6d28d9); color: #fff; }
.ankh-title { font-size: 20px; font-weight: 800; letter-spacing: .05em; }
.ankh-sub { font-size: 13px; color: #ddd6fe; margin-top: 2px; }
.ankh-run { font-size: 12px; color: #ede9fe; text-align: right; white-space: nowrap; }
.ankh-body { flex: 1 1 auto; display: flex; min-height: 0; }
.ankh-side { width: 300px; flex: 0 0 auto; border-right: 1px solid var(--line); background: var(--panel); overflow: auto; }
.ankh-side-h { padding: 12px 14px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ankh-cust { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ankh-cust.on { background: var(--ankh-soft); }
.ankh-cust-t { flex: 1 1 auto; min-width: 0; display: grid; }
.ankh-cust-t small { color: var(--muted); font-size: 12px; }
.ankh-warn { color: var(--warn); }
.ankh-pill { background: var(--ankh); color: var(--ankh-ink); border-radius: 10px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.ankh-switch { position: relative; width: 36px; height: 20px; flex: 0 0 auto; margin: 0; }
.ankh-switch input { opacity: 0; width: 0; height: 0; }
.ankh-switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--line); cursor: pointer; transition: background .2s; }
.ankh-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ankh-switch input:checked + span { background: var(--ankh); }
.ankh-switch input:checked + span::after { transform: translateX(16px); }
.ankh-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ankh-seg { display: flex; gap: 8px; align-items: center; padding: 12px 16px; flex-wrap: wrap; }
.ankh-seg [data-seen] { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 6px 14px; border-radius: 16px; cursor: pointer; font-weight: 600; }
.ankh-seg [data-seen].active { background: var(--ankh); border-color: var(--ankh); color: var(--ankh-ink); }
.ankh-seg select { margin-left: auto; }
.ankh-list { flex: 1 1 auto; overflow: auto; padding: 0 16px 16px; }
.ankh-card { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ankh); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.ankh-card:hover { background: var(--hover); }
.ankh-card-l { flex: 1 1 auto; min-width: 0; }
.ankh-card-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ankh-asin { font: 700 13px Consolas, monospace; }
.ankh-src { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 9px; background: var(--info-bg); color: var(--info); }
.ankh-src.orders { background: var(--warn-bg); color: var(--warn); }
.ankh-cust-n { font-size: 12px; color: var(--muted); }
.ankh-sum { margin-top: 4px; font-size: 14px; }
.ankh-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ankh-solve { flex: 0 0 auto; border-color: var(--ankh); color: var(--ankh); }
.ankh-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.ankh-glyph { font-size: 44px; color: var(--ankh); margin-bottom: 8px; }
.ankh-modal { max-width: 760px; }
.ankh-modal h3 small { font-weight: 400; color: var(--muted); font-size: 14px; }
.ankh-changes { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.ankh-k { display: inline-block; min-width: 70px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin-right: 6px; }
.ankh-k.added { background: var(--ok-bg); color: var(--ok); }
.ankh-k.removed { background: var(--err-bg); color: var(--err); }
.ankh-k.renamed, .ankh-k.changed { background: var(--warn-bg); color: var(--warn); }
.ankh-det { margin: 2px 0 0 82px; font-size: 12px; color: var(--muted); }
.ankh-diff { width: 100%; font-size: 13px; }
.ankh-diff td { vertical-align: top; width: 50%; }
.ankh-diff small { color: var(--muted); }
.ankh-opts { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ankh-diff .ankh-add { background: var(--ok-bg); }
.ankh-diff .ankh-del { background: var(--err-bg); }
.ankh-diff .ankh-chg { background: var(--warn-bg); }
.ankh-none { color: var(--muted); text-align: center; }
@media (max-width: 800px) { .ankh-body { flex-direction: column; } .ankh-side { width: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); } .ankh-head { flex-direction: column; align-items: flex-start; } .ankh-run { text-align: left; } }

/* Visually hidden but still read by screen readers and still a working <input type=file> */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.file-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-top: 4px; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }

/* My performance + Tester panel */
.perf-wrap { flex: 1 1 auto; overflow: auto; padding: 16px; background: var(--bg); }
.perf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.perf-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.perf-card h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.perf-big { font-size: 34px; font-weight: 800; line-height: 1.1; }
.perf-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.perf-good { color: var(--ok); } .perf-warn { color: var(--warn); } .perf-bad { color: var(--err); }
.perf-bar { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; margin-top: 8px; position: relative; }
.perf-bar > div { height: 100%; border-radius: 4px; }
.perf-bar .perf-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); }
.perf-section { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.perf-section h3 { margin: 0 0 10px; font-size: 15px; }
.perf-months { display: flex; gap: 8px; flex-wrap: wrap; }
.perf-month { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 96px; font-size: 13px; }
.perf-month.ok { border-color: var(--ok); background: var(--ok-bg); }
.perf-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 9px; }
.perf-tag.pass { background: var(--ok-bg); color: var(--ok); }
.perf-tag.fail { background: var(--err-bg); color: var(--err); }
.perf-tag.info { background: var(--info-bg); color: var(--info); }
.perf-tag.warn { background: var(--warn-bg); color: var(--warn); }
.perf-row-x { text-decoration: line-through; color: var(--muted); }
.perf-row-new td { background: rgba(239, 68, 68, .09); }
.perf-row-new td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.perf-new-tag { display: inline-block; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; letter-spacing: .04em; vertical-align: 1px; }
.perf-new-banner { border: 1px solid #ef4444; background: rgba(239, 68, 68, .08); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; line-height: 1.5; }
.perf-statement td:last-child { text-align: right; white-space: nowrap; }
.perf-statement tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
.tester-tabs { display: flex; gap: 8px; padding: 12px 16px 0; flex-wrap: wrap; }
.tester-tabs button { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 14px; border-radius: 16px; cursor: pointer; font-weight: 600; }
.tester-tabs button.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tester-tabs .count { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 6px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; }
.review-choice { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.review-choice label { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.review-choice input { margin: 0; }

/* Road to rewards: reward cards */
.rw-section { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.rw-section-head h3 { margin: 0; font-size: 17px; }
.rw-section-head p { margin: 2px 0 14px; color: var(--muted); font-size: 13px; }
.rw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.rw-card { --rw-a: #b7791f; --rw-b: #f6c453; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.rw-card.rw-bonus { --rw-a: #0f766e; --rw-b: #34d399; }
.rw-card.rw-earned { box-shadow: 0 0 0 2px var(--rw-b), 0 10px 30px rgba(0,0,0,.12); }
.rw-head { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon title pill" "value value value";
  gap: 4px 12px; align-items: center; padding: 16px 18px 14px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 55%), linear-gradient(135deg, var(--rw-a), var(--rw-b)); }
.rw-icon { grid-area: icon; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.rw-title { grid-area: title; min-width: 0; }
.rw-kind { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.rw-title h4 { margin: 1px 0 0; font-size: 17px; font-weight: 800; line-height: 1.2; }
.rw-value { grid-area: value; margin-top: 6px; }
.rw-big { font-size: 30px; font-weight: 900; letter-spacing: -.01em; line-height: 1.1; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.rw-small { font-size: 12px; opacity: .9; margin-top: 2px; }
.rw-pill { grid-area: pill; justify-self: end; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.18); color: #fff; white-space: nowrap; }
.rw-pill-earned { background: #fff; color: var(--rw-a); }
.rw-pill-given { background: rgba(255,255,255,.25); }
.rw-meter { height: 6px; background: var(--hover); }
.rw-meter > div { height: 100%; background: linear-gradient(90deg, var(--rw-a), var(--rw-b)); transition: width .6s; }
.rw-body { padding: 14px 18px 4px; display: grid; gap: 14px; }
.rw-req { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.rw-req li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }
.rw-req li b { display: block; color: var(--text); font-size: 13px; font-weight: 700; }
.rw-req li small { font-size: 12px; }
.rw-dot { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; }
.rw-req li.ok .rw-dot { background: var(--rw-a); border-color: var(--rw-a); color: #fff; }
.rw-track { display: grid; align-items: start; padding: 4px 0 6px; }
.rw-step { position: relative; text-align: center; min-width: 0; }
.rw-step + .rw-step::before { content: ""; position: absolute; top: 15px; right: calc(50% + 17px); left: calc(-50% + 17px); height: 2px; background: var(--line); }
.rw-step.ok + .rw-step.ok::before { background: linear-gradient(90deg, var(--rw-a), var(--rw-b)); }
.rw-node { position: relative; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  border: 2px solid var(--line); color: var(--muted); background: var(--panel); }
.rw-step.ok .rw-node { background: linear-gradient(135deg, var(--rw-a), var(--rw-b)); border-color: transparent; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.rw-step-m { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-step-v { font-size: 12px; color: var(--muted); }
.rw-step-v span { display: block; font-size: 11px; }
.rw-foot { padding: 10px 18px 16px; margin-top: auto; }
.rw-note { font-size: 13px; color: var(--muted); }
.rw-note-ok { color: var(--ok); font-weight: 700; }
.rw-give { width: 100%; justify-content: center; background: linear-gradient(135deg, var(--rw-a), var(--rw-b)); border: 0; color: #fff; font-weight: 800; padding: 10px; }
.rw-received { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rw-received h4 { margin: 0 0 10px; font-size: 14px; }
.rw-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rw-history li { display: flex; gap: 12px; align-items: center; }
.rw-hdot { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #b7791f, #f6c453); }
.rw-hdot svg { width: 18px; height: 18px; }
.rw-history b { margin-right: 8px; }
.rw-hval { font-weight: 800; color: var(--ok); }
.rw-history small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 520px) { .rw-req { grid-template-columns: 1fr; } .rw-grid { grid-template-columns: 1fr; } }

/* ? help buttons and their explanation */
.help-q { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--muted); background: transparent; color: var(--muted); font: 800 11px/1 inherit; cursor: pointer; vertical-align: 1px; }
.help-q:hover, .help-q:focus-visible { border-color: var(--accent); color: #fff; background: var(--accent); outline: none; }
.help-modal { max-width: 560px; }
.help-modal h3 { margin: 0 0 8px; }
.help-lead { font-size: 15px; margin: 0 0 12px; }
.help-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; background: var(--bg); }
.help-box h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.help-box p { margin: 0; font-size: 14px; }
.help-box ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.help-formula { font: 700 15px/1.6 Consolas, monospace; text-align: center; padding: 4px 0 8px; }
.help-tip { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* paused 24-hour clock (the item is with a Programmer) */
.badge.st-muted { background: var(--hover); color: var(--muted); border: 1px dashed var(--line); }

/* Saturday off-day notice (staff pages) */
.offday-notice { display: flex; gap: 12px; align-items: center; padding: 12px 18px; background: var(--ok-bg); color: var(--ok); border-bottom: 1px solid var(--line); font-size: 14px; }
.offday-notice b { font-size: 15px; }
.offday-emoji { font-size: 24px; line-height: 1; }

/* Order Range */
.or-toolbar { flex-wrap: wrap; gap: 8px; }
.or-info { padding: 8px 0; font-size: 13px; color: var(--muted); }
.or-note { padding: 8px 12px; margin-bottom: 8px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.or-table td { vertical-align: top; }
.or-table tr.or-sub td { border-top: 1px dashed var(--line); }
.or-item { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--info); background: var(--info-bg); padding: 0 6px; border-radius: 8px; }
.or-num { font: 700 14px Consolas, monospace; }
.or-amz, .or-asin { font: 13px Consolas, monospace; }
.or-asin.hit { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.or-prod { font-size: 12px; color: var(--ok); font-weight: 600; }
.or-prod.none { color: var(--err); }
.or-title { font-size: 12px; color: var(--muted); max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-copy { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 13px; }
.or-copy:hover { color: var(--accent); }
.or-status { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 9px; background: var(--hover); white-space: nowrap; }
.or-status.s-unshipped { background: var(--info-bg); color: var(--info); }
.or-status.s-shipped { background: var(--ok-bg); color: var(--ok); }
.or-status.s-canceled, .or-status.s-cancelled { background: var(--err-bg); color: var(--err); }
.or-dl { padding: 4px 10px; font-size: 12px; white-space: nowrap; text-decoration: none; }

/* Reporting time bar (product-developer.html, report-in.js) */
.att-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--info-bg); font-size: 14px; }
.att-bar.good { background: var(--ok-bg); }
.att-bar.bad { background: var(--err-bg); }
.att-bar.hidden { display: none; }
.att-notice-kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6b7280); }
.att-notice h3 { margin: 2px 0 8px; }
.att-notice ul { padding-left: 18px; line-height: 1.55; }
