/* Vending & Hire page (Data side). Only what app.css / club.css do not already provide. */

/* app.css gives every .card grid-column:span 12 (the Finance pages' 12-column grid); in the two-column data grid
   that forces every card to full width, so reset it here for this page's cards. */
.vd-grid > .card{grid-column:auto}
.vd-grid > .card.span2{grid-column:1/-1}

/* KPI sub-lines carry a comparison ("vs prior 30 days"): let them wrap instead of being cut off */
.vd-kpis .kpi .d{white-space:normal;line-height:1.5}

/* What to restock: one column per club, one scannable line per product */
.vd-restock{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 36px}
.vd-restock.one{grid-template-columns:minmax(0,1fr)}
.vd-site{min-width:0}
.vd-site-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px;font-size:14px}
.vd-site-h .pill{margin-left:0}
.vd-site-sub{color:var(--muted);font-size:12px;flex-basis:100%}
.vd-row{display:grid;grid-template-columns:minmax(0,1fr) 64px 58px 78px 58px;gap:10px;align-items:center;padding:7px 0;border-top:1px solid var(--line);font-size:13px;font-variant-numeric:tabular-nums}
.vd-head{border-top:0;padding:0 0 5px;font-size:11.5px;color:var(--muted)}
.vd-head .vd-two{grid-column:span 2}
.vd-name{line-height:1.3}
/* "Last filled" per line only fits when one club has the full width; with both clubs it is in the club's header line */
.vd-last{display:none}
.vd-restock.one .vd-row{grid-template-columns:minmax(0,1fr) minmax(64px,180px) 58px 78px 78px 58px}
.vd-restock.one .vd-last{display:block}
.vd-bar{height:8px;border-radius:4px;background:var(--surface-3);overflow:hidden}
.vd-bar i{display:block;height:100%;border-radius:4px;background:var(--accent)}
.vd-row.vd-low .vd-bar i{background:var(--warn)}
.vd-row.vd-empty .vd-bar{box-shadow:inset 0 0 0 1px var(--critical)}
.vd-lvl,.vd-last{color:var(--muted);font-size:12px;white-space:nowrap}
.vd-cover{white-space:nowrap}
.vd-row.vd-low .vd-cover,.vd-row.vd-empty .vd-cover{font-weight:600}
.vd-row.vd-low .vd-cover{color:var(--warn-ink)}
.vd-row.vd-empty .vd-cover{color:var(--critical)}
.vd-flag{text-align:right}
.vd-flag .pill{margin-left:0}
.vd-pick{margin:10px 0 0;padding:9px 12px;border-radius:10px;background:var(--fill);font-size:12.5px;line-height:1.45}

/* When things sell: weekday × hour grid */
.vd-heat{display:grid;grid-template-columns:34px repeat(15,minmax(0,1fr));gap:3px;align-items:center}
.vd-heat i{display:block;height:24px;border-radius:4px}
.vd-heat .vd-hh,.vd-heat .vd-dw{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.vd-heat .vd-hh{text-align:left}

/* Racket hire: four small figures above the chart */
.vd-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:10px}
.vd-stats div{min-width:0}
.vd-stats b{display:block;font-size:19px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.vd-stats span{display:block;font-size:11.5px;color:var(--muted);line-height:1.35}

/* Site comparison headings above each pair of bars */
.vd-cmp-h{font-size:12px;color:var(--muted);margin:14px 0 6px}
.vd-cmp-h:first-child{margin-top:0}

/* Run-rate bar with a marker at the expected figure */
.vd-run{margin-bottom:18px}
.vd-run:last-child{margin-bottom:0}
.vd-run-h{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;font-size:13.5px}
.vd-run-h .pill{margin-left:6px}
.vd-run-bar{position:relative;height:12px;border-radius:6px;background:var(--surface-3);margin:9px 0 7px}
.vd-run-bar i{display:block;height:100%;border-radius:6px}
.vd-run-bar em{position:absolute;top:-4px;bottom:-4px;width:2px;margin-left:-1px;border-radius:1px;background:var(--fg)}
.vd-run-f{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted)}

/* Phone: one club per row; each product becomes two lines (name + flag, then bar and figures) */
@media (max-width:900px){.vd-restock{grid-template-columns:minmax(0,1fr)}}
@media (max-width:560px){
  .vd-head{display:none}
  .vd-row,.vd-restock.one .vd-row{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"name name flag" "bar lvl cover";gap:5px 10px}
  .vd-row:first-of-type{border-top:0}
  .vd-name{grid-area:name}.vd-flag{grid-area:flag}.vd-bar{grid-area:bar}.vd-lvl{grid-area:lvl}.vd-cover{grid-area:cover;min-width:74px;text-align:right}
  .vd-restock.one .vd-last{display:none}
  .vd-heat{grid-template-columns:28px repeat(15,minmax(0,1fr));gap:2px}
  .vd-heat i{height:20px;border-radius:3px}
  .vd-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
