/* ==========================================================================
   EMINERE · Admin Pro — sidebar shell, Dashboard & Inventory
   --------------------------------------------------------------------------
   Loaded AFTER admin.css (which provides the colour tokens + the detail
   drawer / crop modal styles we reuse). This sheet adds the persistent
   left sidebar shell and the two new operational surfaces. Same palette
   as the rest of the admin — ink sidebar, cream workspace, gold accents.
   ========================================================================== */

/* ── Shell layout ──────────────────────────────────────────────────── */
body.pro { background: var(--cream-bg); }
.pro-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 60;
  background: var(--navy); color: var(--cream);
  display: flex; flex-direction: column;
  border-right: 1px solid #050f21;
}
.pro-main {
  margin-left: 248px; min-height: 100vh;
  padding: 36px 40px 80px;
  max-width: 1500px;
}

/* ── Sidebar brand ─────────────────────────────────────────────────── */
.pro-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 22px 20px;
  border-bottom: 1px solid rgba(242,236,224,.08);
}
.pro-brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; color: var(--gold);
  background: rgba(201,168,76,.12); border: 1px solid rgba(201,168,76,.3);
}
.pro-brand-mark svg { width: 20px; height: 20px; display: block; }
.pro-brand-name {
  font-family: var(--mono); font-size: 13px; letter-spacing: .28em;
  color: var(--cream); line-height: 1; display: grid; gap: 6px;
}
.pro-brand-name .brand-wordmark { height: 11px; width: auto; display: block; }
.pro-brand-name small {
  font-size: 8.5px; letter-spacing: .26em; color: var(--gold);
}

/* ── Sidebar nav ───────────────────────────────────────────────────── */
.pro-nav { flex: 1 1 auto; overflow-y: auto; padding: 18px 12px; }
.pro-nav::-webkit-scrollbar { width: 0; }
.pro-nav-group { margin-bottom: 22px; }
.pro-nav-label {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .26em;
  color: rgba(242,236,224,.4); text-transform: uppercase;
  padding: 0 12px 10px;
}
.pro-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  font-family: var(--sans); font-size: 13.5px; letter-spacing: .01em;
  color: rgba(242,236,224,.72);
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.pro-nav-item .ic { width: 18px; height: 18px; flex: 0 0 auto; opacity: .8; }
.pro-nav-item:hover { background: rgba(242,236,224,.06); color: var(--cream); }
.pro-nav-item.active {
  background: rgba(201,168,76,.14); color: var(--gold);
}
.pro-nav-item.active .ic { opacity: 1; }
.pro-nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px;
  width: 3px; background: var(--gold); border-radius: 0 2px 2px 0;
}
.pro-nav-item.soon { color: rgba(242,236,224,.34); cursor: default; pointer-events: none; }
.pro-nav-item .soon-tag {
  margin-left: auto;
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(242,236,224,.4);
  border: 1px solid rgba(242,236,224,.18); padding: 2px 5px; border-radius: 3px;
}

/* ── Sidebar footer (user) ─────────────────────────────────────────── */
.pro-side-foot {
  border-top: 1px solid rgba(242,236,224,.08);
  padding: 16px 16px 18px;
}
.pro-user { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.pro-user-av {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  background: rgba(201,168,76,.16); color: var(--gold);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  border: 1px solid rgba(201,168,76,.3);
}
.pro-user-meta { display: grid; gap: 2px; min-width: 0; }
.pro-user-meta .n { font-size: 13px; color: var(--cream); }
.pro-user-meta .r {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  color: rgba(242,236,224,.45); text-transform: uppercase;
}
.pro-signout {
  width: 100%; text-align: left;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  color: rgba(242,236,224,.5); text-transform: uppercase;
  padding: 8px 2px; transition: color .15s;
}
.pro-signout:hover { color: var(--gold); }

/* ── Page header ───────────────────────────────────────────────────── */
.pro-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 28px;
}
.pro-head .titles .eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em;
  color: var(--gold-deep); text-transform: uppercase; margin-bottom: 10px;
}
.pro-head .titles { min-width: 0; }
.pro-head h1 {
  font-family: var(--serif); font-size: clamp(23px, 2vw, 30px);
  font-weight: 500; letter-spacing: -.01em; line-height: 1.08; margin: 0;
}
.pro-head h1 em { font-style: italic; color: var(--gold-deep); }
.pro-head .sub {
  font-size: 13.5px; color: var(--ink-dim); margin-top: 12px;
}
.pro-head-actions { display: flex; gap: 10px; }
.pro-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  transition: border-color .2s, background .2s, color .2s;
}
.pro-btn:hover { border-color: var(--ink); }
.pro-btn.primary { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.pro-btn.primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.pro-btn svg { width: 14px; height: 14px; }

/* ── KPI cards ─────────────────────────────────────────────────────── */
.kpi-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  margin-bottom: 28px;
}
.kpi {
  background: rgba(255,255,255,.55); border: 1px solid var(--line);
  padding: 20px 20px 18px; position: relative;
  display: flex; flex-direction: column; gap: 10px; min-height: 132px;
}
.kpi .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  color: var(--ink-dim); text-transform: uppercase; max-width: 16ch; line-height: 1.5;
}
.kpi .v {
  font-family: var(--serif); font-size: 27px; font-weight: 500;
  letter-spacing: -.01em; color: var(--ink); line-height: 1; margin-top: auto;
}
.kpi .d {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em;
  color: var(--mute); text-transform: none;
}
.kpi .d.warn { color: var(--status-sold); }
.kpi .ic {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; display: grid; place-items: center;
  background: rgba(26,26,26,.05); color: var(--gold-deep);
}
.kpi .ic svg { width: 17px; height: 17px; }
.kpi.alert { border-color: rgba(184,92,92,.35); background: rgba(184,92,92,.05); }
.kpi.alert .ic { background: rgba(184,92,92,.1); color: var(--status-sold); }

/* ── Dashboard panels ──────────────────────────────────────────────── */
.panel-row {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 18px;
  margin-bottom: 18px;
}
.panel {
  background: rgba(255,255,255,.5); border: 1px solid var(--line);
  padding: 24px;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.panel-head h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -.005em;
}
.panel-head .link {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  color: var(--gold-deep); text-transform: uppercase;
}
.panel-head .link:hover { color: var(--ink); }

/* Donut + legend */
.donut-wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.donut { width: 184px; height: 184px; }
.donut-center { font-family: var(--serif); }
.donut-legend { display: grid; gap: 9px; align-content: center; }
.donut-legend .row {
  display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center;
  font-size: 12.5px; color: var(--ink-dim);
}
.donut-legend .sw { width: 10px; height: 10px; border-radius: 2px; }
.donut-legend .ct { font-family: var(--mono); font-size: 11px; color: var(--ink); letter-spacing: .04em; }

/* Bar chart */
.bars { width: 100%; height: 250px; }
.bars text { font-family: var(--mono); fill: var(--ink-dim); }
.bar-legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-dim);
}
.bar-legend .it { display: inline-flex; align-items: center; gap: 6px; }
.bar-legend .sw { width: 9px; height: 9px; border-radius: 2px; }

/* Recent events table */
.events { width: 100%; border-collapse: collapse; }
.events th {
  text-align: left; padding: 0 14px 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  color: var(--ink-dim); text-transform: uppercase; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.events th.r, .events td.r { text-align: right; }
.events td {
  padding: 13px 14px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink);
}
.events tr:last-child td { border-bottom: 0; }
.events .tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; padding: 3px 8px;
  background: rgba(46,125,79,.1); color: var(--status-live);
  white-space: nowrap;
}
.events .tag.stock { background: rgba(201,168,76,.14); color: var(--gold-deep); }
.events .when { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); letter-spacing: .04em; }
.events .val { font-family: var(--mono); font-size: 12.5px; color: var(--ink); letter-spacing: .04em; }

/* ── Inventory ─────────────────────────────────────────────────────── */
.inv-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.inv-tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 18px; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.inv-tab:hover { color: var(--ink); }
.inv-tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.inv-tab .badge {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em;
  padding: 2px 7px; background: rgba(26,26,26,.08); color: var(--ink-dim);
}
.inv-tab.active .badge { background: var(--navy); color: var(--cream); }

.inv-toolbar {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  align-items: center; margin-bottom: 18px;
}
.inv-search {
  position: relative;
}
.inv-search input {
  width: 100%; padding: 11px 14px 11px 38px;
  background: rgba(255,255,255,.5); border: 1px solid var(--line);
  color: var(--ink); font-family: var(--sans); font-size: 13.5px; outline: 0;
  transition: border-color .2s;
}
.inv-search input:focus { border-color: var(--gold); }
.inv-search input::placeholder { color: rgba(26,26,26,.4); }
.inv-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-dim); pointer-events: none;
}
.inv-attention, .inv-filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-dim);
  border: 1px solid var(--line); background: rgba(255,255,255,.5);
  transition: border-color .2s, color .2s, background .2s;
}
.inv-attention svg, .inv-filter svg { width: 14px; height: 14px; }
.inv-attention:hover, .inv-filter:hover { color: var(--ink); border-color: var(--gold-deep); }
.inv-attention.on {
  color: var(--status-sold); border-color: rgba(184,92,92,.4); background: rgba(184,92,92,.07);
}

