/* ─── Excursion sales index + day ledger (#509, D2 locked 2026-10-25) ──────────
   The rows are the gem's `.os-ledger-row` (time · title · value); these rules only
   set the fixed COLUMNS the locked frames draw, their phone fold, and the one
   thing the gem has no notion of — a stat band whose cells are filters. */

.hos-salesbody { display: flex; flex-direction: column; gap: var(--space-8); }
.hos-sales { display: flex; flex-direction: column; min-width: 0; }
.hos-saleslist { margin: 0; padding: 0; }
.hos-saleslist > .os-ledger-row:last-child { border-bottom: 0; }

/* Column headings over a list (≥641px only — a phone row is two lines, not columns). */
.hos-salescols {
  display: grid; column-gap: var(--space-4); padding: 0 18px var(--space-2);
  font-size: var(--text-2xs); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-2);
}
.hos-salescols__end { text-align: right; }

/* A row: the gem gives `.os-ledger-row > *` flex + 12/16 padding; the frames want
   a fixed grid so payment / seats / totals line up down the card. */
.os-ledger-row > .hos-salesrow,
.os-ledger-row > .os-ledger-row__link.hos-salesrow,
.os-ledger-row > .hos-tenderrow {
  display: grid; align-items: center; column-gap: var(--space-4);
  padding: 12px 18px; min-height: 52px;
}
.hos-salesrow--queue { grid-template-columns: minmax(0, 1fr) 220px 90px 120px; }
.hos-salesrow--all { grid-template-columns: 56px minmax(0, 1fr) 220px 110px 16px; }
.os-ledger-row > .hos-tenderrow { grid-template-columns: auto minmax(0, 1fr) auto; }
.os-ledger-row > .hos-tenderrow:not(:has(.os-ledger-row__time)) { grid-template-columns: minmax(0, 1fr) auto; }

.hos-salesrow__who { display: flex; flex-direction: column; min-width: 0; }
.hos-salesrow__name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.hos-salesrow__sub { overflow-wrap: anywhere; margin-top: 2px; font-size: var(--text-xs); color: var(--text-muted); }
.hos-salesrow__pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.hos-salesrow__seats { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.hos-salesrow__amt { text-align: right; }
.hos-salesrow__chev { display: inline-flex; color: var(--muted-2); }
.hos-salesrow__act { justify-self: end; }
.hos-tenderrow__neg { color: var(--status-cancelled-fg); }

/* ─── Close the counter: a stat band whose cells filter the list ──────────────
   Gem gap: `.os-stat-band` has no selectable cell (the clickable KPI concept,
   `.os-stat-card`, is a separate tile, not a band). Upstream candidate. */
.hos-tenderband { --cols: 5; }
.hos-tenderband__cell {
  position: relative; display: block; color: inherit; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.hos-tenderband__cell:hover { background: var(--surface-alt); text-decoration: none; }
.hos-tenderband__cell:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.hos-tenderband__cell.is-on { background: var(--accent-soft); }
.hos-tenderband__cell.is-on .os-stat-band__label,
.hos-tenderband__cell.is-on .os-stat-band__value { color: var(--accent); }
.hos-tenderband__cell.is-on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent);
}
.hos-tenderband__hint { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--text-muted); }

/* The tenders section head carries the applied tender as a clearable chip. */
.os-section-head > .os-filter-btn { flex: none; }

/* ─── Single-date filter: `.os-filter-btn--kv` over a transparent date input ── */
.hos-datekv { margin: 0; }
.hos-datekv__btn { position: relative; cursor: pointer; }
.hos-datekv__input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0; opacity: 0; cursor: pointer;
}
.hos-datekv__btn:focus-within { box-shadow: var(--shadow-focus); }

@media (max-width: 640px) {
  .hos-salescols { display: none; }
  .os-ledger-row > .hos-salesrow,
  .os-ledger-row > .os-ledger-row__link.hos-salesrow,
  .os-ledger-row > .hos-tenderrow { padding: 12px 14px; align-items: start; column-gap: var(--space-3); row-gap: 6px; }
  /* To schedule: name · excursion, then pills + seats · day; Schedule on the right. */
  .hos-salesrow--queue {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "who act" "pills act" "seats act";
  }
  .hos-salesrow--queue .hos-salesrow__who { grid-area: who; }
  .hos-salesrow--queue .hos-salesrow__pills { grid-area: pills; justify-content: flex-start; }
  .hos-salesrow--queue .hos-salesrow__seats { grid-area: seats; flex-direction: row; align-items: baseline; gap: var(--space-2); text-align: left; }
  /* The phone touch floor (48px) — the gem's --sm step is 32. */
  .hos-salesrow--queue .hos-salesrow__act { grid-area: act; align-self: end; min-height: var(--space-12); }
  /* All sales + tenders: time · name · amount, pills under the name. */
  .hos-salesrow--all {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "time who amt" "time pills amt";
  }
  .hos-salesrow--all .os-ledger-row__time { grid-area: time; }
  .hos-salesrow--all .hos-salesrow__who { grid-area: who; }
  .hos-salesrow--all .hos-salesrow__pills { grid-area: pills; justify-content: flex-start; }
  .hos-salesrow--all .hos-salesrow__amt { grid-area: amt; }
  .hos-salesrow--all .hos-salesrow__chev { display: none; }
  .os-ledger-row > :is(.hos-salesrow, .hos-tenderrow) .os-ledger-row__time { width: auto; padding-top: 1px; }

  /* Close the counter: Cash to count spans the width, the other four sit 2×2. */
  .hos-tenderband .os-stat-band__cell:first-child { grid-column: 1 / -1; }
  .hos-tenderband .os-stat-band__cell:nth-child(2) { border-left: 0; border-top: 1px solid var(--hairline-2); }
  .hos-tenderband .os-stat-band__cell:nth-child(3),
  .hos-tenderband .os-stat-band__cell:nth-child(5) { border-left: 1px solid var(--hairline-2); }
}
