/* Open Carts (Testing) -- store -> associate -> guest book.
   Lifted from the approved prototype (2026-07-24). Every constant comes from
   css/tokens.css; the KPI tiles reuse .kpi-card / .kpi-row from kpi-card.css
   untouched, so this view inherits the navy tile treatment for free. */

.oc-basis {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 6px 0 10px; font-size: 11.5px; color: #6b7280;
}
.oc-asof { font-weight: 700; color: var(--navy); }
/* The estimated-value label is a chip, not body text, because it has to survive
   a screenshot. Yellow signal tint so it reads as a caveat without alarming. */
.oc-est {
  background: var(--signal-yellow-bg); color: var(--signal-yellow-text);
  padding: 2px 8px; border-radius: 4px; font-weight: 700;
}

.oc-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.oc-chip-row { display: flex; gap: 6px; }
.oc-chip-label {
  font-size: var(--text-caption); font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: #6b7280; margin-right: 2px;
}
.oc-chip {
  background: #fff; border: 1px solid var(--table-border); border-radius: var(--radius-pill);
  padding: 5px 12px; font-size: 12px; font-weight: 600; color: #374151;
  cursor: pointer; font-family: inherit;
}
.oc-chip:hover { background: var(--icy-blue); border-color: var(--primary-blue); }
.oc-chip.active { background: var(--navy); color: #fff; border-color: var(--navy-border); }
.oc-chip .n { opacity: .7; font-weight: 700; margin-left: 4px; }
.oc-sep { width: 1px; height: 20px; background: var(--table-border); }

.oc-pane select, .oc-filters select, .oc-filters input[type=search] {
  font-family: inherit; font-size: 12.5px; padding: 6px 9px;
  border: 1px solid var(--table-border); border-radius: 6px; background: #fff; color: #111827;
}
.oc-filters input[type=search] { min-width: 210px; }
.oc-btn {
  background: #fff; border: 1px solid var(--table-border); border-radius: 6px;
  padding: 6px 11px; font-size: 12px; font-weight: 600; color: var(--navy);
  cursor: pointer; font-family: inherit;
}
.oc-btn:hover { background: var(--icy-blue); }
.oc-check { font-size: 12.5px; font-weight: 600; color: #374151; }
.oc-kpis { grid-template-columns: repeat(4, 1fr); }
.oc-countline { font-size: 12px; color: #6b7280; margin: 0 0 8px; }

/* ── the book: store row -> associate row -> guest table ───────────────── */
.oc-store {
  background: #fff; border: 1px solid var(--table-border); border-radius: var(--radius);
  margin-bottom: 8px; box-shadow: var(--shadow); overflow: hidden;
}
/* One grid template shared by the store row and the associate row so the metric
   columns line up down the whole page. */
.oc-store-head, .oc-rsa-row {
  display: grid; grid-template-columns: 26px 1fr 96px 110px 120px 118px;
  gap: 10px; align-items: center; cursor: pointer;
}
.oc-store-head { padding: 10px 12px; background: var(--row-region-bg); }
.oc-store-head:hover { background: var(--row-region-bg-hover); }
.oc-tw { color: var(--navy); font-size: 12px; width: 26px; text-align: center; }
.oc-store-name { font-weight: 700; color: var(--navy); font-size: 14.5px; }
.oc-rg {
  font-weight: 600; color: #6b7280; font-size: 11px; margin-left: 7px;
  background: #fff; border-radius: 10px; padding: 1px 7px;
}
.oc-metric { text-align: right; font-variant-numeric: tabular-nums; }
.oc-metric .m-v { font-weight: 700; color: var(--navy); font-size: 14px; }
.oc-metric .m-l {
  font-size: 10px; color: #5b6b73; text-transform: uppercase; letter-spacing: .5px;
}
.oc-store-body { display: none; border-top: 1px solid var(--table-border); }
.oc-store.open .oc-store-body { display: block; }

.oc-rsa-row {
  padding: 8px 12px; background: var(--row-market-bg);
  border-top: 1px solid var(--table-border);
}
.oc-rsa-row:hover { background: var(--row-market-bg-hover); }
.oc-rsa-name { font-weight: 600; color: #0f2f3a; }
.oc-slm { color: #6b7280; font-weight: 500; font-size: 11px; margin-left: 6px; }
.oc-rsa-body { display: none; }
.oc-rsa.open .oc-rsa-body { display: block; }

table.oc-carts { width: 100%; border-collapse: collapse; background: var(--row-store-bg); }
table.oc-carts th {
  background: var(--table-header-bg); color: var(--navy); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .5px; text-align: left;
  padding: var(--pad-row); border-bottom: 1px solid var(--table-border); font-weight: 700;
}
table.oc-carts td {
  padding: var(--pad-row); border-bottom: 1px solid #EEF1F4; font-size: 12.5px; vertical-align: top;
}
table.oc-carts tr:hover td { background: var(--row-store-bg-hover); }
.oc-pane td.num, .oc-pane th.num { text-align: right; font-variant-numeric: tabular-nums; }
.oc-cust { font-weight: 600; color: #111827; }
.oc-mini { font-size: 11px; color: #6b7280; }
.oc-mini a { color: var(--primary-blue); text-decoration: none; }
.oc-mini a:hover { text-decoration: underline; }

.oc-badge {
  display: inline-block; padding: 1px 7px; border-radius: 10px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.oc-badge.b-fresh { background: var(--signal-green-bg); color: var(--signal-green-text); }
.oc-badge.b-warm  { background: var(--icy-blue); color: var(--region-east-text); }
.oc-badge.b-cool  { background: var(--signal-yellow-bg); color: var(--signal-yellow-text); }
.oc-badge.b-cold  { background: var(--signal-red-bg); color: var(--signal-red-text); }

/* Call / Text are real tel: and sms: links, so they get link affordances. */
.oc-act {
  display: inline-block; border: 1px solid var(--table-border); border-radius: 5px;
  padding: 2px 8px; font-size: 11px; font-weight: 600; color: var(--navy);
  background: #fff; margin-right: 4px; text-decoration: none; cursor: pointer;
}
.oc-act:hover { background: var(--icy-blue); border-color: var(--primary-blue); }
.oc-act.off { color: #9ca3af; cursor: default; }

/* ── the two flat grids (roster, rate) ─────────────────────────────────── */
/* Header pins inside its own scroll box rather than to the page, so it can
   never land on top of the first rows at scroll zero. */
.oc-gridwrap {
  background: #fff; box-shadow: var(--shadow); border-radius: var(--radius);
  overflow: auto; max-height: calc(100vh - 260px); border: 1px solid var(--table-border);
}
table.oc-grid { width: 100%; border-collapse: collapse; background: #fff; }
table.oc-grid th {
  background: var(--navy); color: #fff; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .5px; padding: 8px; text-align: left;
  position: sticky; top: 0; z-index: 5; font-weight: 700;
}
table.oc-grid td { padding: var(--pad-row); border-bottom: 1px solid #EEF1F4; font-size: 12.5px; }
table.oc-grid tr:hover td { background: var(--row-store-bg-hover); }
table.oc-grid tr.zero td { background: var(--signal-red-bg-soft); }
table.oc-grid tr.zero:hover td { background: var(--signal-red-bg); }
.oc-pane .cell-green {
  background: var(--signal-green-bg) !important; color: var(--signal-green-text); font-weight: 700;
}
.oc-pane .cell-red {
  background: var(--signal-red-bg) !important; color: var(--signal-red-text); font-weight: 700;
}

/* ── notes ─────────────────────────────────────────────────────────────── */
.oc-note {
  background: #fff; border: 1px solid var(--table-border);
  border-left: 4px solid var(--ashley-orange); border-radius: var(--radius);
  padding: var(--pad-card); margin: 0 0 14px; font-size: 12.5px; line-height: 1.55;
  box-shadow: var(--shadow); max-width: 900px;
}
.oc-note--blue { border-left-color: var(--primary-blue); }
.oc-note h3 {
  margin: 0 0 6px; font-size: 13px; color: var(--navy);
  text-transform: uppercase; letter-spacing: .6px;
}
.oc-note ul { margin: 6px 0 0 18px; padding: 0; }
.oc-note li { margin-bottom: 4px; }

.oc-empty { padding: 22px; text-align: center; color: #6b7280; font-size: 13px; }

@media (max-width: 900px) {
  .oc-kpis { grid-template-columns: repeat(2, 1fr); }
  .oc-store-head, .oc-rsa-row { grid-template-columns: 22px 1fr 92px 104px; }
  .oc-store-head .m-hide, .oc-rsa-row .m-hide { display: none; }
}