.inv-meta {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--ink-dim); text-transform: uppercase; margin-bottom: 12px;
}

/* Inventory table */
.inv-table-wrap { border: 1px solid var(--line); background: rgba(255,255,255,.4); overflow-x: auto; }
table.inv {
  width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 13px;
  min-width: 940px;
}
table.inv thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; padding: 12px 14px; white-space: nowrap;
  background: var(--navy); color: var(--cream);
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 500;
}
table.inv thead th.sortable { cursor: pointer; }
table.inv thead th .car { opacity: .5; margin-left: 5px; }
table.inv thead th.r, table.inv td.r { text-align: right; }
table.inv tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  vertical-align: middle; background: rgba(255,255,255,.45);
}
table.inv tbody tr { cursor: pointer; transition: background .12s; }
table.inv tbody tr:hover td { background: rgba(255,255,255,.92); }
table.inv tbody tr:last-child td { border-bottom: 0; }

.inv-thumb {
  width: 46px; height: 46px; object-fit: cover; display: block;
  background: #fff; border: 1px solid var(--line);
}
.inv-thumb-empty {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: rgba(26,26,26,.04); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 8px; letter-spacing: .12em;
  color: var(--mute); text-transform: uppercase;
}
.inv-stock { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink); }
.inv-serial { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--gold-deep); margin-top: 3px; }
.inv-watch .nm { font-family: var(--serif); font-size: 14px; color: var(--ink); line-height: 1.25; }
.inv-watch .rf { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-dim); margin-top: 3px; }
.inv-watch .own {
  display: inline-block; margin-top: 5px;
  font-family: var(--mono); font-size: 8px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); border: 1px solid rgba(154,126,51,.35); padding: 1px 5px;
}

/* Status pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 9px;
}
.pill::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.pill.instock   { color: var(--status-live);     background: rgba(46,125,79,.1); }
.pill.onhold    { color: var(--status-reserved); background: rgba(184,138,46,.12); }
.pill.unlisted  { color: var(--status-hidden);   background: rgba(107,107,107,.1); }
.pill.sold      { color: var(--status-sold);     background: rgba(184,92,92,.1); }
.pill.consigned { color: var(--gold-deep);       background: rgba(201,168,76,.12); }
.pill.returned  { color: var(--status-hidden);   background: rgba(107,107,107,.16); }

.attn-dot {
  display: inline-grid; place-items: center; margin-left: 6px;
  width: 16px; height: 16px; color: var(--status-sold);
}
.attn-dot svg { width: 14px; height: 14px; }

.inv-loc {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--ink-dim); border: 1px solid var(--line); padding: 2px 7px;
}
.inv-type {
  display: inline-block; white-space: nowrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--line); color: var(--ink-dim);
}
/* Class names carry Airtable's Ownership values verbatim (Owned / Consigned);
   `unset` marks a row nobody has classified yet. */
.inv-type.Consigned { color: var(--gold-deep); border-color: rgba(154,126,51,.4); background: rgba(201,168,76,.08); }
.inv-type.unset { color: #a3701c; border-color: rgba(163,112,28,.5); background: rgba(163,112,28,.08); }
.inv-year { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-dim); }
/* Location column (Airtable's Location select, verbatim) — same type as
   the Added cell beside it. Blank = no location set. */
.inv-loc { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--ink-dim); white-space: nowrap; }
.inv-loc.unset { color: var(--mute); }
.inv-date { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--ink-dim); white-space: nowrap; }
/* Days held under the Added date (frozen at sale/return for closed rows). */
.inv-date-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .02em; color: var(--mute); margin-top: 3px; white-space: nowrap; }

/* Segmented view toggle (By status / By location) */
.seg { display: inline-flex; border: 1px solid var(--line); background: rgba(255,255,255,.5); }
.seg[hidden] { display: none; }   /* the rule above beats the attribute: Inventory's By-location toggle showed from 2026-10-03 until this (2026-11-10) */
.seg-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-dim); background: transparent; border: 0; cursor: pointer;
  padding: 10px 16px; transition: color .15s, background .15s;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { color: var(--cream); background: var(--navy); }

/* Group header row in the By-location view */
table.inv tr.inv-group-row td {
  background: rgba(26,26,26,.04); padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
table.inv tr.inv-group-row .g {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink);
}
table.inv tr.inv-group-row .gc {
  margin-left: 10px; font-family: var(--mono); font-size: 10px;
  color: var(--cream); background: var(--gold-deep); padding: 1px 7px;
}
table.inv tr.inv-group-row:hover td { background: rgba(26,26,26,.04); }

/* By-location board — visual map of stock per location. The image is
   the hero on each tile; brand + model are overlaid on a fade-bottom
   gradient so the board reads as "what's at each location at a glance"
   rather than a list. (Board hidden 2026-10-03 pending a redesign for
   the four current locations — see inventory.html.) */
.loc-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.loc-col   { border: 1px solid var(--line); background: rgba(255,255,255,.4); display: flex; flex-direction: column; }
.loc-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; background: var(--navy); color: var(--cream);
}
.loc-col-head .t { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.loc-col-head .n { font-family: var(--mono); font-size: 10px; color: var(--ink); background: var(--gold); padding: 1px 8px; }
.loc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; padding: 14px;
}
.loc-card {
  position: relative; aspect-ratio: 1;
  background: #0f2140; border: 1px solid var(--line);
  cursor: pointer; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.loc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.loc-card-img { position: absolute; inset: 0; }
.loc-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loc-card-noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.04); color: var(--cream);
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .55;
}
/* Stock code badge — top-left, monospaced. */
.loc-card-stock {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px;
  background: rgba(0,0,0,.55);
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  color: var(--cream); backdrop-filter: blur(2px);
}
/* Status pill — top-right. */
.loc-card-pill {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  text-transform: uppercase;
}
.loc-card-pill.hold { background: rgba(184,138,46,.95); color: #fff; }
/* Brand + model overlay — bottom-left, gradient mask so text reads
   against any photo. */
.loc-card-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 36px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.78) 25%, rgba(0,0,0,0));
  color: var(--cream);
}
.loc-card-brand {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  color: rgba(255,255,255,.7); text-transform: uppercase; margin-bottom: 4px;
}
.loc-card-model {
  font-family: var(--serif); font-size: 14px; line-height: 1.25;
  color: var(--cream);
}
.loc-empty {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mute); padding: 32px 20px; text-align: center;
  grid-column: 1 / -1;
}

/* Attention checkbox column */
table.inv th.c, table.inv td.c { text-align: center; }
.attn-check {
  display: inline-grid; place-items: center; cursor: pointer;
  width: 22px; height: 22px;
}
.attn-check input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 17px; height: 17px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff;
  display: grid; place-items: center; transition: border-color .15s, background .15s;
}
.attn-check input:hover { border-color: var(--gold-deep); }
.attn-check input:checked {
  background: var(--status-sold); border-color: var(--status-sold);
}
.attn-check input:checked::after {
  content: ""; width: 9px; height: 9px;
  /* warning-triangle glyph in white */
  background: #fff;
  clip-path: polygon(50% 8%, 96% 92%, 4% 92%);
}
.attn-check.on { /* hook for row emphasis if needed */ }

/* ── Needs-attention flag: standout row in the intake forms (buy /
   consign / trade-in) and the inventory drawer header. Reuses the ATTN
   column's warning-triangle checkbox (.attn-check). ────────────────── */
:is(.txn-modal, .txn-form) .field.attn-row > label,
.dz-attn-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0;
  padding: 5px 10px 5px 8px; white-space: nowrap;
  border: 1px solid rgba(184,92,92,.35); background: rgba(184,92,92,.06);
  font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--status-sold);
  letter-spacing: 0; text-transform: none;
  transition: border-color .15s, background .15s;
}
:is(.txn-modal, .txn-form) .field.attn-row > label:hover,
.dz-attn-toggle:hover { border-color: var(--status-sold); }
:is(.txn-modal, .txn-form) .field.attn-row > label.on,
.dz-attn-toggle.on { background: rgba(184,92,92,.13); border-color: var(--status-sold); }
/* Drawer header: status pill left, compact attention toggle far right. */
.dz-pill-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }


/* ── Needs cell: inline multi-select on the inventory row ─────────── */
.needs-cell { position: relative; }
.needs-cell > summary {
  list-style: none; cursor: pointer; display: inline-flex;
  flex-wrap: wrap; gap: 4px; padding: 4px 6px;
  border: 1px solid transparent; min-height: 26px; align-items: center;
}
.needs-cell > summary::-webkit-details-marker { display: none; }
.needs-cell > summary:hover { border-color: var(--line); }
.needs-cell[open] > summary { border-color: var(--gold); }
.needs-chip {
  display: inline-block; padding: 2px 7px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold-deep);
  background: rgba(201,168,76,.10); border: 1px solid rgba(201,168,76,.3);
}
.needs-empty { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.needs-pop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
  min-width: 160px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  padding: 6px;
}
.needs-pop-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--ink);
}
.needs-pop-row:hover { background: rgba(201,168,76,.08); }
.needs-pop-row input { margin: 0; cursor: pointer; }
.inv-days { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); letter-spacing: .04em; }
.inv-price { font-family: var(--mono); font-size: 12px; color: var(--ink); letter-spacing: .04em; }
.inv-price.poa { color: var(--mute); }

