/* Preloved Haven app. Same family as the shop (dark, Archivo, square corners, orange), tuned for daily work. */
:root {
  --bg: #0a0a0a; --panel: #121212; --soft: #171717; --sunk: #0f0f0f; --line: #272727; --line2: #3a3a3a;
  --ink: #f4f4f0; --mute: #9b9b95; --dim: #6d6d68; --dk: #0a0a0a;
  --orange: #ff5b1f; --orange-soft: rgba(255, 91, 31, .14);
  --ok: #3fce7d; --ok-soft: rgba(63, 206, 125, .13);
  --warn: #f2b13c; --warn-soft: rgba(242, 177, 60, .13);
  --bad: #ff6a4d; --bad-soft: rgba(255, 106, 77, .13);
  --info: #8ab4ff; --info-soft: rgba(138, 180, 255, .13);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --tab-h: 58px; --sab: env(safe-area-inset-bottom, 0px); --sat: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; }
body { font: 15px/1.45 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.disp { font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: .95; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; border-right: 1px solid var(--line); padding: 22px 12px 14px; display: flex; flex-direction: column; gap: 2px; background: #000; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; font-stretch: 125%; font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: .02em; line-height: 1.1; }
.logo { width: 34px; height: 34px; border-radius: 50%; background: #ff6643; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 10px; flex: none; letter-spacing: 0; font-stretch: 100%; }
.logo.lg { width: 64px; height: 64px; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border: 0; border-left: 3px solid transparent; background: none; text-align: left; color: var(--mute); font-weight: 600; width: 100%; }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav:hover { color: var(--ink); background: var(--soft); }
.nav.on { color: var(--ink); border-left-color: var(--orange); background: var(--soft); }
.nav .badge { margin-left: auto; font-size: 12px; font-weight: 800; background: var(--orange); color: var(--dk); padding: 0 7px; min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.side .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side .links { display: flex; flex-direction: column; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.side .links a { color: var(--mute); text-decoration: none; font-size: 13px; padding: 7px 10px; }
.side .links a:hover { color: var(--ink); }
.side .foot { font-size: 12px; color: var(--dim); padding: 8px 10px 0; }
.side .foot button { background: none; border: 0; padding: 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
main { min-width: 0; padding: 30px 34px 96px; max-width: 1140px; width: 100%; }
.tabbar { display: none; }
@media (max-width: 819px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { padding: calc(14px + var(--sat)) 14px calc(var(--tab-h) + var(--sab) + 84px); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(8, 8, 8, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: var(--sab); }
  .tabbar button { position: relative; border: 0; background: none; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 0; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.on { color: var(--ink); }
  .tabbar button.on::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; background: var(--orange); }
  .tabbar .dot { position: absolute; top: 7px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--orange); color: var(--dk); font-size: 10.5px; font-weight: 800; letter-spacing: 0; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
}

/* ---------- type and common ---------- */
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
h1 { margin: 6px 0 10px; font-size: 40px; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: .95; overflow-wrap: anywhere; }
@media (max-width: 819px) { h1 { font-size: 30px; } }
h2 { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.take { font-size: 17px; margin: 0 0 6px; max-width: 62ch; } .take b { font-weight: 700; color: var(--orange); }
.head-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head-row .grow { flex: 1; min-width: 200px; }
.hdr { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--line2); background: transparent; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--dk); border-color: var(--ink); }
.btn.primary:hover { background: #d6d6d0; border-color: #d6d6d0; }
.btn.accent { background: var(--orange); color: var(--dk); border-color: var(--orange); }
.btn.accent:hover { background: #ff7a45; border-color: #ff7a45; }
.btn.good { background: var(--ok); color: var(--dk); border-color: var(--ok); }
.btn.danger { color: var(--bad); border-color: rgba(255, 106, 77, .45); }
.btn.danger:hover { border-color: var(--bad); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 11px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.refresh { margin-left: auto; }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pill { font-size: 12px; font-weight: 800; padding: 1px 8px; background: var(--orange); color: var(--dk); font-variant-numeric: tabular-nums; }
.pill.zero { background: var(--soft); color: var(--mute); box-shadow: inset 0 0 0 1px var(--line); }
.status { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; white-space: nowrap; background: var(--soft); color: var(--mute); }
.st-Listed, .st-Verified { background: var(--info-soft); color: var(--info); }
.st-Unlisted, .st-Awaiting { background: var(--warn-soft); color: var(--warn); }
.st-Sold, .st-Booked, .st-On { background: var(--ok-soft); color: var(--ok); }
.st-Clearance { background: var(--orange-soft); color: var(--orange); }
.st-Removed { text-decoration: line-through; }
.testtag { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--warn); border: 1px solid var(--warn); padding: 0 4px; margin-left: 6px; vertical-align: middle; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 20px 0 30px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--panel); border: 0; padding: 14px 14px 12px; text-align: left; min-width: 0; display: block; width: 100%; color: inherit; }
button.card:hover { background: var(--soft); }
.card .lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.card .num { font-stretch: 125%; font-weight: 900; font-size: 40px; line-height: 1; margin: 10px 0 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card .num.money { font-size: 26px; font-stretch: 110%; }
.card .sub { font-size: 12px; color: var(--mute); }
.card.hot .num { color: var(--orange); }
.card.clear .num { color: var(--dim); }
.card .delta { font-size: 12px; font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
@media (max-width: 480px) { .card .num { font-size: 34px; } .card .num.money { font-size: 21px; } }

section.block { margin: 0 0 30px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--mute); margin: 0 0 12px; max-width: 70ch; }
.list { background: var(--panel); border: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 60px; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--soft); }
.row.static { cursor: default; } .row.static:hover { background: none; }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .id { color: var(--mute); font-weight: 600; font-size: 12.5px; margin-right: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .detail { font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coderow .detail { white-space: normal; }   /* the discount line wraps instead of hiding the date */
.row .end { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.row .amt { font-weight: 700; }
.row .tag { font-size: 12px; color: var(--mute); }
.tag.late { color: var(--warn); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chip { font-size: 11px; padding: 2px 7px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.chip.next { background: var(--orange-soft); color: var(--orange); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.empty { padding: 18px 14px; color: var(--mute); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.empty::before { content: ""; width: 7px; height: 7px; background: var(--ok); flex: none; }

.thumb { width: 44px; height: 55px; flex: none; background: var(--soft); color: var(--dim); display: grid; place-items: center; font-size: 9px; text-align: center; overflow: hidden; position: relative; }
.thumb img, .tile .ph img, .gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs2 { display: flex; gap: 3px; }

/* toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.search, .inp, select.sel { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--soft); padding: 10px 12px; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.search { flex: 1; min-width: 200px; width: auto; }
select.sel { width: auto; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.inp:focus, .search:focus, select.sel:focus { outline: none; border-color: var(--ink); }
.inp::placeholder, .search::placeholder { color: var(--dim); }
textarea.inp { min-height: 72px; resize: vertical; }
.seg { display: flex; gap: 0; border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; border: 0; border-right: 1px solid var(--line); background: none; min-height: 40px; padding: 6px 13px; font-size: 12px; color: var(--mute); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--dk); }
.seg button .n { font-weight: 600; margin-left: 5px; opacity: .65; font-variant-numeric: tabular-nums; }

/* item grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.tile { background: var(--panel); border: 1px solid var(--line); overflow: hidden; text-align: left; padding: 0; color: inherit; min-width: 0; }
.tile:hover { border-color: var(--line2); }
.tile .ph { aspect-ratio: 4 / 5; display: grid; place-items: center; color: var(--dim); font-size: 12px; position: relative; overflow: hidden; background: var(--soft); }
.tile .ph .status { position: absolute; top: 6px; left: 6px; z-index: 1; background-color: rgba(10, 10, 10, .82); }
.tile .ph .vid, .gal .vid { position: absolute; bottom: 6px; right: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; }
.tile .info { padding: 9px 10px 10px; }
.tile .nm { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.tile .meta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--mute); margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tile .meta b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.tile.test { outline: 1px dashed var(--warn); outline-offset: -1px; }
.more { display: flex; margin: 16px auto 0; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: #101010; z-index: 50; transform: translateX(100%); transition: transform .26s var(--ease); display: flex; flex-direction: column; border-left: 1px solid var(--line); visibility: hidden; }
.sheet.open { transform: none; visibility: visible; }
@media (max-width: 819px) { .sheet { border-left: 0; transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim, .toast, .btn { transition: none; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--sat)) 14px 12px 18px; border-bottom: 1px solid var(--line); background: #000; }
.sheet-head h3 { margin: 0; font-size: 15px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x { border: 1px solid var(--line2); background: none; width: 44px; height: 44px; font-size: 22px; line-height: 1; flex: none; color: var(--ink); }
.sheet-body { overflow-y: auto; padding: 18px; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 18px calc(12px + var(--sab)); border-top: 1px solid var(--line); background: #000; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sheet-foot .grow { flex: 1; }
@media (max-width: 480px) { .sheet-foot .btn { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; } .sheet-foot .grow { display: none; } }

.fieldset { background: var(--panel); border: 1px solid var(--line); padding: 2px 14px; margin-bottom: 14px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--mute); flex: none; }
.kv > span:last-child { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.label { font-size: 11px; font-weight: 800; color: var(--mute); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .14em; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.label .opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.act { border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; text-align: left; font-weight: 700; min-height: 56px; color: inherit; }
.act small { display: block; color: var(--mute); font-weight: 400; font-size: 12px; margin-top: 2px; }
.act.on { border-color: var(--orange); background: var(--orange-soft); }

/* forms */
.f { margin-bottom: 14px; min-width: 0; }
.f label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.f label .req { color: var(--orange); }
.f label .opt { color: var(--mute); font-weight: 400; }
.f2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.f4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .f4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button { border: 1px solid var(--line); background: transparent; border-radius: 999px; min-height: 38px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink); }
.pick button.on { border-color: var(--ink); background: var(--ink); color: var(--dk); }
.collapse { border: 1px solid var(--line); background: var(--panel); margin-bottom: 14px; }
.collapse summary { padding: 13px 14px; cursor: pointer; font-weight: 700; min-height: 44px; }
.collapse .in { padding: 0 14px 8px; }
.note { font-size: 12.5px; color: var(--mute); margin: -6px 0 12px; }
.warnbox, .errbox, .infobox { padding: 11px 12px; font-size: 13.5px; margin-bottom: 14px; border-left: 3px solid; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.errbox { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.infobox { background: var(--soft); color: var(--ink); border-color: var(--orange); }
.infobox p { margin: 0 0 8px; } .infobox p:last-child { margin: 0; }
.listedit .li { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.listedit .li .inp { flex: 1; min-width: 0; }
.settings-row { display: flex; gap: 12px 16px; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.settings-row:last-child { border-bottom: 0; }
.settings-row .t1 { font-weight: 600; } .settings-row .t2 { font-size: 13px; color: var(--mute); }
.settings-row > div:first-child { flex: 1 1 200px; min-width: 0; }
.settings-row > .inp { flex: 1 1 200px; }
.sticky-save { position: sticky; bottom: calc(var(--tab-h) + var(--sab)); background: linear-gradient(transparent, var(--bg) 18px); padding: 20px 0 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; z-index: 5; }
@media (min-width: 820px) { .sticky-save { bottom: 0; } }
.chk { width: 24px; height: 24px; accent-color: var(--orange); flex: none; }

/* switch */
.sw { position: relative; width: 52px; height: 30px; flex: none; border: 1px solid var(--line2); background: var(--soft); padding: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--mute); transition: transform .15s, background .15s; }
.sw[aria-checked=true] { background: var(--orange-soft); border-color: var(--orange); }
.sw[aria-checked=true]::after { transform: translateX(22px); background: var(--orange); }
.sw[disabled] { opacity: .4; }

/* gallery */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-bottom: 10px; }
.gal .g { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); }
.gal .g .ctl { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.gal .g .ctl button { width: 30px; height: 30px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 15px; line-height: 1; }
.gal .g .cov { position: absolute; left: 4px; bottom: 4px; background: var(--orange); color: var(--dk); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 5px; }
.gal .g .bar { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 4px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.gal .g .bar i { display: block; height: 100%; background: var(--orange); width: 0; }
.gal .g .vname { display: grid; place-items: center; height: 100%; font-size: 11px; padding: 6px; text-align: center; word-break: break-all; color: var(--mute); }
.gal .add { border: 1px dashed var(--line2); background: transparent; display: grid; place-items: center; text-align: center; color: var(--mute); font-size: 12px; padding: 6px; }

/* order */
.shot { min-height: 160px; max-height: 420px; background: var(--soft); color: var(--mute); display: grid; place-items: center; text-align: center; font-size: 13px; margin-bottom: 14px; overflow: hidden; }
.shot img { max-width: 100%; max-height: 420px; object-fit: contain; display: block; cursor: zoom-in; }
.steps { display: flex; gap: 6px; margin: 2px 0 16px; flex-wrap: wrap; }
.step { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; background: var(--soft); color: var(--dim); }
.step.done { background: var(--ok-soft); color: var(--ok); }
.step.now { background: var(--orange); color: var(--dk); }
.zoom { position: fixed; inset: 0; background: rgba(0, 0, 0, .95); z-index: 100; display: none; overflow: auto; }
.zoom.on { display: block; }
.zoom img { display: block; max-width: none; width: 100%; height: auto; }
.zoom button { position: fixed; top: calc(12px + var(--sat)); right: 12px; z-index: 2; background: #000; }

/* stats */
.chart { background: var(--panel); border: 1px solid var(--line); padding: 14px; margin-bottom: 14px; position: relative; min-width: 0; }
.chart > h2 { margin-bottom: 10px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.bars .b { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; max-width: 46px; background: var(--line2); min-height: 2px; }
.bars .b.last i { background: var(--orange); }
.bars .b span { font-size: 11px; color: var(--mute); white-space: nowrap; }
.bars .b em { font-style: normal; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bars.dense { gap: 2px; } .bars.dense .b em { display: none; } .bars.dense .b span { font-size: 9.5px; min-height: 12px; }
.bars.dense .b i { max-width: none; }
.fun { display: grid; gap: 8px; }
.fun .fr { display: grid; grid-template-columns: minmax(96px, 140px) minmax(0, 1fr) minmax(70px, auto); gap: 10px; align-items: center; font-size: 13.5px; }
.fun .fr .bar { height: 16px; background: var(--soft); overflow: hidden; } .fun .fr .bar i { display: block; height: 100%; background: var(--orange); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { .two { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-size: 11px; color: var(--mute); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td:first-child { white-space: normal; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; }
.barcell { display: flex; align-items: center; gap: 8px; } .barcell i { height: 8px; background: var(--orange); display: block; }
.countdown { font-stretch: 125%; font-weight: 900; font-size: 50px; line-height: 1; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.readiness { display: flex; height: 8px; overflow: hidden; background: var(--soft); margin: 10px 0 6px; }
.readiness i { display: block; height: 100%; }

/* more page, team, devices */
.menu { background: var(--panel); border: 1px solid var(--line); margin-bottom: 18px; }
.menu .mi { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--ink); text-decoration: none; }
.menu .mi:last-child { border-bottom: 0; }
.menu .mi:hover { background: var(--soft); }
.menu .mi svg { width: 22px; height: 22px; flex: none; color: var(--mute); }
.menu .mi .t1 { font-weight: 700; } .menu .mi .t2 { font-size: 12.5px; color: var(--mute); }
.menu .mi .go { margin-left: auto; color: var(--dim); font-size: 20px; }
.menu .mi.danger .t1 { color: var(--bad); }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.who .av { width: 46px; height: 46px; background: var(--ink); color: var(--dk); display: grid; place-items: center; font-weight: 900; font-stretch: 125%; font-size: 17px; flex: none; }
.codebig { font-stretch: 110%; font-weight: 900; font-size: 30px; letter-spacing: .08em; font-variant-numeric: tabular-nums; padding: 18px 10px; text-align: center; border: 1.5px dashed var(--orange); color: var(--orange); margin: 10px 0 12px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
@media (max-width: 400px) { .codebig { font-size: 24px; } }
.back { background: none; border: 0; padding: 8px 8px 8px 0; min-height: 44px; color: var(--mute); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.back:hover { color: var(--ink); }
@media (min-width: 820px) { .back { display: none; } }

/* sign in */
.signin { position: fixed; inset: 0; z-index: 120; background: var(--bg); display: grid; place-items: center; padding: calc(20px + var(--sat)) 20px calc(20px + var(--sab)); overflow-y: auto; }
.signin-box { width: min(400px, 100%); display: grid; gap: 14px; justify-items: start; }
.signin-box h1 { font-size: 34px; margin: 6px 0 0; }
.signin-box p { margin: 0; }
.code-inp { font-size: 22px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-align: center; min-height: 60px; font-variant-numeric: tabular-nums; }
.code-inp::placeholder { letter-spacing: .12em; font-weight: 600; }
.errline { color: var(--bad); font-size: 13.5px; font-weight: 600; min-height: 1.2em; }

/* floating bits */
.loading { min-height: 70vh; display: grid; place-items: center; color: var(--mute); }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--orange); display: inline-block; vertical-align: middle; }
.spin.s { width: 14px; height: 14px; border-width: 2px; }
@media (prefers-reduced-motion: no-preference) { .spin { animation: rot .8s linear infinite; } @keyframes rot { to { transform: rotate(360deg); } } }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130; overflow: hidden; display: none; }
.topbar.on { display: block; }
.topbar i { position: absolute; top: 0; bottom: 0; width: 30%; background: var(--orange); }
@media (prefers-reduced-motion: no-preference) { .topbar i { animation: slide 1.1s ease-in-out infinite; } @keyframes slide { from { left: -30%; } to { left: 100%; } } }
.ptr { position: fixed; top: calc(8px + var(--sat)); left: 50%; margin-left: -19px; width: 38px; height: 38px; background: #000; border: 1px solid var(--line2); display: grid; place-items: center; z-index: 35; transform: translateY(-70px); opacity: 0; pointer-events: none; }
.ptr.show { opacity: 1; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--sab) + 74px); transform: translateX(-50%) translateY(16px); background: var(--ink); color: var(--dk); padding: 10px 16px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; z-index: 140; pointer-events: none; max-width: calc(100% - 28px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--bad); color: #000; }
@media (min-width: 820px) { .toast { bottom: 84px; } }
.qbar { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--sab) + 12px); transform: translateX(-50%); z-index: 60; display: none; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; background: #000; color: var(--ink); border: 1px solid var(--line2); padding: 9px 14px; font-size: 13px; max-width: calc(100% - 20px); width: max-content; }
.qbar.on { display: flex; }
.qbar.bad { border-color: var(--bad); }
.qbar .qtrack { width: 80px; height: 4px; background: var(--line); overflow: hidden; }
.qbar .qtrack i { display: block; height: 100%; background: var(--orange); transition: width .3s; }
.qbar button { border: 1px solid var(--line2); background: none; min-height: 32px; padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--ink); }
@media (min-width: 820px) { .qbar { bottom: 20px; } }
.upd { position: fixed; left: 50%; top: calc(10px + var(--sat)); transform: translateX(-50%); z-index: 125; display: flex; align-items: center; gap: 12px; background: #000; border: 1px solid var(--orange); padding: 8px 8px 8px 14px; font-size: 13px; font-weight: 700; width: max-content; max-width: calc(100% - 20px); }
.offpill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 4px 8px; }
.offpill::before { content: ""; width: 6px; height: 6px; background: var(--warn); border-radius: 50%; }
.dlg { position: fixed; inset: 0; z-index: 150; display: none; place-items: center; background: rgba(0, 0, 0, .74); padding: 16px; }
.dlg.on { display: grid; }
.dlg .box { background: #131313; border: 1px solid var(--line2); padding: 20px; max-width: 420px; width: 100%; }
.dlg h4 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.dlg p { margin: 0 0 18px; color: var(--mute); font-size: 14px; }
.dlg .btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.install { border: 1px solid var(--line2); background: var(--panel); padding: 14px; margin: 16px 0 0; display: grid; gap: 8px; }
.install .t1 { font-weight: 800; }
.install ol { margin: 0; padding-left: 20px; color: var(--mute); font-size: 14px; }
.install .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.codeline { font-size: 19px; letter-spacing: .14em; font-weight: 800; font-variant-numeric: tabular-nums; }
.offfix { position: fixed; top: calc(8px + var(--sat)); right: 10px; z-index: 36; background: #1d1708; }
.label .opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.app.bare { grid-template-columns: minmax(0, 1fr); } .app.bare .side { display: none; } .app.bare main { max-width: none; }
.coderow { flex-wrap: wrap; }
.coderow .main { flex: 1 1 200px; }
.coderow .end { flex: 0 1 auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
@media (max-width: 600px) { .coderow .end { flex: 1 1 100%; justify-content: flex-start; } }
.step.now { background: transparent; color: var(--orange); box-shadow: inset 0 0 0 1.5px var(--orange); }
.inp[disabled] { opacity: .6; }
