/* Rally — manager dashboard */

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

/* ---------- Shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 14px 16px;
  background: var(--green-950);
  color: rgba(255, 255, 255, 0.72);
  overflow-y: auto;
}

.sb-logo {
  padding: 2px 10px 18px;
  color: #fff;
}

.club-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.club-switch:hover {
  background: rgba(255, 255, 255, 0.09);
}

.club-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ball);
  color: var(--ink);
  font-weight: 800;
  font-size: 12.5px;
}

.club-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.club-meta strong {
  font-size: 14px;
}

.club-meta span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.sb-nav,
.sb-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-nav a,
.sb-foot a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.sb-nav a:hover,
.sb-foot a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sb-nav a.active {
  background: rgba(215, 242, 76, 0.12);
  color: var(--ball);
}

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

.sb-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.sb-count-muted {
  background: rgba(255, 255, 255, 0.14);
}

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

.sb-foot {
  margin-top: auto;
  padding-top: 16px;
}

.sb-plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  color: #fff;
  font-weight: 600;
}

.sb-plan-meta {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.main {
  min-width: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 32px;
  background: rgba(245, 246, 241, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.search:focus-within {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(23, 121, 93, 0.14);
}

.search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.search kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

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

.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 34px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

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

.clock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 3px rgba(23, 121, 93, 0.18);
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(13, 27, 22, 0.06);
}

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

.icon-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg);
}

.menu-btn {
  display: none;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ball);
  font-weight: 800;
  font-size: 12.5px;
}

/* ---------- Content ---------- */
.content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1480px;
  padding: 28px 32px 48px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.page-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-head h1 {
  margin-top: 4px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

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

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

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

.page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

.chip-green {
  background: var(--green-50);
  border-color: #cfe6d9;
  color: var(--green-800);
}

.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-600);
}

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

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

.card-head h2,
.section-title h2 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

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

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

.sub-title {
  margin: 4px 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
}

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

/* ---------- KPIs ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.kpi-value {
  margin-top: 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

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

.kpi-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  min-height: 19px;
}

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

.kpi-bar {
  height: 6px;
  margin-top: 14px;
  border-radius: 99px;
  background: var(--line-2);
  overflow: hidden;
}

.kpi-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-600);
  transition: width 0.4s ease;
}

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

.delta {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12px;
}

.delta.up,
.delta.good {
  background: var(--green-50);
  color: var(--green-700);
}

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

.spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 26px;
  margin-top: 10px;
}

.spark span {
  flex: 1;
  border-radius: 3px 3px 1px 1px;
  background: var(--green-600);
}

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

.spark span.booked {
  background: repeating-linear-gradient(135deg, #cfe2d7 0 3px, #e6f0ea 3px 6px);
}

.dots {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.nd {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

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

.nd b {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--faint);
}

.nd.future b {
  opacity: 0.5;
}

/* ---------- Needs attention ---------- */
.attention {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

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

.count-pill {
  padding: 1px 9px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

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

.attn-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.attn-card {
  --tone: var(--red);
  --tone-bg: var(--red-50);
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.attn-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--tone);
}

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

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

.attn-card.is-resolved {
  --tone: var(--green-600);
  --tone-bg: var(--green-50);
  box-shadow: var(--shadow-sm);
}

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

@keyframes flash {
  0%,
  100% {
    box-shadow: var(--shadow);
  }
  30% {
    box-shadow: 0 0 0 4px var(--tone), var(--shadow);
  }
}

.attn-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 0;
}

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

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

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

.attn-head h3 {
  margin-top: 2px;
  font-size: 16.5px;
  font-weight: 750;
}

.attn-when {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--tone-bg);
  color: var(--tone);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.attn-body {
  padding: 14px 18px 18px;
}

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

.clash {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
}

.clash-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #f3c9cb;
  background: #fffafa;
  font-size: 12.5px;
  line-height: 1.4;
}

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

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

.clash-vs {
  align-self: center;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--red);
}

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

.hint-small {
  font-size: 12.5px;
  color: var(--muted);
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

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

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

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

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

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

.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: 0 7px;
  border-radius: 99px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

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

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

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

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

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

/* Avatars */
.av {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 700;
}

.av-sm {
  width: 28px;
  height: 28px;
  font-size: 10.5px;
}

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

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

.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 state */
.resolved {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--green-50);
  animation: rise 0.35s ease;
}

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

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

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

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

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

