:root {
  --bg: #f3f4f6; --card: #fff; --ink: #111827; --muted: #6b7280; --line: #e5e7eb;
  --brand: #d4141c; --accent: #1f2937; --ok: #047857; --okbg: #d1fae5; --err: #b91c1c; --errbg: #fee2e2;
  --warnbg: #fef3c7; --warn: #92400e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: inherit; }
main { max-width: 1280px; margin: 0 auto; padding: 16px; }
h1 { font-size: 26px; margin: 4px 0 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono, code { font-family: ui-monospace, Consolas, monospace; }
.errtext { color: var(--err); }

.top { background: var(--accent); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.brand { font-weight: 900; letter-spacing: 1px; text-decoration: none; font-size: 18px; }
.brand span { color: #fca5a5; font-weight: 600; }
.top nav { margin-left: auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.top nav a { text-decoration: none; opacity: .9; }
.top nav a.sec { font-weight: 700; padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); }
.top nav a.sec.on { background: #fff; color: var(--accent); opacity: 1; text-decoration: none; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 16px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.subnav a { text-decoration: none; color: #374151; padding: 6px 12px; border-radius: 6px; font-weight: 600; }
.subnav a:hover { background: #f3f4f6; }
.subnav a.on { background: #fee2e2; color: #b91c1c; }
.opsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.opsgrid .card { margin: 0; text-decoration: none; color: inherit; display: block; }
.opsgrid .card:hover { border-color: #dc2626; }
.opsgrid .num { font-size: 26px; font-weight: 800; }
.opssec { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #6b7280; }
.top nav a:hover { opacity: 1; text-decoration: underline; }
.who { opacity: .7; font-size: 14px; }
.top .linkbtn { color: #fff; }
.pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .5px; }
.pill.demo { background: #fde68a; color: #78350f; }
.pill.test { background: #fca5a5; color: #7f1d1d; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

.btn { display: inline-block; border: 1px solid #cbd5e1; background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f8fafc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #b91118; }
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.big { padding: 14px 20px; font-size: 18px; }
.btn.sq { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.btn.all { height: 40px; padding: 0 10px; margin-left: 6px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: #2563eb; cursor: pointer; text-decoration: underline; }
.linkbtn.danger { color: var(--err); }
form { margin: 0; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: var(--okbg); color: var(--ok); }
.flash.err { background: var(--errbg); color: var(--err); font-weight: 600; }
.flash.warn { background: var(--warnbg); color: var(--warn); }
.flash.note { background: var(--warnbg); color: var(--warn); font-size: 18px; }
.secret { display: block; margin-top: 6px; padding: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; user-select: all; word-break: break-all; }

.badge { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #e5e7eb; white-space: nowrap; }
.s-new { background: #dbeafe; color: #1e40af; }
.s-picking { background: #fef3c7; color: #92400e; }
.s-booked { background: #ede9fe; color: #5b21b6; }
.s-done { background: var(--okbg); color: var(--ok); }
.s-hold { background: var(--errbg); color: var(--err); }
.s-closed { background: #e5e7eb; color: #374151; }

.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.scan { flex: 1; min-width: 260px; font-size: 20px; padding: 12px 14px; border: 2px solid #94a3b8; border-radius: 10px; width: 100%; margin-bottom: 10px; }
.scan:focus { outline: none; border-color: var(--brand); }
.scan.bad { border-color: var(--err); background: var(--errbg); }
.scan.good { border-color: var(--ok); background: var(--okbg); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 0; flex-wrap: wrap; }
.tab { padding: 10px 14px; text-decoration: none; font-weight: 600; font-size: 1.1em; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-far { margin-left: auto; }
.zh { font-weight: 600; opacity: 0.85; margin-left: 4px; white-space: nowrap; }
.tab.on { color: var(--ink); border-color: var(--brand); }
.tab b { background: #e5e7eb; border-radius: 99px; padding: 0 8px; font-size: 13px; margin-left: 4px; }
.olist { background: var(--card); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.orow { display: grid; grid-template-columns: 110px 1.4fr 200px 1fr 1fr 70px 150px; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); text-decoration: none; }
/* products */
.prow { grid-template-columns: 80px 2fr 120px 140px 220px; }
.pm-photos { display: flex; flex-wrap: wrap; gap: 12px; }
.pm-photos figure { margin: 0; width: 160px; }
.pm-photos img { width: 160px; height: 160px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.pm-photos figcaption { font-size: 12px; word-break: break-all; }
ul.gate { list-style: none; padding: 0; }
ul.gate li { padding: 8px 0; border-top: 1px solid var(--line); }
.gate-ok { color: #15803d; font-weight: 900; } .gate-todo { color: var(--muted); font-weight: 900; } .gate-bad { color: #b91c1c; font-weight: 900; }
form.inline { display: inline-flex; gap: 6px; align-items: center; }
.decide form { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.decide input { flex: 1; min-width: 180px; }
label.upload { display: inline-block; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 8px; cursor: pointer; }
label.upload input { display: block; margin-top: 4px; }
.badge.pst-approved_listing, .badge.pst-live { background: #dcfce7; color: #166534; }
.badge.pst-submitted { background: #fef9c3; color: #854d0e; }
.badge.pst-needs_info, .badge.pst-rejected { background: #fee2e2; color: #991b1b; }
.ophotos { display: flex; gap: 6px; align-items: center; }
.ophotos img { width: 60px; height: 60px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.ophotos .nophoto { width: 60px; height: 60px; display: grid; place-items: center; font-size: 11px; color: var(--muted); background: #f3f4f6; border-radius: 6px; text-align: center; overflow: hidden; }
.ophotos .more { font-weight: 700; color: var(--muted); }
.orow:first-child { border-top: 0; }
.orow:hover { background: #f9fafb; }
.orow small { display: block; color: var(--muted); font-size: 13px; }
.oname { font-weight: 900; font-size: 20px; }
.oage { color: var(--muted); font-size: 14px; }
.note-flag { color: var(--warn) !important; font-weight: 700; }
@media (max-width: 800px) { .orow { grid-template-columns: 1fr 1fr; } }
.card.manifest { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; background: #ede9fe; border-color: #c4b5fd; }
.card.manifest .btn { margin-left: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; z-index: 10; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--err); }
.station-bar { background: #1e3a8a; color: #fff; text-align: center; padding: 8px; font-weight: 600; }
.station-bar button { margin-left: 12px; }
fieldset.areas { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 10px 0; }
form.areas .chk, fieldset.areas .chk { margin: 6px 0; }
.tbl details summary { cursor: pointer; color: #2563eb; }
details.pin input { width: 110px; padding: 6px; font: inherit; border: 1px solid #cbd5e1; border-radius: 6px; }
details.pin form { display: block; margin: 6px 0; }
/* inventory */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chip { padding: 5px 12px; border: 1px solid #cbd5e1; border-radius: 99px; text-decoration: none; font-size: 14px; background: #fff; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.inv-filter .scan { margin-bottom: 0; }
.tbl.inv td { vertical-align: top; }
a.pick, b.pick { font-family: ui-monospace, Consolas, monospace; font-weight: 900; font-size: 17px; text-decoration: none; }
.big { font-size: 20px; font-weight: 900; }
tr.limit { background: var(--errbg); }
.tbl.count input { width: 90px; padding: 8px; font: inherit; border: 1px solid #cbd5e1; border-radius: 6px; }
.tbl.count tr.hit { outline: 3px solid var(--ok); }
/* pick code on the warehouse pick list */
.pickcode { font-family: ui-monospace, Consolas, monospace; font-weight: 900; font-size: 28px; line-height: 1.1; }
.pickvar { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.small-sku { font-size: 13px !important; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk.live { background: var(--warnbg); padding: 10px; border-radius: 8px; }
.empty { padding: 24px; color: var(--muted); text-align: center; }

.ohead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ohead h1 { margin: 0; }
.ohead form { margin-left: auto; }

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines .img { width: 84px; }
.lines img, .noimg { width: 72px; height: 72px; object-fit: contain; border-radius: 6px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.lines .sku { font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 18px; }
.lines .bin { font-weight: 900; font-size: 22px; white-space: nowrap; }
.lines .qty { font-weight: 900; font-size: 24px; text-align: center; }
.lines .pick { white-space: nowrap; }
.pq { display: inline-block; min-width: 40px; text-align: center; font-size: 22px; font-weight: 800; }
tr.line.done { background: #ecfdf5; }
tr.line.done .pq { color: var(--ok); }
tr.line.flashrow { outline: 3px solid var(--ok); }

.pk { table-layout: fixed; }
.pk th { font-size: 11px; padding: 4px; vertical-align: bottom; }
.pk th:first-child { width: 24%; }
.pk th:last-child { width: 24px; }
.pk input, .pk select { width: 100%; min-width: 0; padding: 8px 4px; font: inherit; border: 1px solid #cbd5e1; border-radius: 6px; }
.pk td { padding: 3px; border: 0; }
.chk { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
address { font-style: normal; font-size: 18px; line-height: 1.5; }
.hist { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.hist li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.tbl td { font-size: 14px; }
tr.off { opacity: .5; }
.tbl form { display: inline; margin-right: 10px; }
.inline-form label { display: block; margin: 8px 0; }
.inline-form input:not([type=checkbox]), .inline-form select, textarea, .login input { width: 100%; padding: 10px; font: inherit; border: 1px solid #cbd5e1; border-radius: 8px; margin-top: 4px; }
textarea { font-family: ui-monospace, Consolas, monospace; margin-bottom: 10px; }
.login { max-width: 380px; margin: 60px auto; }
.login label { display: block; margin-bottom: 14px; }
/* card forms (products, add order): label above a full-width field */
form.card label:not(.chk):not(.upload) { display: block; margin: 8px 0; font-weight: 600; }
form.card label:not(.chk):not(.upload) > input:not([type=checkbox]), form.card label > select, form.card label > textarea { display: block; width: 100%; padding: 9px; font: inherit; font-weight: 400; border: 1px solid #cbd5e1; border-radius: 8px; margin-top: 4px; box-sizing: border-box; }
form.card table.pk { width: 100%; table-layout: fixed; }
form.card table.pk input { width: 100%; padding: 6px; font: inherit; border: 1px solid #cbd5e1; border-radius: 6px; box-sizing: border-box; }
.login .btn { width: 100%; }
.warntext { color: #92400e; }
input::placeholder, textarea::placeholder { color: #b6bcc6; font-style: italic; opacity: 1; }
.rrow { grid-template-columns: 260px 2fr 1.4fr 130px; }
img.vthumb { width: 60px; height: 60px; object-fit: contain; vertical-align: middle; border: 1px solid var(--line); border-radius: 4px; }
.sortgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sortcard { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.sortcard.conflict { border-color: #b91c1c; box-shadow: 0 0 0 2px #fecaca; }
.sortcard.done { border-color: #86efac; }
.sortcard img { width: 100%; height: 180px; object-fit: contain; background: #f8fafc; border-radius: 6px; }
.sortcard .vid { display: grid; place-items: center; height: 180px; background: #0f172a; color: #fff; border-radius: 6px; text-decoration: none; font-size: 13px; padding: 8px; text-align: center; }
.sortsel { display: grid; gap: 4px; margin-top: 6px; }
.sortsel label { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.sortsel select { max-width: 60%; }
.conf-high { color: #15803d; font-weight: 700; } .conf-medium { color: #92400e; font-weight: 700; } .conf-low { color: #b91c1c; font-weight: 700; }
table.import td { vertical-align: top; padding: 8px; border-top: 1px solid var(--line); }
.pk.pmv th:last-child { width: auto; }
.pk.pmv th:first-child { width: auto; }

/* Stock input (phone entries checked on the PC) */
.stockin .sphoto { max-width: 220px; max-height: 220px; border-radius: 8px; float: right; margin: 0 0 8px 12px; border: 1px solid var(--line); }
.stockin .big-code { font-size: 1.3em; }
.stockin .btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.stockin form.rej input { padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; }

/* Login on a PC with a fixed sign-in name */
.login .fixed-user { font-size: 1.6em; font-weight: 800; margin: 4px 0 8px; text-transform: capitalize; }

/* eBay: big price changes held for review */
tr.bigchg td { background: #fff4e5; }


/* Two-step sign-in */
.qr { width: 220px; max-width: 70vw; background: #fff; padding: 6px; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; }
.qr svg { width: 100%; height: auto; display: block; }
input.otp { font-size: 1.6em; letter-spacing: 0.2em; width: 9em; text-align: center; font-family: ui-monospace, monospace; }
ol.rcodes { columns: 2; font-size: 1.15em; }

/* eBay messages */
details.conv { border-top: 1px solid var(--line); padding: 8px 0; }
details.conv summary { cursor: pointer; }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.bubble { max-width: 75%; padding: 8px 12px; border-radius: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.bubble.them { background: #f1f5f9; align-self: flex-start; }
.bubble.me { background: #dcfce7; align-self: flex-end; }

/* eBay: AI website suggestions */
td.aisug { min-width: 280px; }
form.sug { border-top: 1px dashed var(--line); padding: 4px 0; }
form.sug:first-child { border-top: 0; }
form.sug .btn { padding: 2px 10px; margin-left: 4px; }

/* Booked Freight: Print and fulfilled */
.orow-pf { display: flex; align-items: stretch; gap: 10px; }
.orow-pf > .orow { flex: 1; min-width: 0; }
.orow-pf > .pf { flex: none; min-width: 170px; font-size: 1.05em; padding: 0 18px; }
small.intl { display: inline-block; background: #fde68a; color: #7c2d12; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; margin-left: 4px; }
@media (max-width: 700px) { .orow-pf { flex-direction: column; } .orow-pf > .pf { min-height: 52px; } }

/* eBay duplicates review */
.dupgrp h3 { margin: 0 0 6px; font-size: 1em; }
.dupgrp.decided { opacity: .8; }
tr.tokeep td { background: #ecfdf5; }
tr.tobeend td { background: #fef2f2; text-decoration: line-through; text-decoration-color: #fca5a5; }

/* eBay builder */
.descprev { max-height: 260px; overflow: auto; border: 1px solid var(--line); padding: 8px; border-radius: 6px; font-size: .9em; background: #fff; }

