/* ==========================================================================
   dashboard.css
   MEASURED off `Rackman - Dashboard v2 - Desktop` 18106:29046
   ========================================================================== */

.dash__hdr { display: flex; align-items: flex-start; gap: 16px; }
.dash__h1 { font-size: 24px; font-weight: 600; color: var(--text-dark); letter-spacing: -.01em; }
.dash__sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.dash { display: flex; flex-direction: column; gap: 20px; }
.dash__row { display: flex; gap: 16px; align-items: flex-start; }
.dash__label {
  padding-top: 8px; font-size: 10px; font-weight: 600;
  letter-spacing: .05em; color: var(--text-light);
}

.dash__card {
  background: var(--white); border: 1px solid var(--black-7);
  border-radius: var(--radius-xl); padding: 20px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.dash__card--half { flex: 1 1 0; gap: 14px; border-radius: var(--radius-lg); }

.dash__head { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.dash__ct { font-size: 15px; font-weight: 600; color: var(--text-dark); }
.dash__cap { font-size: 11px; color: var(--text-light); white-space: nowrap; }

.dash__stats { display: flex; gap: 16px; }
.dash__stat {
  flex: 1 1 0; height: 97px; border-radius: var(--radius-lg); background: var(--grey-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.dash__statv { font-size: 28px; font-weight: 600; color: var(--text-dark); font-variant-numeric: tabular-nums; }
.dash__statk { font-size: 12.5px; font-weight: 500; color: var(--text-light); }

/* ---------- generic data table (rows are flex, columns are flex-basis) --- */
.dtbl { border: 1px solid var(--black-7); border-radius: var(--radius-lg); overflow: hidden; }
.dtbl__head, .dtbl__row { display: flex; align-items: center; gap: 0; }
.dtbl__head {
  background: var(--grey-light); height: 38px; padding: 0 14px;
  font-size: 10px; font-weight: 500; letter-spacing: .02em; color: var(--text-light);
  border-bottom: 1px solid var(--black-7);
}
.dtbl__row {
  padding: 12px 14px; font-size: 12.5px; font-weight: 500; color: var(--text-medium);
  border-bottom: 1px solid var(--black-7);
}
.dtbl__row:last-child { border-bottom: 0; }
.dtbl__row:hover { background: var(--wrc-rackman-7); }
.dtbl__row.is-total {
  background: var(--grey-light); font-weight: 600; color: var(--text-dark);
  border-bottom: 0;
}
.dtbl__row.is-total:hover { background: var(--grey-light); }
.dtbl .is-strong { font-weight: 600; color: var(--text-dark); }
.dtbl .is-link { font-weight: 600; color: var(--wrc-rackman); }
.dtbl .is-late { color: var(--status-orange); font-weight: 600; }

/* orders-today columns (Figma: 32 86 150 102 120 110 fill 130 104 118) */
.dtbl .c-x      { flex: 0 0 32px; }
.dtbl .c-no     { flex: 0 0 86px; }
.dtbl .c-status { flex: 0 0 150px; }
.dtbl .c-date   { flex: 0 0 102px; }
.dtbl .c-via    { flex: 0 0 120px; }
.dtbl .c-bp     { flex: 0 0 110px; }
.dtbl .c-cust   { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtbl .c-rep    { flex: 0 0 130px; }
.dtbl .c-loc    { flex: 0 0 104px; }
.dtbl .c-amt    { flex: 0 0 118px; text-align: right; }

/* rep + receivables tables: name column flexes, numbers are equal and right */
.dtbl--rep .c-rep2, .dtbl--ar .c-bp2 { flex: 1 1 auto; min-width: 200px; }
.dtbl--ar .c-n { flex: 0 0 148px; text-align: right; }
/* Figma column widths: 170 / 120 / 140 / 110 / 160 · 16 gap · 160. */
.dtbl--rep .c-n { text-align: right; }
.dtbl--rep .c-n:nth-child(2) { flex: 0 0 170px; }
.dtbl--rep .c-n:nth-child(3) { flex: 0 0 120px; }
.dtbl--rep .c-n:nth-child(4) { flex: 0 0 140px; }
.dtbl--rep .c-n:nth-child(5) { flex: 0 0 110px; }
.dtbl--rep .c-n:nth-child(6) { flex: 0 0 160px; }
.dtbl--rep .c-n:nth-child(7) { flex: 0 0 176px; padding-left: 16px; }
.dtbl--rep .dtbl__row { height: 43px; padding: 10px 14px; }
/* The top-3 highlight is a chip on EXCLUDING TAX, not a tint on the row. */
.excl-chip {
  display: block; padding: 4px 8px; border-radius: var(--radius-sm);
  font-weight: 600; color: var(--text-dark);
}
.excl-chip.is-top { background: var(--wrc-green-7); color: var(--wrc-green); }

/* Scoped: the quotes list has its own (boxed) expand button. */
.dtbl .expand-btn {
  width: 15px; height: 15px; border-radius: 0; padding: 0;
  display: grid; place-items: center; color: var(--text-medium); background: none;
}
.dtbl .expand-btn:hover { color: var(--text-dark); background: none; }

/* ---------- bar chart ---------------------------------------------------- */
.dash__legend { display: flex; gap: 14px; }
.dash__leg { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--text-medium); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: block; }
.sw--2026 { background: var(--wrc-rackman); }
.sw--2025 { background: var(--wrc-rackman-32); }

.plot { display: flex; gap: 10px; height: 281px; }
.plot__y {
  flex: 0 0 46px; height: 260px; display: flex; flex-direction: column;
  justify-content: space-between; font-size: 10px; color: var(--text-light);
}
.plot__col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.plot__bars { position: relative; height: 260px; display: flex; align-items: flex-end; }
.plot__grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--black-7); }
.plot__c { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.plot__pair {
  position: relative; height: 100%; width: 100%;
  display: flex; align-items: flex-end; justify-content: center; gap: 6px;
}
.plot__b { width: 32px; border-radius: 4px; transition: filter .12s; }
.plot__b--2026 { background: var(--wrc-rackman); }
.plot__b--2025 { background: var(--wrc-rackman-32); }
.plot__pair:hover .plot__b { filter: brightness(.92); }
/* Figma's value-label is a bordered white pill, not bare text. */
.plot__val {
  position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 6px;
  display: inline-block; padding: 3px 6px; border-radius: 5px;
  background: var(--white); border: 1px solid var(--black-15);
  font-size: 10px; font-weight: 500; color: var(--text-medium);
  white-space: nowrap; pointer-events: none;
}
.plot__x { display: flex; }
.plot__x span { flex: 1 1 0; text-align: center; font-size: 11px; color: var(--text-light); }
.plot__x span.is-now { color: var(--text-dark); font-weight: 500; }

/* ---------- quote conversion --------------------------------------------- */
.cv__t { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.cv__cap { font-size: 11.5px; color: var(--text-light); }
.cv { display: flex; flex-direction: column; }
.cv__row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--black-7);
  font-size: 12px; color: var(--text-medium);
}
.cv__row.is-head {
  padding: 0 0 8px; font-size: 10px; font-weight: 500;
  letter-spacing: .02em; color: var(--text-light);
}
.cv__site { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__n { flex: 0 0 88px; text-align: right; font-variant-numeric: tabular-nums; }
.cv__row.is-head .cv__n { font-size: 10px; }
.cv__car { width: 12px; height: 12px; flex: none; color: var(--text-light); }
.cv__row.is-site { font-weight: 500; color: var(--text-dark); }
.cv__row.is-clickable { cursor: pointer; }
.cv__row.is-clickable:hover { background: var(--wrc-rackman-7); }
.cv__row.is-rep { padding-left: 26px; color: var(--text-light); }
.cv__row.is-rep .cv__site { font-weight: 500; }
.cv__row.is-total { font-weight: 600; color: var(--text-dark); border-bottom: 0; border-top: 1px solid var(--black-15); }
.cv__rate { color: var(--status-orange); font-weight: 600; }
.cv__rate.is-good { color: var(--wrc-green); }
.cv .is-strong { font-weight: 600; color: var(--text-dark); }

/* ---------- rank cards --------------------------------------------------- */
/* MEASURED off "card-sales-employee": table r10 hairline, thead 34 pad 11/14
   grey-light, trow 39 pad 9/14, rank 30, docs 60, gap 16, total-cell 160,
   delta 100. Bar is RIGHT-anchored, #00805f at 20%, r3. */
.rank {
  border: 1px solid var(--black-7); border-radius: var(--radius-lg); overflow: hidden;
}
.rank__row {
  display: flex; align-items: center; gap: 0;
  height: 39px; padding: 9px 14px;
  font-size: 12.5px; color: var(--text-medium);
  border-bottom: 1px solid var(--black-7);
}
.rank__row:last-child { border-bottom: 0; }
.rank__row.is-head {
  height: 34px; padding: 11px 14px; background: var(--grey-light);
  font-size: 10px; font-weight: 500; letter-spacing: .02em; color: var(--text-light);
}
.rank__row:not(.is-head):hover { background: var(--wrc-rackman-7); }
.rank__row.is-gold   { background: rgba(212, 175, 55, .07); }
.rank__row.is-silver { background: rgba(168, 169, 173, .07); }
.rank__row.is-bronze { background: rgba(205, 127, 50, .07); }
.rank__row.is-total {
  background: var(--grey-light); font-weight: 600; color: var(--text-dark);
  border-bottom: 0;
}
.rank__row.is-total:hover { background: var(--grey-light); }

.rank__rk {
  flex: 0 0 30px; display: flex; align-items: center;
  font-size: 10px; font-weight: 500; color: var(--text-light);
}
.rank__medal { display: block; line-height: 0; }
.rank__medal.is-gold   { color: var(--medal-gold); }
.rank__medal.is-silver { color: var(--medal-silver); }
.rank__medal.is-bronze { color: var(--medal-bronze); }

.rank__c.is-name {
  flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--text-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank__row.is-head .rank__c.is-name { font-weight: 500; color: var(--text-light); }
.rank__c.is-n { flex: 0 0 76px; text-align: right; font-variant-numeric: tabular-nums; }

.rank__bar {
  position: relative; flex: 0 0 160px; margin-left: 16px;
  padding: 3px 6px 3px 0; text-align: right; overflow: hidden;
}
.rank__bar.is-head { padding: 0 6px 0 0; }
.rank__fill {
  position: absolute; right: 0; top: 3px; bottom: 3px; display: block;
  border-radius: 3px; background: rgba(0, 128, 95, .20);
}
.rank__fill.is-warm { background: rgba(229, 90, 51, .20); }
.rank__num {
  position: relative; font-size: 12.5px; font-weight: 600;
  color: var(--text-dark); font-variant-numeric: tabular-nums;
}
.rank__d {
  flex: 0 0 100px; display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rank__d.is-up   { color: var(--wrc-green); }
.rank__d.is-down { color: var(--status-orange); }
.rank__row.is-head .rank__d { font-size: 10px; font-weight: 500; color: var(--text-light); }
.rank__tri { display: block; line-height: 0; }
.rank__tri.is-down { transform: rotate(180deg); }