.inv-actions { display: inline-flex; gap: 6px; }
.inv-actions button {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  color: var(--ink-dim); transition: color .15s, border-color .15s, background .15s;
}
.inv-actions button:hover { border-color: currentColor; }
.inv-actions .a-edit:hover { color: var(--gold-deep); }
.inv-actions .a-sold:hover { color: var(--status-live); }
.inv-actions .a-del:hover  { color: var(--status-sold); }
.inv-actions button svg { width: 14px; height: 14px; }

/* Drawer extras (Source / Cost two-column sections reuse detail-side) */
.dz-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dz-section-title {
  font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--ink);
  margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line);
}
.dz-section-title:first-child { margin-top: 8px; padding-top: 0; border-top: 0; }
.dz-list { display: grid; gap: 9px; }
.dz-list .row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline;
  font-size: 13px;
}
.dz-list .row .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  color: var(--ink-dim); text-transform: uppercase;
}
.dz-list .row .v { font-family: var(--serif); color: var(--ink); text-align: right; }
.dz-list .row .v.yes { color: var(--status-live); font-family: var(--mono); font-size: 11px; }
.dz-list .row .v.no  { color: var(--status-sold); font-family: var(--mono); font-size: 11px; }
.dz-source {
  background: rgba(26,26,26,.04); border: 1px solid var(--line);
  padding: 16px; display: grid; gap: 8px; margin-top: 4px;
}
.dz-source .nm {
  font-family: var(--serif); font-size: 15px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.dz-source .nm svg { width: 15px; height: 15px; color: var(--gold-deep); }
.dz-source .ln {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--ink-dim);
}
.dz-source .ln svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--mute); }
.dz-attn {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0;
}
.dz-attn .chip {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--status-sold); background: rgba(184,92,92,.1);
  border: 1px solid rgba(184,92,92,.3); padding: 3px 8px;
}
.dz-photo {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  background: #fff; border: 1px solid var(--line); margin-bottom: 6px;
}
.dz-head-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--ink-dim); margin-top: 6px;
}

/* ── Toolbar / filter popover / summary ────────────────────────────── */
.inv-toolbar { position: relative; }
.inv-filter-wrap { position: relative; }
.inv-filter .fcount {
  margin-left: 2px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .04em;
  background: var(--navy); color: var(--cream); padding: 1px 6px;
}
.inv-filter.on { color: var(--ink); border-color: var(--gold-deep); background: rgba(201,168,76,.07); }
.inv-filter-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: 320px; padding: 18px;
  background: var(--cream-bg); border: 1px solid var(--ink);
  box-shadow: 0 18px 50px rgba(14,14,14,.18);
  display: none;
}
.inv-filter-panel.open { display: block; }
.inv-filter-panel .ff { margin-bottom: 14px; }
.inv-filter-panel .ff:last-of-type { margin-bottom: 0; }
.inv-filter-panel label {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: var(--ink-dim); text-transform: uppercase;
}
.inv-filter-panel select, .inv-filter-panel input {
  width: 100%; padding: 9px 11px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-family: var(--sans); font-size: 13px; outline: 0;
}
.inv-filter-panel select:focus, .inv-filter-panel input:focus { border-color: var(--gold); }
.inv-filter-panel .ff-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv-filter-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
}
.inv-filter-foot .reset {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-dim); cursor: pointer;
}
.inv-filter-foot .reset:hover { color: var(--status-sold); }
.inv-filter-foot .apply {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cream); background: var(--navy);
  border: 1px solid var(--navy); padding: 9px 16px; cursor: pointer;
  transition: background .2s;
}
.inv-filter-foot .apply:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.inv-summary {
  display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 14px;
  background: rgba(255,255,255,.5); border: 1px solid var(--line);
}
.inv-summary .stat {
  display: grid; gap: 5px; padding: 14px 22px;
  border-right: 1px solid var(--line-soft);
}
.inv-summary .stat:last-child { border-right: 0; }
.inv-summary .stat .k {
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: var(--ink-dim); text-transform: uppercase;
}
.inv-summary .stat .v {
  font-family: var(--serif); font-size: 19px; color: var(--ink); line-height: 1;
}
.inv-summary .stat.alert .v { color: var(--status-sold); }

/* Sortable headers */
table.inv thead th .car {
  display: inline-block; opacity: 0; margin-left: 5px;
  transition: opacity .15s, transform .15s; font-size: 8px;
}
table.inv thead th.sortable:hover .car { opacity: .5; }
table.inv thead th.sorted .car { opacity: 1; }
table.inv thead th.sorted.desc .car { transform: rotate(180deg); }

/* Linked-party block in the inventory drawer (replaces the freeform
   Consignor / Source / Sold-to free-text fields with proper Clients
   record refs). One block per role: Source/Consignor for everything,
   plus Sold-to when the watch is in the Sold tab. */
.dz-parties { display: grid; gap: 16px; }
.dz-party { display: grid; gap: 6px; }
.dz-party label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-dim); text-transform: uppercase;
}
.dz-party-link {
  font-family: var(--serif); font-size: 16px; color: var(--gold-deep);
  text-decoration: none; padding: 8px 12px; cursor: pointer;
  background: rgba(201,168,76,.06); border: 1px solid rgba(201,168,76,.25);
  display: inline-block; max-width: max-content;
  transition: background .2s, border-color .2s;
}
.dz-party-link:hover { background: rgba(201,168,76,.14); border-color: var(--gold-deep); }
.dz-party-missing {
  font-family: var(--serif); font-size: 13px; color: var(--mute);
  font-style: italic;
}
.dz-party-sub {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--ink-dim); margin-top: 6px; line-height: 1.5;
}
.dz-inline-link { color: var(--gold-deep); text-decoration: none; }
.dz-inline-link:hover { text-decoration: underline; }
/* Consignor payout line on a sold consignment: owing (amber) / sent (green). */
.dz-payout .dz-payout-amt {
  font-family: var(--serif); font-size: 16px; padding: 8px 12px;
  display: inline-block; max-width: max-content;
}
.dz-payout.owing .dz-payout-amt { color: #a3701c; background: rgba(163,112,28,.08); border: 1px solid rgba(163,112,28,.35); }
.dz-payout.sent  .dz-payout-amt { color: var(--status-live); background: rgba(46,125,79,.08); border: 1px solid rgba(46,125,79,.3); }
/* Unclassified row — Ownership blank in Airtable. */
.dz-own-warn {
  margin: 12px 0 4px; padding: 10px 12px;
  font-family: var(--sans); font-size: 12.5px; line-height: 1.5;
  color: #a3701c; background: rgba(163,112,28,.08); border: 1px solid rgba(163,112,28,.35);
}
/* Consignment endings in the drawer footer — secondary weight next to Mark sold. */
.detail-actions .consign-act {
  padding: 10px 14px; background: transparent; color: var(--gold-deep);
  border: 1px solid var(--gold-deep); cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
}
.detail-actions .consign-act:hover { background: rgba(201,168,76,.12); }
.detail-actions .consign-act[disabled] { opacity: .5; cursor: not-allowed; }
/* Read-only field placeholder inside the drawer (e.g. Buy date) */
.dz-readonly {
  padding: 9px 10px; min-height: 36px; box-sizing: border-box;
  border: 1px dashed var(--line); background: rgba(0,0,0,.02);
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  letter-spacing: .04em;
}

/* ── Sale card (inventory drawer, Sold watches) ──────────────────────
   Sits under the drawer header. Closed, it is one strip: net profit,
   margin, a toggle. Open, the statement unfolds below it — who / when /
   how as three tagged lines, the money as the subtraction it is, and a
   margin meter. Read-only; the editable money fields further down feed
   it live. Profit is defined once, in EminereInv.saleBreakdown. ─────── */
.dz-sale {
  margin-top: 18px;
  background: rgba(255,255,255,.45); border: 1px solid var(--line);
}
.dz-sale-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 18px;
  padding: 14px 16px 13px; flex-wrap: wrap;
}
.dz-sale-eyebrow {
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-deep);
}
.dz-sale-amt {
  font-family: var(--serif); font-size: 27px; line-height: 1.05; color: var(--ink);
  font-variant-numeric: tabular-nums; margin-top: 5px;
}
.dz-sale-amt.neg, .dz-sale .neg { color: var(--status-sold); }
.dz-sale-cap {
  font-family: var(--mono); font-size: 10px; letter-spacing: .05em; color: var(--ink-dim);
  margin-top: 7px; line-height: 1.5;
}
.dz-sale-toggle {
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
  padding: 7px 0 2px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); white-space: nowrap;
}
.dz-sale-toggle:hover { color: var(--ink); }
.dz-sale-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.dz-sale-toggle .chev { font-size: 11px; transition: transform .15s; }
.dz-sale[data-open="1"] .dz-sale-toggle .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .dz-sale-toggle .chev { transition: none; } }
.dz-sale-body {
  border-top: 1px solid var(--line-soft);
  padding: 14px 16px 16px; display: grid; gap: 16px;
}
.dz-sale-body[hidden] { display: none; }   /* the grid rule would otherwise beat the attribute */
/* Who / when / how — three tagged lines instead of a grid of labels. */
.dz-facts { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 6px 10px; align-items: baseline; }
.dz-facts .tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); padding-top: 2px;
}
.dz-facts .txt { font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); min-width: 0; overflow-wrap: anywhere; }
.dz-facts .txt b { font-weight: 500; color: var(--ink); }
/* The money, as the subtraction it is. */
.dz-ledger { display: grid; gap: 7px; }
.dz-ledger .ln { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; }
.dz-ledger .l { font-size: 13px; color: var(--ink); }
.dz-ledger .l small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; color: var(--mute); margin-top: 1px; }
.dz-ledger .a {
  font-family: var(--serif); font-size: 15px; color: var(--ink); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dz-ledger .a i { font-style: normal; color: var(--ink-dim); display: inline-block; width: .85em; }
.dz-ledger .ln.sum, .dz-ledger .ln.total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.dz-ledger .ln.total .l { font-weight: 600; }
.dz-ledger .ln.total .a { font-size: 18px; }
/* Margin meter: the sold price as a bar, the profit share in gold. On a
   loss the bar is the cost, with the shortfall in the status red. */
.dz-meter { display: grid; gap: 8px; }
.dz-meter .bar { display: flex; gap: 2px; height: 6px; }
.dz-meter .seg { display: block; height: 100%; min-width: 2px; }
.dz-meter .seg.base { background: rgba(26,26,26,.2); }
.dz-meter .seg.profit { background: var(--gold-deep); }
.dz-meter .seg.short { background: var(--status-sold); }
.dz-meter .legend {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; color: var(--ink-dim);
}
.dz-meter .sw { display: inline-block; width: 8px; height: 8px; margin-right: 7px; vertical-align: 0; }
.dz-meter .sw.base { background: rgba(26,26,26,.2); }
.dz-meter .sw.profit { background: var(--gold-deep); }
.dz-meter .sw.short { background: var(--status-sold); }

/* ── Inline client modal (opens on top of inventory drawer) ── */
.cli-modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .18s;
}
.cli-modal-bg.open { opacity: 1; pointer-events: auto; }
.cli-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.98);
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 80px); overflow: hidden;
  background: var(--cream-bg); border: 1px solid var(--line);
  z-index: 201; opacity: 0; pointer-events: none;
  display: flex; flex-direction: column;
  transition: opacity .18s, transform .18s;
}
.cli-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.cli-modal-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--line);
}
.cli-modal-head h3 {
  margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 500;
}
.cli-modal-close {
  background: transparent; border: 0; cursor: pointer;
  font-size: 22px; color: var(--ink-dim); line-height: 1;
}
.cli-modal-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 18px 22px;
}
.cli-modal-body .cli-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--ink-dim); text-transform: uppercase;
}
.cli-modal-body .cli-meta .v {
  color: var(--ink); font-family: var(--serif); font-size: 13px;
  letter-spacing: 0; text-transform: none;
}
.cli-modal-body .cli-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
}
.cli-modal-body .cli-form .field { display: flex; flex-direction: column; gap: 4px; }
.cli-modal-body .cli-form .field.full { grid-column: 1 / -1; }
.cli-modal-body .cli-form label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-dim); text-transform: uppercase;
}
.cli-modal-body .cli-form input,
.cli-modal-body .cli-form textarea {
  padding: 8px 10px; border: 1px solid var(--line); background: #fff;
  font-family: var(--sans); font-size: 13px; color: var(--ink); outline: 0;
  border-radius: 0; transition: border-color .15s;
}
.cli-modal-body .cli-form input:focus,
.cli-modal-body .cli-form textarea:focus { border-color: var(--gold); }
.cli-modal-body .cli-form textarea { min-height: 64px; resize: vertical; }
.cli-modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--line);
  background: rgba(0,0,0,.02);
}
.cli-modal-actions button {
  padding: 8px 16px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase;
  border: 1px solid var(--ink); cursor: pointer; transition: background .15s, color .15s;
}
.cli-modal-actions .cancel { background: transparent; color: var(--ink); }
.cli-modal-actions .cancel:hover { background: rgba(0,0,0,.04); }
.cli-modal-actions .save { background: var(--navy); color: var(--cream); }
.cli-modal-actions .save:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.cli-modal-loading {
  padding: 20px 0; font-family: var(--serif); font-size: 12px;
  color: var(--mute); font-style: italic; text-align: center;
}

