/* BOOTIQUE trainer class map. The screen is a fixed 1366 x 1024 layout that is scaled to fit
   the iPad. Look "A · Clean", Brian's pick on Oct 17: no class timers, a small clock, the
   class name as the class picker. The floor map is drawn exactly as before; only the tile
   colors are new (shared/rules.js). */

@font-face { font-family: 'Barlow'; font-weight: 300; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --black: #000000;
  --ink: #FAFAFA;
  --ink-2: #E4E4E7;
  --ink-3: #A1A1AA;
  --line: #232327;
  --line-2: #2E2E33;
  --surface: #0F0F11;
  --surface-2: #18181B;
  --amber: #F59E0B;
  --cyan: #22D3EE;
  --alert: #FF5A6E;
  --green: #34D399;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--ink); overflow: hidden; }
body { font-family: 'Barlow', system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button, select { font-family: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
.pill:disabled { opacity: 0.45; }
button:focus-visible, select:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }

.viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--black); }
.stage { position: relative; width: 1366px; height: 1024px; flex: 0 0 auto; overflow: hidden; background: var(--black); transform-origin: center center; }

/* ---- Buttons ---- */
.pill { height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; line-height: 1; letter-spacing: 0.05em; white-space: nowrap; }
.pill-light { background: #F4F4F5; border-color: #F4F4F5; color: #09090B; }
.pill-light.on { background: #F59E0B; border-color: #F59E0B; color: #000000; }
.pill-dark { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-2); }
.pill-dark.on { background: var(--cyan); border-color: var(--cyan); color: #000000; }
.pill-small { height: 44px; padding: 0 16px; font-size: 13px; letter-spacing: 0.08em; }

/* ---- Top bar: the class (tap it to pick another), the two buttons, the clock ---- */
.top { position: absolute; left: 32px; right: 32px; top: 22px; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.title-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* The class name is a heading; the class picker lies over it, invisible, so a tap on the
   name opens the iPad's own list of today's classes. */
.class-pick { position: relative; display: flex; align-items: center; gap: 10px; align-self: flex-start; max-width: 100%; height: 40px; border-radius: 6px; color: var(--ink-3); }
.keys .class-pick:focus-within { outline: 3px solid var(--cyan); outline-offset: 4px; }
.class-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: -0.005em; }
.class-chevron { flex: 0 0 auto; }
.class-select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; font-size: 16px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.class-select:disabled { cursor: default; }
.class-pick:has(.class-select:disabled) .class-chevron { display: none; }
.class-line { font-weight: 500; font-size: 16px; line-height: 1.2; color: var(--ink-3); min-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.top-actions .pill { min-width: 168px; }
.clock { margin-left: 10px; padding-left: 22px; border-left: 1px solid var(--line-2); height: 40px; display: flex; align-items: center; font-weight: 500; font-size: 26px; line-height: 1; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Counts and sync ---- */
.stats-row { position: absolute; left: 32px; right: 32px; top: 112px; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stats { display: flex; gap: 10px; }
.stat-pill { height: 52px; padding: 0 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.stat-num { font-weight: 600; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-lab { font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: 0.1em; color: var(--ink-3); }
.sync { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; line-height: 1; color: var(--ink-3); }
.sync .pill { margin-left: 6px; }
.sync-dot { display: block; width: 9px; height: 9px; border-radius: 999px; background: #55555C; }
.sync-dot.live { background: var(--green); }
.sync-dot.idle { background: #8A8A92; }
.sync-dot.stale { background: var(--amber); }
.sync-dot.offline { background: var(--alert); }
.sync-text.stale { color: var(--amber); }
.sync-text.offline { color: var(--alert); }

/* ---- Legend: a swatch and a word for each color ---- */
.legend { position: absolute; left: 34px; right: 32px; top: 184px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.key { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; line-height: 1; color: var(--ink-2); }
.sw { display: block; width: 16px; height: 16px; border-radius: 5px; }
.sw-first { background: #5BF0A8; }
.sw-second { background: #FACC15; }
.sw-repeat { background: #F4F4F5; }
.sw-b5 { background: #000000; box-shadow: inset 0 0 0 3px #E11D2E; }
.sw-b10 { background: #000000; box-shadow: inset 0 0 0 3px #A020F0; }
.sw-vip { background: #F9A8D4; }
.sw-comp { background: #5AC8FA; }
.sw-staff { background: #2F49E8; }
.sw-noshow { background: #26262A; box-shadow: inset 0 0 0 1px #3A3A40; position: relative; }
.sw-noshow::after { content: ''; position: absolute; left: 4px; right: 4px; top: 7px; height: 2px; border-radius: 1px; background: #FF5A6E; }

/* ---- Notes ---- */
.notes { position: absolute; left: 32px; right: 32px; top: 214px; height: 42px; padding: 0 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; font-weight: 500; font-size: 15px; line-height: 1.2; color: var(--ink-2); }
.notes b { flex: 0 0 auto; font-weight: 700; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-3); }
.notes-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.notes.swap { border-color: var(--cyan); color: var(--cyan); }
.notes.swap b { color: var(--cyan); }

/* ---- Room: exactly today's floor map (Brian: don't change how it looks). Only the tile
   colors are new, and those come from COLORS in shared/rules.js. ---- */
.room { position: absolute; z-index: 0; left: 32px; top: 276px; width: 1302px; height: 730px; border: 1.5px solid #2C2C30; border-radius: 6px; }
.room-label { position: absolute; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; line-height: 1; letter-spacing: 0.2em; color: #8E8E96; }
.room-label-back { left: 16px; top: 9px; }
.room-label-floor { left: 16px; top: 268px; }
.room-label-entry { right: 14px; top: 256px; font-size: 13px; }
.entry-gap { position: absolute; right: -3px; top: 228px; width: 5px; height: 70px; background: #000000; }
.sides-pill { position: absolute; right: 14px; top: 5px; height: 22px; padding: 0 10px; border-radius: 3px; display: flex; align-items: center; background: #1C1C1F; color: #C4C4CA; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: 0.14em; }
.sides-pill.on { background: #F59E0B; color: #000000; }
/* Between the StairMasters and the floor: ALL TO STAIRS / ALL TO FLOOR on the left,
   ORIGINAL SPOTS at the right end. Nothing pops up beside them (Brian, Oct 16). Above the
   tiles, so a tile sliding past right after a move never covers a button. */
.gather { position: absolute; z-index: 1; left: 16px; right: 16px; top: 184px; height: 56px; display: flex; align-items: center; gap: 10px; }
.map-btn { height: 44px; padding: 0 14px; border-radius: 4px; border: 1px solid #3A3A40; background: #141416; color: #E4E4E7; display: flex; align-items: center; gap: 6px; font-family: 'Barlow', system-ui, sans-serif; font-weight: 600; font-size: 13px; line-height: 1; letter-spacing: 0.08em; }
.map-btn:disabled { opacity: 0.45; }
.gather-btn { flex: 0 0 auto; }
.original-btn { margin-left: auto; }
.stage-block { position: absolute; left: 575px; bottom: 0; width: 150px; height: 252px; padding-bottom: 24px; border: 1.5px solid #55555C; border-bottom: none; border-radius: 75px 75px 0 0; background: #111113; display: flex; align-items: flex-end; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; line-height: 1; letter-spacing: 0.3em; color: #C4C4CA; }
.unassigned-label { position: absolute; left: 16px; top: 644px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: 0.16em; color: #F59E0B; }

.open-spot { position: absolute; padding: 0; border: 2px dashed #3A3A40; border-radius: 4px; background: #1C1C1F; color: #BDBDC2; display: flex; align-items: center; justify-content: center; font-family: 'Barlow', system-ui, sans-serif; font-weight: 500; font-size: 13px; line-height: 1; }
.open-spot.target { border-color: #22D3EE; }
.open-spot .tile-id { color: #BDBDC2; }

.tile { position: absolute; padding: 18px 3px 8px; border: 4px solid; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; font-family: 'Barlow', system-ui, sans-serif; }
.animate .tile { transition: left 650ms cubic-bezier(0.2, 0.7, 0.2, 1), top 650ms cubic-bezier(0.2, 0.7, 0.2, 1), width 650ms cubic-bezier(0.2, 0.7, 0.2, 1), height 650ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile.selected { box-shadow: 0 0 0 3px #000000, 0 0 0 7px #FFFFFF; }
.tile.moving { box-shadow: 0 0 0 3px #000000, 0 0 0 7px #22D3EE; }
.tile-id { position: absolute; left: 4px; top: 4px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: 0.04em; }
.tile-badges { position: absolute; right: 3px; top: 3px; display: flex; gap: 2px; }
.badge { width: 16px; height: 16px; border-radius: 999px; background: #000000; color: #E8C468; display: flex; align-items: center; justify-content: center; }
.badge-alert { color: #FFFFFF; background: #E5322D; font-weight: 700; font-size: 11px; line-height: 1; }
.tile-first { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; line-height: 1.1; }
.tile-ini { font-weight: 500; font-size: 13px; line-height: 1.1; }
.tile-num { margin-top: 4px; font-weight: 600; font-size: 26px; line-height: 1; }
.tile-with { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 11px; line-height: 1.1; }
.tile-check { position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 999px; background: #000000; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }

/* Members without a spot: compact chips in the strip below the front row. */
.tile.chip-tile { padding: 4px 22px 4px 8px; flex-direction: row; justify-content: space-between; gap: 6px; text-align: left; }
.chip-tile .tile-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chip-tile .tile-first { font-size: 12px; }
.chip-tile .tile-num { margin-top: 0; font-size: 18px; }
.chip-tile .tile-check { right: 3px; top: 3px; bottom: auto; }
.chip-tile .tile-badges { top: auto; bottom: 3px; right: 3px; flex-direction: column; }

/* ---- Member panel ---- */
/* Below the top bar, so SWAP SIDES, SWAP SPOTS and the clock stay in reach with a member open.
   The member's details scroll if they ever run long; the buttons stay at the bottom. */
.panel { position: absolute; top: 98px; right: 0; bottom: 0; width: 400px; background: #0E0E10; border-left: 1px solid var(--line); border-top: 1px solid var(--line); border-top-left-radius: 16px; box-shadow: -24px 0 48px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; overflow: hidden; }
.panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 26px 18px; display: flex; flex-direction: column; gap: 18px; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-station { font-weight: 600; font-size: 13px; line-height: 1.2; letter-spacing: 0.14em; color: var(--ink-3); }
.panel-close { width: 44px; height: 44px; flex-shrink: 0; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.panel-name { margin: 0; font-weight: 600; font-size: 40px; line-height: 1.05; letter-spacing: -0.01em; }
.panel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-chip { height: 30px; padding: 0 12px; display: flex; align-items: center; border-radius: 999px; border: 2px solid; font-weight: 600; font-size: 14px; line-height: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.stat-label, .row-label { font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: 0.12em; color: var(--ink-3); }
.stat-value { font-weight: 600; font-size: 32px; line-height: 1; }
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row-value { font-weight: 600; font-size: 16px; line-height: 1.2; text-align: right; }
.callout { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-size: 16px; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.callout-gold { color: #E8C468; }
.callout-alert { color: var(--alert); }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.note-text { font-size: 16px; line-height: 1.4; }
.actions { flex: 0 0 auto; padding: 0 26px 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.act { height: 52px; padding: 0 6px; border-radius: 12px; border: 1px solid var(--line-2); font-weight: 700; font-size: 13px; line-height: 1.1; letter-spacing: 0.05em; }
.act-check { background: #F4F4F5; border-color: #F4F4F5; color: #09090B; }
.act-noshow { background: var(--surface-2); color: var(--alert); }
.act-move { background: var(--surface-2); color: var(--ink); }

.nowrap { white-space: nowrap; }

/* ---- Toast ---- */
.toast { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 14px 24px; border-radius: 999px; background: #F4F4F5; color: #000000; font-weight: 600; font-size: 18px; line-height: 1; white-space: nowrap; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); }

@media (prefers-reduced-motion: reduce) {
  .animate .tile { transition: none; }
}
