:root {
  --bg: #090d12; --panel: #10151c; --panel2: #141a22; --line: #1f2731; --line2: #2a3440;
  --text: #e6edf3; --muted: #8b97a5; --dim: #5d6876;
  --accent: #2dd4bf; --accent-ink: #04201c;
  --ordered: #f5b942; --shipped: #8b7cf6; --ofd: #38bdf8; --delayed: #fb923c; --delivered: #34d399; --canceled: #f87171;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 Inter, system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* layout */
.shell { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.side { background: #0c1117; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 15px; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #6366f1); display: grid; place-items: center; color: #021; font-weight: 800; }
.navlbl { font-size: 10px; letter-spacing: .12em; color: var(--dim); padding: 14px 10px 6px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; border: 0; background: none; text-align: left; width: 100%; }
.nav:hover { background: var(--panel2); color: var(--text); }
.nav.on { background: rgba(var(--accent-rgb),.12); color: var(--accent); }
.nav .badge { margin-left: auto; }
.me { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 8px; border-top: 1px solid var(--line); }
.me .who { overflow: hidden; }
.me .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--panel2); flex: none; object-fit: cover; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--muted); }
.main { padding: 20px 22px 90px; min-width: 0; }

/* hero */
.hero { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: radial-gradient(1200px 300px at 0% 0%, rgba(var(--accent-rgb),.16), transparent 60%), radial-gradient(900px 300px at 100% 100%, rgba(139,124,246,.16), transparent 60%), var(--panel); margin-bottom: 16px; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hero h1 { margin: 0; font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.hero .big { font-family: var(--mono); font-size: 34px; font-weight: 700; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stat { background: rgba(9,13,18,.55); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; }
.stat:hover, .stat.on { border-color: var(--line2); background: rgba(9,13,18,.8); }
.stat.on { outline: 1px solid var(--accent); }
.stat .lbl { font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.stat .num { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-top: 6px; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--panel2); border-radius: 9px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3a4757; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--canceled); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.input { background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 8px 11px; outline: none; }
.input:focus { border-color: var(--accent); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--line2); background: var(--panel2); border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 600; margin-left: 4px; }
.chip.on { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.badge { font-size: 11px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 999px; padding: 1px 7px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--dim); }
.dot.ok { background: var(--delivered); box-shadow: 0 0 8px var(--delivered); }

/* table card */
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.card-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 320px; position: relative; }
.search input { width: 100%; padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--panel); }
th.sorted { color: var(--accent); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tbody tr { cursor: default; }
tbody tr:hover { background: rgba(255,255,255,.02); }
tbody tr.sel { background: rgba(var(--accent-rgb),.08); }
td.ck, th.ck { width: 34px; padding-right: 0; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.prod { display: flex; align-items: center; gap: 10px; max-width: 360px; }
.prod img, .prod .ph { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: #fff; flex: none; }
.prod .ph { background: var(--panel2); }
.prod span { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.addr { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.name { font-weight: 600; }
.retailer { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); border-radius: 999px; padding: 2px 9px 2px 3px; font-size: 12px; }
.retailer i { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fff 0 2.5px, #cc0000 2.5px 4.5px, #fff 4.5px 6px, #cc0000 6px); display: inline-block; }
.member { display: inline-flex; align-items: center; gap: 6px; background: rgba(139,124,246,.12); color: #c4bbff; border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.foot { padding: 10px 14px; color: var(--muted); font-size: 12px; }

/* status progress */
.st { min-width: 150px; }
.st .lbl { font-size: 11.5px; font-weight: 600; margin-bottom: 4px; }
.st .bar { display: flex; align-items: center; }
.st .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex: none; }
.st .bar b { height: 2px; flex: 1; background: var(--line2); }
.st .steps { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--dim); margin-top: 3px; }
.s-ordered { --c: var(--ordered); } .s-shipped { --c: var(--shipped); } .s-out_for_delivery { --c: var(--ofd); }
.s-delayed { --c: var(--delayed); } .s-delivered { --c: var(--delivered); } .s-canceled { --c: var(--canceled); }
.st .lbl { color: var(--c); }
.st .bar .on { background: var(--c); }

/* selection bar + menus */
.selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #18202a; border: 1px solid var(--line2); border-radius: 14px; padding: 8px 10px 8px 16px; display: flex; align-items: center; gap: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.5); z-index: 20; }
.menu { position: fixed; z-index: 50; min-width: 200px; max-height: 70vh; overflow: auto; background: #18202a; border: 1px solid var(--line2); border-radius: 10px; padding: 5px; box-shadow: 0 12px 40px rgba(0,0,0,.55); }
.menu .mi { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 7px; border: 0; background: none; cursor: pointer; }
.menu .mi:hover { background: rgba(255,255,255,.06); }
.menu .mi.danger { color: var(--canceled); }
.menu .sep { height: 1px; background: var(--line2); margin: 4px 2px; }
.menu .hd { font-size: 10px; letter-spacing: .1em; color: var(--dim); padding: 6px 10px 4px; text-transform: uppercase; }
.menu input.input { width: calc(100% - 8px); margin: 4px; padding: 6px 9px; }
.menu label.mi { cursor: pointer; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #18202a; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* pages */
.page-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 18px; }
.panel { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 14px; }
.code { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.list > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list > div:last-child { border-bottom: 0; }
ol.steps-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
ol.steps-list b { color: var(--text); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(800px 400px at 50% 0%, rgba(var(--accent-rgb),.14), transparent 70%), var(--bg); }
.login .box { width: 100%; max-width: 380px; text-align: center; border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 30px 24px; }
.login .logo { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #6366f1); display: grid; place-items: center; color: #021; font-weight: 800; font-size: 20px; }
.discord { background: #5865f2; border-color: #5865f2; color: #fff; font-weight: 600; width: 100%; justify-content: center; padding: 11px; margin-top: 18px; }
.err { color: var(--canceled); margin-top: 12px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px; }
  .side .navlbl, .brand span { display: none; }
  .brand { padding: 0 6px; }
  .nav { width: auto; }
  .me { margin: 0 0 0 auto; border: 0; padding: 0 6px; }
  .main { padding: 14px 16px 90px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- v2: scan, addresses, team ---- */
.badge.warn { background: rgba(251,146,60,.15); border-color: rgba(251,146,60,.4); color: var(--delayed); }
.badge.running, .badge.queued { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); }
.badge.done { color: var(--delivered); }
.badge.failed { color: var(--canceled); }
.avatar.xs { width: 18px; height: 18px; font-size: 9px; }
.avatar.xl { width: 64px; height: 64px; font-size: 24px; }
.member .auto { font-style: normal; font-size: 10px; background: rgba(var(--accent-rgb),.15); color: var(--accent); border-radius: 4px; padding: 0 4px; margin-left: 2px; }
.review { display: inline-block; background: rgba(251,146,60,.12); color: var(--delayed); border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.input.sm { padding: 5px 9px; font-size: 12px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.side-panel { position: sticky; top: 16px; border-color: rgba(var(--accent-rgb),.35); }
.hd2 { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 4px 0 10px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { font-size: 16px; }
.warnbox { border: 1px solid rgba(251,146,60,.35); background: rgba(251,146,60,.08); color: #fcd9b6; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.6; }
.chip.fav { color: #f5c542; border-color: rgba(245,197,66,.35); display: inline-flex; gap: 4px; align-items: center; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rcard { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 9px 10px; cursor: pointer; }
.rcard:hover { border-color: var(--line2); }
.rcard.off { opacity: .55; cursor: default; }
.ricon { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #111; flex: none; }
.rname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 2px; display: grid; }
.star.on { color: #f5c542; }
.hstats { gap: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; display: inline-flex; margin-bottom: 14px; }
.hstats span { padding: 10px 16px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hstats span:last-child { border-right: 0; }
.hstats b { font-size: 18px; margin-right: 6px; color: var(--text); }
.vsep { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-wrap: wrap; }
.toggle input { display: none; }
.toggle .sw { width: 34px; height: 19px; border-radius: 999px; background: var(--line2); position: relative; flex: none; transition: .15s; }
.toggle .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: .15s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { left: 17px; }
.acard { border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; margin-bottom: 8px; }
.ahead { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.chev { color: var(--dim); width: 12px; }
.amain { flex: 1; min-width: 0; }
.astreet { font-weight: 700; }
.astreet.muted { font-style: italic; }
.aright { text-align: right; font-size: 12px; line-height: 1.8; }
.abody { padding: 0 14px 12px; }
.stick { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--delivered); }
.stick span { width: 72px; height: 4px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.stick i { display: block; height: 100%; }
table.inner td, table.inner th { background: transparent; }
tr.arow { cursor: pointer; }
.mrow { flex-direction: column; align-items: stretch !important; }
.rules { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: 38px; }
.rule { display: inline-flex; align-items: center; gap: 6px; background: rgba(var(--accent-rgb),.08); border: 1px solid rgba(var(--accent-rgb),.25); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12px; }
.rule button { border: 0; background: rgba(255,255,255,.06); color: var(--muted); border-radius: 50%; width: 18px; height: 18px; cursor: pointer; line-height: 1; }
.rule button:hover { color: var(--canceled); }
.addrule { margin-left: auto; }
.profile { display: flex; gap: 16px; align-items: center; }
.pname { font-size: 18px; font-weight: 700; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mtile { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 10px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .side-panel { position: static; } }
@media (max-width: 700px) { .rules { padding-left: 0; } .addrule { margin-left: 0; } .ahead { flex-wrap: wrap; } .aright { text-align: left; } }

/* scan progress bar */
.prog { padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.prog-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.prog-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.prog-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s ease; }
.prog-bar.bad i { background: var(--canceled); }
.prog-bar.busy i { animation: progslide 1.2s ease-in-out infinite; }
@keyframes progslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* pagination */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); }
.pager > .dim:first-child { margin-right: auto; }
.pager .chip[disabled] { opacity: .4; pointer-events: none; }

/* right-click member list: small pfp + nickname, scrolls after ~7 people */
.avatar.sm { width: 20px; height: 20px; font-size: 10px; }
.menu .mlist { max-height: 230px; overflow-y: auto; }
.menu .mem { gap: 7px; padding-top: 5px; padding-bottom: 5px; }
.menu .mem b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.menu .mem .dim { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu .hd.mem { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.menu .hd.mem b { color: var(--text); }

/* delivery date under the tracking number */
.eta { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.eta.ok { color: var(--delivered); }
.eta.late { color: var(--delayed); font-weight: 600; }

/* ===================== Midnight glass theme ===================== */
:root {
  --bg: #070b18; --panel: rgba(255,255,255,.045); --panel2: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.13);
  --text: #e8ecff; --muted: #97a3c9; --dim: #5f6a90;
  --accent: #6e93ff; --accent-rgb: 110,147,255; --accent-ink: #fff;
  --ordered: #f5c26b; --shipped: #a78bfa; --ofd: #5ec8ff; --delayed: #ff9f5a; --delivered: #4ade80; --canceled: #ff7a8a;
  --glass: rgba(16,22,44,.55); --pop: rgba(18,24,48,.92);
}
html, body { background: var(--bg); font: 13.5px/1.45 'Inter', system-ui, sans-serif; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 600px at 10% -10%, rgba(59,108,255,.22), transparent 60%),
              radial-gradient(800px 600px at 110% 10%, rgba(139,92,246,.16), transparent 60%),
              radial-gradient(700px 500px at 50% 120%, rgba(56,189,248,.10), transparent 60%); }
.side { background: rgba(10,14,30,.6); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right: 1px solid var(--line); }
.brand .logo, .login .logo { background: linear-gradient(135deg, #3b6cff, #8b5cf6); color: #fff; box-shadow: 0 6px 20px rgba(59,108,255,.35); }
.nav { border-radius: 10px; transition: background .15s, color .15s; }
.nav.on { background: rgba(var(--accent-rgb),.14); color: #b9cbff; box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.25); }
.hero, .card, .panel, .login .box { background: var(--glass); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 50px rgba(0,0,0,.35); }
.hero { border-radius: 20px; background: linear-gradient(135deg, rgba(59,108,255,.14), rgba(139,92,246,.08) 60%, transparent), var(--glass); }
.card { border-radius: 18px; }
.panel { border-radius: 16px; }
.hero h1 { color: #aab6e0; }
.hero .big { font-weight: 600; letter-spacing: -.02em; }
.stat { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s, transform .15s; }
.stat:hover { background: rgba(255,255,255,.08); border-color: var(--line2); transform: translateY(-1px); }
.stat.on { outline: none; border-color: rgba(var(--accent-rgb),.6); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.15); }
.stat .num { font-weight: 600; }
.btn { background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 10px; transition: background .15s, border-color .15s; }
.btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.btn.primary { background: linear-gradient(135deg, #3b6cff, #5b7cff); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(59,108,255,.35); }
.btn.primary:hover { background: linear-gradient(135deg, #4a78ff, #6b89ff); }
.input { background: rgba(255,255,255,.05); border: 1px solid var(--line2); border-radius: 10px; }
.input:focus { border-color: rgba(var(--accent-rgb),.7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.15); }
.chip { background: rgba(255,255,255,.04); border-color: var(--line2); }
.chip:hover { background: rgba(255,255,255,.08); }
.chip.on { color: #c3d3ff; background: rgba(var(--accent-rgb),.16); border-color: rgba(var(--accent-rgb),.55); }
th { background: rgba(14,19,40,.92); color: #8f9bc4; }
th.sorted { color: #b9cbff; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: rgba(255,255,255,.035); }
tbody tr.sel { background: rgba(var(--accent-rgb),.12); }
.prod img, .prod .ph { border-radius: 9px; }
.member { background: rgba(139,92,246,.16); color: #cfc2ff; }
.selbar, .menu, .toast { background: var(--pop); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line2); }
.selbar { border-radius: 16px; }
.menu { border-radius: 12px; }
.menu .mi { border-radius: 8px; }
.menu .mi:hover { background: rgba(var(--accent-rgb),.12); }
.toast { border-radius: 12px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== Graphite grid (greyish black + faint box grid) ===================== */
:root {
  --bg: #0a0a0b; --glass: rgba(22,22,24,.78); --pop: rgba(26,26,29,.96);
  --text: #ececee; --muted: #9b9ba3; --dim: #64646c;
}
body::before { background:
  linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 28px,
  radial-gradient(1000px 600px at 50% -20%, rgba(255,255,255,.05), transparent 70%); }
.side { background: rgba(14,14,16,.85); }
.hero { background: linear-gradient(180deg, rgba(255,255,255,.04), transparent), var(--glass); }
th { background: rgba(20,20,22,.96); color: #8e8e96; }
.hero h1 { color: #a8a8b0; }
html { background: var(--bg); }
body { background: transparent; }

/* dropdowns: dark list with readable text */
html { color-scheme: dark; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select.input option, select.input optgroup { background: #1b1b1e; color: #ececee; }
select.input option:checked { background: #2a3350; color: #fff; }

/* owner / customer view switch (bottom-left) */
.vswitch { margin-top: auto; padding: 10px 4px 8px; display: flex; flex-direction: column; gap: 6px; }
.vswitch + .me { margin-top: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,.05); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 4px; border-radius: 7px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(var(--accent-rgb),.2); color: #c3d3ff; box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.45); }
.vswitch select.input { width: 100%; padding-top: 6px; padding-bottom: 6px; font-size: 12px; }
.pvbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(var(--accent-rgb),.12); border: 1px solid rgba(var(--accent-rgb),.35); color: #c9d6ff; }
.pvbar .btn { margin-left: auto; }
.stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

/* status boxes: make it obvious they're clickable filters */
.stat { position: relative; }
.stat::after { content: 'Show \2192'; position: absolute; right: 12px; bottom: 12px; font-size: 11px; color: var(--muted); opacity: .55; transition: opacity .15s, color .15s; }
.stat:hover::after { opacity: 1; color: rgb(var(--accent-rgb)); }
.stat.on { background: rgba(var(--accent-rgb),.14); }
.stat.on::after { content: '\2713  Showing'; opacity: 1; color: rgb(var(--accent-rgb)); font-size: 10px; }
.stathint { font-size: 12px; color: var(--muted); margin: 0 0 8px 2px; }
.stat.on[data-astatus="all"]::after, .stat.on[data-status="all"]::after, .stat.on[data-mstatus="all"]::after { content: '\2713  Showing'; }

/* drawing wins */
:root { --won: #facc15; }
.s-won { --c: var(--won); }
.s-won .lbl { color: var(--won); font-weight: 600; }

/* "site updated" banner */
#updbar { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 16px; border-radius: 12px; background: #15161a; border: 1px solid rgba(var(--accent-rgb),.5); color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 13px; }

/* member search in menus: hide non-matches (display:flex on .mi overrode [hidden]) */
.menu [hidden] { display: none !important; }

/* pre-orders (ordered, not released yet) */
.s-pre .lbl { color: #5eead4; }

/* customer-view member picker with Discord pfps */
.vspick { width: 100%; display: flex; align-items: center; gap: 7px; padding-top: 6px; padding-bottom: 6px; font-size: 12px; cursor: pointer; text-align: left; }
.vspick span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vspick i { font-style: normal; color: var(--dim); }

/* ---------- deliveries (OrderScrape-style) ---------- */
:root { --d-tr: #f0883e; --d-today: #a3e635; --d-del: #4ade80; --d-late: #f87171; --d-proc: #a1a1aa; --d-can: #6b7280; --d-accent: #f0883e; }
.dseg { display: inline-flex; background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; }
.dseg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 12px; }
.dseg button.on { background: var(--text); color: #0b0b0c; font-weight: 600; }
.dstats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dstats .dim { font-size: 11px; margin-top: 2px; }
.dcard { overflow: hidden; }
.utabs { display: flex; gap: 26px; padding: 4px 18px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.utabs::-webkit-scrollbar { display: none; }
.utabs button { border: 0; background: none; padding: 14px 0 12px; font-size: 15px; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.utabs button span { color: var(--dim); }
.utabs button:hover { color: var(--text); }
.utabs button.on { color: var(--text); border-bottom-color: var(--d-accent); }
.dtool { border-bottom: 1px solid var(--line); }
.dtool select.input { border-radius: 999px; padding: 8px 14px; }
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.ibtn { border: 1px solid var(--line2); background: var(--panel2); border-radius: 6px; padding: 1px 7px; font-size: 11px; cursor: pointer; color: var(--muted); }

/* package row */
.drow { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.dimg { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: #1b1b1e; border: 1px solid var(--line); padding: 3px; flex: none; }
div.dimg { padding: 0; }
.dmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dprod { font-size: 15px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dstat { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 14px; }
.ddate { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.dqty { color: var(--muted); font-size: 13px; }
.dmem { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.dtrk { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.dtrk .mono { color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.cpy, .opn { border: 0; background: none; padding: 2px; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.cpy:hover, .opn:hover { color: var(--text); text-decoration: none; }
.cpy.ok { color: var(--d-del); }
.opn { margin-left: auto; }

/* by address */
.agroups { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.agroup { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.18); }
.ahd { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 14px 18px; cursor: pointer; }
.ahd:hover { background: rgba(255,255,255,.02); }
.achev { color: var(--muted); display: inline-grid; transition: transform .15s; transform: rotate(-90deg); }
.agroup.open .achev { transform: none; }
.aaddr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aaddr b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aaddr > span { color: var(--muted); font-size: 13px; }
.amem { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.acount { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.abody { border-top: 1px solid var(--line); }
.arow { display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 58px; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.ameta { color: var(--muted); font-size: 13px; }
.ameta a { color: var(--muted); font-size: 12px; }
.astat { font-weight: 600; font-size: 14px; white-space: nowrap; flex: none; }

/* calendar */
.calwrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.cal { padding: 14px 16px; border-right: 1px solid var(--line); }
.calhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calhead b { font-size: 16px; min-width: 150px; text-align: center; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wd { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 2px 6px; }
.cell { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; background: rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cell:hover { border-color: var(--line2); }
.cell.other { opacity: .4; }
.cell.today { border-color: var(--d-accent); }
.cell.sel { background: rgba(240,136,62,.08); border-color: var(--d-accent); }
.dn { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.dnw { display: none; }
.cell.today .dn { color: var(--d-accent); font-weight: 700; }
.latedot { width: 7px; height: 7px; border-radius: 50%; background: var(--d-late); box-shadow: 0 0 6px var(--d-late); margin-left: auto; }
.pills { display: flex; flex-direction: column; gap: 3px; }
.pill { font-size: 11px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pill em { font-style: normal; font-weight: 400; opacity: .75; margin-left: 2px; }
.pill.arr { background: rgba(240,136,62,.15); color: var(--d-tr); }
.pill.today { background: rgba(163,230,53,.15); color: var(--d-today); }
.pill.late, .pill.dly { background: rgba(248,113,113,.15); color: var(--d-late); }
.pill.del { background: rgba(74,222,128,.13); color: var(--d-del); }
.pill.can { background: var(--panel2); color: var(--d-can); }
.daypanel { max-height: 780px; overflow-y: auto; }
.dphead { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.dphead .ibtn { margin-left: auto; }

@media (max-width: 1100px) { .calwrap { grid-template-columns: 1fr; } .cal { border-right: 0; border-bottom: 1px solid var(--line); } .daypanel { max-height: none; } }
@media (max-width: 700px) {
  .dstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utabs { gap: 20px; padding: 0 14px; }
  .calgrid { grid-template-columns: 1fr; }
  .wd, .cell:not(.has), .cell.other { display: none; }
  .cell { min-height: 0; flex-direction: row; align-items: center; }
  .dn { min-width: 70px; } .dnw { display: inline; }
  .pills { flex-direction: row; flex-wrap: wrap; }
  .drow { padding: 14px; } .arow { padding: 12px 14px; }
  .agroups { padding: 8px; }
}
.perpage { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 12px; }
.perpage select.input { padding: 4px 8px; font-size: 12px; min-width: 64px; }

/* team: selected customer */
.mrow.sel { background: rgba(124,92,255,.08); border-radius: 10px; }
.mrow input[type=checkbox] { flex: none; }
