:root {
  --bg: #141826; --panel: #1d2234; --panel-2: #242a40; --line: #2f3651;
  --fg: #e6e9f2; --muted: #8b93ad; --accent: #4f8cff; --ship: #f2a541;
  --ok: #3ccf91; --bad: #ff6b6b; --warn: #f2c94c;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans', Inter, system-ui, sans-serif;
  --r: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { padding: 64px; background: radial-gradient(1000px 500px at 0% 0%, #4f8cff22, transparent), var(--panel); display: flex; flex-direction: column; justify-content: center; gap: 18px; border-right: 1px solid var(--line); }
.auth-hero h1 { font-size: 40px; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
.auth-hero p { color: var(--muted); font-size: 16px; max-width: 460px; margin: 0; }
.auth-hero ul { color: var(--muted); padding-left: 18px; margin: 8px 0 0; }
.auth-hero li { margin: 6px 0; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; width: 100%; max-width: 400px; }
.card h2 { margin: 0 0 4px; font-size: 22px; }
.card .sub { color: var(--muted); margin: 0 0 20px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; outline: none; }
.input:focus { border-color: var(--accent); }
select.input { width: auto; padding: 7px 10px; background: var(--panel-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 7px 12px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: #46507a; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.block { width: 100%; padding: 10px; }
.btn:disabled { opacity: .6; cursor: default; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo i { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.logo i svg { width: 17px; height: 17px; }
.logo b { color: var(--accent); font-weight: 700; }

/* ---------- dashboard ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 20px 24px 80px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--line); }
.nav a { color: var(--muted); padding: 5px 10px; border-radius: 6px; font-size: 13px; }
.nav a:hover { background: var(--panel); color: var(--fg); text-decoration: none; }
.nav a.on { color: var(--fg); background: var(--panel-2); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.bar .lbl, .lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bar .range { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.banner { background: #f2c94c14; border: 1px solid #f2c94c55; color: var(--warn); padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.tile .v { font-family: var(--mono); font-size: 24px; font-weight: 600; margin: 6px 0 4px; letter-spacing: -.02em; }
.tile .s { font-size: 12px; color: var(--muted); }
.tile.prod { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.tile.prod .lbl { grid-column: 1 / -1; }
.tile.prod img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; }
.tile.prod .t { font-size: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
h2.sec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; font-weight: 600; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; min-width: 0; scroll-margin-top: 60px; }
.panel > .ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel h3 { margin: 0; font-size: 16px; }
.panel .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.kv td:last-child { text-align: right; font-family: var(--mono); }
.kv tr.total td { background: var(--panel-2); font-weight: 600; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tools .input[type=search] { width: 260px; }
.tools .count { font-size: 12px; color: var(--muted); }

.tw { overflow: auto; max-height: 620px; border-top: 1px solid var(--line); }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
table.t th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 500; font-size: 12px; cursor: pointer; user-select: none; z-index: 1; }
table.t th.n, table.t td.n { text-align: right; font-family: var(--mono); }
table.t tr:hover td { background: #ffffff06; }
table.t tr.tot td { background: var(--panel-2); font-weight: 600; }
.pc { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; min-width: 300px; max-width: 460px; white-space: normal; }
.pc img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; }
.pc .t { font-weight: 500; line-height: 1.3; }
.pc .ids { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.pc .ids b { color: var(--fg); font-weight: 400; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--panel-2); color: var(--muted); }
.pill.ok { background: #3ccf9122; color: var(--ok); } .pill.bad { background: #ff6b6b22; color: var(--bad); }
.pill.warn { background: #f2c94c22; color: var(--warn); } .pill.ship { background: #f2a54122; color: var(--ship); } .pill.acc { background: #4f8cff22; color: var(--accent); }
.cell-in { width: 100px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; font-family: var(--mono); font-size: 12px; }
.cell-in.wide { width: 170px; font-family: var(--sans); }
.chart svg { width: 100%; height: 220px; display: block; }
.chart .b { fill: var(--accent); opacity: .85; } .chart .b:hover { opacity: 1; }
.chart .ax { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.drop { display: block; border: 1px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 10px; }
.drop:hover { border-color: var(--accent); }
.drop b { color: var(--fg); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--panel-2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px; z-index: 50; max-width: 380px; }
.note { font-size: 12px; color: var(--muted); margin-top: 8px; }

@media (max-width: 980px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-hero h1 { font-size: 28px; }
  .wrap { padding: 12px 16px 60px; }
  .tools .input[type=search] { width: 100%; }
  .tile .v { font-size: 20px; }
}

/* ---------- product links, copy buttons ---------- */
.pc img[data-prod], .tile.prod img[data-prod] { cursor: pointer; }
a.t { color: var(--fg); display: block; }
a.t:hover { color: var(--accent); text-decoration: underline; }
.tile.prod a.t { font-size: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc .ids { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.pc .ids .id { display: inline-flex; align-items: center; gap: 4px; }
.cp { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 2px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; vertical-align: middle; }
.cp:hover { background: var(--panel-2); color: var(--fg); }
.amz { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid #f2a54166; border-radius: 6px; color: var(--ship); font-family: var(--sans); font-size: 11px; font-weight: 600; }
.amz:hover { background: #f2a5411a; text-decoration: none; }

/* ---------- product popup ---------- */
body.noscroll { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 40; background: #0a0d16cc; display: flex; justify-content: center; align-items: flex-start; padding: 24px 16px; overflow-y: auto; }
.modal-box { width: 100%; max-width: 1140px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: 0 20px 60px #0008; }
.m-head { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: start; margin-bottom: 14px; }
.m-head img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; }
.m-head h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-end; }
.facts span { display: block; font-size: 11px; color: var(--muted); }
.facts b { font-family: var(--mono); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; }
.x-btn { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; line-height: 1; padding: 0; }
.x-btn:hover { color: var(--bad); border-color: var(--bad); }
.x-btn.big { width: 34px; height: 34px; font-size: 18px; color: var(--fg); }
.panel.inner { margin-bottom: 14px; }
.panel h4 { margin: 0 0 2px; font-size: 14px; }
.panel h4 + .desc { margin-bottom: 10px; }
#pm-batches h4 { margin-top: 18px; }
.tw.short { max-height: 320px; }
.btn.sm { padding: 4px 12px; font-size: 12px; }
.input.sm { width: 100px; }
.add-batch { margin: 10px 0 0; }
.add-batch .input[type=date] { width: auto; }
.cog-in { width: 90px; text-align: right; }
@media (max-width: 760px) {
  .m-head { grid-template-columns: 52px 1fr auto; }
  .m-head img { width: 52px; height: 52px; }
  .modal { padding: 8px; }
  .modal-box { padding: 12px; }
}

/* ---------- claims ---------- */
.need { color: var(--warn); font-size: 11px; margin-top: 4px; }
.until { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }
.acc-t { color: var(--accent); }
.claim-btns { display: grid; gap: 5px; justify-items: stretch; }
.note-box { border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); }
.note-box b { margin-right: 4px; }
.ok-box { border-color: #3ccf9188; background: #3ccf910f; } .ok-box b { color: var(--ok); }
.warn-box { border-color: #f2c94c88; background: #f2c94c0f; } .warn-box b { color: var(--warn); }
.acc-box { border-color: #4f8cff88; background: #4f8cff0f; } .acc-box b { color: var(--accent); }
.steps { margin: 6px 0 0; padding-left: 20px; line-height: 1.8; }
.claim-text { width: 100%; resize: vertical; font-size: 13px; line-height: 1.5; }
.inv-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.m-head h3 .cp { vertical-align: -3px; }
.st-lbl { font-size: 11px; font-weight: 600; text-align: center; }
.claude-box { border-color: #4f8cff88; }
.claude-box code { font-family: var(--mono); background: var(--panel-2); padding: 2px 6px; border-radius: 4px; color: var(--fg); margin-left: 4px; }
/* units into FBA chart + expandable shipments */
.chart .ln { fill: none; stroke: var(--ship); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .dt { fill: var(--ship); }
.chart .hit { fill: transparent; } .chart .hit:hover { fill: #ffffff0d; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.lg.lb { background: var(--accent); } .lg.ll { background: var(--ship); height: 3px; vertical-align: 3px; }
.xpw { display: flex; gap: 8px; align-items: flex-start; }
.xp { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 5px; width: 22px; height: 22px; line-height: 1; cursor: pointer; flex: none; font-size: 11px; }
.xp:hover { color: var(--fg); border-color: var(--accent); }
tr.sub > td { background: var(--panel-2); padding: 8px 12px 12px 42px; }
.sub-t { width: 100%; font-size: 12px; }
/* segmented tabs, catalog mix */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.mix { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 4px 0 12px; }
.mix span { min-width: 3px; }
.mix-lg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.mix-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
#sell .panel, #brands .panel { margin-bottom: 16px; }
.rb-grid { margin: 0 0 16px; align-items: start; }
.rb-months { max-height: 420px; overflow: auto; }
.rb-h { margin: 6px 0 10px; font-size: 14px; }
/* themes (picked in the header, saved per browser) */
:root[data-theme="midnight"] { --bg: #0b0c10; --panel: #13151b; --panel-2: #1b1e26; --line: #262a35; --fg: #e8e9ee; --muted: #8a8f9e; --accent: #7c8cff; }
:root[data-theme="ocean"] { --bg: #0d1b22; --panel: #12252e; --panel-2: #183039; --line: #22404b; --fg: #e3f1f4; --muted: #86a6b0; --accent: #2bb8c9; }
:root[data-theme="forest"] { --bg: #111a15; --panel: #17231c; --panel-2: #1e2d24; --line: #2a3d31; --fg: #e5efe8; --muted: #8ea597; --accent: #3fbf7f; --ok: #6ee7a8; }
:root[data-theme="plum"] { --bg: #18121f; --panel: #21192b; --panel-2: #2a2036; --line: #3a2d4a; --fg: #efe8f5; --muted: #a596b5; --accent: #b07cff; }
:root[data-theme="light"] { --bg: #f4f6fb; --panel: #ffffff; --panel-2: #eef1f7; --line: #dde2ec; --fg: #1c2233; --muted: #616a82; --accent: #2f6fe8; --ship: #c9781a; --ok: #13915b; --bad: #d23f3f; --warn: #a87c00; }
:root[data-theme="light"] .modal { background: #1c223366; }
:root[data-theme="light"] .modal-box { box-shadow: 0 20px 60px #0003; }
:root[data-theme="light"] .chart .hit:hover { fill: #0000000a; }
:root[data-theme="sand"] { --bg: #f6f1e9; --panel: #fffdf8; --panel-2: #f0e8db; --line: #e2d7c5; --fg: #2b2620; --muted: #776c5e; --accent: #c2631d; --ship: #b5762a; --ok: #2f8a4f; --bad: #c43d33; --warn: #9a7300; }
:root[data-theme="sand"] .modal { background: #2b262066; }
#theme { padding: 4px 8px; font-size: 12px; }
/* P&L drill-downs */
.kv tr.ddr { cursor: pointer; } .kv tr.ddr:hover td { background: var(--panel-2); }
.ddc { display: inline-block; width: 14px; color: var(--muted); font-size: 10px; }
.kv tr.ddx > td { background: var(--panel-2); padding: 8px 10px 10px 20px; text-align: left; font-family: var(--sans); }
.dd-src { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.dd-t { width: 100%; border-collapse: collapse; font-size: 12px; }
.dd-t td { padding: 4px 2px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.dd-t td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 10px; }
.ref { color: var(--accent); } .ref:hover { text-decoration: underline; }
/* full-width layout: tables fit the screen instead of scrolling sideways */
.wrap { max-width: 1360px; padding-left: 20px; padding-right: 20px; }
table.t { font-size: 12.5px; }
table.t th, table.t td { padding: 7px 7px; }
table.t th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
table.t th.n { min-width: 56px; }
.pc { min-width: 220px; max-width: 340px; grid-template-columns: 38px 1fr; gap: 8px; }
.pc img { width: 38px; height: 38px; }
.pc .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 1700px) { table.t { font-size: 13px; } .pc { max-width: 420px; -webkit-line-clamp: 3; } }
table.t td:not(.n) { white-space: normal; max-width: 380px; overflow-wrap: anywhere; }
table.t td .mono, table.t td .pill, table.t td .btn, table.t td .ref, table.t td .amz { white-space: nowrap; overflow-wrap: normal; }
.grid2 > *, .rb-grid > * { min-width: 0; }
.rb-grid table.t { table-layout: fixed; }
.rb-grid table.t th:first-child, .rb-grid table.t td:first-child { width: 45%; }
#claims-t td input { max-width: 130px; }
/* arrange sections */
.nav a.arr { margin-left: auto; color: var(--accent); }
.arr-box { max-width: 520px; margin-top: 40px; }
.arr-list { list-style: none; margin: 0; padding: 0; }
.arr-list li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.arr-list li.off .arr-l { color: var(--muted); text-decoration: line-through; }
.arr-n { width: 22px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.arr-l { flex: 1; font-weight: 500; }
.arr-v { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; margin-right: 6px; }
.btn.sm[disabled] { opacity: .35; cursor: default; }
.tile .v { overflow-wrap: anywhere; }
.tiles .tile[draggable="true"] { cursor: grab; }
.tiles .tile.dragging { opacity: .45; outline: 2px dashed var(--accent); cursor: grabbing; }
.tiles .tile { transition: transform .12s ease, opacity .12s ease; }
.tiles .tile.dragging { transform: scale(.97); }
.tiles .tile img { -webkit-user-drag: none; user-select: none; }
/* skip layout/paint work for sections that are off screen: keeps dragging and scrolling smooth */
.wrap > section:not(#overview) { content-visibility: auto; contain-intrinsic-size: auto 900px; }
/* account health */
.ah { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: 18px; }
.ah-score { background: var(--panel-2); border-radius: var(--r); padding: 16px; }
.ah-score .lbl { display: flex; justify-content: space-between; align-items: center; }
.ah-v { font-family: var(--mono); font-size: 40px; font-weight: 600; margin: 6px 0 10px; }
.ah-bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); }
.ah-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ok); }
.ah-bar span.warn { background: var(--warn); } .ah-bar span.bad { background: var(--bad); }
.ah-bar i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--panel-2); }
.ah-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ah-ticks span { position: absolute; top: 2px; }
.ah-ticks span:nth-child(2), .ah-ticks span:nth-child(3) { transform: translateX(-50%); }
.ah-issues { border: 1px solid var(--line); border-radius: var(--r); }
.ah-h { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.ah-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--fg); font-size: 13px; }
.ah-row:last-child { border-bottom: 0; } .ah-row:hover { background: var(--panel-2); text-decoration: none; }
.ah-c { font-family: var(--mono); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.ah-dot { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }
@media (max-width: 800px) { .ah { grid-template-columns: 1fr; } }
.pnl-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
/* purchases */
.pu-p { max-width: 320px; } .pu-p a { color: var(--fg); } .pu-p a:hover { color: var(--accent); }
.pu-st { width: auto; font-family: var(--sans); }
.ap-box { max-width: 760px; margin-top: 30px; }
.ap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; }
.ap-grid .wide { grid-column: 1 / -1; }
.fl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.fl .input { width: 100%; }
.ap-sum { background: var(--panel-2); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
@media (max-width: 700px) { .ap-grid { grid-template-columns: 1fr; } }
/* regions */
.rg-tools { gap: 10px; }
.rg-map { position: relative; margin: 6px 0 14px; background: var(--panel-2); border-radius: var(--r); padding: 8px; min-height: 120px; }
.rg-svg { width: 100%; height: auto; display: block; max-height: 520px; }
.rg-svg path { fill: var(--panel); stroke: var(--line); stroke-width: .6; cursor: pointer; transition: fill-opacity .15s; }
.rg-svg path:hover { stroke: var(--fg); stroke-width: 1.2; }
.rg-legend { position: absolute; right: 14px; bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.rg-legend i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, transparent), var(--accent)); }
.rg-tip { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 12px; pointer-events: none; box-shadow: 0 6px 20px #0006; }
.rg-flag { margin-right: 8px; font-size: 15px; }
.rg-why { font-size: 12px; color: var(--muted); margin: 2px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rg-why b { color: var(--fg); font-weight: 600; }
.tile .v { white-space: nowrap; overflow-wrap: normal; font-size: clamp(18px, 1.55vw, 24px); }
.tile.fc { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
/* aged inventory */
.ag-chart { margin: 8px 0 12px; }
.ag-svg { width: 100%; max-height: 300px; display: block; }
.ag-svg .gl { stroke: var(--line); } .ag-svg .ax { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.ag-svg .ag-x { text-anchor: middle; }
.ag-svg .ag-v { fill: var(--fg); font-size: 13px; font-weight: 600; text-anchor: middle; font-family: var(--mono); }
.ag-bar { cursor: pointer; } .ag-bar .hit { fill: transparent; } .ag-bar:hover .hit { fill: #ffffff08; }
.ag-bar .b { fill: var(--accent); opacity: .55; } .ag-bar.old .b { fill: var(--warn); } .ag-bar.on .b { opacity: 1; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ok-box { border-color: #3ccf9155; background: #3ccf910f; }
/* sales + live orders */
.lv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.lv-grid > .panel { margin: 0; }
.lv-card { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.lv-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lv-big { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 8px; }
.lv-n { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--ok); } .lv-n.ok { color: var(--ok); }
.lv-big > div:first-child .lv-n { color: var(--fg); }
.lv-cmp { font-size: 12px; display: grid; gap: 2px; margin-left: auto; }
#lv-c svg { width: 100%; height: 220px; display: block; }
#lv-c .b { fill: var(--ok); opacity: .8; } #lv-c .b.lv-best { fill: var(--accent); opacity: 1; } #lv-c .b:hover { opacity: 1; }
#lv-c .gl { stroke: var(--line); } #lv-c .ax { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.lv-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.lv-m { border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); border-radius: var(--r); padding: 9px 10px; min-width: 0; }
.lv-m .v { font-family: var(--mono); font-size: 18px; font-weight: 600; margin: 3px 0; white-space: nowrap; } .lv-m .v.ok { color: var(--ok); }
.lv-m .s { font-size: 11px; color: var(--muted); }
.lv-days { display: flex; gap: 22px; text-align: right; } .lv-n2 { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.lv-days .s { font-size: 11px; color: var(--muted); }
#lv-t .tw { max-height: 360px; } .lv-title { max-width: 300px; }
@media (max-width: 1100px) { .lv-grid { grid-template-columns: 1fr; } }
.lv-grid { align-items: start; }
#lv-t table.t td:not(.n) { max-width: 260px; } #lv-t .lv-title { max-width: 260px; }
.lv-pr { display: grid; grid-template-columns: 40px 1fr; gap: 9px; align-items: center; }
.lv-pr img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; cursor: pointer; }
.lv-noimg { width: 40px; height: 40px; border-radius: 6px; background: var(--panel-2); display: block; }
#lv-t table.t td:not(.n) { max-width: 300px; }
/* at a glance */
.gl-top .gl-k { border-left: 3px solid var(--line); }
.gl-k.c1 { border-left-color: var(--accent); } .gl-k.c2 { border-left-color: var(--ship); } .gl-k.c3 { border-left-color: var(--ok); }
.gl-k.c4 { border-left-color: #6c8cff; } .gl-k.c5 { border-left-color: var(--warn); } .gl-k.c6 { border-left-color: #ff6b9a; }
.gl-panel { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.gl-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.gl-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; background: var(--panel); }
.gl-h { padding: 10px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.gl-h b { font-size: 15px; } .gl-h .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.c-today .gl-h { background: color-mix(in srgb, var(--ok) 28%, var(--panel)); }
.c-yest .gl-h { background: color-mix(in srgb, #a67cff 28%, var(--panel)); }
.c-mtd .gl-h { background: color-mix(in srgb, #2bb8c9 28%, var(--panel)); }
.c-last .gl-h { background: color-mix(in srgb, var(--muted) 22%, var(--panel)); }
.c-pace { border: 1px dashed var(--warn); } .c-pace .gl-h { background: color-mix(in srgb, var(--warn) 22%, var(--panel)); }
.gl-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.gl-b { padding: 10px 12px; flex: 1; }
.gl-b > .lbl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .gl-b > .lbl span span { text-transform: none; letter-spacing: 0; }
.gl-sales { font-family: var(--mono); font-size: 24px; font-weight: 700; margin: 2px 0 8px; }
.gl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.gl-grid .lbl { font-size: 10px; } .gv { font-family: var(--mono); font-size: 13px; font-weight: 600; margin-top: 1px; }
.gl-note { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.35; }
.gl-more { margin: 0 12px 12px; border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); }
@media (max-width: 1200px) { .gl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gl-cards { grid-template-columns: 1fr; } }
/* where inventory is */
.wh-tot { text-align: right; } .wh-big { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ok); }
table.wh tr.wh-r { cursor: pointer; } table.wh tr.tot td { font-weight: 700; }
table.wh tr.wh-child td { font-size: 11.5px; color: var(--muted); padding-top: 3px; padding-bottom: 3px; }
table.wh tr.wh-sep td { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--panel-2); }
.wh-sh { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.wh-bar { flex: 1; height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; } .wh-bar i { display: block; height: 100%; border-radius: 4px; }
.wh-pc { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 34px; text-align: right; }
.b-green { background: var(--ok); } .b-blue { background: var(--accent); } .b-teal { background: #2bb8c9; } .b-purple { background: #a67cff; } .b-amber { background: var(--warn); }
/* sales by brand, profit waiting */
.sb-sh { position: relative; min-width: 90px; height: 16px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.sb-sh i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--ok) 55%, transparent); } .sb-sh span { position: relative; font-size: 11px; font-family: var(--mono); padding-left: 6px; }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .pc-grid > .panel { margin: 0 0 16px; }
.pw-r { display: grid; grid-template-columns: 140px 1fr 90px 40px; gap: 10px; align-items: center; padding: 5px 0; }
.pw-r .s { font-size: 11px; } .pw-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; } .pw-bar i { display: block; height: 100%; border-radius: 4px; }
.pw-v { font-family: var(--mono); font-weight: 700; text-align: right; } .pw-p { font-family: var(--mono); font-size: 11px; text-align: right; }
/* inbound shipping */
.is-k { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
#is-c svg { width: 100%; height: 230px; display: block; } #is-c .gl { stroke: var(--line); } #is-c .ax { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
/* returns */
.rt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 6px; }
#rt-c svg { width: 100%; height: 210px; } #rt-c .gl { stroke: var(--line); } #rt-c .ax { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.rt-w { margin: 7px 0; } .rt-wl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; } .rt-wl .muted { font-family: var(--mono); font-size: 11px; }
.rt-wb { height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; } .rt-wb i { display: block; height: 100%; background: var(--bad); border-radius: 4px; }
@media (max-width: 900px) { .pc-grid, .rt-grid { grid-template-columns: 1fr; } }
table.heat td { transition: background .2s; }
.bw-k { display: inline-block; min-width: 260px; margin-bottom: 10px; } .bw-k.worst { border-color: var(--bad); } .bw-k.best { border-color: var(--ok); }
/* streamer mode: hide what identifies products, keep every number */
.nav a.strm { margin-left: auto; color: var(--muted); } .nav a.strm + .arr { margin-left: 0; }
.nav a.strm.on { color: #fff; background: var(--bad); }
html.streamer .pc img, html.streamer .pc .t, html.streamer .pc .ids, html.streamer .pc .amz,
html.streamer .tile.prod img, html.streamer .tile.prod .t,
html.streamer .lv-pr img, html.streamer .lv-title, html.streamer .lv-pr .muted,
html.streamer .pu-p, html.streamer .pu-p + .muted, html.streamer #pu-t td:nth-child(9),
html.streamer a[href*="amazon.com/dp/"], html.streamer .cp, html.streamer [data-prod],
html.streamer #inv-t td:not(.n), html.streamer #claims-t td:nth-child(1), html.streamer #claims-t td:nth-child(10),
html.streamer .head .meta > :first-child, html.streamer .rg-why .pill,
html.streamer .modal-box h3 .mono, html.streamer td.mono-sku {
  filter: blur(6px); pointer-events: none; user-select: none;
}
html.streamer .head .meta { color: transparent; text-shadow: 0 0 8px var(--muted); }
html.streamer .head .meta select, html.streamer .head .meta button { color: var(--fg); text-shadow: none; }
html.streamer .pc img, html.streamer .lv-pr img, html.streamer .tile.prod img { filter: blur(10px) grayscale(.4); }
html.streamer #pu-t td:nth-child(11), html.streamer .dd-t a.t, html.streamer .dd-t a.t + .muted { filter: blur(6px); pointer-events: none; user-select: none; }
.rb-sum .tiles.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rb-sum .tile .v { font-size: clamp(20px, 2vw, 28px); }
@media (max-width: 760px) { .rb-sum .tiles.wide { grid-template-columns: 1fr 1fr; } }
/* globe */
.gb-wrap { position: relative; display: flex; justify-content: center; }
canvas.gb { display: block; cursor: grab; touch-action: none; } canvas.gb:active { cursor: grabbing; }
.gb-feed { position: absolute; left: 12px; top: 10px; font-size: 12px; background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 210px; backdrop-filter: blur(4px); }
.gb-f { margin-top: 4px; white-space: nowrap; } .gb-f b { font-family: var(--mono); color: var(--ok); } .gb-f .muted { font-size: 10px; }
.gb-hint { position: absolute; left: 12px; bottom: 10px; font-size: 11px; color: var(--muted); }

/* average sale price */
.asp-big { display: flex; gap: 34px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 12px; }
.asp-n { font-size: 34px; font-weight: 800; font-family: var(--mono); line-height: 1.1; }
.asp-d { font-size: 22px; font-weight: 700; font-family: var(--mono); } .asp-d.up { color: #38bdf8; }
.asp-big .s, .asp-g .s { font-size: 12px; color: var(--muted); }
.asp-g { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 10px; } .asp-v { font-size: 18px; font-weight: 700; font-family: var(--mono); }
.asp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.asp-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--c); background: transparent; color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.asp-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.asp-chip.off { opacity: .45; border-color: var(--line); } .asp-chip.off i { background: transparent; border: 1.5px solid var(--c); }
#asp-tr.on { border-color: var(--ok); color: var(--ok); }
/* inventory value / age bars */
.iv-r { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 90px; gap: 14px; align-items: center; padding: 6px 0; }
.iv-l b { font-size: 13px; } .iv-l .s, .iv-v .s { font-size: 11px; color: var(--muted); }
.iv-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; } .iv-bar i { display: block; height: 100%; border-radius: 99px; }
.iv-v { text-align: right; font-family: var(--mono); } .iv-v b { font-size: 13px; }
/* line charts with hover read-out */
.lc { position: relative; } .lc svg { cursor: crosshair; }
.lc-x { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.lc-tip { position: absolute; pointer-events: none; background: var(--panel, #111827); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 170px; box-shadow: 0 6px 20px rgba(0,0,0,.35); z-index: 3; }
.lc-tip b { display: block; margin-bottom: 4px; } .lc-tip div { display: flex; justify-content: space-between; gap: 14px; } .lc-tip div span:last-child { font-family: var(--mono); }
.lc-tip i, .lc-lg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.lc-lg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 640px) { .iv-r { grid-template-columns: 1fr 70px; } .iv-bar { grid-column: 1 / -1; order: 3; } }
html.streamer .iv-l b { filter: none; }
/* sales rank categories */
.sr-cat { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid #f472b6; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sr-cat span { font-size: 10px; color: #f472b6; } .sr-cat.on { background: color-mix(in srgb, #f472b6 18%, transparent); }
.fc-g { min-width: 34px; text-align: center; font-weight: 700; }
/* FedEx deliveries */
.fx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.fx-tile { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2, transparent); color: var(--text); font: inherit; cursor: pointer; }
.fx-tile b { font-size: 20px; font-family: var(--mono); } .fx-tile span:last-child { grid-column: 2; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fx-tile.on { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset; }
.fx-dot { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); } .fx-dot.ok { background: var(--ok); } .fx-dot.bad { background: var(--bad); } .fx-dot.pur { background: #8b5cf6; }
.fx-x { padding: 6px 4px; font-size: 13px; } .fx-x > div { margin-bottom: 8px; }
@media (max-width: 760px) { .fx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* expected deliveries */
.dl-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.dl-day { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.dl-day b { font-size: 30px; font-family: var(--mono); line-height: 1.1; } .dl-day .s { font-size: 12px; color: var(--muted); }
.dl-day.on { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset; }
.dl-c { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.dl-c i, .dl-tag { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.dl-fedex { background: #4d148c33; color: #a78bfa; } .dl-ups { background: #ffb50033; color: #fbbf24; } .dl-usps { background: #33366733; color: #60a5fa; } .dl-ontrac { background: #f9731633; color: #fb923c; }
@media (max-width: 760px) { .dl-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dl-from { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.dl-src { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }

/* product popup: sales activity */
.pa { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-top: 4px; }
.pa-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pa-top h4 { margin: 0 0 2px; font-size: 16px; }
.pa-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pa-ctl .input { width: auto; padding: 6px 10px; font-size: 13px; }
.pa-seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
.pa-seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.pa-seg button:hover { color: var(--fg); }
.pa-seg button.on { background: var(--panel-2); color: var(--fg); box-shadow: 0 1px 2px #0004; }
.pa-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 14px; }
.pa-kpi { padding: 12px 14px; min-width: 0; }
.pa-kpi + .pa-kpi { border-left: 1px solid var(--line); }
.pa-kpi > span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.pa-kpi b { display: block; font-size: 20px; font-weight: 700; margin: 3px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.pa-kpi em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pa-kpi em i { font-style: normal; color: var(--muted); }
.pa-chart { margin-bottom: 14px; }
.pa-lg { display: flex; gap: 16px; font-size: 12px; margin-bottom: 6px; align-items: center; }
.pa-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pa-lg i.s { background: var(--accent); } .pa-lg i.p { background: var(--ok); border-radius: 50%; }
.pa-lg .muted { margin-left: auto; }
.pa-chart svg { width: 100%; height: 230px; display: block; overflow: visible; }
.pa-chart .gl { stroke: var(--line); stroke-dasharray: 3 4; }
.pa-chart .ax { fill: var(--muted); font-size: 11px; }
.pa-b .hit { fill: transparent; }
.pa-b .bar { fill: var(--accent); opacity: .85; transition: opacity .12s; }
.pa-b.now .bar { fill: color-mix(in srgb, var(--accent) 55%, #fff); }
.pa-b:hover .hit { fill: color-mix(in srgb, var(--fg) 6%, transparent); }
.pa-b:hover .bar { opacity: 1; }
.pa-pl { fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.pa-pd { fill: var(--panel); stroke: var(--ok); stroke-width: 1.8; vector-effect: non-scaling-stroke; pointer-events: none; }
.pa-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; margin-bottom: 14px; }
.pa-box { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; min-width: 0; }
.pa-bh { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.pa-q { width: 190px !important; padding: 5px 9px !important; font-size: 12.5px; }
.pa-tw { max-height: 380px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.pa-tw.flat { max-height: none; }
.pa-tw::-webkit-scrollbar { width: 6px; height: 6px; } .pa-tw::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; } .pa-tw::-webkit-scrollbar-track, .pa-tw::-webkit-scrollbar-corner { background: transparent; }
.pa-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.pa-t th { position: sticky; top: 0; z-index: 1; background: var(--bg); text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pa-t td { padding: 9px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); vertical-align: middle; }
.pa-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pa-t tbody tr:hover td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.pa-t tbody tr:last-child td { border-bottom: 0; }
.pa-t tfoot td { position: sticky; bottom: 0; background: var(--panel-2); font-weight: 700; border-top: 1px solid var(--line); }
.pa-t tr.dim td { opacity: .5; }
.pa-t .nw { white-space: nowrap; }
.pa-t .sm, .pa .sm { font-size: 11.5px; }
.pa-cell { position: relative; display: inline-flex; justify-content: flex-end; min-width: 96px; padding: 2px 6px 6px; }
.pa-cell i { position: absolute; right: 6px; bottom: 0; height: 3px; max-width: calc(100% - 12px); background: var(--accent); opacity: .75; border-radius: 3px; }
.pa-cell span { position: relative; }
.pa-idw { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pa-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; display: block; }
.pa-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pa-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pa-st.shipped i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.pa-st.pending i { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.pa-st.cancelled i { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.pa-mcol { width: 26%; }
.pa-meter { height: 6px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin-bottom: 4px; }
.pa-meter i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 50%, transparent), var(--ok)); }
@media (max-width: 980px) { .pa-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pa-kpi:nth-child(4) { border-left: 0; } .pa-kpi:nth-child(n+4) { border-top: 1px solid var(--line); } .pa-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .pa { padding: 12px; } .pa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pa-kpi:nth-child(odd) { border-left: 0; } .pa-kpi:nth-child(4) { border-left: 1px solid var(--line); } .pa-kpi:nth-child(n+3) { border-top: 1px solid var(--line); } .pa-q { width: 130px !important; } .pa-mcol { display: none; } }

/* "Your cards" drawer */
.yc-wrap { position: fixed; inset: 0; z-index: 60; }
.yc-scrim { position: absolute; inset: 0; background: #05070dcc; opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.yc { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -20px 0 60px #0007; transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.yc-wrap.in .yc-scrim { opacity: 1; } .yc-wrap.in .yc { transform: none; }
.yc-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg)); }
.yc-logo { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.yc-logo svg { width: 22px; height: 22px; }
.yc-ht { flex: 1; min-width: 0; }
.yc-ht h3 { margin: 0 0 4px; font-size: 19px; }
.yc-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.yc-x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer; }
.yc-x:hover { border-color: var(--accent); }
.yc-tools { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.yc-tools .input { flex: 1; padding: 8px 11px; }
.yc-tools .muted { font-size: 12px; white-space: nowrap; }
.yc-body { flex: 1; overflow-y: auto; padding: 14px 18px 18px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.yc-sh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.yc-sh span { font-weight: 500; text-transform: none; letter-spacing: 0; }
.yc-top { margin-bottom: 16px; }
.yc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.yc-chip { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 11.5px; font-weight: 600; line-height: 1.25; cursor: grab; user-select: none; touch-action: none; }
.yc-chip:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.yc-g { margin-bottom: 10px; }
.yc-gh { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.yc-gh:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.yc-g.open .yc-gh { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.yc-car { color: var(--muted); font-size: 11px; transition: transform .15s; }
.yc-g.open .yc-car { transform: rotate(90deg); }
.yc-gi { display: grid; place-items: center; color: var(--accent); } .yc-gi svg { width: 18px; height: 18px; }
.yc-gh b { flex: 1; font-size: 14.5px; }
.yc-cnt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.yc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0 4px; }
.yc-card { position: relative; display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 8px 8px 8px 4px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; user-select: none; transition: border-color .12s, background .12s, opacity .12s, box-shadow .12s; }
.yc-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.yc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.yc-grip { flex: none; width: 16px; display: grid; place-items: center; color: var(--muted); opacity: .55; cursor: grab; touch-action: none; }
.yc-grip svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.yc-card:hover .yc-grip { opacity: 1; }
.yc-ci { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.yc-ci svg { width: 16px; height: 16px; }
.yc-cl { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.yc-eye { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.yc-eye svg { width: 16px; height: 16px; }
.yc-eye:hover { border-color: var(--accent); color: var(--accent); }
.yc-card.off { opacity: .5; border-style: dashed; }
.yc-card.off .yc-cl { text-decoration: line-through; }
.yc-card.off .yc-eye { color: var(--muted); }
.yc-card.lift, .yc-chip.lift { position: relative; z-index: 5; opacity: .95; box-shadow: 0 14px 34px #000a; border-color: var(--accent); cursor: grabbing; transition: none; }
.yc-card.target, .yc-chip.target { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); box-shadow: inset 0 0 0 1px var(--accent); }
.yc-wrap.dragging, .yc-wrap.dragging * { cursor: grabbing !important; }
.yc-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg); }
.yc-foot .primary { margin-left: auto; }
@media (max-width: 400px) { .yc-cards { grid-template-columns: 1fr; } }
@media (hover: none) { .yc-grip { opacity: 1; width: 22px; } .yc-grip svg { width: 18px; height: 18px; } }

/* profitability */
.pf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pf-head h3 { margin: 0 0 2px; }
.pf-ctl, .pf-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-ctl .input, .pf-bar .input { width: auto; padding: 6px 10px; font-size: 13px; }
.pf-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pf-kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.pf-kpi > span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.pf-kpi b { display: block; font-size: 21px; margin: 3px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.pf-kpi em { font-style: normal; font-size: 11.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-kpi.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 16%, var(--bg)), var(--bg) 70%); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.pf-flow { margin-bottom: 14px; }
.pf-fh { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; } .pf-fh .muted { font-size: 11.5px; }
.pf-stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--bg); }
.pf-stack i { min-width: 3px; transition: filter .12s; } .pf-stack i:hover { filter: brightness(1.25); }
.pf-stack .fee, .pf-lg .fee { background: #f87171; } .pf-stack .oth, .pf-lg .oth { background: #c084fc; } .pf-stack .cogs, .pf-lg .cogs { background: #f2a541; }
.pf-stack .nc, .pf-lg .nc { background: #64748b; } .pf-stack .pro, .pf-lg .pro { background: var(--ok); }
.pf-lg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.pf-lg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pf-lg b { color: var(--fg); margin-left: 3px; }
.pf-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.pf-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.pf-ch { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; } .pf-ch .muted { font-size: 11.5px; margin-left: auto; }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; } .pf-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); } .pf-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.pf-mini { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 8px; cursor: pointer; }
.pf-mini:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.pf-mini img, .pf-mini .pf-noimg { width: 34px; height: 34px; border-radius: 7px; object-fit: contain; background: #fff; flex: none; }
.pf-mt { flex: 1; min-width: 0; font-size: 12.5px; } .pf-mt .muted { font-size: 11px; }
.pf-mini > b { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.pf-tt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); font-weight: 600; }
a.pf-tt:hover { color: var(--accent); }
.pf-bar { margin-bottom: 10px; }
.pf-bar .pa-seg button span { margin-left: 6px; font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 6px; }
.pf-bar .pa-seg button.on span { background: var(--panel); }
.pf-q { flex: 1; min-width: 180px; }
.pf-tw { border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 720px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.pf-tw::-webkit-scrollbar { width: 7px; height: 7px; } .pf-tw::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; } .pf-tw::-webkit-scrollbar-track, .pf-tw::-webkit-scrollbar-corner { background: transparent; }
.pf-tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 980px; }
.pf-tbl th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; white-space: nowrap; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line); }
.pf-tbl th:hover, .pf-tbl th.sorted { color: var(--fg); }
.pf-arr { margin-left: 4px; color: var(--accent); }
.pf-tbl td { padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); vertical-align: middle; }
.pf-tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-tbl tbody tr { transition: background .1s; }
.pf-tbl tbody tr:hover td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.pf-tbl tbody tr td:first-child { box-shadow: inset 3px 0 0 transparent; }
.pf-tbl tbody tr.win td:first-child { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 70%, transparent); }
.pf-tbl tbody tr.loss td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.pf-tbl tbody tr.nocost td:first-child { box-shadow: inset 3px 0 0 var(--line); }
.pf-tbl tfoot td { position: sticky; bottom: 0; background: var(--panel-2); font-weight: 700; border-top: 1px solid var(--line); padding: 11px 12px; }
.pf-tbl .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pf-p { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 340px; }
.pf-p img, .pf-p .pf-noimg { width: 48px; height: 48px; border-radius: 9px; object-fit: contain; background: #fff; flex: none; cursor: pointer; border: 1px solid var(--line); }
.pf-noimg { background: var(--panel-2) !important; }
.pf-pt { min-width: 0; flex: 1; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.pf-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-tag.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pf-tag .cp { transform: scale(.85); }
.pf-tag.sup { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pf-tag.amzl { color: var(--ship); border-color: color-mix(in srgb, var(--ship) 40%, var(--line)); }
.pf-rb { height: 4px; border-radius: 3px; background: var(--bg); margin-top: 5px; overflow: hidden; margin-left: auto; width: 90px; }
.pf-rb i { display: block; height: 100%; margin-left: auto; background: var(--accent); border-radius: 3px; }
.pf-m { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pf-mb { width: 64px; height: 4px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.pf-mb i { display: block; height: 100%; border-radius: 3px; }
.pf-m.ok span { color: var(--ok); } .pf-m.ok i { background: var(--ok); }
.pf-m.warn span { color: var(--warn); } .pf-m.warn i { background: var(--warn); }
.pf-m.bad span { color: var(--bad); } .pf-m.bad i { background: var(--bad); }
.pf-roi { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.pf-roi.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pf-roi.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pf-roi.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pf-more { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; } .pf-more .muted { font-size: 12px; }
@media (max-width: 1100px) { .pf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-duo { grid-template-columns: 1fr; } .pf-p { min-width: 230px; } }

/* left menu */
#nav.nav { position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 45; display: flex; flex-direction: column; gap: 0; flex-wrap: nowrap; margin: 0; padding: 0; background: var(--panel); border-right: 1px solid var(--line); border-bottom: 0; transform: translateX(-100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
body.side-open #nav.nav { transform: none; box-shadow: 8px 0 30px #0003; }
body .wrap { transition: margin-left .22s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 901px) { body.side-open .wrap { margin-left: calc(248px + max(0px, (100vw - 248px - 1380px) / 2)); max-width: 1380px; } }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.logo.sm { font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.sb-x { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.sb-x:hover { border-color: var(--accent); color: var(--accent); }
.sb-x svg { width: 16px; height: 16px; }
.sb-body { flex: 1; overflow-y: auto; padding: 10px 10px 16px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sb-g { margin-bottom: 4px; }
.sb-gh { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; border-radius: 7px; text-align: left; }
.sb-gh:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.sb-gh > span:nth-child(2) { flex: 1; }
.sb-gi { display: grid; place-items: center; color: var(--accent); } .sb-gi svg { width: 15px; height: 15px; }
.sb-car { font-size: 10px; transition: transform .15s; }
.sb-g.open .sb-car { transform: rotate(90deg); }
.sb-links { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px 18px; margin-left: 7px; border-left: 1px solid var(--line); }
.sb-g.open .sb-links { display: flex; }
#nav .sb-links a { display: block; padding: 6px 10px; border-radius: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
#nav .sb-links a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
#nav .sb-links a.on { color: var(--fg); background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 600; }
#nav .sb-links a.on::before { content: ''; position: absolute; left: -19px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent); }
.sb-foot { border-top: 1px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
#nav .sb-act { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--fg); margin: 0; }
#nav .sb-act svg { width: 16px; height: 16px; color: var(--accent); }
#nav .sb-act:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
#nav .sb-act.strm.on { background: var(--bad); color: #fff; } #nav .sb-act.strm.on svg { color: #fff; }
.sb-tg { position: fixed; top: 12px; left: 12px; z-index: 44; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px #0004; transition: opacity .15s; }
.sb-tg:hover { border-color: var(--accent); }
.sb-tg svg { width: 18px; height: 18px; }
body.side-open .sb-tg { opacity: 0; pointer-events: none; }
body:not(.side-open) .wrap > .head { padding-left: 96px; }
.sb-scrim { display: none; }
@media (max-width: 900px) {
  body.side-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: #05070dbb; }
  #nav.nav { width: min(280px, 86vw); }
  body:not(.side-open) .wrap > .head { padding-left: 86px; }
}

/* purchase log grid (spreadsheet style) */
.pg-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.pg-tools .input { width: auto; padding: 6px 10px; font-size: 13px; }
.pg-q { flex: 1; min-width: 200px; }
.pg-count { font-size: 12px; color: var(--muted); }
.pg-save { font-size: 12px; font-weight: 600; min-width: 60px; } .pg-save.ok { color: var(--ok); } .pg-save.bad { color: var(--bad); }
.pg-hint { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; } .pg-hint b { color: var(--fg); font-weight: 600; }
.pg-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 72vh; background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.pg-wrap::-webkit-scrollbar { width: 8px; height: 8px; } .pg-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; } .pg-wrap::-webkit-scrollbar-track, .pg-wrap::-webkit-scrollbar-corner { background: transparent; }
.pg { border-collapse: separate; border-spacing: 0; font-size: 12.5px; table-layout: fixed; width: max-content; min-width: 100%; }
.pg th { position: sticky; top: 0; z-index: 3; background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); border-right: 1px solid color-mix(in srgb, var(--line) 70%, transparent); white-space: nowrap; cursor: pointer; user-select: none; }
.pg th:hover, .pg th.sorted { color: var(--fg); }
.pg th.num, .pg td.num { text-align: right; }
.pg td { border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-right: 1px solid color-mix(in srgb, var(--line) 50%, transparent); padding: 0; height: 32px; background: var(--bg); }
.pg tbody tr:hover td { background: color-mix(in srgb, var(--fg) 3%, var(--bg)); }
.pg .pg-rn { position: sticky; left: 0; z-index: 2; width: 44px; min-width: 44px; text-align: center; color: var(--muted); font-size: 11px; background: var(--panel); border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pg th.pg-rn { z-index: 4; background: var(--panel-2); }
.pg-in { width: 100%; height: 32px; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 12.5px; padding: 0 8px; border-radius: 0; }
.pg-in.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pg td.num .pg-in { text-align: right; font-variant-numeric: tabular-nums; }
.pg-in:focus { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); position: relative; z-index: 1; }
.pg-in[type="date"] { color-scheme: dark; }
:root[data-theme="light"] .pg-in[type="date"], :root[data-theme="sand"] .pg-in[type="date"] { color-scheme: light; }
.pg-in::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.pg td.calc { padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); background: color-mix(in srgb, var(--panel) 45%, var(--bg)); white-space: nowrap; }
.pg td.calc.ok { color: var(--ok); } .pg td.calc.bad { color: var(--bad); }
select.pg-in { cursor: pointer; font-weight: 600; font-size: 12px; appearance: auto; }
select.pg-in option { background: var(--panel); color: var(--fg); }
.pg-st.st-delivered, .pg-st.st-pickedup { color: var(--ok); }
.pg-st.st-ordered, .pg-st.st-back-ordered, .pg-st.st-partial-delivered { color: var(--warn); }
.pg-st.st-cancelled, .pg-st.st-lost, .pg-st.st-returned, .pg-st.st-refunded { color: var(--bad); }
.pg-st.st-not-reconciled { color: #c084fc; }
.pg tr.dim td:not(.pg-rn):not(.pg-x) { opacity: .55; }
.pg tr.saved td { background: color-mix(in srgb, var(--ok) 12%, var(--bg)) !important; transition: background .6s; }
.pg tr.err td { background: color-mix(in srgb, var(--bad) 14%, var(--bg)) !important; }
.pg-x { width: 52px; min-width: 52px; text-align: center; }
.pg-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 6px; opacity: 0; }
.pg tr:hover .pg-del { opacity: 1; } .pg-del:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.pg tr.pg-new td { background: color-mix(in srgb, var(--ok) 7%, var(--bg)); border-bottom: 2px solid color-mix(in srgb, var(--ok) 45%, var(--line)); }
.pg tr.pg-new .pg-rn { color: var(--ok); font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
.pg tr.pg-new .pg-in::placeholder { color: var(--muted); }
.pg-add { border: 0; background: var(--ok); color: #06240f; font-weight: 700; font-size: 11.5px; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.pg tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--panel-2); font-weight: 700; padding: 0 8px; height: 34px; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg tfoot td.pg-rn { z-index: 3; }
html.streamer .pg .pg-in[data-k="title"], html.streamer .pg .pg-in[data-k="asin"], html.streamer .pg .pg-in[data-k="model_sku"], html.streamer .pg .pg-in[data-k="order_id"], html.streamer .pg .pg-in[data-k="link"] { filter: blur(5px); }
.pg-in[list]::-webkit-calendar-picker-indicator { display: none !important; }
.pg th { touch-action: none; }
.pg-grip { display: inline-block; margin-right: 5px; opacity: 0; font-size: 10px; letter-spacing: -2px; color: var(--muted); cursor: grab; transition: opacity .12s; }
.pg th:hover .pg-grip { opacity: .8; }
@media (hover: none) { .pg-grip { opacity: .6; } }
#pu-grid.col-drag, #pu-grid.col-drag th { cursor: grabbing !important; user-select: none; }
.pg th.col-lift { background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); color: var(--fg); }
.pg th.drop-l { box-shadow: inset 3px 0 0 var(--accent); }
.pg th.drop-r { box-shadow: inset -3px 0 0 var(--accent); }
[hidden] { display: none !important; }

/* purchase grid: excel behaviours */
.pg th { padding: 0; position: sticky; }
.pg-th { display: flex; align-items: center; gap: 2px; padding: 8px 4px 8px 8px; min-width: 0; }
.pg th.num .pg-th { justify-content: flex-end; }
.pg-tl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pg-fb { flex: none; margin-left: auto; width: 20px; height: 20px; border-radius: 5px; border: 1px solid transparent; background: none; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pg th.num .pg-fb { margin-left: 4px; }
.pg-fb:hover { border-color: var(--line); background: var(--bg); color: var(--fg); }
.pg-fb.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.pg-rz { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 5; }
.pg-rz:hover, #pu-grid.resizing .pg-rz:hover { background: color-mix(in srgb, var(--accent) 60%, transparent); }
#pu-grid.resizing, #pu-grid.resizing * { cursor: col-resize !important; user-select: none; }
#pu-grid { outline: none; }
#pu-grid.selecting, #pu-grid.selecting * { user-select: none; cursor: cell; }
.pg td.sel { background: color-mix(in srgb, var(--accent) 16%, var(--bg)) !important; }
.pg td.sel-t { box-shadow: inset 0 2px 0 var(--accent); } .pg td.sel-b { box-shadow: inset 0 -2px 0 var(--accent); }
.pg td.sel-t.sel-b { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.pg td.sel-l { border-left: 2px solid var(--accent); } .pg td.sel-r { border-right: 2px solid var(--accent); }
.pg td.sel-cur { outline: 2px solid var(--accent); outline-offset: -2px; }
.pg tr.row-sel td.pg-rn { background: var(--accent); color: #fff; }
.pg tbody td.pg-rn[data-r] { cursor: e-resize; } .pg tbody td.pg-rn[data-r]:hover { color: var(--fg); background: var(--panel-2); }
.pg-all { cursor: pointer; font-size: 10px; color: var(--muted); } .pg-all:hover { color: var(--accent); }
#pu-grid.copied td.sel { animation: pgcopy .6s; }
@keyframes pgcopy { 50% { background: color-mix(in srgb, var(--ok) 30%, var(--bg)); } }
.pg-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); font-size: 12.5px; }
.pg-sums { color: var(--muted); } .pg-sums b { color: var(--fg); }
.pg-sb-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); } .btn.danger:hover { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pg-clr { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
details.pg-hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
details.pg-hint summary { cursor: pointer; width: max-content; }
details.pg-hint > div { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 2px 2px; }
.pg-menu { position: fixed; z-index: 80; width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px #000a; padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pgm-sort { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.pgm-sort button { text-align: left; border: 0; background: none; color: var(--fg); font: inherit; padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.pgm-sort button:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.pg-menu .input { width: 100%; padding: 6px 9px; font-size: 12.5px; }
.pgm-rng { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); } .pgm-rng .input { flex: 1; min-width: 0; }
.pgm-all { display: flex; align-items: center; gap: 8px; padding: 4px 6px; cursor: pointer; }
.pgm-list { max-height: 230px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.pgm-list label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.pgm-list label:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.pgm-list label span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgm-list label em { font-style: normal; font-size: 11px; color: var(--muted); }
.pgm-list .muted { padding: 6px; font-size: 12px; }
.pgm-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .pgm-foot span { flex: 1; }
.pg-menu input[type=checkbox] { accent-color: var(--accent); }

/* purchases: business summary + cards */
.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.ps-tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ps { border-collapse: collapse; font-size: 12px; width: 100%; font-variant-numeric: tabular-nums; }
.ps th, .ps td { padding: 6px 8px; white-space: nowrap; text-align: right; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.ps thead th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ps thead th.now { color: var(--accent); }
.ps tbody th { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 140px; }
.ps .tot { font-weight: 700; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ps .u { color: var(--muted); }
.ps td.fut { opacity: .45; }
.ps tr.grp th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); padding-top: 9px; }
.ps tr.sum th, .ps tr.sum td { font-weight: 700; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.ps tr.sum th { background: var(--panel-2); }
.ps tr.flow th, .ps tr.flow td { font-weight: 700; }
.ps tr.dimrow td, .ps tr.dimrow th { opacity: .55; }
.ps tbody tr:hover td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.ps-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: var(--muted); }
.ps-dot.st-delivered, .ps-dot.st-pickedup { background: var(--ok); } .ps-dot.st-ordered, .ps-dot.st-back-ordered, .ps-dot.st-partial-delivered { background: var(--warn); }
.ps-dot.st-cancelled, .ps-dot.st-lost, .ps-dot.st-returned, .ps-dot.st-refunded { background: var(--bad); } .ps-dot.st-not-reconciled { background: #c084fc; }
.ps-chart { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.ps-chart .pa-lg { flex-wrap: wrap; gap: 4px 14px; }
.ps-svg { width: 100%; height: auto; display: block; }
.ps-svg .gl { stroke: var(--line); stroke-dasharray: 3 4; } .ps-svg .ax { fill: var(--muted); font-size: 11px; }
.ps-svg circle { cursor: pointer; } .ps-svg circle:hover { r: 5; }
.pc-top { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pc-tile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.pc-tile span { display: block; font-size: 11.5px; color: var(--muted); }
.pc-tile b { display: block; font-size: 18px; margin: 3px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-tile em { font-style: normal; font-size: 11.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-tile.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bg)), var(--bg) 70%); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pc-stack { display: flex; height: 12px; border-radius: 7px; overflow: hidden; gap: 2px; margin-bottom: 12px; } .pc-stack i { min-width: 3px; }
.pc-tw { overflow: auto; max-height: 560px; border-radius: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.pc-tbl { min-width: 900px; border: 1px solid var(--line); border-radius: 10px; }
.pc-tbl th { cursor: default; }
.pc-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.pc-share { display: flex; align-items: center; gap: 8px; min-width: 120px; } .pc-share > div { flex: 1; height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; } .pc-share i { display: block; height: 100%; border-radius: 4px; } .pc-share span { font-size: 11.5px; color: var(--muted); width: 42px; text-align: right; }
@media (max-width: 1250px) { .ps-grid { grid-template-columns: 1fr; } .ps-chart { max-width: 640px; } }
@media (max-width: 900px) { .pc-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ps-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ps-chart { margin-bottom: 14px; }
.ps-chart .pa-lg .muted { margin-left: auto; font-size: 11.5px; }
.ps tr.gift th, .ps tr.gift td { color: #c084fc; } .ps tr.gift td .muted { color: var(--muted); }
.ps tr.pay th, .ps tr.pay td { font-weight: 600; }
@media (max-width: 1100px) { .ps-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ps tr.supply th, .ps tr.supply td { color: #38bdf8; } .ps tr.inv th, .ps tr.inv td { color: var(--muted); font-style: italic; }

/* prep center */
.pr-duo { gap: 12px; margin-top: 4px; }
.pr-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; font-size: 12.5px; }
.pr-rl { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pr-rl .muted { font-size: 11px; }
.pr-bar { width: 32%; height: 6px; border-radius: 4px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); } .pr-bar i { display: block; height: 100%; background: var(--accent); }
.pr-rv { min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.pr-duo .pf-stack { margin: 6px 0 8px; }
.pg td.pr-tot { color: var(--fg); font-weight: 700; }
.pr-st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pr-st.paid { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pr-st.due { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pr-st.overdue { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.pg tr.pr-over td.pg-rn { box-shadow: inset 3px 0 0 var(--bad); }
.pc-tile.warnt { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.pa-lg i.p { background: var(--ok); border-radius: 50%; }
.ps-chart .pa-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* employees */
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.st-card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.st-card.on { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 25%, transparent); }
.st-top { display: flex; align-items: center; gap: 10px; }
.st-av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; flex: none; }
.st-top > div { flex: 1; min-width: 0; }
.st-name { border: 0; background: none; color: var(--fg); font: inherit; font-weight: 700; font-size: 15px; padding: 1px 4px; margin-left: -4px; border-radius: 6px; width: 100%; }
.st-name:hover, .st-name:focus { background: var(--panel-2); outline: none; }
.st-rate { width: 56px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; padding: 0 2px; border-radius: 4px; }
.st-rate:hover, .st-rate:focus { background: var(--panel-2); color: var(--fg); outline: none; }
.st-dot { font-size: 11.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.st-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st-dot.on { color: var(--ok); } .st-dot.on::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); animation: stpulse 1.6s infinite; }
@keyframes stpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 0%, transparent); } }
.st-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-nums > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.st-nums span { display: block; font-size: 11px; color: var(--muted); } .st-nums b { display: block; font-size: 16px; margin: 2px 0; font-variant-numeric: tabular-nums; } .st-nums em { font-style: normal; font-size: 11px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-btns { display: flex; gap: 8px; flex-wrap: wrap; } .st-btns .sm { margin-left: auto; }
.st-live { color: var(--ok); font-weight: 700; font-size: 11.5px; }
.pg tr.st-openrow td { background: color-mix(in srgb, var(--ok) 8%, var(--bg)); }
.pg-st.st-paid { color: var(--ok); } .pg-st.st-unpaid { color: var(--warn); } .pg-st.st-off { color: var(--muted); }
.ps tr.prep th, .ps tr.prep td { color: #fb923c; } .ps tr.payroll th, .ps tr.payroll td { color: #f87171; }

/* Amazon payout card (compact) */
.po-card { margin-bottom: 14px; padding: 12px 14px !important; }
.po-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.po-head > b { font-size: 14px; } .po-head .muted { font-size: 11.5px; } .po-i { cursor: help; color: var(--muted); font-size: 12px; }
.po-req { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.po-total { display: flex; align-items: center; gap: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; flex-wrap: wrap; row-gap: 8px; }
.po-total > div { padding: 0 14px; border-left: 1px solid var(--line); } .po-total > div:first-child { padding-left: 0; border-left: 0; }
.po-total span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.po-tb b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.po-sm b { font-size: 15px; font-variant-numeric: tabular-nums; }
.po-rel { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-left: auto; border-left: 0 !important; padding-right: 0 !important; }
.po-rel > div { width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1px; padding: 0 !important; border: 0 !important; }
.po-rel i { width: 100%; background: var(--ok); border-radius: 2px; opacity: .85; } .po-rel span { font-size: 8.5px !important; letter-spacing: 0 !important; text-transform: none !important; }
.po-lines { display: flex; flex-direction: column; gap: 4px; }
.po-line { display: grid; grid-template-columns: 70px 100px minmax(170px, 1.3fr) repeat(2, minmax(0, 1fr)) 50px; align-items: center; gap: 12px; padding: 5px 4px; font-size: 12px; border-radius: 7px; }
.po-line:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.po-ln-t { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.po-ln-v { font-size: 15px; font-variant-numeric: tabular-nums; }
.po-ln-d { display: flex; align-items: center; gap: 8px; min-width: 0; } .po-ln-d .po-left { color: var(--warn); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.po-ln-d.ready .po-left { color: var(--ok); }
.po-ln-d .po-prog { flex: 1; height: 4px; background: var(--bg); border-radius: 3px; overflow: hidden; min-width: 40px; } .po-ln-d .po-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--warn), var(--ok)); }
.po-ln-m { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .po-ln-m b { color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .po-line { grid-template-columns: 70px 1fr; } .po-ln-d { grid-column: 1 / -1; } .po-ln-m { display: none; } .po-rel { display: none !important; } }

/* inventory snapshot row */
.is-row { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; margin: 4px 0 14px; }
.tile.is-k { border-top: 3px solid var(--accent); }
.tile.is-k.c1 { border-top-color: #4f8cff; } .tile.is-k.c2 { border-top-color: #f2a541; } .tile.is-k.c3 { border-top-color: #3ccf91; }
.tile.is-k.c4 { border-top-color: #818cf8; } .tile.is-k.c5 { border-top-color: #fbbf24; } .tile.is-k.c6 { border-top-color: #f472b6; }
.tile.is-k .s { white-space: normal; }
@media (max-width: 1200px) { .is-row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 700px) { .is-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }


.po-total small, .po-c small, .po-ln-t small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.po-ln-t small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.po-c { display: flex; flex-direction: column; min-width: 0; }
.po-line { grid-template-columns: 74px minmax(150px, 1fr) minmax(220px, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 90px; padding: 6px 4px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: 0; }
.po-ln-d { flex-direction: column; align-items: stretch; gap: 2px; } .po-dr { display: flex; align-items: center; gap: 8px; }
@media (max-width: 900px) { .po-line { grid-template-columns: 74px 1fr; } .po-ln-d { grid-column: 1 / -1; } .po-line > .po-c:nth-child(n+4) { display: none; } }

/* average sale price — compact */
.asp2 { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.asp-side { display: flex; flex-direction: column; gap: 5px; }
.asp-row { display: grid; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; border-radius: 9px; transition: border-color .12s, opacity .12s; }
.asp-row:hover { border-color: var(--c); }
.asp-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 14%, var(--bg)), var(--bg) 75%); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.asp-hl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.asp-hn { display: flex; align-items: center; gap: 8px; } .asp-hn b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.asp-hero em { font-style: normal; font-size: 11px; color: var(--muted); }
.asp-b { grid-template-columns: 10px minmax(0, 1fr) auto 58px; gap: 8px; padding: 6px 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 13%, var(--bg)) var(--w), var(--bg) var(--w)); }
.asp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.asp-nm { min-width: 0; display: flex; align-items: baseline; gap: 6px; } .asp-nm b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .asp-nm small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.asp-pr { font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--c); }
.asp-pill { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; white-space: nowrap; justify-self: end; }
.asp-pill.up { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); } .asp-pill.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 15%, transparent); }
.asp-row.off { opacity: .4; } .asp-row.off .asp-dot { background: transparent; border: 1.5px solid var(--c); }
.asp-main { min-width: 0; } .asp-main .note { display: none; } .asp-cw { position: relative; }
.asp-cw .chart svg { width: 100%; height: auto; max-height: 250px; display: block; }
.asp-hit { fill: transparent; cursor: crosshair; } .asp-cross { stroke: var(--muted); stroke-dasharray: 3 3; pointer-events: none; }
.asp-tip { position: absolute; top: 6px; z-index: 5; min-width: 160px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; box-shadow: 0 10px 28px #0008; font-size: 12px; pointer-events: none; }
.asp-tip b { display: block; margin-bottom: 3px; } .asp-tip div { display: flex; align-items: center; gap: 7px; } .asp-tip i { width: 8px; height: 8px; border-radius: 50%; } .asp-tip span { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
#asp .ph { margin-bottom: 8px; }
@media (max-width: 1000px) { .asp2 { grid-template-columns: 1fr; } }

/* manage returns */
.rm-scan { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 14px; padding: 8px 8px 8px 16px; margin-bottom: 12px; }
.rm-scan:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.rm-ico { font-size: 22px; color: var(--accent); }
.rm-scan .input { flex: 1; border: 0; background: none; font-size: 17px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; padding: 8px 4px; }
.rm-scan .input:focus { outline: none; }
.rm-card { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.rm-card.nf { font-size: 13px; color: var(--muted); } .rm-card.nf b { color: var(--fg); }
.rm-top { display: flex; gap: 14px; align-items: flex-start; }
.rm-top img, .rm-top .pf-noimg { width: 76px; height: 76px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; cursor: pointer; }
.rm-tt { flex: 1; min-width: 0; } .rm-tt > b { font-size: 15px; display: block; margin-bottom: 4px; }
.rm-why { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.rm-cond { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 4px; text-transform: capitalize; }
.rm-cond.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); } .rm-cond.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.rm-cmt { font-size: 12.5px; font-style: italic; margin-top: 6px; color: var(--fg); }
.rm-done { font-size: 11.5px; font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.rm-money { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rm-money > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.rm-money span { display: block; font-size: 11px; color: var(--muted); } .rm-money b { display: block; font-size: 17px; margin: 2px 0; font-variant-numeric: tabular-nums; } .rm-money em { font-style: normal; font-size: 11px; color: var(--muted); display: block; }
.rm-money .rm-tot { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); } .rm-money .rm-tot.ok b { color: var(--ok); } .rm-money .rm-tot.bad b { color: var(--bad); }
.rm-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rm-k { margin-top: 4px; }
.rm-tbl { min-width: 1150px; } .rm-tbl .input { padding: 5px 8px; font-size: 12px; width: 100%; min-width: 0; } .rm-tbl .rm-price { width: 84px; text-align: right; }
.rm-tbl .pf-p { min-width: 240px; max-width: 300px; } .rm-tbl td { vertical-align: middle; }
.rm-st { border: 1px solid var(--line); background: var(--bg); color: var(--warn); font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.rm-st.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
@media (max-width: 1100px) { .rm-money { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* sales rank — compact */
.sr2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.sr-l .tools { display: none; }
.sr-l .tw { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sr-l table.t { font-size: 12.5px; } .sr-l table.t td, .sr-l table.t th { padding: 6px 10px; }
.sr-l tbody tr { cursor: pointer; } .sr-l tbody tr:hover td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.sr-l tbody tr.sr-on td { background: color-mix(in srgb, var(--accent) 14%, transparent); } .sr-l tbody tr.sr-on td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.sr-c { font-weight: 600; white-space: nowrap; }
.sr-r { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; }
.sr-rh { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.seg.sm button { padding: 3px 9px; font-size: 11.5px; }
.sr-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 230px; }
.sr-bc { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.sr-bv { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sr-bt { flex: 1; width: 100%; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--fg) 3%, transparent); border-radius: 6px; overflow: hidden; }
.sr-bt i { display: block; width: 100%; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); border-radius: 6px 6px 2px 2px; }
.sr-bl { font-size: 10px; color: var(--muted); white-space: nowrap; } .sr-bp { font-size: 10px; color: var(--muted); }
@media (max-width: 1000px) { .sr2 { grid-template-columns: 1fr; } }

/* returns — compact */
.rt-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; margin: 4px 0 12px; }
.rt-strip > div { padding: 10px 14px; min-width: 0; } .rt-strip > div + div { border-left: 1px solid var(--line); }
.rt-strip span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rt-strip b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; } .rt-strip b.warn { color: var(--warn); }
.rt-strip .rt-s1 { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; } .rt-strip .rt-s1 span:first-child { width: 100%; }
.rt-strip em { display: block; font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-top { font-size: 15px !important; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-sb { height: 4px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-top: 5px; } .rt-sb i { display: block; height: 100%; background: var(--ok); }
.rt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rt-box { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; min-width: 0; }
.rt-bh { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.rt-box .chart svg { width: 100%; height: auto; max-height: 160px; display: block; }
.rt-box .rt-w { margin: 4px 0; } .rt-box .rt-wl { font-size: 12px; margin-bottom: 2px; } .rt-box .rt-wb { height: 5px; } .rt-box .rt-wb i { background: var(--accent) !important; }
.rt-items .tw { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rt-items .tools { margin-bottom: 6px; }
.rt-items table.t td { padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 900px) { .rt-strip, .rt-grid2 { grid-template-columns: 1fr 1fr; } }

.rm-card .pf-tag { font-size: 12.5px; padding: 3px 10px; max-width: none; }
.rm-card .pf-tag .cp { transform: none; margin-left: 2px; }
.rm-card .pf-tags { gap: 6px; margin-top: 6px; }
.rm-tt > b { font-size: 17px !important; }
.rm-why { font-size: 14px !important; margin-top: 8px !important; }
.rm-cond { font-size: 12.5px !important; padding: 2px 10px !important; }
.rm-cmt { font-size: 14px !important; font-style: normal !important; margin-top: 8px !important; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); }
.rm-cmt span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.rm-cmt.none { background: var(--panel); border-color: var(--line); color: var(--muted); font-size: 12.5px !important; }

.sec-mv { display: inline-flex; gap: 2px; margin-left: 6px; }
.sec-mv button { width: 24px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.sec-mv button:hover { color: var(--fg); border-color: var(--accent); }

/* orders page */
.op-sec .ph { margin-bottom: 8px; }
.op-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.op-bar .input { width: auto; padding: 6px 10px; font-size: 13px; } .op-q { flex: 1; min-width: 220px; }
.op-kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.op-kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.op-kpi > span { display: block; font-size: 11.5px; color: var(--muted); } .op-kpi b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0; }
.op-kpi em { font-style: normal; font-size: 12px; font-weight: 700; }
.op-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.op-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.op-tabs button span { margin-left: 6px; font-size: 11px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.op-tabs button:hover { color: var(--fg); } .op-tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
.op-pg { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12.5px; margin: 6px 0; }
.op-pg .input { width: auto; padding: 3px 6px; font-size: 12px; } .op-rng { margin: 0 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.op-nav { width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.op-nav:disabled { opacity: .35; cursor: default; } .op-nav:not(:disabled):hover { border-color: var(--accent); }
.op-card { display: grid; grid-template-columns: 1.45fr 1fr 1.1fr .9fr .75fr; gap: 8px; margin-bottom: 10px; }
.op-p { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.op-pl, .op-od { border-left: 3px solid var(--ok); }
.op-h { font-size: 12.5px; font-weight: 700; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-prod .op-h { display: block; }
.op-pb { display: flex; gap: 10px; align-items: flex-start; }
.op-pb img, .op-pb .pf-noimg { width: 72px; height: 72px; border-radius: 9px; object-fit: contain; background: #fff; flex: none; cursor: pointer; border: 1px solid var(--line); }
.op-rows { flex: 1; min-width: 0; }
.op-r { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
.op-r:last-child { border-bottom: 0; } .op-r span { color: var(--muted); white-space: nowrap; } .op-r b { font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.op-r b .cp { flex: none; }
.op-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--panel); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.op-hero span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .op-hero b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.op-hero em { font-style: normal; font-size: 10.5px; color: var(--muted); text-transform: uppercase; } .op-hero em i { font-style: normal; font-weight: 700; font-size: 12px; text-transform: none; }
.op-st { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.op-st.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); } .op-st.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.op-st.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); } .op-st.muted { color: var(--muted); background: var(--panel-2); }
.op-prime { font-size: 10px; color: #38bdf8; font-style: italic; font-weight: 700; }
.op-tbl { min-width: 1000px; } .op-tbl .pf-p { min-width: 260px; }
@media (max-width: 1300px) { .op-card { grid-template-columns: 1.4fr 1fr 1.1fr; } .op-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 800px) { .op-card { grid-template-columns: 1fr; } .op-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.op-kpi > span { display: block; font-size: 11.5px; color: var(--muted); } .op-kpi span:not(:first-child) { display: inline; font-size: inherit; color: inherit; }
.op-kpi b span { font-size: 17px !important; display: inline !important; }
.op-r b { white-space: normal; flex-wrap: wrap; justify-content: flex-end; word-break: break-all; text-overflow: clip; }
.op-r b .mono { font-size: 11.5px; }
.op-link { color: var(--fg); text-decoration: none; cursor: pointer; } .op-link:hover { color: var(--accent); text-decoration: underline; }
.op-amz { margin-top: 8px; text-align: right; } .op-amz .amz { font-size: 12px; }

/* account health — compact */
.ah2-ph { margin-bottom: 10px; align-items: center; }
.ah2 { display: grid; grid-template-columns: 190px minmax(0, 1fr) 300px; gap: 12px; align-items: stretch; }
.ah2 > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ah2-g { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ah2-g svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.ah2-trk { fill: none; stroke: var(--panel-2); stroke-width: 10; } .ah2-val { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .6s; }
.ah2-w { position: relative; width: 120px; height: 120px; }
.ah2-n { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ah2-n b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .ah2-n span { font-size: 10.5px; color: var(--muted); }
.ah2-pill { margin-top: 6px; }
.ah2-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; } .ah2-h span { font-size: 12px; font-weight: 700; }
.ah2-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.ah2-chip { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: color-mix(in srgb, var(--bad) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); color: var(--fg); text-decoration: none; font-size: 12.5px; }
.ah2-chip:hover { border-color: var(--bad); } .ah2-chip b { font-size: 16px; color: var(--bad); min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; } .ah2-chip span { line-height: 1.25; }
.ah2-clear { margin-top: 8px; font-size: 12px; color: var(--ok); cursor: help; }
.ah2-m { display: grid; grid-template-columns: 8px 1fr auto; column-gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); font-size: 12.5px; }
.ah2-m:last-child { border-bottom: 0; } .ah2-m i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); } .ah2-m i.warn { background: var(--warn); }
.ah2-m b { font-variant-numeric: tabular-nums; } .ah2-m b.warn { color: var(--warn); } .ah2-m em { grid-column: 2 / -1; font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: -2px; }
@media (max-width: 1100px) { .ah2 { grid-template-columns: 170px 1fr; } .ah2-ms { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ah2 { grid-template-columns: 1fr; } }

.op-life { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line, #e5e7eb); }
.op-lh { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
button.ah2-chip { font: inherit; text-align: left; cursor: pointer; }
.ah2-chip.on { border-color: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 25%, transparent); }
#ah-drill:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ah-dh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; } .ah-dh .btn { margin-left: auto; }
.ah-list { display: grid; gap: 10px; }
.op-issue { font-size: 12px; line-height: 1.4; margin: 6px 0; padding: 7px 9px; border-radius: 8px; background: color-mix(in srgb, var(--bad) 7%, var(--panel)); max-height: 120px; overflow: auto; white-space: pre-wrap; }
.op-iss .amz { display: inline-block; margin-top: 4px; font-size: 12px; }
.nc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.nc-k { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2, var(--panel)); display: flex; flex-direction: column; gap: 2px; }
.nc-k span { font-size: 11px; color: var(--muted); } .nc-k b { font-size: 18px; font-variant-numeric: tabular-nums; } .nc-k em { font-style: normal; font-size: 11px; color: var(--muted); }
.nc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .nc-tools .input { max-width: 280px; }
.nc-in { white-space: nowrap; } .nc-in .cell-in { width: 80px; margin-left: 4px; }
.nc-sug { display: block; margin: 3px 0 0 auto; font: inherit; font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--accent); cursor: pointer; }
.nc-done { opacity: .45; transition: opacity .3s; }
@media (max-width: 800px) { .nc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* claims: compact */
.cl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.cl-k { padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel); display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 8px; }
.cl-k span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .cl-k b { font-size: 18px; font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center; }
.cl-k em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.cl-k.ok { border-left-color: var(--ok); } .cl-k.warn { border-left-color: var(--warn); } .cl-k.acc { border-left-color: var(--accent); } .cl-k.bad { border-left-color: var(--bad); }
.cl-k.warn b { color: var(--warn); } .cl-k.bad b { color: var(--bad); }
#claims-t .t td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
#claims-t .t th { white-space: nowrap; }
.cl-ref { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .cl-ref .pill.sm, .pill.sm { font-size: 10.5px; padding: 1px 7px; }
.cl-sub { font-size: 11px; color: var(--muted); max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
#claims-t .need { margin-top: 2px; }
.cl-val { text-align: right; white-space: nowrap; } .cl-val b { display: block; font-variant-numeric: tabular-nums; } .cl-val span { font-size: 11px; color: var(--muted); }
.cl-left { text-align: right; white-space: nowrap; } .cl-left .until { margin-top: 2px; }
#claims-t .claim-btns { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-start; }
#claims-t .claim-btns .btn { white-space: nowrap; }
#claims-t td input.cell-in, #claims-t td .cell-in { min-width: 90px; }
@media (max-width: 900px) { .cl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* reimbursements: compact */
.rb-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 4px; }
.cl-k.cl-claude { border-left-color: #a78bfa; } .cl-k.cl-claude b { color: #a78bfa; }
.rb-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; margin-bottom: 10px; }
.rb-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); min-width: 0; }
.rb-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13px; } .rb-ch .muted { font-size: 11.5px; }
.rb-bar { display: grid; grid-template-columns: 140px minmax(40px, 1fr) 80px 40px; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.rb-bar .rb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-bar i, .rb-col i { display: block; background: color-mix(in srgb, var(--line) 50%, transparent); border-radius: 4px; position: relative; }
.rb-bar i { height: 8px; } .rb-bar u { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.rb-bar u.neg, .rb-col u.neg { background: var(--bad); }
.rb-bar b { text-align: right; font-variant-numeric: tabular-nums; } .rb-bar em { font-style: normal; color: var(--muted); text-align: right; font-size: 11px; }
.rb-cols { display: flex; gap: 4px; align-items: stretch; height: 170px; }
.rb-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.rb-col span { font-size: 9.5px; color: var(--muted); white-space: nowrap; } .rb-col em { font-style: normal; font-size: 10px; color: var(--muted); }
.rb-col i { flex: 1; width: 100%; max-width: 26px; background: transparent; display: flex; align-items: flex-end; }
.rb-col u { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); }
.rb-claude { margin-bottom: 12px; border-left: 3px solid #a78bfa; }
.rb-cct { max-height: 300px; overflow: auto; } .rb-cct td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.pill.acc.sm { font-size: 10.5px; padding: 1px 6px; }
@media (max-width: 1000px) { .rb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rb-g { grid-template-columns: 1fr; } }
/* all reimbursements: compact rows */
#reimb-t .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
#reimb-t .rbt-d { white-space: nowrap; font-size: 12.5px; }
#reimb-t .rbt-p { min-width: 260px; max-width: 520px; }
#reimb-t .rbt-p .pf-tt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#reimb-t .rbt-ref { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
#reimb-t .pill.sm { white-space: nowrap; }
#reimb-t .rbt-p { gap: 10px; } #reimb-t .rbt-p img, #reimb-t .rbt-p .pf-noimg { width: 36px; height: 36px; border-radius: 7px; }
#reimb-t .rbt-p .pf-pt { min-width: 0; }
/* sell-through: compact */
.st2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.st2-c { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.st2-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; } .st2-h .muted { font-size: 11.5px; }
.st2-w { display: grid; grid-template-columns: 34px minmax(40px, 1fr) 54px 80px; align-items: center; gap: 8px; font-size: 12.5px; padding: 2px 0; }
.st2-w span { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.st2-w i, .stb i { display: block; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--line) 55%, transparent); overflow: hidden; }
.st2-w u, .stb u { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.st2-w u.ok, .stb.ok u { background: var(--ok); } .st2-w u.warn, .stb.warn u { background: var(--warn); } .st2-w u.bad, .stb.bad u { background: var(--bad); }
.st2-w b { text-align: right; font-variant-numeric: tabular-nums; } .st2-w em { font-style: normal; font-size: 11px; color: var(--muted); text-align: right; }
.st2-ks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button.st2-k { font: inherit; color: inherit; text-align: left; cursor: pointer; } button.st2-k:not([data-stf]) { cursor: default; }
button.st2-k[data-stf]:hover { border-color: var(--accent); }
.cl-k.st2-k b { font-size: 17px; }
.pm-mini { gap: 10px; min-width: 240px; max-width: 420px; } .pm-mini img, .pm-mini .pf-noimg { width: 36px; height: 36px; border-radius: 7px; }
.pm-mini .pf-pt { min-width: 0; } .pm-mini .pf-tt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#st-t .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.stb { display: grid; grid-template-columns: 46px 34px 30px; align-items: center; gap: 5px; justify-content: end; font-size: 12px; }
.stb b { text-align: right; font-variant-numeric: tabular-nums; } .stb em { font-style: normal; color: var(--muted); font-size: 10.5px; text-align: right; }
.stb.bad b { color: var(--bad); } .stb.warn b { color: var(--warn); }
.st-out { white-space: nowrap; font-variant-numeric: tabular-nums; } .st-out em { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 6px; }
@media (max-width: 1000px) { .st2 { grid-template-columns: 1fr; } }
/* inventory by disposition: compact */
.b-purple2 { background: #c9a8ff; }
.wh-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 2px 0 6px; background: var(--panel-2); }
.wh-stack i { display: block; height: 100%; min-width: 3px; }
.wh-lg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; margin-bottom: 10px; color: var(--muted); }
.wh-lg span { display: inline-flex; align-items: center; gap: 5px; } .wh-lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.wh-lg b { color: var(--fg); font-variant-numeric: tabular-nums; } .wh-lg em { font-style: normal; }
.wh-big { font-size: 22px !important; }
table.wh td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
table.wh tr.wh-r { cursor: pointer; } table.wh tr.wh-r:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
table.wh tr.wh-child td { font-size: 12.5px; color: var(--muted); padding-top: 4px; padding-bottom: 4px; }
.wh-sh { display: flex; align-items: center; gap: 8px; min-width: 160px; }
tr.sub > td { padding: 4px 0 10px 18px !important; background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.wh-sub { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.wh-sub .sub-t td { padding-top: 4px; padding-bottom: 4px; vertical-align: middle; }
.wh-sub .sub-t thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.wh-sb { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; vertical-align: middle; margin-right: 6px; } .wh-sb i { display: block; height: 100%; background: var(--accent); }
/* deliveries: compact */
.dl-days { gap: 8px; margin: 6px 0 10px; }
.dl-day { padding: 9px 12px; gap: 2px; border-radius: 10px; }
.dl-day .lbl { font-size: 10.5px; } .dl-n { display: flex; align-items: baseline; gap: 6px; } .dl-day .dl-n b { font-size: 22px; }
.dl-day .dl-c { margin-top: 2px; gap: 4px; } .dl-day .dl-from { border-top: 0; margin-top: 0; padding-top: 0; }
.dl-c i, .dl-tag { font-size: 10.5px; padding: 1px 7px; }
.dl-g { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 8px; }
#dl-from { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.dl-fh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 13px; } .dl-fh .muted { font-size: 11px; }
.dl-fr { display: grid; grid-template-columns: minmax(0, 1fr) 70px 28px 32px; gap: 6px; align-items: center; font-size: 12px; padding: 2px 0; }
.dl-fr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dl-fr i { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; display: block; }
.dl-fr u { display: block; height: 100%; background: var(--ok); } .dl-fr b { text-align: right; } .dl-fr em { font-style: normal; font-size: 10.5px; color: var(--muted); text-align: right; }
#dl-today .t td, #fx-t .t td, #fx-s .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
#dl-today .tools { margin-top: 0; }
.fx-ph { margin-top: 12px !important; }
.fx-tiles { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.fx-tile { display: inline-flex !important; align-items: center; gap: 7px; padding: 5px 11px !important; border-radius: 99px !important; font-size: 12px; }
.fx-tile .fx-dot { width: 8px; height: 8px; grid-row: auto; } .fx-tile span:last-child, .fx-tile span { font-size: 12px !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--text, var(--fg)) !important; }
.fx-tile b { font-size: 12.5px !important; color: var(--muted); }
@media (max-width: 900px) { .dl-g { grid-template-columns: 1fr; } .dl-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* storage: compact */
.sf-k { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 6px; }
.sf-chart svg { max-height: 190px; }
/* warehouse report card */
.fc-s { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: stretch; margin-bottom: 10px; }
.fc-all, .fc-gr, .fc-ws { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.fc-all { display: flex; flex-direction: column; } .fc-all span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .fc-all b { font-size: 20px; } .fc-all em { font-style: normal; font-size: 11px; color: var(--muted); }
.fc-gr { display: flex; gap: 12px; align-items: center; } .fc-gc { display: flex; flex-direction: column; align-items: center; gap: 2px; } .fc-gc b { font-size: 15px; font-variant-numeric: tabular-nums; } .fc-gc em { font-style: normal; font-size: 9.5px; }
.fc-ws { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; }
.fc-ws i { font-style: normal; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.fc-ws i.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); } .fc-ws i.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
#fc-t .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.fc-lf { font-size: 10.5px; }
.fc-rb { display: inline-grid; grid-template-columns: 70px 46px; gap: 6px; align-items: center; } .fc-rb.dim { opacity: .55; }
.fc-rb i { display: block; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; } .fc-rb u { display: block; height: 100%; }
.fc-rb u.ok { background: var(--ok); } .fc-rb u.warn { background: var(--warn); } .fc-rb u.bad { background: var(--bad); } .fc-rb b { text-align: right; font-weight: 500; }
@media (max-width: 1000px) { .fc-s { grid-template-columns: 1fr; } .sf-k { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ledger charts */
.lm2 .grid2 > .panel { padding-top: 12px; padding-bottom: 10px; }
.lm2 .grid2 .ph { margin-bottom: 4px; } .lm2 .grid2 .ph h3 { font-size: 14px; } .lm2 .grid2 .desc { font-size: 11.5px; }
.lm-hd { display: flex; gap: 18px; margin: 2px 0 6px; flex-wrap: wrap; }
.lm-hd > div { display: flex; flex-direction: column; } .lm-hd span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lm-hd b { font-size: 18px; font-variant-numeric: tabular-nums; } .lm-hd em { font-style: normal; font-size: 11px; color: var(--muted); }
.lm2 .chart.lc svg { max-height: 190px; }
.lm2 .lc-lg { margin-top: 2px; }
/* amazon by year */
.yr-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.yr-c { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.yr-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; } .yr-h b { font-size: 18px; } .yr-h .muted { font-size: 11.5px; }
.yr-b { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; align-items: center; font-size: 12px; padding: 2px 0; }
.yr-b span { color: var(--muted); } .yr-b i { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; display: block; } .yr-b u { display: block; height: 100%; } .yr-b b { text-align: right; font-variant-numeric: tabular-nums; }
.yr-s { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.yr-s > div { display: flex; flex-direction: column; } .yr-s span { font-size: 10.5px; color: var(--muted); } .yr-s b { font-size: 13px; font-variant-numeric: tabular-nums; } .yr-s .ok, .yr-s .bad { font-size: 10.5px; }
/* inventory age */
.ia-top { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; } .ia-top > div { display: flex; flex-direction: column; }
.ia-top span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .ia-top b { font-size: 20px; font-variant-numeric: tabular-nums; } .ia-top em { font-style: normal; font-size: 11px; color: var(--muted); }
.ia-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--panel-2); margin-bottom: 8px; } .ia-stack i { display: block; height: 100%; min-width: 4px; }
.ia-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ia-c { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; } .ia-c.zero { opacity: .5; }
.ia-c span { font-size: 11.5px; display: flex; align-items: center; gap: 6px; } .ia-c span i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.ia-c b { font-size: 15px; font-variant-numeric: tabular-nums; } .ia-c em { font-style: normal; font-size: 10.5px; color: var(--muted); }
/* removals */
.rm-k { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rm-d { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.rm-mix { display: flex; width: 110px; height: 8px; border-radius: 4px; overflow: hidden; gap: 1px; background: var(--panel-2); } .rm-mix i { display: block; height: 100%; }
#rm-t .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
@media (max-width: 1100px) { .rm-k { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ia-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* best & worst */
.bw-k2 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 8px; }
#bw-t .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.bw-tb { display: inline-grid; grid-template-columns: 70px auto; gap: 8px; align-items: center; justify-content: end; }
.bw-tb i { display: block; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; } .bw-tb u { display: block; height: 100%; background: var(--ok); margin-left: auto; } .bw-tb u.neg { background: var(--bad); }
.bw-tb b { min-width: 84px; text-align: right; font-weight: 500; }
@media (max-width: 900px) { .bw-k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* P&L */
.pl-wf { grid-column: 1 / -1; padding: 12px 14px; }
.pl-hero { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 10px; } .pl-hero > div { display: flex; flex-direction: column; }
.pl-hero span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .pl-hero b { font-size: 22px; font-variant-numeric: tabular-nums; } .pl-hero em { font-style: normal; font-size: 11px; color: var(--muted); }
.wf { display: grid; gap: 3px; }
.wf-r { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 12px; }
.wf-r span { color: var(--muted); } .wf-r b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.wf-t { position: relative; height: 12px; background: color-mix(in srgb, var(--line) 35%, transparent); border-radius: 3px; }
.wf-t i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.wf-t i.pos { background: #3b82f6; } .wf-t i.pos2 { background: color-mix(in srgb, var(--ok) 70%, transparent); } .wf-t i.neg { background: color-mix(in srgb, var(--bad) 75%, transparent); } .wf-t i.tot { background: var(--ok); }
.wf-tot { margin-top: 3px; padding-top: 4px; border-top: 1px solid var(--line); } .wf-tot span { color: var(--fg); font-weight: 700; } .wf-tot b { font-weight: 700; }
#pnl table.kv td { padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }
#pnl .panel .ph { margin-bottom: 4px; }
/* overview: compact tiles */
#overview .tiles { gap: 8px; margin-bottom: 10px; }
#overview #kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); }
#overview #highlights { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#overview .tile { padding: 9px 11px; border-radius: 10px; }
#overview .tile .lbl { font-size: 10px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#overview .tile .v { font-size: clamp(16px, 1.25vw, 19px); margin: 3px 0 2px; }
#overview .tile .s { font-size: 11px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#overview .tile.fc .s { -webkit-line-clamp: 4; }
#overview .tile.is-k { border-top-width: 2px; }
#overview .is-row { margin: 0 0 10px; }
#overview .tile.prod { grid-template-columns: 34px 1fr; gap: 8px; } #overview .tile.prod img { width: 34px; height: 34px; }
#overview .tile.prod .t, #overview .tile.prod a.t { font-size: 11.5px; -webkit-line-clamp: 2; }
#overview h2.sec { margin: 8px 0 6px; }
@media (max-width: 1200px) { #overview #kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { #overview #kpis, #overview .is-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* live sales: compact */
.lv-k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; }
.lv-k5 .cl-k { padding: 6px 9px; } .lv-k5 .cl-k b { font-size: 15px; } .lv-k5 .cl-k span { font-size: 9.5px; } .lv-k5 .cl-k em { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lv-days:empty { display: none; }
#lv-t .t td { padding-top: 4px; padding-bottom: 4px; vertical-align: middle; }
.lv-pr2 { display: flex; align-items: center; gap: 8px; min-width: 200px; max-width: 360px; }
.lv-pr2 img, .lv-pr2 .lv-noimg { width: 30px; height: 30px; border-radius: 6px; object-fit: contain; background: #fff; flex: none; border: 1px solid var(--line); cursor: pointer; }
.lv-pr2 > div { min-width: 0; } .lv-pr2 a.t { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.lv-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-st { display: flex; gap: 5px; align-items: center; font-size: 10.5px; margin-top: 1px; } .lv-st i { font-style: normal; font-weight: 700; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
@media (max-width: 700px) { .lv-k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #overview #highlights { grid-template-columns: repeat(9, minmax(0, 1fr)); } #overview #highlights .tile.prod { grid-template-columns: 1fr; } #overview #highlights .tile.prod img { display: none; } }
/* live sales tiles: stacked so nothing gets cut */
.lv-k5 .cl-k { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 8px; }
.lv-k5 .cl-k span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-k5 .cl-k b { font-size: 16px; white-space: nowrap; grid-row: auto; align-self: flex-start; }
.lv-k5 .cl-k em { white-space: normal; line-height: 1.3; font-size: 10.5px; }
.lv-k5 .cl-k b .ok, .lv-k5 .cl-k b .bad, .lv-k5 .cl-k b span { font-size: 15px; }
.lv-pr2 { max-width: none; } .lv-pr2 a.t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
/* sales + live sales: same height */
@media (min-width: 1101px) {
  .lv-grid { align-items: stretch !important; }
  .lv-grid > .lv-card { height: 480px; display: flex; flex-direction: column; overflow: hidden; }
  .lv-grid > .lv-card > .ph, .lv-grid #lv-sum, .lv-grid #lv-mini, .lv-grid #lv-today, .lv-grid .lv-card > .note { flex: none; }
  .lv-grid #lv-c { flex: 1; min-height: 0; display: flex; } .lv-grid #lv-c svg { width: 100%; height: 100%; }
  .lv-grid #lv-t { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .lv-grid #lv-t > * { flex: none; } .lv-grid #lv-t .tw { flex: 1; min-height: 0; max-height: none !important; overflow: auto; }
}
.lv-st { white-space: nowrap; flex-wrap: nowrap; }
#lv-t .lv-pr2 { min-width: 150px; } #lv-t td, #lv-t th { padding-left: 6px; padding-right: 6px; }
#lv-t td:first-child { white-space: nowrap; }
@media (min-width: 1101px) { .lv-grid > .lv-card { height: 540px; } }
#lv-t .tw { overflow-x: hidden; }
#lv-t table { width: 100%; table-layout: fixed; }
#lv-t th:nth-child(1), #lv-t td:nth-child(1) { width: 82px; }
#lv-t th:nth-child(3), #lv-t td:nth-child(3) { width: 34px; }
#lv-t th:nth-child(4), #lv-t td:nth-child(4) { width: 70px; }
#lv-t th:nth-child(5), #lv-t td:nth-child(5) { width: 64px; }
#lv-t .lv-pr2 { min-width: 0; }
#lv-t td:nth-child(5) .muted { font-size: 11px; }
/* at a glance tiles: fill the full width like the tables below */
#gl-kpis.gl-top { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 10px; margin-bottom: 12px; }
#gl-kpis .tile { padding: 10px 14px; } #gl-kpis .tile .v { font-size: clamp(18px, 1.5vw, 24px); margin: 4px 0 2px; } #gl-kpis .tile .s { font-size: 11.5px; line-height: 1.35; }
@media (max-width: 1100px) { #gl-kpis.gl-top { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { #gl-kpis.gl-top { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* orders: scroll box option */
#op-list.op-scroll { max-height: 760px; overflow-y: auto; padding-right: 4px; border-radius: 10px; scrollbar-gutter: stable; }
.op-scr { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; margin-right: 8px; }
.op-scr.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
/* all inventory: compact */
.ia-k { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 8px; }
#inv-all .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
#inv-all .cell-in { width: 72px; padding: 3px 6px; }
.ia-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) { .ia-k { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* settings: schedule */
#set-sched { margin-top: 14px; }
.ss-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ss-c { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; } .ss-wide { grid-column: 1 / -1; }
.ss-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; } .ss-h b { font-size: 14px; } .ss-h .muted { font-size: 11.5px; }
.ss-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; } .ss-row .muted { font-size: 11.5px; } label.ss-row > span { flex: 1; } .ss-row .input { min-width: 150px; }
.ss-sub { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ss-reps { display: grid; grid-template-columns: 1fr; }
.ss-ar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .ss-tg { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; margin-right: 6px; }
.ss-rt { max-height: 320px; } .ss-rt td { padding-top: 5px; padding-bottom: 5px; }
.ar-box { max-width: 820px; } .ar-k { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 12px; }
@media (max-width: 900px) { .ss-g { grid-template-columns: 1fr; } }
/* modern thin scrollbars everywhere */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 65%, transparent); background-clip: padding-box; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
*::-webkit-scrollbar-corner { background: transparent; }
/* advertising */
.ad-conn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
.ad-conn p { font-size: 12.5px; margin: 6px 0 10px; } .ad-steps { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--muted); } .ad-steps b { color: var(--fg); }
.ad-k { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 8px; }
.ad-chart { margin-bottom: 8px; } .ad-chart svg { max-height: 190px; }
.ad-tabs { margin: 4px 0 8px; }
#ad-t2 .t td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
@media (max-width: 1100px) { .ad-k { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ad-conn { grid-template-columns: 1fr; } }
/* loading screen: counting money */
.bm { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bm-n { font-family: var(--mono, 'IBM Plex Mono', monospace); font-size: clamp(28px, 5vw, 44px); font-weight: 700; color: var(--ok, #22c55e); font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 10ch; text-align: center; }
.bm-l { font-size: 13px; color: var(--muted, #8b93ad); letter-spacing: .02em; }
.bm-stack { position: relative; width: 64px; height: 44px; }
.bm-stack i { position: absolute; left: 6px; width: 52px; height: 22px; border-radius: 4px; background: linear-gradient(135deg, #3ccf91, #1f9d6b); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 1px 0 rgba(0,0,0,.2); opacity: 0; animation: bm-drop 1.6s ease-in infinite; }
.bm-stack i::after { content: '$'; position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px/1 var(--mono, monospace); color: rgba(255,255,255,.85); }
.bm-stack i:nth-child(1) { animation-delay: 0s; } .bm-stack i:nth-child(2) { animation-delay: .4s; } .bm-stack i:nth-child(3) { animation-delay: .8s; } .bm-stack i:nth-child(4) { animation-delay: 1.2s; }
@keyframes bm-drop { 0% { transform: translateY(-26px) rotate(-6deg); opacity: 0; } 25% { opacity: 1; } 55% { transform: translateY(14px) rotate(2deg); opacity: 1; } 100% { transform: translateY(14px) rotate(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bm-stack i { animation: none; opacity: 1; transform: translateY(14px); } }
/* prep center overview: compact */
.pr-k2 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 10px; }
#pr-ch svg { max-height: 200px; }
.ps-chart { padding: 8px 10px !important; margin-bottom: 10px; }
.pr-trio { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 10px; }
.pr-trio .pf-card { padding: 10px 12px; } .pr-trio .pf-ch { margin-bottom: 6px; }
.pr-trio .pr-row { padding: 3px 0; font-size: 12px; } .pr-trio .pr-rl span.muted { font-size: 10.5px; }
.pr-li { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.pr-li:last-child { border-bottom: 0; } .pr-li .mono { color: var(--muted); font-size: 11px; } .pr-lc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pr-li b { font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .pr-k2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pr-trio { grid-template-columns: 1fr; } }
.pr-li { grid-template-columns: 74px minmax(0, 1fr) auto auto; } .pr-li .mono { white-space: nowrap; }
.pr-k2 .cl-k { display: flex; flex-direction: column; gap: 1px; } .pr-k2 .cl-k b { font-size: 18px; grid-row: auto; } .pr-k2 .cl-k em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ---------- esllr brand: logo + palette from the logo (electric blue, cyan, orange glow) ---------- */
:root:not([data-theme]) { --bg: #0b1020; --panel: #111933; --panel-2: #172242; --line: #233158; --fg: #e8eeff; --muted: #8e9bc2; --accent: #1f7bff; --accent-2: #22d3ee; --ship: #f5a524; }
:root:not([data-theme]) .btn.primary { background: linear-gradient(135deg, #1f7bff, #1aa7f0); border-color: #1f7bff; }
:root:not([data-theme]) .btn:hover { border-color: #3a5296; }
:root:not([data-theme]) .auth-hero { background: radial-gradient(900px 480px at 0% 0%, #1f7bff2e, transparent), radial-gradient(600px 300px at 30% 100%, #f5a52414, transparent), var(--panel); }
:root[data-theme="light"] { --accent: #1668e8; }
.logo-img { display: inline-flex; align-items: center; line-height: 0; }
.logo-img img { height: 46px; width: auto; display: block; }
.logo-img.sm img { height: 38px; }
.auth-hero .logo-img img { height: 78px; margin-left: -6px; }
.logo-img .lg-light { display: none; }
:root[data-theme="light"] .logo-img .lg-dark, :root[data-theme="sand"] .logo-img .lg-dark { display: none; }
:root[data-theme="light"] .logo-img .lg-light, :root[data-theme="sand"] .logo-img .lg-light { display: block; }
.sb-head .logo-img { margin: -4px 0 -4px -4px; }
.bm-logo { width: 72px; height: 72px; filter: drop-shadow(0 0 18px #1f7bff66); animation: bm-pulse 1.6s ease-in-out infinite; }
@keyframes bm-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .bm-logo { animation: none; } }
.auth-tag { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(90deg, #22d3ee, #1f7bff 55%, #f5a524); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: -6px; }
.auth-tag { color: var(--muted); background: none; -webkit-background-clip: border-box; background-clip: border-box; font-size: 13.5px; }
.auth-tag b { font-weight: 800; font-size: 1.15em; background: linear-gradient(135deg, #22d3ee, #1f7bff 60%, #f5a524); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero .logo-img img { height: 120px; margin: 0 0 -6px -10px; filter: drop-shadow(0 0 28px #1f7bff40); }
.auth-tag { font-size: 14px; }
/* ---------- esllr brand mark + wordmark ---------- */
.logo.brand { display: inline-flex; align-items: center; gap: .3em; font-size: 26px; line-height: 1; }
.logo.brand img { height: 1.4em; width: auto; }
.logo.brand.sm { font-size: 22px; }
.logo.brand .wm { font-weight: 800; letter-spacing: -.045em; background: linear-gradient(180deg, #ffffff 15%, #a9c9ff 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo.brand .wm i { font-style: normal; background: linear-gradient(135deg, #5ee7ff, #1f7bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .logo.brand .wm, :root[data-theme="sand"] .logo.brand .wm { background: linear-gradient(180deg, #132457, #1f4fc9); -webkit-background-clip: text; background-clip: text; }
.auth-hero .logo.brand { font-size: 52px; margin-left: -4px; }
.auth-hero .logo.brand img { filter: none; }
.sb-head .logo.brand { margin: 0; }
.bm-logo { width: 72px; height: 72px; filter: drop-shadow(0 0 22px #1f7bff55); }
/* ---------- esllr brand v3: charcoal + emerald ---------- */
:root:not([data-theme]) { --bg: #0b100f; --panel: #111816; --panel-2: #17211e; --line: #23312c; --fg: #e9f5f0; --muted: #8ba39a; --accent: #10b981; --accent-2: #6ee7b7; --ok: #34d399; --ship: #f5a524; }
:root:not([data-theme]) .btn.primary { background: linear-gradient(135deg, #059669, #10b981); border-color: #0ea573; color: #fff; }
:root:not([data-theme]) .btn:hover { border-color: #2f5248; }
:root:not([data-theme]) .auth-hero { background: radial-gradient(900px 480px at 0% 0%, #10b98124, transparent), radial-gradient(500px 300px at 20% 100%, #6ee7b70f, transparent), var(--panel); }
:root[data-theme="light"] { --accent: #059669; }
.logo.brand .wm, :root[data-theme="light"] .logo.brand .wm, :root[data-theme="sand"] .logo.brand .wm { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--fg); }
.logo.brand .wm em { font-style: normal; color: #34d399; background: none; }
:root[data-theme="light"] .logo.brand .wm em, :root[data-theme="sand"] .logo.brand .wm em { color: #059669; }
.logo.brand img { height: 1.3em; filter: none; }
.logo.brand i { all: unset; }
.auth-tag b { background: linear-gradient(135deg, #6ee7b7, #10b981); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bm-logo { filter: drop-shadow(0 0 22px #10b98155); }
.bm-n { color: #34d399; }
