/* ==========================================================================
   app.css — Rackman
   ========================================================================== */

.app { display: flex; min-height: 100vh; background: var(--grey-light); }

/* ---------- sidebar ------------------------------------------------------ */
.side {
  width: var(--app-sidebar-w); flex: 0 0 var(--app-sidebar-w);
  background: var(--grey-medium-blue);
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: 20px 16px; position: sticky; top: 0; height: 100vh;
}
.side__rep {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-md); background: var(--grey-light);
}
/* Figma: window-controls row, right-aligned, two 28px r7 chips on grey-light. */
.side__hd { display: flex; justify-content: flex-end; gap: 8px; height: 28px; }
.side__winbtn {
  width: 28px; height: 28px; border-radius: 7px; background: var(--grey-light);
  color: var(--text-light); display: grid; place-items: center; border: 0;
}
.side__winbtn:hover { background: var(--grey-medium); color: var(--text-dark); }
.side__logo { display: block; width: 168px; height: auto; }
.side__av {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--wrc-rackman); color: #fff;
  display: grid; place-items: center; font-size: var(--app-caption); font-weight: 600;
}
.side__nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: var(--radius-md);
  font-size: var(--app-body-l); color: var(--text-medium); font-weight: 500;
  position: relative;
}
/* Figma State=Active carries a 3x20 r999 accent flush to the item's left edge. */
.nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 999px; background: var(--wrc-rackman);
}
.nav-item:hover { background: var(--grey-light); color: var(--text-dark); }
.nav-item.is-active { background: var(--wrc-rackman-7); color: var(--wrc-rackman); font-weight: 600; }
.nav-item.is-active svg { color: var(--wrc-rackman); }
.nav-item svg { flex: none; color: var(--text-medium); }
/* Figma admin-sub: full-width items with an absolute 1px tree rail at x=16. */
.nav-sub {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 6px; padding: 0; border: 0;
}
.nav-sub::before {
  content: ""; position: absolute; left: 16px; top: 0; bottom: 0;
  width: 1px; background: var(--black-15);
}
.nav-sub a {
  display: flex; align-items: center; height: 34px; padding: 0 8px 0 28px;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500; color: var(--text-medium);
}
.nav-sub a:hover { background: var(--grey-light); color: var(--text-dark); }
.nav-sub a.is-active { background: var(--wrc-rackman-7); color: var(--wrc-rackman); font-weight: 600; }
.side__spacer { flex: 1 1 auto; }
.side__brand { display: flex; flex-direction: column; gap: 1px; line-height: 1; padding-top: 4px; }

/* ---------- panel -------------------------------------------------------- */
.panel {
  flex: 1 1 auto; min-width: 0;
  padding: var(--app-panel-pad);
  display: flex; flex-direction: column; gap: var(--space-20);
}
.panel__hd { display: flex; align-items: flex-start; gap: var(--space-16); }
.panel__hd h1 { font-size: var(--app-title-xl); font-weight: 600; }
.panel__hd p { font-size: var(--app-caption); color: var(--text-light); margin-top: 3px; }

.topbar { display: flex; align-items: center; gap: var(--space-12); }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: var(--app-caption); color: var(--wrc-rackman); font-weight: 500; }
.crumb:hover { text-decoration: underline; }

/* ---------- toolbar / filters -------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: var(--space-12); }
.searchbar {
  flex: 1 1 auto; display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--black-7);
  border-radius: var(--radius-md); padding: 0 12px; height: 38px;
}
.searchbar input { flex: 1 1 auto; border: 0; background: none; outline: none; font-size: var(--app-body-m); }
.seg {
  display: inline-flex; background: var(--grey-medium); border-radius: var(--radius-md); padding: 3px;
}
.seg button {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: var(--app-body-s); font-weight: 500; color: var(--text-medium);
}
.seg button.is-active { background: var(--white); color: var(--text-dark); font-weight: 600; box-shadow: var(--shadow-card); }

/* ---------- data card + rows --------------------------------------------- */
.dcard { background: var(--white); border: 1px solid var(--black-7); border-radius: var(--radius-lg); }
.dcard__sum {
  display: flex; align-items: center; gap: var(--space-8);
  padding: 12px 18px; font-size: var(--app-body-s);
}
.dcard__body { padding: 0 18px 4px; }