/* Editable drawer form */
.dz-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.dz-edit .field { display: grid; gap: 5px; min-width: 0; }
.dz-edit .field.full { grid-column: 1 / -1; }
.dz-edit label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-dim); text-transform: uppercase;
}
.dz-edit input, .dz-edit select, .dz-edit textarea {
  width: 100%; padding: 9px 11px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-family: var(--sans); font-size: 13px; outline: 0; border-radius: 0;
  transition: border-color .2s, background .2s;
}
.dz-edit textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.dz-edit input:focus, .dz-edit select:focus, .dz-edit textarea:focus {
  border-color: var(--gold); background: rgba(201,168,76,.04);
}
.dz-edit input[readonly] { background: rgba(26,26,26,.04); color: var(--ink-dim); cursor: default; }
.dz-edit select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 28px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%239a7e33' stroke-width='1.4' d='M1 1 L5 5 L9 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 9px;
}
.dz-edit .prefix { position: relative; }
.dz-edit .prefix::before {
  content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim); pointer-events: none;
}
.dz-edit .prefix input { padding-left: 26px; }
.dz-toggles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }

/* Read-only transaction-notes history shown below the editable
   Internal notes textarea on the inventory drawer. */
.dz-txn-notes {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.dz-txn-notes-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-dim);
}
.dz-txn-note {
  display: block; padding: 8px 10px;
  background: rgba(26,26,26,.025); border-left: 2px solid var(--gold);
  color: inherit; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dz-txn-note:hover {
  background: rgba(201,168,76,.10);
  border-left-color: var(--gold-deep);
}
.dz-txn-note:hover .dz-txn-note-arrow { transform: translateX(2px); }
.dz-txn-note-head {
  display: flex; gap: 10px; align-items: center; margin-bottom: 4px;
}
.dz-txn-note-arrow {
  margin-left: auto; color: var(--gold-deep);
  font-family: var(--mono); font-size: 12px;
  transition: transform .15s;
}
.dz-txn-note-type {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep);
}
.dz-txn-note-date {
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
}
.dz-txn-note-body {
  font-family: var(--sans); font-size: 13px; color: var(--ink);
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.pill-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-dim);
  background: #fff; border: 1px solid var(--line); padding: 8px 12px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.pill-toggle::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid currentColor;
}
.pill-toggle.on { color: var(--status-live); border-color: rgba(46,125,79,.4); background: rgba(46,125,79,.08); }
.pill-toggle.on::before { background: currentColor; }
.pill-toggle.flag.on { color: var(--status-sold); border-color: rgba(184,92,92,.4); background: rgba(184,92,92,.08); }

/* ── Generic ops pages (Clients / Transactions / Sources / Enquiries) ── */
.ops-toolbar {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  margin-bottom: 16px;
}
.ops-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-dim); background: rgba(255,255,255,.5); border: 1px solid var(--line);
  padding: 9px 13px; cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.ops-chip:hover { color: var(--ink); border-color: var(--gold-deep); }
.ops-chip.on { color: var(--cream); background: var(--navy); border-color: var(--navy); }
.ops-count {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 12px;
}
.cell-main { font-family: var(--serif); font-size: 14px; color: var(--ink); line-height: 1.25; }
.cell-sub  { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--ink-dim); margin-top: 3px; }
.cell-note { font-size: 12.5px; color: var(--ink-dim); line-height: 1.4; margin-top: 3px; max-width: 52ch; }
.badge {
  display: inline-block; white-space: nowrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--line); color: var(--ink-dim);
}
.badge.gold  { color: var(--gold-deep);       border-color: rgba(154,126,51,.4);  background: rgba(201,168,76,.08); }
.badge.green { color: var(--status-live);     border-color: rgba(46,125,79,.35);  background: rgba(46,125,79,.08); }
.badge.amber { color: var(--status-reserved); border-color: rgba(184,138,46,.4);  background: rgba(184,138,46,.1); }
.badge.red   { color: var(--status-sold);     border-color: rgba(184,92,92,.4);   background: rgba(184,92,92,.08); }
.badge.blue  { color: #3a6ea5;                border-color: rgba(58,110,165,.4);  background: rgba(58,110,165,.1); }
.badge.grey  { color: var(--status-hidden);   border-color: var(--line);          background: rgba(107,107,107,.08); }
.amt { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: var(--ink); }
.amt.pos { color: var(--status-live); }
.amt.neg { color: var(--status-sold); }
.vip-star { color: var(--gold-deep); margin-left: 6px; font-size: 12px; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .panel-row { grid-template-columns: 1fr; }
}
/* ── Hamburger toggle + mobile/desktop drawer behaviour ─────────── */
/* Desktop position: top-left of viewport (overlays the top of the
   left sidebar when it's open). Mobile position: top-right of the
   top bar — see the media query below. */
.pro-nav-toggle {
  position: fixed; top: 16px; left: 16px; z-index: 80;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--navy); color: var(--cream);
  border: 1px solid rgba(242,236,224,.18); border-radius: 0;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.pro-nav-toggle:hover { color: var(--gold); border-color: rgba(201,168,76,.4); }
.pro-nav-toggle svg { width: 20px; height: 20px; }
.pro-mobile-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  z-index: 70;
}
body.pro-mobile-open .pro-mobile-backdrop { opacity: 1; pointer-events: auto; }

