/* Rally — manager dashboard */

body {
  background: var(--bg);
  font-size: 14px;
}

/* Session-type colors, shared by the timeline, legend, tags and table dots */
.t-booking {
  --c: #2756a8;
  --c-bg: #e3ebf8;
  --c-ink: #14305f;
  --c-line: #b8cbec;
}

.t-open {
  --c: #9bb315;
  --c-bg: #f1f8bf;
  --c-ink: #485300;
  --c-line: #d3e470;
}

.t-league {
  --c: #6b46c9;
  --c-bg: #ece6ff;
  --c-ink: #3b2391;
  --c-line: #cdbff5;
}

.t-ladder {
  --c: #c03a84;
  --c-bg: #fbe5f1;
  --c-ink: #861a56;
  --c-line: #f0bcd8;
}

.t-clinic {
  --c: #dc6a17;
  --c-bg: #ffead8;
  --c-ink: #873800;
  --c-line: #f7c79f;
}

.t-lesson {
  --c: #1c9584;
  --c-bg: #daf2ee;
  --c-ink: #0b574d;
  --c-line: #a7ddd4;
}

.t-maint {
  --c: #9aa1ad;
  --c-bg: #eceef1;
  --c-ink: #586173;
  --c-line: #d3d7de;
}

.muted {
  color: var(--faint);
}