/* status dot for list rows */
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* line-item table */
.lines th { font-size: var(--app-label-col); }
.lines td { border-top: 1px solid var(--black-7); }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.lines tfoot td { border-top: 1px solid var(--black-15); font-weight: 600; }

/* totals block */
.totals { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.totals__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: var(--app-body-s); }
.totals__row--grand { font-size: var(--app-title-m); font-weight: 600; }
.totals__row--grand .v { color: var(--wrc-orange); }

/* tabs */
.tabs { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--black-7); }
.tabs a {
  padding: 0 0 10px; font-size: var(--app-body-m); font-weight: 500; color: var(--text-medium);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text-dark); }
.tabs a.is-active { color: var(--wrc-rackman); font-weight: 600; border-bottom-color: var(--wrc-rackman); }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 900px) {
  .app { display: block; }
  .side {
    position: static; width: auto; height: auto; flex-direction: row; align-items: center;
    overflow-x: auto; gap: 8px; padding: 10px 12px; border-right: 0;
    border-bottom: 1px solid var(--black-7);
  }
  .side__rep, .side__spacer, .side__brand, .nav-sub { display: none; }
  .side__nav { flex-direction: row; gap: 4px; }
  .nav-item { white-space: nowrap; }
  .panel { padding: 16px; gap: 16px; }
}

/* ---------- quotes list — widths measured off Figma `Rackman - Quotes` ---- */
.qtbl { width: 100%; table-layout: fixed; }
.qtbl th, .qtbl td { text-align: left; }
.qtbl thead th {
  padding: 12px 0; font-size: var(--app-label-col); font-weight: 500;
  letter-spacing: var(--app-ls-label); color: var(--text-light);
  text-transform: uppercase; border-bottom: 1px solid var(--grey-medium-blue); background: var(--grey-light);}
.qtbl thead th:first-child { padding-left: 18px; }
.qtbl thead th:last-child  { padding-right: 18px; text-align: right; }
.qtbl tbody td {
  padding: 13px 0; font-size: var(--app-body-s); border-bottom: 1px solid var(--black-7);
  vertical-align: middle;
}
.qtbl tbody td:first-child { padding-left: 18px; }
.qtbl tbody td:last-child  { padding-right: 18px; text-align: right; }
.qtbl tbody tr { cursor: pointer; }
.qtbl tbody tr:hover td { background: var(--grey-light); }
.qtbl tbody tr:last-child td { border-bottom: 0; }

.col-expand  { width: 32px; }
.col-date    { width: 92px; }
.col-number  { width: 96px; }
.col-status  { width: 104px; }
.col-shipvia { width: 118px; }
.col-from    { width: 110px; }
.col-rep     { width: 118px; }
.col-total   { width: 128px; }

.qt-num { color: var(--text-dark); font-weight: 600; }
.cust-code { font-size: var(--app-micro); color: var(--text-light); }
.cust-name { font-weight: 600; }

/* the two status pills, measured: grey-light / text-medium / 10 Semi Bold / r999 / 3-9 */
.spill {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: var(--radius-full); background: var(--grey-light);
  color: var(--text-medium); font-size: var(--app-micro); font-weight: 600;
  line-height: 1.3; white-space: nowrap;
}
.spill--open { background: var(--status-blue-tint); color: var(--status-blue); }

.expand-btn {
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: var(--radius-sm); color: var(--text-light);
}
.expand-btn:hover { background: var(--black-7); color: var(--text-dark); }

/* filter bar */
.fbar { display: flex; align-items: center; gap: 10px; }
.fchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-md);
  background: var(--white); border: 1px solid var(--black-15);
  font-size: var(--app-body-s);
}
.fchip .k { color: var(--text-light); }
.fchip .op { color: var(--black-25); }
.fchip .v { font-weight: 600; }
.fchip__x { color: var(--text-light); display: grid; place-items: center; }
.fchip__x:hover { color: var(--status-red); }

/* pagination footer */
.pager { display: flex; align-items: center; gap: 12px; font-size: var(--app-body-s); color: var(--text-light); }
.pager__pages { display: flex; align-items: center; gap: 2px; }
.pager__pages button {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--radius-sm);
  font-size: var(--app-body-s); color: var(--text-medium);
}
.pager__pages button:hover { background: var(--grey-medium); }
.pager__pages button.is-active { background: var(--white); border: 1px solid var(--black-15); color: var(--text-dark); font-weight: 600; }