/* ── Desktop sidebar collapse ───────────────────────────────────── */
/* Default state: sidebar pinned to the left. Hamburger toggles a
   body.pro-sidebar-hidden class which slides .pro-side off-screen
   and reclaims the main content width. Smooth transitions both ways.
   State persists in localStorage. */
.pro-side { transition: transform .25s ease; }
.pro-main { transition: margin-left .25s ease, padding-left .25s ease; }
body.pro-sidebar-hidden .pro-side { transform: translateX(-100%); }
body.pro-sidebar-hidden .pro-main { margin-left: 0; }
/* With the sidebar hidden the fixed hamburger (16px in, 40px wide) sat on
   the first letter of every page title, because the main's 40px padding
   put the h1 at x=40. Clear it (fixed 2026-11-05). Desktop only: the
   ≤900px rail below keeps its own padding. */
@media (min-width: 901px) { body.pro-sidebar-hidden .pro-main { padding-left: 72px; } }

@media (max-width: 900px) {
  /* Mobile sidebar is a thin always-visible left rail (56px). The
     hamburger lives inside it and expands the rail outward to a
     full nav drawer (~280px) when tapped. Backdrop covers the
     content while the drawer is expanded. */
  .pro-side {
    position: fixed; top: 0; left: 0; bottom: 0; right: auto;
    width: 56px; border-right: 1px solid #000; border-bottom: 0;
    flex-direction: column; overflow: hidden;
    transform: none; transition: width .25s ease;
    z-index: 75;
  }
  body.pro-mobile-open .pro-side {
    width: min(280px, 80vw);
    box-shadow: 4px 0 16px rgba(0,0,0,.25);
    overflow-y: auto;
  }
  body.pro-sidebar-hidden .pro-side { transform: none; }  /* desktop-only class — ignore */

  /* Brand: mark only when collapsed; full name appears when expanded. */
  .pro-brand {
    padding: 14px 12px; gap: 0; border-bottom: 1px solid rgba(242,236,224,.08);
    border-right: 0;
  }
  .pro-brand-name { display: none; }
  body.pro-mobile-open .pro-brand-name { display: grid; margin-left: 12px; }

  /* Hamburger sits inside the rail, below the brand. */
  .pro-nav-toggle { top: 76px; left: 8px; right: auto; }

  /* Nav links hidden until the rail expands. */
  .pro-nav { display: none; padding: 64px 8px 18px; }
  body.pro-mobile-open .pro-nav { display: block; }

  /* Foot (user chip + sign out) hidden until expanded. */
  .pro-side-foot { display: none; border-top: 1px solid rgba(242,236,224,.08); }
  body.pro-mobile-open .pro-side-foot { display: block; }
  .pro-user { margin-bottom: 12px; }

  /* Main content sits beside the rail at all times. */
  .pro-main { margin-left: 56px; padding: 24px 18px 60px; }

  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dz-cols { grid-template-columns: 1fr; gap: 0; }
  .dz-edit { grid-template-columns: 1fr; }
  .inv-filter-panel { width: min(320px, calc(100vw - 36px)); }

  /* Inventory tabs (All / Active / Reserved / Sold) — keep on one row
     at mobile widths by shrinking font + padding. */
  .inv-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 0; }
  .inv-tab {
    padding: 11px 9px; font-size: 8.5px; letter-spacing: .12em;
    gap: 6px; white-space: nowrap; flex: 0 1 auto;
  }
  .inv-tab .badge { padding: 2px 5px; font-size: 9px; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr; }
}

/* ── Pagination bar (Clients / Sources / Transactions) ───────────────
   Rendered into the .pg-mount slot below each list by
   EminereAdmin.renderPager(). Prev / Next, a windowed page-number
   strip, and a "per page" dropdown. */
.pg-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 18px 0; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--ink-dim); text-transform: uppercase;
}
.pg-info { white-space: nowrap; }
.pg-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-step, .pg-num {
  padding: 7px 12px; min-width: 36px; height: 32px;
  background: transparent; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-dim); text-transform: uppercase;
  cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.pg-step:hover:not(:disabled), .pg-num:hover:not(.on) {
  border-color: var(--ink); color: var(--ink);
}
.pg-step:disabled { opacity: .35; cursor: default; }
.pg-num.on {
  background: var(--navy); color: var(--cream); border-color: var(--navy);
  cursor: default;
}
.pg-nums { display: flex; gap: 4px; align-items: center; }
.pg-gap { padding: 0 4px; color: var(--ink-dim); }
.pg-per {
  margin-left: 8px;
  padding: 7px 28px 7px 10px;
  background: transparent; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-dim); text-transform: uppercase;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%238a8a85' stroke-width='1.4' d='M1 1 L5 5 L9 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  background-size: 9px; height: 32px; cursor: pointer;
}

/* ── "+ New" transaction chooser — shared by Inventory + Transactions ── */
.inv-new-wrap { position: relative; }
.inv-new {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
    font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
    text-transform: uppercase; cursor: pointer;
    background: var(--navy); color: var(--cream); border: 1px solid var(--navy);
    transition: background .15s, border-color .15s;
}
.inv-new:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.inv-new svg { width: 13px; height: 13px; }
.new-menu {
    position: absolute; right: 0; top: calc(100% + 6px); width: 280px;
    background: var(--cream); border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 80;
}
.new-menu-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    width: 100%; text-align: left; padding: 13px 16px; cursor: pointer;
    border: 0; border-bottom: 1px solid var(--line-soft); background: transparent;
}
.new-menu-row:last-child { border-bottom: 0; }
.new-menu-row:hover:not(:disabled) { background: rgba(201,168,76,.12); }
.new-menu-row .t { font-family: var(--sans); font-size: 14px; color: var(--ink); }
.new-menu-row .d { font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-dim); }
.new-menu-row:disabled { cursor: default; opacity: .45; }

/* On a narrow screen the Inventory toolbar wraps, and its buttons land wherever
   the rows put them: on an iPhone the New button sits alone at the LEFT of the
   third row. Its menu was hung from the button's right edge and is 280px wide,
   so it opened 122px off the left of the screen: four rows that could be
   pressed and not one label that could be read (Eric, on his phone,
   2026-11-21). The Filter panel, hung the same way, was cut by 116 and 152px
   on a 320 and a 360px screen, and from 375 to 900px its left 29px lay under
   the side menu's strip, the start of every label with it.
   So where the toolbar wraps (900px and under) the Filter panel hangs from
   the TOOLBAR, which starts where the page's content starts, and opens at its
   left edge. On a phone (560px and under) the New menu does too, and both
   open across the toolbar's width, wherever their button is. Above 560px the
   New menu is as it was (its button is far enough right for it to fit), and
   above 900px so is the Filter panel. (The Transactions page keeps its New
   button at the right, where the menu fits as it is.) */
@media (max-width: 900px) {
  .inv-toolbar .inv-filter-wrap { position: static; }
  .inv-toolbar .inv-filter-panel { left: 0; right: auto; }
}
@media (max-width: 560px) {
  .inv-toolbar .inv-new-wrap { position: static; }
  .inv-toolbar .new-menu, .inv-toolbar .inv-filter-panel { left: 0; right: 0; width: auto; }
}

/* ══ Transaction modals (sale / consign / buy) — shared by every page
     that loads admin-txn-modals.js. Moved verbatim from the pages. ══ */
/* Sale modal — wider than the client mini-modal because of the
   payment breakdown row + dual-column form. Reuses .cli-modal* shell
   so it inherits the open/close transitions. */
.txn-modal { width: 640px; max-width: calc(100vw - 32px); max-height: 90vh; }
/* Consign modal extras */
:is(.txn-modal, .txn-form) .chips { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
:is(.txn-modal, .txn-form) .sale-watch-info {
  padding: 10px 14px; background: rgba(0,0,0,.03);
  border-left: 3px solid var(--gold); margin-bottom: 14px;
  font-family: var(--sans); font-size: 13px;
}
:is(.txn-modal, .txn-form) .sale-watch-info .nm { font-weight: 600; font-size: 14px; }
:is(.txn-modal, .txn-form) .sale-watch-info .sub { color: var(--ink-dim); font-size: 12px; margin-top: 2px; }
:is(.txn-modal, .txn-form) .sale-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
:is(.txn-modal, .txn-form) .sale-grid .full { grid-column: 1 / -1; }
:is(.txn-modal, .txn-form) .field label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
    text-transform: uppercase; color: var(--ink-dim); display: block; margin-bottom: 4px; }
/* Radios/checkboxes keep their native size — width:100% on them stretches
   the control across its label and word-wraps the text beside it. */