.resolved p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* Waitlist */
.wait-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wait-item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.wait-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wait-top {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

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

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

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

.match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

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

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

.match.ok {
  background: var(--green-50);
  color: var(--green-700);
}

.spinner {
  width: 11px;
  height: 11px;
  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;
  gap: 6px;
  flex-basis: 100%;
  padding-left: 44px;
}

/* To-do list + staff */
.todo-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.todo {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}

.todo-item:last-child {
  border-bottom: 0;
}

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

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

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

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

.tone-blue {
  background: var(--blue-50);
  color: var(--blue);
}

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

.todo-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.todo-main strong {
  font-size: 14px;
  font-weight: 650;
}

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

.todo-item.done .todo-main strong {
  color: var(--muted);
  font-weight: 550;
}

.todo-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.staff {
  padding: 18px;
}

.staff-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-list li > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

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

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

.staff-st {
  flex: none;
  padding: 2px 8px;
  border-radius: 99px;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 650;
  background: var(--line-2);
  color: var(--muted);
}

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

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

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

/* ---------- Type colors ---------- */
.t-booking {
  --c: #17795d;
  --c-bg: #e2f2e9;
  --c-ink: #0b3d30;
}

.t-open {
  --c: #93ad12;
  --c-bg: #f1f9cc;
  --c-ink: #3b4705;
}

.t-league {
  --c: #4a5fd6;
  --c-bg: #e9ecff;
  --c-ink: #23308a;
}

.t-ladder {
  --c: #7a4fd6;
  --c-bg: #f1ebff;
  --c-ink: #43258f;
}

.t-clinic {
  --c: #dd7516;
  --c-bg: #fff0e2;
  --c-ink: #793a05;
}

.t-lesson {
  --c: #2389b5;
  --c-bg: #e3f3fa;
  --c-ink: #0b4862;
}

.t-maint {
  --c: #8a9892;
  --c-bg: #eef0ed;
  --c-ink: #4a5752;
}

.tag {
  display: inline-block;
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 11.5px;
  font-weight: 650;
}

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

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

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

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

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

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

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

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

.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-size: 11.5px;
  font-weight: 600;
  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: 17px;
  border-radius: 6px 6px 0 0;
  background: var(--ball-100);
  color: #5d6b08;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: center;
  line-height: 17px;
}

.tl-row {
  display: flex;
  height: 54px;
  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;
  background: #fff;
  box-shadow: 8px 0 8px -8px rgba(13, 27, 22, 0.12);
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--label);
  line-height: 1.25;
}

.tl-label strong {
  font-size: 13px;
}

.tl-label span {
  font-size: 11px;
  color: var(--faint);
}

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

.tl-prime {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(215, 242, 76, 0.12);
}

.tl-past {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: repeating-linear-gradient(135deg, rgba(13, 27, 22, 0.018) 0 6px, rgba(13, 27, 22, 0.04) 6px 12px);
}

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

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

.tl-open.prime {
  border-color: var(--green-600);
  background: rgba(23, 121, 93, 0.05);
  color: var(--green-700);
}

.tl-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 8px 0 10px;
  border: 0;
  border-left: 3px solid var(--c);
  border-radius: 7px;
  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, filter 0.12s;
}

.tl-block:hover {
  z-index: 3;
  box-shadow: 0 4px 14px rgba(13, 27, 22, 0.15);
  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.75;
}

.tl-block.st-done {
  filter: saturate(0.4);
  opacity: 0.6;
}

.tl-block.st-live {
  box-shadow: inset 0 0 0 1.5px 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(23, 121, 93, 0.5);
  }
  100% {
    box-shadow: 0 0 0 7px rgba(23, 121, 93, 0);
  }
}

.tl-block.st-noshow {
  --c: #b8c0bb;
  --c-bg: #f4f5f2;
  --c-ink: #8a9892;
  background: repeating-linear-gradient(135deg, #f4f5f2 0 6px, #eceee9 6px 12px);
}

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

.tl-block.st-cancelled {
  --c: #b8c0bb;
  --c-bg: #f7f8f5;
  --c-ink: #8a9892;
  border: 1.5px dashed #c6cdc8;
}

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

.tl-block.st-pending {
  border-left-style: dashed;
  box-shadow: inset 0 0 0 1.5px rgba(122, 79, 214, 0.35);
}

.tl-block.conflict {
  --c: var(--red);
  --c-ink: #7d1418;
  background: repeating-linear-gradient(135deg, #fde3e4 0 6px, #fbd2d4 6px 12px);
  box-shadow: inset 0 0 0 1.5px 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 {
  box-shadow: inset 0 0 0 1.5px #e08a00;
}

.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: #e08a00;
}

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

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

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

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

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

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

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

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

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

/* Bookings table */
.table-wrap {
  flex: 1 1 0;
  min-height: 420px;
  margin: 0 -22px -20px;
  overflow: auto;
  border-top: 1px solid var(--line-2);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: #fafbf8;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-align: left;
}

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

.table th:last-child,
.table td:last-child {
  padding-right: 22px;
}

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

.table tbody tr {
  cursor: pointer;
}

.table tbody tr:hover {
  background: #fafbf8;
}

.table tbody tr:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

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

.table .nowrap {
  white-space: nowrap;
}

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

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

.row-conflict {
  background: #fffafa;
}

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

.bk .tdot {
  margin-top: 5px;
}

.bk div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.bk strong {
  font-weight: 600;
}

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

.bk span {
  font-size: 12.5px;
  color: var(--muted);
}

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

.pay,
.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pay.paid {
  background: var(--green-50);
  color: var(--green-700);
}

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

.pay.sent {
  background: var(--blue-50);
  color: var(--blue);
}

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

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

.s-live {
  background: var(--green-600);
  color: #fff;
}

.s-upcoming {
  background: transparent;
  color: var(--ink-2);
  padding-inline: 0;
}

.s-conflict,
.s-noshow {
  background: var(--red-50);
  color: var(--red);
}

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

.s-done {
  background: transparent;
  color: var(--faint);
  padding-inline: 0;
}

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

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

.arr-time {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 64px;
  line-height: 1.3;
}

.arr-time strong {
  font-size: 13px;
}

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

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

.arr-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  font-weight: 600;
  font-size: 13.5px;
}

.late {
  white-space: nowrap;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--amber-50);
  color: var(--amber);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.faces {
  display: flex;
  margin-top: 5px;
}

.face {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: -5px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--line-2);
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 700;
}