/* ---------- column header tools: sort + filter --------------------------- */
.qtbl thead th .thh { display: inline-flex; align-items: center; gap: 6px; }
.th-sort, .th-filter {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  border-radius: var(--radius-xs); color: var(--text-light); flex: none;
}
.th-sort:hover, .th-filter:hover { background: var(--black-7); color: var(--text-medium); }
.th-sort.is-on  { color: var(--wrc-rackman); }
.th-filter.is-on { color: var(--wrc-rackman); background: none; }

/* ---------- dashboard ---------------------------------------------------- */
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kpi { padding: 16px 18px; }

.chart {
  display: flex; align-items: flex-end; gap: 10px;
  height: 190px; padding: 16px 18px 12px;
}
.chart__col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.chart__bars { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart__bar { width: 42%; max-width: 22px; border-radius: 3px 3px 0 0; min-height: 3px; }
.chart__bar--prev { background: var(--grey-strong); }
.chart__bar--now  { background: var(--wrc-rackman); }
.chart__lbl { font-size: var(--app-micro); color: var(--text-light); }

/* ---------- quotes: pill tones, customer cell, totals row ---------------- */
.spill--open     { background: var(--status-blue-tint); color: var(--status-blue); }
.spill--closed   { background: var(--status-stale-tint); color: var(--status-stale); }
.spill--plain    { background: var(--grey-light); color: var(--text-medium); }
.spill--followup { background: var(--status-orange-tint); color: var(--status-orange); }
.spill--approved { background: var(--status-green-tint); color: var(--status-green); }
.spill--declined { background: var(--status-red-tint); color: var(--status-red); }

.cust-link { color: var(--wrc-rackman); display: inline-grid; place-items: center; }
.cust-link:hover { color: var(--wrc-rackman-dark); }

.qtbl tfoot td {
  padding: 14px 0; font-size: var(--app-body-s);
  border-top: 1px solid var(--black-15); background: var(--white);
}
.qtbl tfoot td:first-child { padding-left: 18px; }
.qtbl tfoot td:last-child  { padding-right: 18px; text-align: right; font-size: var(--app-title-s); }

.fchip .check { margin-right: 2px; }

/* first column carries the 18px panel padding *plus* the 32px expand cell */
.col-expand { width: 50px; }
.qtbl thead th:first-child, .qtbl tbody td:first-child, .qtbl tfoot td:first-child { padding-left: 18px; }
.qtbl tbody td:first-child { padding-right: 0; }

/* sticky sidebar needs the flex item to size itself, not stretch */
.app { align-items: flex-start; }
@media (max-width: 900px) { .app { align-items: stretch; } }

/* ==========================================================================
   MEASURED off `Rackman - Quotes - Desktop` 18136:29046 — do not eyeball
   header 24 Bold · sub 12 · toolbar 38 · filter-bar 36 r10 pad 9/14
   table r12 · row 56 pad 10/18 · sidebar 200 pad 20/16 gap 16 · nav item 40
   ========================================================================== */
.panel__hd h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.panel__hd p  { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.nav-item { height: 40px; padding: 0 10px; }
.side__nav { gap: 4px; }

.searchbar { height: 38px; border-radius: var(--radius-lg); }
.searchbar input { order: 1; }
.searchbar .sb-icon { order: 2; color: var(--text-light); }

.fbar {
  height: 36px; padding: 9px 14px; gap: 10px; border-radius: var(--radius-lg);
  background: var(--white); border: 1px solid var(--black-7);
}
.fbar__x { width: 15px; height: 15px; display: grid; place-items: center; color: var(--text-light); }
.fbar__x:hover { color: var(--status-red); }
.fbar__div { width: 1px; height: 16px; background: var(--black-15); flex: none; }
.fbar .k { font-size: 12px; color: var(--text-medium); }
.fbar .op { font-size: 12px; color: var(--black-25); }
.fbar .v {
  font-size: 12px; font-weight: 500; color: var(--wrc-rackman);
  background: var(--wrc-rackman-7); border-radius: var(--radius-sm); padding: 2px 7px;
}

.dcard { border-radius: var(--radius-xl); }

.qtbl tbody td { padding: 10px 0; height: 56px; }
.qtbl tbody td.tabnum { font-size: 12px; font-weight: 400; }
.qt-num { font-size: 13px; font-weight: 600; }
.cust-code { font-size: 11px; font-weight: 400; }
.cust-name { font-size: 13px; font-weight: 500; }
.spill { font-size: 10px; }
.spill--open, .spill--closed { font-size: 11px; }
.qtbl tbody td.ink-medium { font-size: 12px; }
.qtbl tbody td:last-child { font-size: 13px; font-weight: 600; }

/* MEASURED off `Layout/Sidebar` 18152:29047 — nav row 40 pad 0/12 gap 12,
   AddQuoteBtn 41 r10 14 Semi Bold. */
.side .nav-item { height: 40px; padding: 0 12px; }
.side .btn--primary.btn--block { height: 41px; padding: 0; border-radius: var(--radius-lg); font-size: 14px; }

/* ---------- MEASURED off `Rackman - Quotes - Desktop` 18136:29046 --------- */
/* qtbl-measured: thead 40 pad 12/18 grey-light · rows hairline #e5e7eb ·
   summary 48 pad 15/18 grey-light with a top #e5e7eb rule, amount 15 Bold
   orange · stage pill 24 r999 on the tone at 12% · pager buttons 32 r8. */
.qtbl tbody td { border-bottom-color: var(--grey-medium-blue); }
.qtbl tfoot td {
  background: var(--grey-light); border-top: 1px solid var(--grey-medium-blue);
  padding: 15px 0; font-size: var(--app-body-l); font-weight: 600; color: var(--text-dark);
}
.qtbl tfoot td:last-child {
  padding-right: 18px; text-align: right;
  font-size: 15px; font-weight: 700; color: var(--wrc-orange);
}
.spill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 11px;
  border-radius: var(--radius-full); font-weight: 600;
}
.fbar__k {
  display: inline-flex; align-items: center; height: 18px; padding: 0 8px;
  border-radius: var(--radius-full); background: var(--grey-light);
  font-size: 10px; font-weight: 600; color: var(--text-light);
}
.fbar__v {
  display: inline-flex; align-items: center; height: 18px; padding: 0 8px;
  border-radius: var(--radius-full); background: var(--wrc-rackman-7);
  font-size: 10px; font-weight: 600; color: var(--wrc-rackman);
}
.pager__pages button {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--radius-md);
  font-size: var(--app-body-s); font-weight: 600; color: var(--text-medium);
}
.pager__pages button.is-active {
  background: var(--white); border: 1px solid var(--black-7); color: var(--text-medium);
}
.pager__note, .pager__per { font-size: var(--app-caption); color: var(--text-light); }
/* Form/Checkbox Density=Micro — 14 r4, unchecked #000@35% hairline. */
.fbar .check__box, .cfm .check__box { width: 14px; height: 14px; border-radius: var(--radius-xs); }
.fbar .check input:not(:checked) + .check__box,
.cfm  .check input:not(:checked) + .check__box { border-color: var(--black-35); }