:is(.txn-modal, .txn-form) .field input:not([type="radio"]):not([type="checkbox"]),
:is(.txn-modal, .txn-form) .field select, :is(.txn-modal, .txn-form) .field textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--line);
    background: rgba(255,255,255,.7); font-family: var(--sans); font-size: 13px;
    color: var(--ink); outline: 0; border-radius: 0; box-sizing: border-box;
}
:is(.txn-modal, .txn-form) .field textarea { min-height: 60px; resize: vertical; }
:is(.txn-modal, .txn-form) .field-helper { font-size: 11px; color: var(--ink-dim); margin-top: 4px; font-style: italic; }
:is(.txn-modal, .txn-form) .radio-row { display: flex; gap: 16px; align-items: center; padding-top: 4px; }
:is(.txn-modal, .txn-form) .radio-row label { display: flex; align-items: center; gap: 6px;
    font-family: var(--sans); font-size: 13px; color: var(--ink);
    letter-spacing: 0; text-transform: none; margin: 0; cursor: pointer; }
:is(.txn-modal, .txn-form) .check-row { display: flex; align-items: center; gap: 8px; padding-top: 22px; }
:is(.txn-modal, .txn-form) .check-row label { display: flex; align-items: center; gap: 8px;
    font-family: var(--sans); font-size: 13px; color: var(--ink);
    letter-spacing: 0; text-transform: none; margin: 0; cursor: pointer; }
:is(.txn-modal, .txn-form) .pay-breakdown {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
:is(.txn-modal, .txn-form) .pay-breakdown .pay-field { display: flex; flex-direction: column; gap: 4px; }
:is(.txn-modal, .txn-form) .pay-breakdown .pay-field label {
    font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-dim);
}
:is(.txn-modal, .txn-form) .pay-breakdown .pay-field input {
    padding: 6px 8px; font-size: 12px;
    width: 100%; border: 1px solid var(--line);
    background: rgba(255,255,255,.7); font-family: var(--sans);
    color: var(--ink); outline: 0; border-radius: 0; box-sizing: border-box;
}
:is(.txn-modal, .txn-form) .pay-sum-warn {
    font-size: 11px; color: #b03a2e; margin-top: 4px; min-height: 14px;
}
/* Type-ahead client combobox. */
:is(.txn-modal, .txn-form) .client-combo { position: relative; }
:is(.txn-modal, .txn-form) .client-combo-list {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
    background: #fff; border: 1px solid var(--line); border-top: 0;
    max-height: 240px; overflow-y: auto;
    box-shadow: 0 10px 24px rgba(0,0,0,.10);
}
:is(.txn-modal, .txn-form) .client-combo-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none;
    font-family: var(--sans); font-size: 13px; color: var(--ink); cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