.face.in {
  background: var(--green-600);
  color: #fff;
}

.recent li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.recent li > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

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

.recent span:not(.av) {
  font-size: 12px;
  color: var(--muted);
}

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

.recent li.fresh {
  animation: rise 0.35s ease;
}

.recent li.fresh time {
  color: var(--green-700);
  font-weight: 650;
}

.checkins .empty,
.arrivals .empty {
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

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

.rev-total strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.rev-total span {
  font-size: 12.5px;
  color: var(--muted);
}

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

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

.rev-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
  min-height: 180px;
  padding-top: 20px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
}

.bar {
  width: 100%;
  max-width: 48px;
  border-radius: 6px 6px 2px 2px;
  background: var(--green-600);
  transition: height 0.4s ease;
}

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

.bar-col.booked .bar {
  background: repeating-linear-gradient(135deg, #d5e7dc 0 5px, #e9f2ec 5px 10px);
  box-shadow: inset 0 0 0 1px #c6dccf;
}

.bar-val {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
}

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

.bar-col.booked .bar-val {
  color: var(--faint);
}

.bar-day {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
}

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

.rev-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.rev-breakdown .stack {
  grid-column: 1 / -1;
  display: flex;
  height: 10px;
  margin-bottom: 4px;
  border-radius: 99px;
  overflow: hidden;
  gap: 2px;
}

.rev-breakdown li:not(.stack) {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}

.rb-label {
  flex: 1;
  color: var(--ink-2);
}

.rb-amt {
  font-weight: 650;
}

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

.stack .tone-green,
.sw.tone-green {
  background: var(--green-600);
  color: inherit;
}

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

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

.stack .tone-indigo,
.sw.tone-indigo {
  background: #4a5fd6;
}

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

/* No-shows */
.ns-list {
  display: flex;
  flex-direction: column;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

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

.ns-day {
  flex: none;
  width: 44px;
  font-size: 12px;
  font-weight: 650;
  color: var(--faint);
}

.ns-list li:first-child .ns-day {
  color: var(--ink);
}

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

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

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

.repeat {
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--red-50);
  color: var(--red);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.proto-note {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--faint);
  text-align: center;
}

/* ---------- Popover ---------- */
.popover {
  position: fixed;
  z-index: 60;
  width: 330px;
  max-width: calc(100vw - 24px);
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: rise 0.18s ease;
}

.pop-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -4px -8px 10px 0;
}

.pop-close {
  width: 30px;
  height: 30px;
  margin-left: auto;
}

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

.popover h3 {
  font-size: 16px;
  font-weight: 750;
}

.pop-alert {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--red-50);
  color: #7d1418;
  font-size: 12.5px;
  line-height: 1.45;
}

.popover dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 7px 10px;
  margin: 14px 0 0;
  font-size: 13px;
}

.popover dt {
  color: var(--faint);
}

.popover dd {
  margin: 0;
  color: var(--ink-2);
}

.pop-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 11px 16px 11px 12px;
  border-radius: 12px;
  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: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-style: italic;
  font-family: Georgia, serif;
}

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

  .attn-grid > .attn-red {
    grid-column: 1 / -1;
  }

  .attn-red .attn-body[data-state="open"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 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;
    margin-top: 0;
  }

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

@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .nav-open .sidebar {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  .menu-btn {
    display: grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .clock {
    display: none;
  }

  .content {
    padding: 22px 16px 40px;
  }

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

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

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

@media (max-width: 640px) {
  .kpis {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .clash {
    grid-template-columns: 1fr;
  }

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

  .todo-item {
    flex-wrap: wrap;
  }

  .todo-main {
    flex: 1 1 calc(100% - 48px);
  }

  .todo-actions {
    padding-left: 48px;
  }

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

  .bars {
    gap: 6px;
  }

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

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

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