/* ---------- App bar ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 60;
}

.appbar-top {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
  padding: 0 32px;
  background: var(--ink);
  color: #fff;
}

.sb-logo {
  color: #fff;
  font-size: 24px;
}

.club-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 10px 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: #c9d0dc;
  text-align: left;
  cursor: pointer;
}

.club-switch:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.club-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 3px;
  background: var(--ball);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
}

.club-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.club-meta strong {
  font-size: 13.5px;
  color: #fff;
}

.club-meta span {
  font-size: 11.5px;
  color: #98a2b5;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 440px;
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

.search:focus-within {
  border-color: var(--ball);
  background: rgba(255, 255, 255, 0.1);
}

.search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: #98a2b5;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
}

.search input::placeholder {
  color: #8690a3;
}

.search kbd {
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: #98a2b5;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #c3cad6;
  white-space: nowrap;
}

.clock strong {
  color: #fff;
  font-weight: 600;
}

.clock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ball);
  animation: ping 1.8s infinite;
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 242, 71, 0.55);
  }
  100% {
    box-shadow: 0 0 0 7px rgba(220, 242, 71, 0);
  }
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a4e;
  box-shadow: 0 0 0 2px var(--ink);
}

.menu-btn {
  display: none;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

/* Section tabs */
.sidebar {
  display: flex;
  align-items: stretch;
  height: 46px;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.sb-nav,
.sb-foot {
  display: flex;
  align-items: stretch;
}

.sb-foot {
  margin-left: auto;
  gap: 8px;
  align-items: center;
}

.sb-nav a,
.sb-foot a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 13px;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.sb-nav a:hover,
.sb-foot a:hover {
  color: var(--ink);
}

.sb-nav a.active {
  color: var(--ink);
  font-weight: 650;
  border-bottom-color: var(--court);
}

.sb-nav svg,
.sb-foot svg {
  display: none;
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.sb-count-muted {
  background: var(--line-2);
  color: var(--ink-2);
}

.sb-count[hidden] {
  display: none;
}

.sb-plan {
  display: flex;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.sb-plan > span:first-child {
  font-weight: 600;
}

.sb-plan-meta {
  color: var(--faint);
}

/* Anchored sections clear the sticky app bar */
.attn-card,
.card {
  scroll-margin-top: 124px;
}

/* ---------- Content ---------- */
.content {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 32px;
  align-items: end;
  margin-bottom: 22px;
}

.page-kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.page-head h1 {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 50px;
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

.page-sub {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.page-sub strong {
  color: var(--red);
  font-weight: 650;
}

.page-sub strong.ok {
  color: var(--apron);
}

.page-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.chip-green {
  color: var(--apron);
  font-weight: 600;
}

.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a9a68;
}

/* Cards */
.card {
  margin-top: 18px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.card-head h2,
.section-title h2,
.card-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.card-title {
  font-size: 21px;
  margin-bottom: 6px;
}

.section-note {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.section-note strong {
  color: var(--ink);
  font-weight: 650;
}

.sub-title {
  margin: 16px 0 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- KPIs: one scoreboard strip ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius-sm);
}

.kpi {
  display: flex;
  flex-direction: column;
  padding: 16px 22px 18px;
  border-left: 1px solid var(--line);
}

.kpi:first-child {
  border-left: 0;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.kpi-value {
  margin: 6px 0 4px;
  font-family: var(--display);
  font-size: 58px;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.kpi-of {
  font-size: 0.5em;
  color: var(--faint);
  font-weight: 700;
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.kpi-sub strong {
  color: var(--ink);
}

.kpi-bar {
  height: 6px;
  margin-top: auto;
  transform: translateY(8px);
  background: var(--line-2);
}

.kpi-bar span {
  display: block;
  height: 100%;
  background: var(--court);
}

.kpi-bar-blue span {
  background: var(--apron);
}

.delta {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.delta.up,
.delta.good {
  background: var(--apron-100);
  color: var(--apron);
}

.delta.down {
  background: var(--red-50);
  color: var(--red);
}

.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
  margin-top: 12px;
}

.spark span {
  flex: 1;
  background: var(--court);
}

.spark span.today {
  background: var(--ink);
}

.spark span.booked {
  background: repeating-linear-gradient(135deg, var(--court-100) 0 3px, #c4d4ef 3px 6px);
}

.dots {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.nd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 22px;
}

.nd i {
  height: 12px;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--red);
  line-height: 12px;
}

.nd b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}

.nd.future b {
  color: #c2c7cf;
}

/* ---------- Needs attention ---------- */
.attention {
  margin-top: 30px;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 12px;
}

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
}

.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.count-pill.clear {
  background: var(--apron);
}

.attn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 18px;
  align-items: start;
}

.attn-grid {
  display: grid;
  gap: 12px;
}

.attn-card {
  --tone: var(--red);
  --tone-bg: var(--red-50);
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.attn-amber {
  --tone: var(--amber);
  --tone-bg: var(--amber-50);
}

.attn-blue {
  --tone: var(--court);
  --tone-bg: var(--court-100);
}

/* The time rail: when this problem lands tonight */
.attn-rail {
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  background: var(--tone);
  color: #fff;
}

.attn-clock {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 800;
  line-height: 0.9;
}

.attn-clock small {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.85;
}

.attn-clock-word {
  font-size: 32px;
  text-transform: uppercase;
}

.attn-card.is-resolved {
  --tone: var(--apron);
  --tone-bg: var(--apron-100);
}

.attn-card.is-resolved .attn-clock {
  opacity: 0.75;
}

.attn-card.flash {
  animation: flash 1.4s ease;
}

@keyframes flash {
  0%,
  60% {
    box-shadow: 0 0 0 3px var(--ball), 0 0 0 5px var(--ink);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.attn-main {
  min-width: 0;
  padding: 16px 20px 18px;
}

.attn-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attn-head > div {
  min-width: 0;
}

.attn-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tone-bg);
  color: var(--tone);
}

.attn-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attn-kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--tone);
}

.attn-head h3 {
  margin-top: 1px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.attn-when {
  flex: none;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--tone-bg);
  color: var(--tone);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.attn-body {
  margin-top: 14px;
}

/* Conflict: the two bookings on the left, the decision on the right */
.attn-red .attn-body[data-state="open"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 20px;
}

.attn-red .attn-body[data-state="open"] .clash,
.attn-red .attn-body[data-state="open"] .hint {
  grid-column: 1;
}

.attn-red .attn-body[data-state="open"] .choices {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.attn-red .attn-body[data-state="open"] .attn-actions {
  grid-column: 2;
}

/* Coach: the situation and actions on the left, the subs on the right */
.attn-amber .attn-body[data-state="open"] {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-rows: auto 1fr;
  gap: 12px 20px;
}

.attn-amber .attn-body[data-state="open"] .attn-text {
  grid-column: 1;
}

.attn-amber .attn-body[data-state="open"] .choices {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.attn-amber .attn-body[data-state="open"] .attn-actions {
  grid-column: 1;
  grid-row: 2;
  flex-direction: column;
  align-items: stretch;
  align-self: end;
}

.attn-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

.clash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
}

.clash-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: repeating-linear-gradient(135deg, #fff 0 8px, #fdf3f2 8px 16px);
  font-size: 12.5px;
  line-height: 1.4;
}

.clash-item .tag {
  align-self: flex-start;
  margin-bottom: 4px;
}

.clash-item strong {
  font-size: 14px;
}

.clash-item .muted {
  font-size: 12px;
}

.clash-vs {
  align-self: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
}

.hint {
  padding: 10px 12px;
  border-radius: 3px;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.hint-small {
  margin-top: 12px;
  font-size: 12.5px;
}

.choices {
  display: grid;
  gap: 8px;
  align-content: start;
}

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.choice:hover {
  border-color: #a9afba;
}

.choice:has(input:checked) {
  border-color: var(--ink);
  background: var(--court-50);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.choice input {
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.choice strong {
  font-size: 13.5px;
  font-weight: 650;
}

.choice-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.choice em,
.wait-top em {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  vertical-align: 1px;
}

.rec {
  background: var(--apron-100);
  color: var(--apron);
}

.warn {
  background: var(--amber-50);
  color: var(--amber);
}

.muted-tag {
  background: var(--line-2);
  color: var(--muted);
}

.coach {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.attn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.av {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.av-sm {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.av-green {
  background: var(--apron-100);
  color: var(--apron);
}

.av-blue {
  background: var(--court-100);
  color: var(--court-700);
}

.av-violet {
  background: var(--violet-50);
  color: var(--violet);
}

.av-red {
  background: var(--red-50);
  color: var(--red);
}

.av-ball {
  background: var(--ball);
  color: var(--ink);
}

.resolved {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 3px;
  background: var(--apron-100);
}

.resolved-muted {
  background: var(--line-2);
}

.resolved-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--apron);
  color: #fff;
}

.resolved-muted .resolved-ico {
  background: var(--faint);
}

.resolved-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.resolved strong {
  font-size: 14.5px;
}

.resolved p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* Waitlist */
.wait-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wait-item {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.wait-main {
  flex: 1;
  min-width: 0;
}

.wait-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.wait-top strong {
  font-size: 14.5px;
}

.wait-top .muted {
  font-size: 13px;
  color: var(--ink-2);
}

.wait-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--faint);
}

.match {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 6px 9px;
  border-radius: 3px;
  background: var(--court-50);
  color: var(--court-700);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.match.blocked {
  background: var(--bg);
  color: var(--muted);
  font-weight: 500;
}

.match.pending {
  background: var(--amber-50);
  color: var(--amber);
}

.match.ok {
  background: var(--apron-100);
  color: var(--apron);
}

.spinner {
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wait-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding-left: 42px;
}

/* Quick fixes + staff */
.todo-wrap {
  display: grid;
  gap: 12px;
}

.todo-wrap .card {
  margin-top: 0;
  padding: 16px 18px 6px;
}

.todo {
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-2);
}

.todo-item:first-child {
  border-top: 0;
}

.todo-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.todo-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.todo-ico.tone-red {
  background: var(--red-50);
  color: var(--red);
}

.todo-ico.tone-amber {
  background: var(--amber-50);
  color: var(--amber);
}

.todo-ico.tone-blue {
  background: var(--court-100);
  color: var(--court);
}

.todo-ico.tone-green {
  background: var(--apron);
  color: #fff;
}

.todo-main {
  flex: 1;
  min-width: 0;
}

.todo-main strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
}

.todo-main span {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.todo-item.done .todo-main strong {
  color: var(--ink-2);
}

.todo-item.done .todo-main span {
  color: var(--apron);
  font-family: var(--mono);
  font-size: 11.5px;
}

.todo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 9px;
  padding-left: 42px;
}

.todo-actions:empty {
  display: none;
}

.staff-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-2);
}

.staff-list li:first-child {
  border-top: 0;
}

.staff-list li > div {
  flex: 1;
  min-width: 0;
}

.staff-list strong {
  display: block;
  font-size: 13.5px;
}

.staff-list span:not(.av) {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.staff-st {
  flex: none;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.st-ball {
  background: var(--ball);
  color: var(--ink);
}

.st-green {
  background: var(--apron-100);
  color: var(--apron);
}

.st-blue {
  background: var(--court-100);
  color: var(--court-700);
}

.st-red {
  background: var(--red-50);
  color: var(--red);
}

/* ---------- Timeline ---------- */
.schedule {
  margin-top: 30px;
  padding-bottom: 14px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tdot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--c);
}

.tdot.t-open-slot {
  background: transparent;
  border: 1.5px dashed var(--apron);
}

.timeline-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.timeline {
  --label: 96px;
  position: relative;
  min-width: 1560px;
}

.tl-head {
  display: flex;
  height: 44px;
}

.tl-corner {
  position: sticky;
  left: 0;
  z-index: 6;
  flex: none;
  width: var(--label);
  background: #fff;
}

.tl-hours {
  position: relative;
  flex: 1;
}

.tl-hours span {
  position: absolute;
  bottom: 6px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.tl-hours span:first-of-type {
  transform: none;
}

.tl-hours span:last-of-type {
  transform: translateX(-100%);
}

.tl-prime-label {
  position: absolute;
  top: 0;
  height: 18px;
  background: var(--ball);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 18px;
  text-align: center;
  text-transform: uppercase;
}

.tl-row {
  display: flex;
  height: 56px;
  border-top: 1px solid var(--line-2);
}

.tl-row:last-child {
  border-bottom: 1px solid var(--line-2);
}

.tl-label {
  position: sticky;
  left: 0;
  z-index: 6;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--label);
  background: #fff;
  box-shadow: 8px 0 8px -8px rgba(14, 23, 38, 0.14);
  line-height: 1.1;
}

.tl-label strong {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  text-transform: uppercase;
}

.tl-label span {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.tl-track {
  position: relative;
  flex: 1;
}

.tl-prime {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(220, 242, 71, 0.14);
}

.tl-past {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: repeating-linear-gradient(135deg, rgba(14, 23, 38, 0.02) 0 6px, rgba(14, 23, 38, 0.045) 6px 12px);
}

.tl-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-2);
}

.tl-open {
  position: absolute;
  top: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1.5px dashed #c6cad3;
  border-radius: 3px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
}

.tl-open.prime {
  border-color: var(--apron);
  background: rgba(46, 107, 78, 0.06);
  color: var(--apron);
}

.tl-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--c-line);
  border-radius: 3px;
  background: var(--c-bg);
  color: var(--c-ink);
  text-align: left;
  line-height: 1.2;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.tl-block:hover {
  z-index: 3;
  border-color: var(--c);
  box-shadow: 0 4px 14px rgba(14, 23, 38, 0.16);
  transform: translateY(-1px);
}

.tl-title,
.tl-sub {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tl-title {
  font-size: 12px;
  font-weight: 650;
}

.tl-sub {
  margin-top: 1px;
  font-size: 11px;
  opacity: 0.78;
}

.tl-block.st-done {
  opacity: 0.55;
  filter: saturate(0.5);
}

.tl-block.st-live {
  border: 2px solid var(--c);
}

.tl-live {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  animation: live 1.6s infinite;
}

@keyframes live {
  0% {
    box-shadow: 0 0 0 0 rgba(39, 86, 168, 0.5);
  }
  100% {
    box-shadow: 0 0 0 7px rgba(39, 86, 168, 0);
  }
}

.tl-block.st-noshow {
  --c: #b0b6c0;
  --c-ink: #868d9b;
  --c-line: #d3d7de;
  background: repeating-linear-gradient(135deg, #f3f4f6 0 6px, #e9ebee 6px 12px);
}

.tl-block.st-noshow .tl-title,
.tl-block.st-cancelled .tl-title {
  text-decoration: line-through;
}

.tl-block.st-cancelled {
  --c: #b0b6c0;
  --c-bg: #f6f7f8;
  --c-ink: #868d9b;
  border: 1.5px dashed #c3c8d0;
}

.tl-block.st-pending {
  border: 1.5px dashed var(--violet);
}

.tl-block.conflict {
  --c: var(--red);
  --c-ink: #7d140e;
  background: repeating-linear-gradient(135deg, #fde2df 0 6px, #fbcfca 6px 12px);
  border: 1.5px solid var(--red);
}

.tl-block.conflict.lane-0 {
  top: 3px;
  bottom: 50%;
  margin-bottom: 1px;
}

.tl-block.conflict.lane-1 {
  top: 50%;
  bottom: 3px;
  margin-top: 1px;
}

.tl-block.conflict .tl-sub {
  display: none;
}

.tl-block.st-nocoach {
  border: 2px solid var(--amber);
}

.tl-flag {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.st-nocoach .tl-flag {
  background: var(--amber);
}

.st-nocoach .tl-title,
.st-nocoach .tl-sub,
.conflict .tl-title {
  padding-right: 18px;
}

.tl-now {
  position: absolute;
  top: 26px;
  bottom: 0;
  left: calc(var(--label) + (100% - var(--label)) * var(--now));
  z-index: 4;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  pointer-events: none;
}

.tl-now span {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translate(-50%, -100%);
  padding: 1px 6px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--ball);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Two-column rows ---------- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.two-col > .card {
  margin-top: 18px;
}

.two-col-even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.bookings {
  display: flex;
  flex-direction: column;
}

/* Segmented control */
.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
}

.seg button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.seg button:hover {
  color: var(--ink);
}

.seg button[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}

/* Bookings table */
/* Zero basis: the table fills whatever height the check-ins column sets, then scrolls */
.table-wrap {
  flex: 1 1 auto;
  height: 0;
  min-height: 420px;
  overflow: auto;
  margin: 0 -22px -20px;
  padding: 0 22px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  background: #fff;
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}

.table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.table th:first-child,
.table td:first-child {
  padding-left: 0;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
  text-align: right;
}

.table tr[data-session] {
  cursor: pointer;
}

.table tbody tr:hover td {
  background: var(--court-50);
}

.table tr:focus-visible {
  outline-offset: -2px;
}

.table td:first-child.nowrap {
  font-family: var(--mono);
  font-size: 12.5px;
}

.table td:nth-child(2) {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

.num {
  text-align: right;
}

.table th.num {
  text-align: right;
}

.bk {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bk strong {
  display: block;
  font-weight: 650;
}

.bk span:not(.tdot) {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.warn-text {
  color: var(--amber);
  font-weight: 650;
}

.row-done td {
  color: var(--faint);
}

.row-done .bk strong {
  color: var(--muted);
}

.row-conflict td {
  background: #fff6f5;
}

.row-nocoach td {
  background: #fffaf0;
}

.pay {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.pay.paid {
  background: var(--apron-100);
  color: var(--apron);
}

.pay.due {
  background: var(--red-50);
  color: var(--red);
  font-weight: 600;
}

.pay.sent {
  background: var(--court-100);
  color: var(--court-700);
}

.pay.pass {
  background: var(--line-2);
  color: var(--muted);
}

.pay.refunded {
  background: var(--line-2);
  color: var(--muted);
  text-decoration: line-through;
}

.pay.none {
  color: var(--faint);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.status.s-live {
  color: var(--apron);
  font-weight: 600;
}

.status.s-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a9a68;
}

.status.s-done,
.status.s-cancelled {
  color: var(--faint);
}

.status.s-conflict,
.status.s-nocoach,
.status.s-noshow,
.status.s-pending {
  padding: 2px 7px;
  border-radius: 2px;
  font-weight: 600;
}

.status.s-conflict {
  background: var(--red);
  color: #fff;
}

.status.s-nocoach {
  background: var(--amber-50);
  color: var(--amber);
}

.status.s-noshow {
  background: var(--line-2);
  color: var(--ink-2);
}

.status.s-pending {
  background: var(--violet-50);
  color: var(--violet);
}

.empty {
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
}

.table td.empty {
  text-align: center;
}

/* Check-ins */
.arrivals,
.recent {
  margin: 0;
  padding: 0;
  list-style: none;
}

.arrival {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-2);
}

.arrival:first-child {
  border-top: 0;
}

.arr-time {
  flex: none;
  width: 70px;
  line-height: 1.25;
}

.arr-time strong {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.arr-time span {
  font-size: 11.5px;
  color: var(--muted);
}

.arr-main {
  flex: 1;
  min-width: 0;
}

.arr-who {
  font-size: 13.5px;
  font-weight: 650;
}

.late {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 2px;
  background: var(--amber-50);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.faces {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.face {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1.5px dashed #bfc4cd;
  border-radius: 50%;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 700;
}

.face.in {
  border: 1.5px solid var(--apron);
  background: var(--apron);
  color: #fff;
}

.arrivals .empty {
  padding: 14px 0;
  text-align: left;
}

.recent li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line-2);
}

.recent li:first-child {
  border-top: 0;
}

.recent li > div {
  flex: 1;
  min-width: 0;
}

.recent strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.recent li > div span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.recent time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.recent li.fresh {
  margin: 0 -8px;
  padding-inline: 8px;
  background: var(--ball-100);
}

.recent li.fresh time {
  color: var(--ball-ink);
  font-weight: 600;
}

/* Revenue */
.rev-total {
  text-align: right;
}

.rev-total strong {
  display: block;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 800;
  line-height: 0.95;
}

.rev-total span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.rev-total span strong {
  display: inline;
  font-family: var(--font);
  font-size: inherit;
  font-weight: 650;
  color: var(--ink);
}

.rev-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.bars {
  display: flex;
  gap: 8px;
  height: 210px;
}

.bar-col {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding: 18px 0 24px;
}

.bar-val {
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.bar {
  flex: none;
  width: 100%;
  min-height: 4px;
  background: var(--court);
}

.bar-day {
  position: absolute;
  bottom: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.bar-col.today .bar {
  background: var(--ink);
}

.bar-col.today .bar-day,
.bar-col.today .bar-val {
  color: var(--ink);
  font-weight: 600;
}

.bar-col.booked .bar {
  background: repeating-linear-gradient(135deg, var(--court-100) 0 5px, #c4d4ef 5px 10px);
}

.rev-breakdown {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 0 24px;
  list-style: none;
}

.rev-breakdown li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.rev-breakdown li.stack {
  display: flex;
  gap: 2px;
  height: 14px;
  margin-bottom: 6px;
  overflow: hidden;
}

.stack span {
  height: 100%;
}

.sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.stack .tone-green,
.sw.tone-green {
  background: var(--court);
}

.stack .tone-orange,
.sw.tone-orange {
  background: #dc6a17;
}

.stack .tone-ball,
.sw.tone-ball {
  background: #c9e02f;
}

.stack .tone-indigo,
.sw.tone-indigo {
  background: var(--violet);
}

.stack .tone-gray,
.sw.tone-gray {
  background: #aab0bb;
}

.rb-amt {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
}

.rb-pct {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  text-align: right;
}

/* No-shows */
.ns-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ns-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-2);
}

.ns-list li:first-child {
  border-top: 0;
}

.ns-day {
  flex: none;
  width: 44px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.ns-main {
  flex: 1;
  min-width: 0;
}

.ns-main strong {
  font-size: 13.5px;
}

.ns-main span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

.repeat {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 2px;
  background: var(--red-50);
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.noshows .hint-small {
  margin-top: 8px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.proto-note {
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

/* ---------- Popover ---------- */
.popover {
  position: fixed;
  z-index: 80;
  width: 340px;
  max-width: calc(100vw - 24px);
  padding: 14px 16px 16px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.popover[hidden] {
  display: none;
}

.pop-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pop-close {
  width: 30px;
  height: 30px;
  margin: -4px -6px 0 auto;
  color: var(--muted);
}

.pop-close:hover {
  background: var(--line-2);
  color: var(--ink);
}

.pop-close svg {
  width: 16px;
  height: 16px;
}

.popover h3 {
  margin: 10px 0 10px;
  font-size: 17px;
  font-weight: 700;
}

.pop-alert {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 3px;
  background: var(--red-50);
  color: var(--red-600);
  font-size: 13px;
}

.popover dl {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
  font-size: 13px;
}

.popover dt {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--faint);
}

.popover dd {
  margin: 0;
}

.pop-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: end;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.in {
  opacity: 1;
  transform: none;
}

.toast-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ball);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.toast-info .toast-ico {
  background: #fff;
  font-family: var(--mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .attn-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .attn-amber .attn-body[data-state="open"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .attn-amber .attn-body[data-state="open"] .attn-text,
  .attn-amber .attn-body[data-state="open"] .choices,
  .attn-amber .attn-body[data-state="open"] .attn-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .attn-amber .attn-body[data-state="open"] .attn-actions {
    flex-direction: row;
  }
}

@media (max-width: 1180px) {
  .club-meta,
  .club-switch > svg {
    display: none;
  }

  .club-switch {
    padding: 0 6px;
  }

  .page-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-chips {
    justify-content: flex-start;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi:nth-child(3) {
    border-left: 0;
  }

  .kpi:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .kpi {
    padding-bottom: 22px;
  }

  .attn-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .todo-wrap {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: start;
  }

  .two-col,
  .two-col-even {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .table-wrap {
    height: auto;
    max-height: 560px;
    min-height: 0;
  }
}

/* Tabs fold into a menu */
@media (max-width: 1100px) {
  .menu-btn {
    display: grid;
  }

  .appbar-top {
    gap: 12px;
    padding: 0 16px 0 10px;
  }

  .sidebar {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    height: auto;
    max-height: calc(100vh - 60px);
    padding: 8px 12px 14px;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }

  .nav-open .sidebar {
    display: flex;
  }

  .sb-nav,
  .sb-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .sb-foot {
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--line-2);
  }

  .sb-nav a,
  .sb-foot a {
    height: 42px;
    padding: 0 10px;
    border: 0;
    border-radius: 3px;
  }

  .sb-nav a.active {
    background: var(--court-50);
    box-shadow: inset 3px 0 0 var(--court);
  }

  .sb-nav svg,
  .sb-foot svg {
    display: block;
  }

  .sb-count {
    margin-left: auto;
  }

  .sb-plan {
    justify-content: space-between;
    margin: 4px 10px 0;
    padding: 8px 10px;
  }
}

@media (max-width: 960px) {
  .content {
    padding: 22px 16px 40px;
  }

  .clock {
    display: none;
  }

  .attn-red .attn-body[data-state="open"] {
    display: block;
  }

  .attn-red .attn-body[data-state="open"] .choices {
    margin-top: 12px;
  }

  .attn-red .attn-body[data-state="open"] .attn-actions,
  .attn-amber .attn-body[data-state="open"] .attn-actions {
    margin-top: 12px;
  }

  .attn-amber .attn-body[data-state="open"] {
    display: block;
  }

  .attn-amber .attn-body[data-state="open"] .choices {
    margin-top: 12px;
  }

  .rev-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .appbar-top {
    gap: 8px;
  }

  .sb-logo {
    gap: 0;
    font-size: 0;
  }

  .search {
    min-width: 0;
  }

  .topbar-right {
    gap: 4px;
  }

  .search kbd,
  #newBookingBtn {
    display: none;
  }

  .page-head h1 {
    font-size: 40px;
  }

  .kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi,
  .kpi:nth-child(3) {
    border-left: 0;
  }

  .kpi:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .attn-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .attn-rail {
    flex-direction: row;
    align-items: baseline;
    padding: 8px 14px;
  }

  .attn-clock {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 26px;
  }

  .attn-clock small {
    display: inline;
    margin: 0;
  }

  .attn-head {
    flex-wrap: wrap;
  }

  .attn-head > div {
    flex: 1;
  }

  .attn-main {
    padding: 14px 14px 16px;
  }

  .wait-list,
  .todo-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .clash {
    grid-template-columns: minmax(0, 1fr);
  }

  .clash-vs {
    justify-self: center;
  }

  .wait-actions,
  .todo-actions {
    padding-left: 0;
  }

  .card {
    padding: 16px;
  }

  .table-wrap {
    margin: 0 -16px -16px;
    padding: 0 16px;
  }

  .table {
    min-width: 520px;
  }

  .table th:nth-child(4),
  .table td:nth-child(4) {
    display: none;
  }

  .rev-total {
    text-align: left;
  }

  .bars {
    gap: 5px;
  }

  .bar-val {
    font-size: 9px;
  }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