/* ---- document-list columns measured off the Rackman_v2 list frames ------- */
.col-status2  { width: 158px; }
.col-dn       { width: 118px; }
.col-carrier  { width: 132px; }
.col-lines    { width: 80px; }
.col-contact  { width: 210px; }
.col-group    { width: 130px; }
.col-count    { width: 96px; }

/* Data/Status Chip tones. Three are 7% tints of a brand colour; grey is a
   SOLID #f8f8f8 and marks a status that is neither progressing nor done. */
.spill--blue   { background: rgba(39, 92, 211, .07); color: #275cd3; }
.spill--green  { background: rgba(0, 128, 95, .07);  color: #00805f; }
.spill--orange { background: rgba(229, 90, 51, .07); color: #e55a33; }
.spill--grey   { background: #f8f8f8;                color: #364153; }
/* stale is reserved for draft / archived / closed / cancelled */
.spill--stale  { background: var(--status-stale-tint); color: var(--status-stale); }

/* the 26px initials avatar in the Customers default-contact cell */
.cavatar { width: 26px; height: 26px; border-radius: 999px; background: #f8f8f8;
           display: inline-grid; place-items: center; flex: 0 0 26px;
           font: 600 10px/1 Inter, sans-serif; color: #364153; }
/* amount due: bold orange when owing, quiet grey at zero */
.cdue { font: 400 13px/1.2 Inter, sans-serif; color: #656772; font-variant-numeric: tabular-nums; }
.cdue.is-owing { font-weight: 700; color: #e55a33; }

/* ---- Admin/Users --------------------------------------------------------- */
.dtoolbar { display: flex; align-items: center; gap: 12px; }
.dtoolbar .searchbar { flex: 1 1 auto; }
.usel { width: 190px; height: 38px; }
.usum { display: flex; align-items: center; gap: 8px; padding: 14px 18px 10px;
        font-size: var(--app-body-s); }
.usum__hint { margin-left: auto; color: var(--text-light); }
.col-idx  { width: 36px; }
.col-name { width: 170px; }
.col-roles{ width: 300px; }
.col-site { width: 150px; }
.col-dash { width: 210px; }
.col-rep2 { width: 130px; }
.umail { color: var(--wrc-rackman); text-decoration: none; }
.umail.is-off { color: var(--text-light); }
/* the "+N more" overflow marker — blue on ROLES, grey on DASHBOARD */
.umore.is-blue { color: var(--wrc-rackman); }
.umore.is-grey { color: var(--text-light); }
.uyes { color: var(--status-green); font-weight: 600; }

/* ---- Inventory ----------------------------------------------------------- */
/* The table is 2297 wide inside a 1672 card and the visible block ends at the
   rule; the overflow is the design, so the card scrolls rather than shrinks. */
.ivscroll { overflow-x: auto; }
.ivtbl { table-layout: fixed; width: 2297px; }
.ivsum { display: flex; align-items: center; justify-content: space-between;
         padding: 14px 18px 10px; font-size: var(--app-body-s); }
.col-iv-thumb { width: 56px; }
.col-iv-item  { width: 598px; }
.col-iv-prod  { width: 116px; }
.col-iv-comp  { width: 120px; }
.col-iv-avail { width: 264px; }
.col-iv-alloc { width: 112px; }
.col-iv-po    { width: 86px; }
.col-iv-price { width: 92px; }
.col-iv-info  { width: 36px; }
.col-iv-exp   { width: 32px; }
.col-iv-rule  { width: 1px; padding: 0 !important; background: rgba(0,0,0,.07); }
.ivtbl thead .col-iv-rule { background: rgba(0,0,0,.15); }
.col-iv-n     { width: 92px; }
.col-iv-n2    { width: 102px; }
.col-iv-n3    { width: 124px; }

.ivthumb { display: block; width: 56px; height: 42px; border-radius: 6px;
           background: var(--grey-light) center/cover no-repeat; }
.ivchip { padding: 2px 7px; border-radius: 999px; background: var(--grey-light);
          font: 600 10px/1.4 Inter, sans-serif; color: var(--text-light); }
.ivpart { font: 600 12.5px/1.3 Inter, sans-serif; color: var(--wrc-rackman); text-decoration: none; }
.ivdesc { font-size: 12.5px; color: var(--text-dark); }
.ivchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ivloc { padding: 2px 8px; border-radius: 999px;
         background: rgba(0, 128, 95, .07); color: var(--wrc-green);
         font: 500 11px/1.5 Inter, sans-serif; font-variant-numeric: tabular-nums; }
.ivloc.is-zero { background: rgba(229, 90, 51, .07); color: var(--status-orange); }
.ivinfo, .ivexp { width: 28px; height: 28px; border: 0; background: none;
                  border-radius: 999px; cursor: pointer; color: var(--text-light);
                  display: inline-grid; place-items: center; }
.ivinfo:hover, .ivexp:hover { background: var(--black-7); }
/* an expanded row is washed blue and its chevron turns blue */
.ivrow.is-open > td { background: rgba(39, 92, 211, .07); }
.ivexp.is-open { color: var(--wrc-rackman); }
.ivsub > td { background: var(--grey-light); height: 31px; padding: 8px 6px; }
.ivsub__w { font: 600 12px/1.3 Inter, sans-serif; color: var(--text-dark); }
.ivsub__b { font-size: 11px; color: var(--text-light); }
.vtog--app .vtog__b.is-on { background: rgba(39, 92, 211, .07);
                            border-color: var(--wrc-rackman); color: var(--wrc-rackman); }
.ivcards { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 18px 18px; }
.ivcard { width: 268px; border: 1px solid var(--black-7); border-radius: 10px;
          overflow: hidden; cursor: pointer; background: #fff; }
.ivcard:hover { border-color: var(--wrc-rackman); }
.ivcard__img { display: block; height: 150px; background: var(--grey-light) center/cover no-repeat; }
.ivcard__b { padding: 12px; display: flex; flex-direction: column; gap: 6px; }

/* ---- Admin roles --------------------------------------------------------- */
.col-rolename { width: 380px; }
.col-roletype { width: 170px; }
/* Data/Status Chip tones used by role type and item status */
.rchip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
         font: 600 10px/1.6 Inter, sans-serif; letter-spacing: .02em; }
.rchip--purple { background: rgba(124, 58, 237, .1); color: #7c3aed; }
.rchip--blue   { background: rgba(39, 92, 211, .1);  color: #275cd3; }
.rchip--gold   { background: rgba(202, 138, 4, .12); color: #ca8a04; }
.rchip--cyan   { background: rgba(8, 145, 178, .1);  color: #0891b2; }
.rchip--green  { background: rgba(0, 128, 95, .1);   color: #00805f; }

/* ---- Item detail --------------------------------------------------------- */
.idhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.idpart { font: 700 22px/1.2 Inter, sans-serif; color: var(--text-dark); }
.idacts { flex-wrap: wrap; }
.iddesc { font-size: var(--app-body-m); color: var(--text-medium); margin: -8px 0 0; }
.idtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--black-7); }
.idtab { border: 0; background: none; cursor: pointer; padding: 8px 12px;
         font: 500 14px/1.3 Inter, sans-serif; color: var(--text-light);
         border-bottom: 2px solid transparent; margin-bottom: -1px; }
.idtab.is-on { color: var(--wrc-rackman); border-bottom-color: var(--wrc-rackman); font-weight: 600; }
.idgrid { display: flex; align-items: flex-start; gap: 16px; }
.idcard { flex: 1 1 0; padding: 18px; }
.idcard__h { font: 600 16px/1.3 Inter, sans-serif; color: var(--text-dark); margin: 0 0 12px; }
.idphoto { display: block; height: 180px; border-radius: 8px; margin-bottom: 14px;
           background: var(--grey-light) center/cover no-repeat; }
.idrows { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; }
.idrow { display: contents; }
.idrow dt { font-size: 12.5px; color: var(--text-light); }
.idrow dd { font-size: 12.5px; color: var(--text-dark); margin: 0; font-weight: 500; }
.idstock { display: flex; flex-direction: column; gap: 8px; }
.idstock__r { display: flex; align-items: center; gap: 12px; }
.idstock__w { flex: 0 0 130px; font-weight: 600; font-size: 12.5px; }
.idstock__b { flex: 1 1 auto; font-size: 11.5px; color: var(--text-light); }
.idtotal { display: flex; justify-content: space-between; margin-top: 14px;
           padding-top: 12px; border-top: 1px solid var(--black-7); font-size: 13px; }
.idempty { padding: 32px 18px; }

/* ---- Quick Search -------------------------------------------------------- */
.qsempty { padding: 32px 18px; }
.qsgroup { padding: 0 0 6px; }
.qsgroup__h { display: flex; gap: 8px; padding: 12px 18px 6px; font-size: var(--app-body-s); }
.qsrow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 18px;
         border: 0; background: none; cursor: pointer; text-align: left; }
.qsrow:hover { background: var(--grey-light); }
.qsrow__id { flex: 0 0 130px; font-weight: 600; color: var(--wrc-rackman); font-size: 12.5px; }
.qsrow__n  { flex: 1 1 auto; font-size: 12.5px; color: var(--text-dark); }
.qsrow__m  { flex: 0 0 170px; font-size: 12px; color: var(--text-light); }
.qsrow__r  { flex: 0 0 110px; text-align: right; font-weight: 600; font-size: 12.5px;
             font-variant-numeric: tabular-nums; }
.qsgroup__more { padding: 4px 18px 8px; font-size: 12px; color: var(--text-light); }

/* ---- Admin settings ------------------------------------------------------ */
.astabs { display: flex; gap: 4px; border-bottom: 1px solid var(--black-7); }
.astab { border: 0; background: none; cursor: pointer; padding: 5px 10px 8px;
         font: 500 13px/1.3 Inter, sans-serif; color: var(--text-light);
         border-bottom: 2px solid transparent; margin-bottom: -1px; }
.astab.is-on { color: var(--wrc-rackman); border-bottom-color: var(--wrc-rackman); font-weight: 600; }
.ascols { display: flex; align-items: flex-start; gap: 16px; }
.ascols.is-wide .ascol { flex: 1 1 100%; }
.ascol { flex: 1 1 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ascard { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ascard__h { font: 600 11px/1.4 Inter, sans-serif; letter-spacing: .06em;
             color: var(--text-light); margin: 0; }
.ascard__sub { font-size: 11.5px; color: var(--text-light); margin: -8px 0 0; }
.ascard__k { font: 600 10px/1.4 Inter, sans-serif; letter-spacing: .05em; color: var(--text-light); }
.ascard__note { font-size: 11.5px; color: var(--text-light); margin: 0; }
.ascard__act { border: 0; background: none; cursor: pointer; padding: 0; align-self: flex-start;
               font: 600 12.5px/1.3 Inter, sans-serif; color: var(--wrc-rackman); }
.asfield { display: flex; flex-direction: column; gap: 5px; }
.asinline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.asbanner { height: 96px; border-radius: 8px; border: 1px dashed var(--black-15);
            display: grid; place-items: center; font-size: 12px; color: var(--text-light); }
.aspeople { display: flex; flex-wrap: wrap; gap: 6px; }
.asperson { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
            border-radius: 999px; background: var(--grey-light);
            font-size: 12px; color: var(--text-dark); }
.asperson i { font-style: normal; color: var(--text-light); cursor: pointer; }
.asevent { display: flex; flex-direction: column; gap: 6px; padding: 10px 0;
           border-top: 1px solid var(--black-7); }
.asevent__l { font-size: 12.5px; font-weight: 600; color: var(--text-dark); }
.asdur { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-light); }
.asdur .input { width: 46px; text-align: center; }
.astoggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
            font-size: 12.5px; color: var(--text-dark); }
.astoggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.astoggle__box { width: 30px; height: 18px; border-radius: 999px; background: var(--black-15);
                 position: relative; transition: background .15s; flex: 0 0 30px; }
.astoggle__box::after { content: ""; position: absolute; top: 2px; left: 2px;
                        width: 14px; height: 14px; border-radius: 999px; background: #fff;
                        transition: transform .15s; }
.astoggle input:checked + .astoggle__box { background: var(--wrc-rackman); }
.astoggle input:checked + .astoggle__box::after { transform: translateX(12px); }
.astpl { display: flex; align-items: center; justify-content: space-between; gap: 12px;
         padding: 10px 0; border-top: 1px solid var(--black-7); font-size: 12.5px; }
.asdash__hd, .asdash__r { display: grid; align-items: center; gap: 12px;
  grid-template-columns: 20px minmax(220px,1.4fr) 130px 140px minmax(200px,1fr) 40px; }
.asdash__hd { padding: 8px 0; font: 600 10px/1.4 Inter, sans-serif;
              letter-spacing: .05em; color: var(--text-light);
              border-bottom: 1px solid var(--black-15); }
.asdash__r { padding: 10px 0; border-bottom: 1px solid var(--black-7); font-size: 12.5px; }
.asdash__grip { color: var(--black-25); cursor: grab; }
.asdash__roles { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---- Customer detail ----------------------------------------------------- */
.cdstats { display: flex; flex-wrap: wrap; gap: 12px; }
.cdstat { flex: 1 1 150px; padding: 12px 14px; border-radius: 10px; background: #fff;
          border: 1px solid var(--black-7); display: flex; flex-direction: column; gap: 3px; }
.cdstat__k { font: 600 10px/1.4 Inter, sans-serif; letter-spacing: .05em; color: var(--text-light); }
.cdstat__v { font: 600 16px/1.3 Inter, sans-serif; color: var(--text-dark);
             font-variant-numeric: tabular-nums; }
.cdstat__v.is-owing { color: var(--status-orange); }
.cdcard { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 0; }
.cdcard h2 { font: 600 16px/1.3 Inter, sans-serif; color: var(--text-dark); margin: 0; }
.cdcard__hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cdrow { display: flex; align-items: center; gap: 14px; padding: 10px 0;
         border-top: 1px solid var(--black-7); font-size: 12.5px; }
.cdrow > .col { flex: 1 1 auto; min-width: 0; }
.cdrow__ico { color: var(--text-light); }
