:root { --n0:#070d1f; --n1:#0a1128; --n2:#111b3a; --n3:#1a2650; --line:#24315f; --text:#e9ecf5; --muted:#8a94b8; --red:#d62839; --red2:#ff4a5c; --gold:#f2b632; --green:#2ec27e; --blue:#8fb4ff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--n0); color: var(--text); font: 14px/1.4 Inter, "Segoe UI", system-ui, sans-serif; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.grow { flex: 1; }
button { background: var(--n3); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--red); border-color: var(--red); color: #fff; }
button.primary:hover { background: var(--red2); }
button.good { background: var(--green); border-color: var(--green); color: #04210f; }
button.ghost { background: transparent; }
button.sm { padding: 5px 9px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
input { background: var(--n0); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: none; }
input:focus { border-color: var(--gold); }
input[type=date] { color-scheme: dark; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: var(--n1); border-bottom: 1px solid var(--line); }
.logo { font: 30px/1 "Bebas Neue", Impact, sans-serif; letter-spacing: 1.5px; }
.logo span { color: var(--gold); }
.views, .days, .chips { display: flex; gap: 4px; }
.views button, .days button, .chips button { background: transparent; border-color: transparent; color: var(--muted); }
.views button.on, .days button.on, .chips button.on { background: var(--n3); border-color: var(--line); color: var(--text); }
.views button { font-size: 15px; }
.views b { color: var(--gold); margin-left: 4px; }
#search { width: 180px; margin-left: auto; }
.tog { display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; }
.tog input { accent-color: var(--red); width: 16px; height: 16px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red2); }
.dot.ok { background: var(--green); }

.stats { display: flex; gap: 10px; padding: 12px 18px 0; flex-wrap: wrap; }
.stat { background: var(--n2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; min-width: 120px; }
.stat b { display: block; font: 28px/1 "Bebas Neue", sans-serif; letter-spacing: .5px; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat.new b { color: var(--gold); } .stat.pr b { color: var(--blue); } .stat.pk b { color: var(--green); }

main { padding: 12px 18px 40px; }
.view { display: none; } .view.on { display: block; }
.bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.empty { color: var(--muted); text-align: center; padding: 50px; border: 1px dashed var(--line); border-radius: 12px; }

.thumb { background: repeating-conic-gradient(#2a3563 0 25%, #1d2649 0 50%) 0 0 / 14px 14px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .ext { font: 18px "Bebas Neue", sans-serif; color: var(--muted); }

/* queue */
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.q { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: var(--n2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.q.fresh { animation: fresh 4s ease-out; border-color: var(--gold); }
@keyframes fresh { from { background: rgba(242,182,50,.25); } }
.q .thumb { width: 96px; height: 110px; }
.q .nm { font: 22px/1.05 "Bebas Neue", sans-serif; letter-spacing: .4px; word-break: break-word; }
.q .buyer { font-weight: 700; font-size: 15px; margin-top: 2px; }
.q .meta { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.q .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .3px; vertical-align: 2px; }
.pill.new { background: rgba(242,182,50,.2); color: var(--gold); }
.pill.printed { background: rgba(80,140,255,.2); color: var(--blue); }
.pill.packed { background: rgba(46,194,126,.2); color: var(--green); }
.pill.shipped { background: var(--n3); color: var(--muted); }
.dl { color: var(--green); font-size: 12px; font-weight: 600; }

/* buyer tabs */
.tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
.tab { background: var(--n2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tab.st-ship { border-color: var(--green); }
.tab header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--n3); }
.tab header h2 { margin: 0; font: 26px/1 "Bebas Neue", sans-serif; letter-spacing: .5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab header .sum { text-align: right; color: var(--muted); font-size: 12px; }
.tab header .sum b { display: block; color: var(--gold); font: 22px/1 "Bebas Neue", sans-serif; }
.items { padding: 6px 14px; }
.it { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--n3); }
.it:last-child { border-bottom: 0; }
.it .thumb { width: 50px; height: 50px; }
.it .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it .sub { color: var(--muted); font-size: 12px; }
.it label { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.it input { width: 18px; height: 18px; accent-color: var(--green); }
.tab footer { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.tab footer .row { display: flex; gap: 6px; flex-wrap: wrap; }
.tab footer .row input { flex: 1; min-width: 140px; }
.shipped { color: var(--muted); font-size: 13px; }

.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 50; cursor: zoom-out; padding: 20px; }
.viewer img { max-width: 100%; max-height: 100%; background: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--n3); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
@media (max-width: 700px) { .top { gap: 8px; } #search { width: 100%; } .queue, .tabs { grid-template-columns: 1fr; } }

/* sheet labels */
.labelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lb { background: var(--n2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; position: relative; }
.lb.sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.lb .thumb { height: 110px; }
.lb .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .sub { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.lb .chk { position: absolute; top: 12px; left: 12px; width: 20px; height: 20px; accent-color: var(--gold); }
.lb .done { color: var(--green); font-weight: 600; }
#lSearch { width: 220px; }
.lb .qp { width: 100%; margin-top: 2px; padding: 9px; font-size: 13px; }
.it > div { min-width: 0; }
.tab .showname { padding: 6px 14px; background: var(--n1); color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-bottom: 1px solid var(--line); }

.pill.lot { background: transparent; border: 1px solid currentColor; opacity: .75; }

/* order check-off + shipping label */
.ordchk { width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; background: transparent; color: inherit; opacity: .45; font: 700 18px/1 sans-serif; cursor: pointer; flex: none; padding: 0; }
.ordchk:hover { opacity: .9; }
.ordchk.on { background: #1f9d55; border-color: #1f9d55; color: #fff; opacity: 1; }
.tab.checked { opacity: .72; }
.tab.checked h2 { text-decoration: line-through; text-decoration-thickness: 2px; }
.shiplabel { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 6px 12px; border: 1px dashed currentColor; border-radius: 8px; font-size: 13px; }
.shiplabel .ico { font-size: 18px; }
.shiplabel .grow { flex: 1; min-width: 0; }
.shiplabel .sub { opacity: .7; font-size: 12px; overflow-wrap: anywhere; }
a.btn { text-decoration: none; display: inline-block; background: var(--red); border: 1px solid var(--red); color: #fff; border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
a.btn:hover { background: var(--red2); }
.ordchk.on { background: var(--green); border-color: var(--green); color: #04210f; }
.shiplabel { border-color: var(--line); background: var(--n2); }
#v-tabs .bar select { background: var(--n3); color: var(--text); border: 1px solid var(--line); }
#tCount { color: var(--muted); font-size: 12px; }
#v-tabs .bar select { padding: 6px 8px; border-radius: 8px; }

/* review / change sheet */
.it { grid-template-columns: 50px minmax(0, 1fr) auto auto; }
.itacts { display: flex; gap: 6px; align-items: center; }
button.warnbtn { background: var(--gold); border-color: var(--gold); color: #1d1500; }
.rv { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 60; display: grid; place-items: center; padding: 16px; }
.rvbox { background: var(--n1); border: 1px solid var(--line); border-radius: 14px; width: min(1100px, 100%); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; }
.rvbox header, .rvbox footer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--n2); }
.rvbox h3 { margin: 0; flex: 1; font: 24px/1 "Bebas Neue", sans-serif; letter-spacing: .5px; }
.rvmain { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; padding: 16px; overflow: auto; }
.rvframe { display: flex; flex-direction: column; gap: 10px; }
.rvframe img { width: 100%; border-radius: 10px; background: #000; }
.rvframe .empty { padding: 40px 10px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
a.btn.wide { display: block; text-align: center; padding: 9px 12px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; }
.rvpick input { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--n2); margin-bottom: 10px; }
.rvh { font: 16px "Bebas Neue", sans-serif; letter-spacing: 1px; color: var(--muted); margin: 4px 0 8px; }
.rvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rvc { display: flex; flex-direction: column; gap: 4px; padding: 8px; text-align: left; white-space: normal; background: var(--n2); }
.rvc.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.rvc .thumb { width: 100%; height: 120px; }
.rvn { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rvs { font-size: 11px; color: var(--muted); }
.rvs .hi { color: var(--green); } .rvs .mid { color: var(--gold); } .rvs .lo { color: var(--red2); }
@media (max-width: 760px) { .rvmain { grid-template-columns: 1fr; } }
.osz{font-weight:600;opacity:.75}

.thumb.gift{background:#7c3aed;display:flex;align-items:center;justify-content:center;text-align:center}
.thumb.gift span{color:#fff;font-weight:900;font-size:11px;letter-spacing:.06em;line-height:1.1}
.pill.gift{background:#7c3aed;color:#fff;font-weight:800;letter-spacing:.05em}
.it .nm:has(+ .sub){}

.slide { position: relative; width: 210px; height: 36px; border-radius: 18px; background: var(--n0); border: 1px solid var(--line); overflow: hidden; touch-action: none; user-select: none; cursor: grab; flex: none; }
.slide-fill { position: absolute; inset: 0 auto 0 0; width: 36px; background: rgba(46,194,126,.25); border-radius: 18px; transition: width .2s; }
.slide-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 30px; font-size: 12px; font-weight: 700; color: var(--muted); pointer-events: none; }
.slide-knob { position: absolute; left: 2px; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #000; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: transform .2s; pointer-events: none; }
.slide.dragging .slide-knob, .slide.dragging .slide-fill { transition: none; }
.slide.dragging { cursor: grabbing; }
.slide.armed .slide-knob { background: var(--green); }
.slide.armed .slide-fill { background: rgba(46,194,126,.5); }
.slide.done .slide-knob { background: var(--green); }
@media (max-width: 520px) { .slide { width: 100%; } .shiplabel { flex-wrap: wrap; } }

.mt { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 5px; margin-right: 4px; vertical-align: 1px; }
.mt.ok { background: rgba(46,194,126,.18); color: var(--green); }
.mt.warn { background: rgba(242,182,50,.18); color: var(--gold); }
.mt.bad { background: rgba(214,40,57,.22); color: var(--red2); }
a.pill.lot { color: var(--blue); text-decoration: none; opacity: 1; cursor: pointer; }
a.pill.lot:hover { background: rgba(143,180,255,.15); }

.rev { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; padding: 8px 10px; border: 1px solid var(--red); background: rgba(214,40,57,.12); border-radius: 8px; font-size: 13px; }
.rev .revtxt { flex: 1; min-width: 0; }
.rev .sub { opacity: .75; font-size: 12px; }
.items .rev { margin: 0 12px 8px; }
.pill.revpill { background: var(--red); color: #fff; margin-left: 6px; }
.views button.alert b { color: var(--red2); }
.changes { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; }
.chg { display: flex; gap: 12px; align-items: flex-start; background: var(--n2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.chg .grow { flex: 1; min-width: 0; }
.chg.wasshipped { border-color: var(--red); }
.shippedwarn { color: var(--red2); }
.rev.wait { border-color: var(--gold); background: rgba(242,182,50,.10); }
.rev button:disabled { opacity: .4; cursor: not-allowed; }

.cloudbar { background: var(--red); color: #fff; font-weight: 700; padding: 8px 18px; font-size: 13px; }
.top .logout { color: var(--muted); text-decoration: none; font-size: 13px; margin-left: 4px; }

/* ---------- phones ---------- */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  .top { padding: 8px 12px; position: static; }
  .logo { font-size: 18px; }
  .views, .days, .chips { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .views::-webkit-scrollbar, .days::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .views { order: 3; width: 100%; }
  .days { order: 4; width: 100%; }
  .views button, .days button, .chips button { flex: none; }
  #search { order: 5; width: 100%; margin-left: 0; font-size: 16px; }
  .tog { font-size: 12px; }
  .stats { padding: 10px 12px 0; gap: 6px; }
  .stat { min-width: 0; flex: 1 1 calc(50% - 6px); padding: 6px 10px; }
  main { padding: 10px 12px 40px; }
  .bar select, .bar button { max-width: 100%; }
  .bar select { flex: 1 1 45%; min-width: 0; }
  .queue, .tabs { grid-template-columns: minmax(0, 1fr); }
  .q { grid-template-columns: 72px minmax(0, 1fr); }
  .it { grid-template-columns: 44px minmax(0, 1fr); row-gap: 6px; }
  .it .itacts, .it > label { grid-column: 2; justify-self: start; }
  .tab header { flex-wrap: wrap; row-gap: 4px; }
  .tab header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .rev { flex-wrap: wrap; }
  .rev .revtxt { flex-basis: 100%; }
  .chg { flex-direction: column; }
  .shiplabel { flex-wrap: wrap; }
  .slide { width: 100%; }
  .tab footer .row { flex-wrap: wrap; }
  .tab footer input { min-width: 0; flex: 1 1 100%; font-size: 16px; }
  .cloudbar { padding: 8px 12px; }
}