:is(.txn-modal, .txn-form) .client-combo-row span { font-size: 11px; color: var(--ink-dim); }
:is(.txn-modal, .txn-form) .client-combo-row:hover,
:is(.txn-modal, .txn-form) .client-combo-row.hi { background: rgba(201,168,76,.12); }
:is(.txn-modal, .txn-form) .client-combo-row.is-new { color: var(--gold-deep, #8a6d1f); font-weight: 600; border-bottom: 0; }
/* Brand type-ahead (EminereAdmin.wireBrandCombo) — wraps the plain
   brand <input> everywhere a brand is typed: intake modals, trade
   cards, the Inventory drawer and the Listings side panel. Unscoped on
   purpose; the input keeps whichever field styling its host applies. */
.brand-combo { position: relative; min-width: 0; }
.brand-combo-list {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
    background: #fff; border: 1px solid var(--line);
    max-height: 240px; overflow-y: auto;
    box-shadow: 0 10px 24px rgba(0,0,0,.10);
}
.brand-combo-row {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    border: 0; background: none; cursor: pointer;
    font-family: var(--sans); font-size: 13px; color: var(--ink);
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.brand-combo-row:hover, .brand-combo-row.hi { background: rgba(201,168,76,.12); }
.brand-combo-row.is-new { color: var(--gold-deep, #8a6d1f); font-weight: 600; border-bottom: 0; }
/* Watch picker — step 1 of "Log a sale" from the + New chooser. */
:is(.txn-modal, .txn-form) .sale-pick-list {
    margin-top: 4px; border: 1px solid var(--line);
    max-height: 300px; overflow-y: auto; background: #fff;
}
:is(.txn-modal, .txn-form) .sale-pick-row {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    border: 0; background: none; cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
:is(.txn-modal, .txn-form) .sale-pick-row:hover { background: rgba(201,168,76,.12); }
:is(.txn-modal, .txn-form) .sale-pick-list .sale-pick-row:last-child { border-bottom: 0; }
:is(.txn-modal, .txn-form) .sale-pick-row .nm { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink); }
:is(.txn-modal, .txn-form) .sale-pick-row .sub { display: block; font-family: var(--mono); font-size: 9.5px;
    letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); margin-top: 2px; }
:is(.txn-modal, .txn-form) .sale-pick-row.is-new { color: var(--gold-deep, #8a6d1f); font-family: var(--sans);
    font-size: 13px; font-weight: 600; border-bottom: 0; }
:is(.txn-modal, .txn-form) .sale-pick-empty { padding: 12px; font-family: var(--sans); font-size: 12.5px;
    color: var(--ink-dim); font-style: italic; }
/* Manual-entry row sits OUTSIDE the scrollable list so it's always
   visible — visually attached to the list's bottom edge. */
:is(.txn-modal, .txn-form) .sale-pick-manual { border: 1px solid var(--line); border-top: 0; background: #fff; }
/* Settle-mode deposit summary. */
:is(.txn-modal, .txn-form) .settle-summary {
    display: grid; gap: 7px; padding: 12px 14px; margin-bottom: 2px;
    background: rgba(201,168,76,.07); border: 1px solid rgba(201,168,76,.35);
}
:is(.txn-modal, .txn-form) .settle-summary .row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    font-family: var(--sans); font-size: 13px; color: var(--ink);
}
:is(.txn-modal, .txn-form) .settle-summary .row span {
    font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--ink-dim);
}
:is(.txn-modal, .txn-form) .settle-summary .row.balance { border-top: 1px solid rgba(201,168,76,.35); padding-top: 8px; }
:is(.txn-modal, .txn-form) .settle-summary .row.balance strong { font-size: 15px; }
/* Cancel-reservation button (inside the settle modal): destructive, so
   outlined red — never the primary action's weight. */
:is(.txn-modal, .txn-form) .cancel-resv-btn {
    display: block; width: 100%; text-align: center; padding: 10px 12px;
    background: transparent; color: #b03a2e; border: 1px solid rgba(176,58,46,.55);
    font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
    text-transform: uppercase; cursor: pointer; box-sizing: border-box;
}
:is(.txn-modal, .txn-form) .cancel-resv-btn:hover { background: rgba(176,58,46,.08); }
:is(.txn-modal, .txn-form) .cancel-resv-btn[disabled] { opacity: .5; cursor: not-allowed; }
/* Buy modal — shares the .txn-modal form styles; only its width and the
   linked-buy banner are its own. */
#buy-modal { width: 720px; max-width: calc(100vw - 32px); max-height: 92vh; }
#buy-modal .linked-banner {
    padding: 10px 14px; background: rgba(201,168,76,.1); border-left: 3px solid var(--gold);
    font-family: var(--sans); font-size: 12px; color: var(--ink); margin-bottom: 12px;
}


/* ══════════════════════════════════════════════════════════════════════
   Redesigned transaction modals (Eric, 2026-10-16): Log a buy, Log a
   sale, Log a consignment, and List a phantom (listings.html, 2026-10-28).
   Scoped to :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal)
   so the buyout / return modals keep the old look until each is redone.
   Same fields, same data-field hooks, same payload.
   ══════════════════════════════════════════════════════════════════════ */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) { width: 820px; max-width: calc(100vw - 32px); background: #f4efe4; border-radius: 8px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-head { align-items: center; gap: 16px; padding: 22px 28px 16px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-head h3 { font-family: var(--sans); font-size: 22px; letter-spacing: -.01em; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-sub { font-size: 13px; color: var(--ink-dim); margin-top: 4px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-close {
  width: 40px; height: 40px; border: 1px solid rgba(26,26,26,.18); border-radius: 6px;
  font-size: 20px; display: inline-flex; align-items: center; justify-content: center;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-body { padding: 4px 28px 26px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-form { display: flex; flex-direction: column; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-section { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 600;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .eyebrow-note { color: var(--mute); letter-spacing: .08em; text-transform: none; font-weight: 400; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-head-note { font-size: 12px; color: var(--ink-dim); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-quiet-link {
  background: none; border: 0; padding: 0 0 1px; font-family: var(--sans); font-size: 12px;
  color: var(--gold-deep); border-bottom: 1px solid rgba(154,126,51,.5); cursor: pointer; text-align: right;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-quiet-link:hover { color: var(--ink); border-color: var(--ink); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-reveal { padding: 12px 14px; background: rgba(201,168,76,.09); border-left: 3px solid var(--gold); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-stack { display: flex; flex-direction: column; gap: 14px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid { display: grid; gap: 14px 18px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid .span-2 { grid-column: span 2; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .linked-banner { margin: 18px 0 0; }

/* Labels: sentence case, readable. The tracked uppercase is the eyebrow's. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field label {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--ink); margin-bottom: 6px;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field label em { font-style: normal; color: var(--gold-deep); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .lbl-note { color: var(--mute); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field-helper { font-style: normal; font-size: 12px; margin-top: 6px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field-note { font-size: 12px; color: var(--ink-dim); margin-top: 6px; min-height: 16px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field-note.neg { color: #a2402f; }

/* Inputs: real borders, rounded, 42px tall; brand/model a step larger. */
/* :where() keeps this base rule's weight low so the money, date, focus
   and payment-notes rules below can override it. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field input:where(:not([type="radio"]):not([type="checkbox"])),
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field select, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field textarea {
  height: 42px; padding: 0 12px; border: 1px solid rgba(26,26,26,.22); border-radius: 6px;
  background: #fffdf8; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field input[type="date"] { padding: 0 10px; font-size: 13px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field textarea { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.45; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field input:focus, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field select:focus, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,.35);
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid-4 > .field:nth-child(-n+2) input { height: 46px; font-size: 16px; }

/* Money: A$ prefix inside the box; the input itself is borderless. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .money {
  display: flex; align-items: center; height: 46px; border: 1px solid rgba(26,26,26,.22);
  border-radius: 6px; background: #fffdf8; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .money:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,.35); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .money-prefix { padding-left: 12px; font-size: 13px; color: var(--ink-dim); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field .money input {
  height: 100%; border: 0; border-radius: 0; background: transparent; padding: 0 12px 0 8px;
  font-size: 17px; font-variant-numeric: tabular-nums; box-shadow: none;
}

/* Needs: toggle chips with a tick (they looked like radios). */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-needs-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.3fr); gap: 14px 18px; align-items: start; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .chips { padding-top: 0; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pill-toggle {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--ink); background: transparent; border: 1px solid rgba(26,26,26,.25);
  border-radius: 999px; padding: 0 14px; height: 36px; gap: 7px;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pill-toggle::before { display: none; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pill-toggle.on, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pill-toggle.flag.on {
  color: var(--cream); background: var(--navy); border-color: var(--navy);
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pill-toggle.on::before {
  content: ""; display: inline-block; width: 5px; height: 9px; margin-top: -3px;
  border: solid currentColor; border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg); background: none;
}

/* Switches: the attention row and the shipping row are both a checkbox
   drawn as a switch — no red box that reads as an error state. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field.attn-row { padding-top: 24px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field.attn-row > label, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field.attn-row > label.on, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field.attn-row > label:hover {
  border: 0; background: transparent; padding: 0; color: var(--ink); font-weight: 400; white-space: normal;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-switch {
  display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; padding: 2px 0;
  font-family: var(--sans); font-size: 13px; color: var(--ink); letter-spacing: 0; text-transform: none; align-self: flex-start;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .attn-check { display: inline-flex; width: auto; height: auto; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-switch input[type="checkbox"], :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .attn-check input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 42px; height: 24px; border-radius: 999px; border: 0; position: relative;
  background: rgba(26,26,26,.25); transition: background .15s; display: block;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-switch input[type="checkbox"]::before, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .attn-check input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-switch input[type="checkbox"]:checked, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .attn-check input:checked { background: var(--gold-deep); border-color: var(--gold-deep); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-switch input[type="checkbox"]:checked::before, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .attn-check input:checked::before { left: 21px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .attn-check input:checked::after { display: none; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-switch input:focus-visible { box-shadow: 0 0 0 2px rgba(201,168,76,.6); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .switch-text { display: flex; flex-direction: column; gap: 2px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .switch-text small { font-size: 12px; color: var(--ink-dim); }

/* Office: segmented buttons (still a radio group underneath). */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-seg { display: inline-flex; border: 1px solid rgba(26,26,26,.25); border-radius: 6px; overflow: hidden; background: transparent; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field label.rf-seg-opt { display: inline-flex; margin: 0; cursor: pointer; position: relative; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-seg-opt span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  font-size: 13px; background: #fffdf8; color: var(--ink); transition: background .15s, color .15s;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-seg-opt + .rf-seg-opt span { border-left: 1px solid rgba(26,26,26,.25); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-seg-opt input:checked + span { background: var(--navy); color: var(--cream); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-seg-opt input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--gold); }

/* Payment breakdown: same five boxes, sum reported inline. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-breakdown { gap: 10px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-breakdown .pay-field label { font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-breakdown .pay-field input {
  height: 40px; padding: 0 10px; border: 1px solid rgba(26,26,26,.22); border-radius: 6px;
  background: #fffdf8; font-size: 14px; font-variant-numeric: tabular-nums;
}
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-breakdown .pay-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,.35); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-pay-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-sum { font-size: 13px; color: var(--mute); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-sum.ok { color: #2e6b45; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-sum.warn { color: #a2402f; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-notes { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; min-width: 0; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-notes label { margin: 0; white-space: nowrap; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-notes input { height: 40px; }

/* Footer: status on the left, buttons on the right; Save only lit when ready. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-actions { justify-content: space-between; align-items: center; gap: 16px; padding: 14px 28px; background: #ebe5d7; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-status { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-status-head { font-size: 13px; font-weight: 600; color: var(--gold-deep); }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-status.ready .rf-status-head { color: #2e6b45; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-status-sub { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* An instruction ("One thing to fix …") must be readable in full; only the ready summary is clipped. */
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-status:not(.ready) .rf-status-sub { white-space: normal; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-actions-btns { display: flex; gap: 10px; flex: none; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-actions button { height: 44px; padding: 0 20px; border-radius: 6px; font-size: 12px; letter-spacing: .08em; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-actions .save[disabled] { background: rgba(26,26,26,.18); color: rgba(26,26,26,.45); border-color: transparent; cursor: not-allowed; }
:is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-actions .save[disabled]:hover { background: rgba(26,26,26,.18); border-color: transparent; }

/* Phone width: two columns, chips and switch stack, payment boxes wrap. */
@media (max-width: 640px) {
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-head, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-body, :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-actions { padding-left: 16px; padding-right: 16px; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid-4 .span-2 { grid-column: 1 / -1; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-grid-2 { grid-template-columns: 1fr; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-needs-row { grid-template-columns: 1fr; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .field.attn-row { padding-top: 0; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .pay-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-quiet-link { text-align: left; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .cli-modal-actions { flex-direction: column; align-items: stretch; }
  :is(#buy-modal, #sale-modal, #consign-modal, #phantom-modal) .rf-actions-btns { justify-content: flex-end; }
}


/* ── Log a sale: picker, watch card, outcome strip, settle summary, danger zone ── */
#sale-modal .rf-search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding-left: 12px; margin-top: 14px;
  border: 1px solid rgba(26,26,26,.22); border-radius: 6px; background: #fffdf8; overflow: hidden; color: var(--ink-dim);
}
#sale-modal .rf-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,.35); }
#sale-modal .rf-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 12px 0 0; font-family: var(--sans); font-size: 15px; color: var(--ink); outline: 0; }
#sale-modal .rf-pick-list { display: flex; flex-direction: column; margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fffdf8; max-height: min(52vh, 480px); overflow-y: auto; }
#sale-modal .rf-pick-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid rgba(26,26,26,.07);
  background: transparent; text-align: left; font-family: var(--sans); color: var(--ink); cursor: pointer;
}
#sale-modal .rf-pick-row:last-child { border-bottom: 0; }
#sale-modal .rf-pick-row:hover, #sale-modal .rf-pick-row:focus-visible { background: rgba(201,168,76,.12); }
#sale-modal .rf-thumb { width: 48px; height: 48px; border-radius: 6px; background: #e6dfd0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: var(--mute); flex: none; }
#sale-modal .rf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#sale-modal .rf-pick-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#sale-modal .rf-pick-main .nm { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sale-modal .rf-pick-main .sub { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sale-modal .rf-pick-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
#sale-modal .rf-pick-side .price { font-size: 14px; font-variant-numeric: tabular-nums; }
#sale-modal .rf-pill { font-size: 11px; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
#sale-modal .rf-pill.in  { background: rgba(46,107,69,.12); color: #2e6b45; }
#sale-modal .rf-pill.res { background: rgba(154,126,51,.16); color: #9a7e33; }
#sale-modal .rf-pick-empty { padding: 22px 14px; font-size: 13px; color: var(--mute); text-align: center; }
#sale-modal .rf-pick-note { font-size: 12px; color: var(--mute); padding: 10px 2px 0; }
#sale-modal .cli-modal-actions .rf-manual-btn {
  height: 44px; padding: 0 16px; border: 1px dashed rgba(154,126,51,.7); border-radius: 6px;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--gold-deep); background: transparent; cursor: pointer;
}
#sale-modal .cli-modal-actions .rf-manual-btn:hover { background: rgba(201,168,76,.12); border-color: var(--gold-deep); color: var(--gold-deep); }
#sale-modal .rf-watch-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 14px; margin-top: 14px; background: #fffdf8; border: 1px solid var(--line); border-radius: 8px;
}
#sale-modal .rf-watch-card .rf-thumb { width: 64px; height: 64px; }
#sale-modal .rf-watch-card .nm { font-size: 17px; font-weight: 500; }
#sale-modal .rf-watch-card .sub { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
:is(#sale-modal, #consign-modal) .rf-note {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 14px;
  padding: 12px 14px; background: rgba(201,168,76,.12); border-left: 3px solid var(--gold); font-size: 13px; color: var(--ink);
}
:is(#sale-modal, #consign-modal) .rf-note .rf-quiet-link { white-space: nowrap; flex: none; }
:is(#sale-modal, #consign-modal) .rf-outcome { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 6px; font-size: 13px; }
:is(#sale-modal, #consign-modal) .rf-outcome svg { flex: none; }
:is(#sale-modal, #consign-modal) .rf-outcome.neutral { background: rgba(26,26,26,.05); color: var(--ink-dim); }
:is(#sale-modal, #consign-modal) .rf-outcome.ok   { background: rgba(46,107,69,.12); color: #2e6b45; }
:is(#sale-modal, #consign-modal) .rf-outcome.warn { background: rgba(154,126,51,.14); color: #7a6224; }
:is(#sale-modal, #consign-modal) .rf-outcome.bad  { background: rgba(162,64,47,.1); color: #a2402f; }
#sale-modal .rf-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; background: #fffdf8; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#sale-modal .rf-summary > div { padding: 14px 16px; border-right: 1px solid rgba(26,26,26,.08); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#sale-modal .rf-summary > div:last-child { border-right: 0; }
#sale-modal .rf-summary .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sale-modal .rf-summary .v { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sale-modal .rf-summary .balance { background: rgba(154,126,51,.1); }
#sale-modal .rf-summary .balance .k { color: #7a6224; }
#sale-modal .rf-summary .balance .v { font-size: 18px; font-weight: 600; color: #7a6224; }
#sale-modal .rf-danger {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px;
  padding: 14px 16px; border: 1px solid rgba(162,64,47,.3); border-radius: 8px; background: rgba(162,64,47,.05);
}
#sale-modal .rf-danger .t { font-size: 13px; font-weight: 600; color: #a2402f; }
#sale-modal .rf-danger .d { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
#sale-modal .rf-danger button {
  height: 40px; padding: 0 16px; border: 1px solid #a2402f; background: transparent; border-radius: 6px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #a2402f; cursor: pointer; white-space: nowrap; flex: none;
}
#sale-modal .rf-danger button:hover { background: rgba(162,64,47,.1); }
#sale-modal .rf-danger button[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 640px) {
  #sale-modal .rf-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sale-modal .rf-watch-card { grid-template-columns: 48px minmax(0, 1fr); }
  #sale-modal .rf-watch-card .rf-quiet-link { grid-column: 1 / -1; text-align: left; }
  #sale-modal .rf-danger { flex-direction: column; align-items: flex-start; }
  #sale-modal .rf-pill-more { display: none; }
  #sale-modal .cli-modal-actions .rf-manual-btn { height: auto; min-height: 44px; padding: 8px 14px; white-space: normal; text-align: left; }
}


/* ═══════════════════════════════════════════════════════════════════
   Phantom listings (Listings page, 2026-10-28): an advert for a watch
   not held — Status Phantom, never stock. Lives on listings.html only.
   ═══════════════════════════════════════════════════════════════════ */
:root { --status-phantom: #5c5a86; }
/* The chip filters on the record's Status, not Web Status like the four
   before it — set apart by a hairline on desktop. */
.inv-chip.phantom { margin-left: 10px; position: relative; }
.inv-chip.phantom::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; border-left: 1px solid var(--line); }
/* Card tag over the photo. */
.inv-card .pic { position: relative; }
.inv-card .pic .ph-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  padding: 4px 7px; background: var(--status-phantom); color: #f5efe4;
}
/* Panel header: the badge row and the stock code line. */
.status-badge.phantom { color: var(--status-phantom); background: rgba(92,90,134,.12); }
.detail-body .head .badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-body .head .stock { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-dim); margin-top: 10px; }
/* The form's read-only Description note sits at input height. */
#phantom-modal .rf-static-note { margin-top: 0; min-height: 42px; display: flex; align-items: center; }
/* Phone width on the Listings page: the search box takes its own row
   above the chips (a sixth chip squeezed it further than before), the
   chip divider goes once the chips wrap, and the panel footer's three
   buttons share one row. */
/* Header actions: two buttons that keep their words on one line and wrap
   as a pair on a phone instead of squeezing. */
.pro-head-actions.is-listings { flex-wrap: wrap; }
.pro-head-actions.is-listings .pro-btn, .pro-head-actions.is-listings .inv-new { white-space: nowrap; }
/* Six chips: cap their column so the search box keeps at least a third of
   the row and the chips wrap instead (the base rule is 1fr auto, which
   gives the chips their whole single row first). */
.inv-tools.is-listings { grid-template-columns: minmax(0, 1fr) fit-content(62%); }
@media (max-width: 640px) {
  .inv-tools.is-listings { grid-template-columns: 1fr; gap: 12px; }
  .inv-chip.phantom { margin-left: 0; }
  .inv-chip.phantom::before { display: none; }
  .detail-actions.is-listings { padding: 14px 16px; gap: 8px; flex-wrap: wrap; }
  .detail-actions.is-listings button { padding: 9px 10px; white-space: nowrap; letter-spacing: .12em; }
}
/* Narrow phones (≤380px): three buttons don't fit one row, and a fixed
   panel pushes overflow off the LEFT edge where it can't be reached —
   Delete takes its own row above Cancel / Save as a plain red text link. */
@media (max-width: 380px) {
  .detail-actions.is-listings button.danger { order: -1; flex: 1 0 100%; margin-right: 0; text-align: left; padding-left: 0; border-color: transparent; }
  .detail-actions.is-listings button.danger:hover { background: transparent; color: #b85c5c; border-color: transparent; text-decoration: underline; }
}


/* ═══════════════════════════════════════════════════════════════════
   Analytics page (analytics.html, 2026-11-02): range bar, eight cards,
   Chart.js charts in the house colours. Shares the Dashboard's .kpi,
   .panel and .events rules; these are the page's own.
   ═══════════════════════════════════════════════════════════════════ */
.an-range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 22px; }
.an-range .inv-chips { gap: 6px; }
.an-custom { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); }
.an-custom input[type="date"] {
  height: 32px; padding: 0 8px; border: 1px solid var(--line); background: transparent;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink); outline: 0;
}
.an-custom input[type="date"]:focus { border-color: var(--gold); }
.an-basis { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-left: auto; }
/* The one page without the shell's 1500px cap (Eric, 2026-11-05): on a
   wide monitor the cards and charts stretch with the window, as
   Horoclick's do, instead of leaving the right half of the screen empty.
   The other pages keep .pro-main's cap until asked. */
.pro-main.is-analytics { max-width: none; }
/* Eight cards, four across at every desktop width, stretching with the
   window (about 770px-wide cards on a 3440px monitor, 830px with the
   sidebar hidden; Horoclick's cards stretch the same way, five across);
   then the Dashboard's own breakpoints. Card colours as on Horoclick:
   money and margins green, a loss red, the item count gold, the average
   sale price in plain ink. */
.kpi-row.an-kpis { grid-template-columns: repeat(4, 1fr); }
.kpi .v.pos { color: var(--status-live); }
.kpi .v.neg { color: var(--status-sold); }
.kpi .v.count { color: var(--gold-deep); }
@media (max-width: 1180px) { .kpi-row.an-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .kpi-row.an-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .kpi-row.an-kpis { grid-template-columns: 1fr; } }
/* Charts: a sized box the canvas fills; min-width 0 so a canvas never
   forces a grid column wider than the screen. */
.an-chart { position: relative; height: 260px; min-width: 0; }
.an-chart canvas { max-width: 100%; }
.an-chart.tall { height: 300px; }
.an-chart.bars { height: 320px; }
.panel-row.an-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Donut beside its legend while the panel has room for both (200px each
   plus the gap); otherwise the legend drops under the donut, whatever the
   viewport. The sidebar, pinned or hidden, changes the panel's width and
   not the screen's, so a breakpoint alone can't know — a grid with a
   fixed legend column left a 10px donut at 901px with the sidebar pinned. */
.an-donut-wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.an-donut-wrap .an-chart { flex: 999 1 200px; min-width: 200px; height: 220px; }
.an-donut-wrap .donut-legend { flex: 1 0 200px; gap: 7px; }
.an-donut-wrap .donut-legend .row { font-size: 12px; }
.an-donut-wrap .donut-legend .ct { white-space: nowrap; }
.panel-head .an-note { color: var(--ink-dim); }
.an-legend { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.an-legend .it { display: inline-flex; align-items: center; gap: 6px; }
.an-legend .sw { width: 9px; height: 9px; border-radius: 2px; }
.panel-head .an-legend { margin-left: auto; }
/* Top customers: the Dashboard's events table with numeric columns. */
.events td.num, .events th.num { text-align: right; font-variant-numeric: tabular-nums; }
.events td.num { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; }
.events .rank { font-family: var(--mono); font-size: 10px; color: var(--mute); width: 28px; }
.events .cust { font-size: 13.5px; color: var(--ink); }
.events .cust small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; color: var(--mute); margin-top: 2px; }
.an-empty { padding: 28px 0 8px; color: var(--mute); font-size: 13px; text-align: center; }
.an-table { overflow-x: auto; }     /* the table never widens the page; on a phone it scrolls inside its panel if it must */
@media (max-width: 1180px) { .panel-row.an-two { grid-template-columns: minmax(0, 1fr); } }   /* one column where the Dashboard's rows go to one */
@media (max-width: 640px) {
  .an-basis { margin-left: 0; }
  #customers th, #customers td { padding-left: 8px; padding-right: 8px; }
  #customers th:nth-child(5), #customers td:nth-child(5) { display: none; }   /* Avg value hides on a phone; Transactions is narrow and stays */
}
