/* Validus Canis — owner dashboard. Same brass/near-black as the store, tuned for reading on a phone. */
:root {
  --bg: #0B0A0C; --panel: #131215; --raise: #1A181C; --line: #26232A; --line2: #34303A;
  --text: #E9E2D6; --muted: #8C857D; --dim: #5F5953;
  --brass: #C4965A; --brass-l: #DDB37E; --brass-d: #8A6840;
  --new: #E39A45; --packed: #79A7E8; --shipped: #6CC08B; --bad: #E07A65;
  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --sub: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body { font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass-l); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-size: 13px; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 22px; font-family: var(--sub); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; text-decoration: none; transition: filter .2s, transform .2s; }
.btn--brass { background: linear-gradient(180deg, #CFA367, #9C7647); color: #0B0A0C; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px rgba(0,0,0,.4); }
.btn--brass:hover { filter: brightness(1.06); }
.btn--ghost { border: 1px solid var(--line2); color: var(--text); }
.btn--ghost:hover { border-color: var(--brass-d); color: var(--brass-l); }
.btn--sm { padding: 8px 14px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--brass-l); }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--brass-l); border-color: var(--brass-d); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 50% 0%, rgba(196,150,90,.12), transparent 60%), var(--bg); }
.login__card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; background: var(--panel); border: 1px solid var(--line); padding: 34px 28px; border-radius: 14px; }
.login__card img { margin: 0 auto 6px; }
.login__card h1 { font-family: var(--display); font-weight: 400; font-size: 42px; letter-spacing: .03em; line-height: 1; margin-bottom: 14px; }
.login__card label { text-align: left; font-family: var(--sub); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.login__card input { background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 13px 14px; font-size: 16px; }
.login__card input:focus { outline: none; border-color: var(--brass); }
.login__err { color: var(--bad); font-size: 13px; min-height: 18px; text-align: left; }
.login__hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.login__hint b { color: var(--brass-l); font-family: ui-monospace, Menlo, monospace; }
.eyebrow { font-family: var(--sub); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 20px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); background: rgba(11,10,12,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 24px; letter-spacing: .05em; }
.top__brand b { color: var(--brass); font-weight: 400; }
.top__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.mode { font-family: var(--sub); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; border: 1px solid currentColor; }
.mode--live { color: var(--shipped); }
.mode--demo { color: var(--new); }
.demo-banner { background: rgba(227,154,69,.08); border-bottom: 1px solid rgba(227,154,69,.25); color: #E8C49A; font-size: 13px; padding: 10px 20px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.demo-banner .link-btn { margin-left: auto; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi { text-align: left; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
button.kpi:hover { border-color: var(--line2); }
.kpi__k { font-family: var(--sub); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi__v { font-family: var(--display); font-size: 44px; line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi__s { font-size: 12.5px; color: var(--dim); }
.kpi--alert.has { border-color: rgba(227,154,69,.55); background: linear-gradient(180deg, rgba(227,154,69,.10), var(--panel)); }
.kpi--alert.has .kpi__v { color: var(--new); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { font-family: var(--sub); font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--text); border-color: var(--brass); }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel__head h2 { font-family: var(--sub); font-size: 16px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.panel__head .btn { margin-left: auto; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--sub); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; }
.chip[aria-pressed="true"] { background: var(--brass); color: #0B0A0C; border-color: var(--brass); }
.chip .n { opacity: .7; margin-left: 4px; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; min-width: 0; flex: 0 1 230px; }
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.search input { background: none; border: 0; outline: none; min-width: 0; width: 100%; font-size: 14px; }

/* order list */
.olist { max-height: calc(100vh - 330px); min-height: 280px; overflow: auto; }
.orow { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.orow:hover { background: var(--raise); }
.orow[aria-current="true"] { background: var(--raise); box-shadow: inset 3px 0 0 var(--brass); }
.dot { width: 10px; height: 10px; border-radius: 99px; }
.dot--new { background: var(--new); box-shadow: 0 0 0 4px rgba(227,154,69,.15); }
.dot--packed { background: var(--packed); }
.dot--shipped { background: var(--shipped); }
.orow__who { min-width: 0; }
.orow__who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow__who span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.orow__amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.pill { font-family: var(--sub); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; border: 1px solid currentColor; white-space: nowrap; }
.pill--new { color: var(--new); } .pill--packed { color: var(--packed); } .pill--shipped { color: var(--shipped); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; color: var(--text); letter-spacing: .03em; }

/* detail */
.detail { position: sticky; top: 84px; }
.d { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.d__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.d__num { font-family: var(--display); font-size: 36px; line-height: 1; letter-spacing: .03em; }
.d__date { font-size: 13px; color: var(--muted); margin-top: 4px; }
.d__back { display: none; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps div { display: flex; flex-direction: column; gap: 6px; font-family: var(--sub); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.steps div::before { content: ''; height: 4px; border-radius: 2px; background: var(--line2); }
.steps .on { color: var(--text); }
.steps .on::before { background: var(--brass); }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.box h3 { font-family: var(--sub); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.addr { font-size: 15px; line-height: 1.55; }
.addr small { color: var(--muted); font-size: 13px; }
.copy { font-family: var(--sub); font-size: 11px; letter-spacing: .12em; color: var(--brass-l); text-transform: uppercase; }
.li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.li:last-of-type { border-bottom: 0; }
.li img { width: 46px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--raise); }
.li b { display: block; font-weight: 600; font-size: 14px; }
.li span { font-size: 13px; color: var(--muted); }
.li .size { display: inline-block; font-family: var(--sub); font-weight: 700; letter-spacing: .08em; color: var(--brass-l); border: 1px solid var(--brass-d); border-radius: 4px; padding: 0 6px; margin-right: 6px; }
.tot { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); padding: 3px 0; font-variant-numeric: tabular-nums; }
.tot--grand { color: var(--text); font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 9px; }
.act { display: flex; flex-direction: column; gap: 10px; }
.act__row { display: flex; gap: 10px; flex-wrap: wrap; }
.act__row .btn { flex: 1; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 140px; }
.field label { font-family: var(--sub); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 11px 12px; font-size: 15px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--brass); }
.err { color: var(--bad); font-size: 13px; }
.note { font-size: 13px; color: var(--muted); }
.note a { color: var(--brass-l); }

/* sales */
.chart { padding: 16px 16px 8px; }
.chart svg { width: 100%; height: 240px; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--sub); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl .pimg { display: flex; align-items: center; gap: 10px; }
.tbl .pimg img { width: 34px; height: 42px; object-fit: cover; border-radius: 4px; }
.sizes { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.srow { display: grid; grid-template-columns: 44px 1fr 34px; gap: 10px; align-items: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.srow b { font-family: var(--sub); letter-spacing: .08em; }
.sbar { height: 10px; background: var(--raise); border-radius: 99px; overflow: hidden; }
.sbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brass-d), var(--brass-l)); border-radius: 99px; }

/* products */
.howto { padding: 14px 16px 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.howto b { color: var(--text); }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 16px; }
.pc { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.pc img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.pc div { padding: 12px; }
.pc b { display: block; font-weight: 600; }
.pc span { font-size: 13px; color: var(--muted); }
.pc .sold { color: var(--brass-l); }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* packing slip — only visible when printing */
.slip { display: none; }
@media print {
  body > *:not(.slip) { display: none !important; }
  .slip { display: block !important; color: #000; background: #fff; font-family: var(--body); padding: 24px; }
  .slip h1 { font-family: var(--display); font-size: 34px; font-weight: 400; letter-spacing: .04em; }
  .slip table { width: 100%; border-collapse: collapse; margin-top: 18px; }
  .slip td, .slip th { border-bottom: 1px solid #ccc; padding: 8px 4px; text-align: left; font-size: 13px; }
  html, body { background: #fff !important; }
}

/* phone */
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .split, .grid2 { grid-template-columns: 1fr; }
  .detail { position: static; }
  .olist { max-height: none; }
  .split.has-sel .list-panel { display: none; }
  .split:not(.has-sel) .detail { display: none; }
  .d__back { display: inline-flex; }
  .search { flex: 1 1 100%; margin-left: 0; }
}
@media (max-width: 480px) {
  .top { padding-inline: 14px; }
  .top__brand span { display: none; }
  .wrap { padding-inline: 14px; }
  .kpi { padding: 14px; }
  .kpi__v { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── v2: clearer order rows + detail ── */
.orow { align-items: start; padding: 14px 16px; }
.orow .dot { margin-top: 6px; }
.orow .pill { margin-top: 2px; }
.orow__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.orow__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.orow__top b { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow__amt { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15.5px; }
.orow__what { font-size: 13.5px; color: var(--text); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow__what .sz { font-family: var(--sub); font-weight: 700; letter-spacing: .06em; color: var(--brass-l); border: 1px solid var(--brass-d); border-radius: 4px; padding: 0 5px; font-size: 12px; }
.orow__what .more { color: var(--muted); }
.orow__meta { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow__meta svg { width: 13px; height: 13px; flex: none; }
.d__paid { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.d__paid b { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.d__paid small { font-size: 12px; color: var(--muted); margin-top: -3px; }
.warn { display: flex; gap: 10px; align-items: flex-start; background: rgba(224,122,101,.08); border: 1px solid rgba(224,122,101,.4); color: #F0B4A6; border-radius: 10px; padding: 11px 13px; font-size: 13.5px; line-height: 1.45; }
.warn svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--bad); }
.act__step { font-size: 14px; color: var(--text); }
.act__step b { color: var(--brass-l); font-family: var(--sub); letter-spacing: .1em; text-transform: uppercase; font-size: 13px; margin-right: 4px; }
.addr { font-size: 16px; line-height: 1.55; }
.contact { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
details.money summary { cursor: pointer; font-family: var(--sub); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; list-style: none; }
details.money summary::-webkit-details-marker { display: none; }
details.money summary::after { content: ' +'; color: var(--brass); }
details.money[open] summary::after { content: ' −'; }
details.money[open] summary { margin-bottom: 8px; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.field[hidden] { display: none !important; }

/* shipping rates */
.shiprates { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 16px; }
.shiprates label { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.shiprates label > span { font-size: 12px; color: var(--muted); }
.money-in { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 600; color: var(--text); }
.money-in input { width: 100%; min-width: 0; background: var(--raise); border: 1px solid var(--line2); border-radius: 6px; color: var(--text); font: inherit; padding: 6px 8px; }
.money-in input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.shiprates__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shiprates input::-webkit-inner-spin-button { opacity: .4; }

/* Pirate Ship step */
.pirate { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.pirate .btn { align-self: flex-start; }
.pirate .note b { color: var(--text); }
details.manual { margin-top: 10px; }
details.manual summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
details.manual summary:hover { color: var(--brass); }

/* ── v3: custom orders + profit ── */
.tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: none; }
.tab__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--new); color: #0B0A0C; font-size: 11px; letter-spacing: 0; vertical-align: 2px; }
.tab__n[hidden] { display: none; }
.dot--muted { background: var(--line2); }
.pill--quoted { color: var(--brass-l); } .pill--paid { color: var(--packed); } .pill--done { color: var(--shipped); } .pill--lost { color: var(--dim); }
.muted { color: var(--muted); }
.neg { color: #E0705A; } .pos { color: #7FC48A; } .amber { color: #E3B45A; }
.flag { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 99px; background: var(--line2); color: var(--text); font-size: 11px; font-weight: 700; }
.stock { font-size: 12px; color: var(--brass-l); margin-left: 6px; }
.stock--low { color: #E0705A; } .stock--mto { color: var(--dim); }

#view-profit .panel, #view-custom .panel + .panel { margin-bottom: 16px; }
#view-profit .panel { margin-bottom: 16px; }
.kpis--in { padding: 16px; margin: 0; }
.kpi--good .kpi__v { color: #7FC48A; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.tbl--profit tbody tr { cursor: pointer; }
.tbl--profit tbody tr:hover { background: var(--raise); }
.tbl--econ td, .tbl--profit td { vertical-align: middle; }
.tbl--econ td:first-child { min-width: 150px; }
.sub { font-family: var(--sub); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 18px 16px 8px; }
.sub small { text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 12px; color: var(--dim); }
.costs { padding: 0 0 16px; }
.costs .sub { margin-inline: 0; }
.costs__grid { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(110px, 160px); gap: 8px 12px; align-items: center; padding: 0 16px; }
.costs__grid--3 { grid-template-columns: minmax(120px, 1fr) minmax(96px, 150px) minmax(96px, 150px); }
.costs__h { font-family: var(--sub); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.costs__l { font-size: 14px; }
.costs__l small { display: block; font-size: 12px; color: var(--muted); }
.costs .howto { margin: 14px 16px; }
.costs .shiprates__foot { padding: 14px 16px 0; }
.money-in--sm { max-width: 110px; margin-left: auto; }
input.txt, .cform input, .cform select, .cform textarea, .qf input, .qf select, textarea.notes { width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; font-size: 15px; color: var(--text); }
input.txt:focus, .cform :is(input,select,textarea):focus, .qf :is(input,select):focus, textarea.notes:focus { outline: none; border-color: var(--brass); }

.statusbar { display: flex; flex-wrap: wrap; gap: 6px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.msg { margin-top: 10px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
.design { display: block; margin-top: 12px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2); background: repeating-conic-gradient(#1d1b20 0 25%, #151417 0 50%) 0 0/16px 16px; max-width: 100%; }
.design img { display: block; max-width: 100%; max-height: 340px; object-fit: contain; margin: 0 auto; }
.cname { font-size: 30px; overflow-wrap: anywhere; }
textarea.notes { min-height: 90px; resize: vertical; font-family: var(--body); }
.paybox { border-color: var(--brass-d); background: rgba(196,150,90,.06); }
.paybox .act__row { margin-top: 10px; align-items: center; }
.linkout { flex: 1 1 200px; font-size: 13px !important; }
.cform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cform label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.cform .wide, .cform .err, .cform .act__row { grid-column: 1 / -1; }
.qf { display: flex; flex-direction: column; gap: 12px; }
.qf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.qf label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.qf .money-in { width: 100%; }
.qf .money-in input { width: 100%; }
.qf input:disabled { opacity: .45; }
.qout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.qout h4 { font-family: var(--sub); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.err { color: #E0705A; font-size: 13.5px; min-height: 0; }
.profit-box summary b { margin-left: 8px; }
@media (max-width: 900px) {
  .split--custom.has-sel .list-panel { display: none; }
  .split--custom:not(.has-sel) .detail { display: none; }
}
@media (max-width: 560px) {
  .qf__grid, .qout, .cform { grid-template-columns: 1fr; }
  .costs__grid--3 { grid-template-columns: minmax(90px, 1fr) 1fr 1fr; gap: 8px; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .tab { padding: 10px 12px; font-size: 14px; }
}
.qf .money-in, .costs .money-in, .tbl .money-in { font-size: 15px; font-weight: 500; }
#view-custom .panel__head .btn { white-space: nowrap; }
#view-custom .panel__head .filters { flex: 1 1 100%; }
.paybox .btn, .qf .btn { white-space: nowrap; }
.tbl .money-in { min-width: 92px; justify-content: flex-end; }
.tbl .money-in input { min-width: 64px; }
@media (max-width: 560px) { .tbl td, .tbl th { padding: 8px 10px; } .tbl--econ td:first-child { min-width: 120px; } }

/* ── v4: customers, site, popular, on hand ── */
.btn--xs { padding: 5px 10px; font-size: 11px; }
.act__row--tight { gap: 6px; flex-wrap: nowrap; }
.chk { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); }
.chk input { accent-color: var(--brass); width: 16px; height: 16px; }
.bulk { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.danger { color: #E0705A !important; border-color: rgba(224,112,90,.5) !important; }
.danger-solid { background: #C4573F !important; color: #fff !important; }
.confirm { margin: 12px 16px; padding: 14px; border: 1px solid rgba(224,112,90,.45); border-radius: 10px; background: rgba(224,112,90,.07); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.tbl--users td { vertical-align: top; }
.tbl--users td small { display: block; color: var(--muted); font-size: 12px; }
.tbl--users td:first-child { width: 28px; padding-right: 0; }
.tbl--users input[type=checkbox] { accent-color: var(--brass); width: 16px; height: 16px; }
.pts-form { display: flex; gap: 8px; flex-wrap: wrap; }
.pts-form input { background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 7px 10px; color: var(--text); font-size: 14px; }
.pts-form input[name=delta] { width: 120px; }
.pts-form input[name=note] { flex: 1 1 200px; }
.faq-ed { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.faq-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.faq-row legend { padding: 0 6px; font-family: var(--sub); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.faq-row--need { border-color: rgba(227,154,69,.6); background: rgba(227,154,69,.04); }
.faq-row--off { opacity: .55; }
.faq-row__g { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.faq-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.faq-row label.chk { flex-direction: row; }
.faq-row input:not([type=checkbox]), .faq-row textarea { background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 14.5px; font-family: var(--body); }
.faq-row textarea { resize: vertical; min-height: 70px; }
.coll-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.coll { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.coll__img { width: 44px; height: 44px; border-radius: 6px; background: var(--raise); overflow: hidden; }
.coll__img img { width: 100%; height: 100%; object-fit: cover; }
.coll small { display: block; color: var(--muted); font-size: 12px; }
.coll-form { padding: 14px 16px 16px; }
.spark { padding: 12px 16px 0; }
.spark svg { width: 100%; height: 60px; display: block; }
.vbar { position: relative; min-width: 140px; height: 22px; background: var(--raise); border-radius: 4px; overflow: hidden; }
.vbar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(160,122,74,.55), rgba(221,179,126,.75)); }
.vbar b { position: relative; padding-left: 8px; line-height: 22px; font-size: 13px; }
.tag { display: inline-block; font-family: var(--sub); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.tag--hot { background: rgba(224,112,90,.18); color: #F0957F; }
.tag--ok { background: rgba(127,196,138,.14); color: #8FD09A; }
.tag--mid { background: rgba(227,180,90,.15); color: #E3B45A; }
.tag--cold { background: var(--raise); color: var(--muted); }
.rts { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border-top: 1px solid var(--line); }
.rts img { width: 56px; height: 68px; object-fit: cover; border-radius: 6px; background: var(--raise); }
.rts__main small { display: block; color: var(--muted); font-size: 12.5px; }
.rts__sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rts__sizes label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); font-family: var(--sub); letter-spacing: .1em; }
.rts__sizes input { width: 64px; background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 6px 8px; color: var(--text); font-size: 15px; }
.rts-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.rts-add label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.rts-add select { background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 14.5px; min-width: 220px; }
.tbl--bo input.txt { min-width: 120px; }
.tbl--bo input[type=checkbox] { accent-color: var(--brass); width: 18px; height: 18px; }
@media (max-width: 700px) {
  .faq-row__g { grid-template-columns: 1fr; }
  .rts { grid-template-columns: 48px minmax(0, 1fr); }
  .rts > button { grid-column: 1 / -1; justify-self: start; }
}
