/* Club Court Manager — court reservation app (tenant-themed via /api/tenant/branding) */
:root {
  --brand-blue: #1b4f8b;
  --brand-blue-green: #299ed9;
  --brand-text: #0c447c;
  --accent: var(--brand-blue-green);
  --accent-hover: #2289c4;
  --accent-soft: #e8f4fc;
  --dark: var(--brand-blue);
  --light: hsl(210, 3%, 88%);
  --bg: hsl(0, 0%, 98%);
  --card: #ffffff;
  --text: #1a2332;
  --muted: #3d4a5c;
  --line: hsl(210, 3%, 88%);
  --good: hsl(152, 45%, 35%);
  --bad: hsl(0, 65%, 45%);
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --focus-ring: 0 0 0 2px #fff, 0 0 0 5px var(--brand-text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
}

.text-sm { font-size: 0.9375rem; }
.text-xs { font-size: 0.875rem; }

a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--dark);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Header — white bar + logo like the club site; sticky with shrink-on-scroll */
header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Auth pages are short — no need to pin the header */
body.page-login header.site { position: static; }

header.site.is-compact .header-inner { padding: 6px 20px; }
header.site.is-compact .brand img { height: 44px; }

/* Keep scrollIntoView / anchor targets clear of the pinned bar */
html { scroll-padding-top: 130px; }

header.site.admin-mode {
  border-bottom-color: #eab308;
  box-shadow:
    0 0 0 1px rgba(234, 179, 8, 0.35),
    0 0 18px rgba(250, 204, 21, 0.45),
    0 4px 12px rgba(234, 179, 8, 0.2);
}

header.site .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  max-width: 1140px;
  margin: 0 auto;
  transition: padding 0.18s ease;
}

header.site a { color: var(--dark); text-decoration: none; }
header.site a:hover { color: var(--accent); text-decoration: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  display: block;
  height: 96px;
  width: auto;
  max-width: min(510px, 85vw);
  object-fit: contain;
  transition: height 0.18s ease;
}

.brand-text {
  display: none;
}

.brand img.hide {
  display: none !important;
}

.brand.brand-text-only .brand-text {
  display: block;
}

.brand.brand-text-only .brand-text strong {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}

.brand-text span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

nav.main {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  position: relative;
  flex-shrink: 0;
}

nav.main .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  cursor: pointer;
  flex-shrink: 0;
}

/* Native app in-app browser: hide site ☰ (duplicate of app / Safari chrome). */
body.ccm-app nav.main .nav-toggle,
body.ccm-app nav.main .nav-menu-panel {
  display: none !important;
}

nav.main .nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

nav.main .nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
}

nav.main .nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

nav.main.is-open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
nav.main.is-open .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
nav.main.is-open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

nav.main .nav-menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  min-width: min(280px, 86vw);
  z-index: 120;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

nav.main.is-open .nav-menu-panel {
  display: flex;
}

nav.main .nav-menu-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
  opacity: 0.9;
}

nav.main .nav-menu-panel a:hover {
  background: #f8fafc;
  color: var(--accent);
  opacity: 1;
}

.staging-banner {
  background: #fef3c7;
  border-bottom: 1px solid #fbbf24;
  color: #92400e;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
}
.staging-banner strong { font-weight: 600; }
.staging-banner a { color: #b45309; font-weight: 500; }

.demo-banner {
  background: #e0f2fe;
  border-bottom: 1px solid #7dd3fc;
  color: #0c4a6e;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
}
.demo-banner strong { font-weight: 600; }
.demo-banner a { color: #0369a1; font-weight: 500; margin: 0 4px; }
.demo-banner button.linkish {
  background: none; border: none; padding: 0; font: inherit; color: #0369a1;
  font-weight: 500; cursor: pointer; text-decoration: underline;
  margin: 0 2px;
}
.demo-banner .demo-persona-pill {
  display: inline-block;
  background: rgba(3, 105, 161, 0.12);
  color: #0369a1;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  margin: 0 4px;
}
.demo-banner .demo-persona-pill--admin {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}
.demo-banner .demo-switch-links {
  display: inline;
}
.demo-banner .demo-switch-links button.linkish {
  margin: 0 2px;
}
.demo-banner .demo-switch-sep {
  opacity: 0.5;
  margin: 0 2px;
}

.demo-scroll-banner {
  background: #fef9c3;
  border-bottom: 1px solid #fde047;
  color: #713f12;
  padding: 8px 16px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
}
.demo-scroll-banner.is-pinned {
  position: sticky;
  top: 0;
  z-index: 110;
}
.demo-scroll-banner a { color: #92400e; font-weight: 500; margin: 0 4px; }
.demo-scroll-banner button.linkish {
  background: none; border: none; padding: 0; font: inherit; color: #92400e;
  font-weight: 600; cursor: pointer; text-decoration: underline;
  margin: 0 2px;
}
.demo-scroll-banner .demo-switch-links { display: inline; }
.demo-scroll-banner .demo-switch-sep { opacity: 0.55; margin: 0 2px; }

body.demo-scroll-bar-visible header.site {
  top: var(--demo-scroll-bar-h, 40px);
}

.demo-teaching-banner {
  background: #fef9c3;
  border-bottom: 1px solid #fde047;
  color: #713f12;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
}
.demo-teaching-banner strong { font-weight: 600; }

.demo-notice-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.demo-notice-card {
  background: #fff; border-radius: 12px; max-width: 440px; width: 100%;
  padding: 22px 24px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.demo-notice-card h2 {
  margin: 0 0 12px; font-size: 1.15rem; color: var(--navy, #1b3a6b);
}
.demo-notice-card p { margin: 0 0 12px; line-height: 1.55; color: #374151; }
.demo-notice-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important;
}
.demo-welcome-card {
  background: #fff; border-radius: 12px; max-width: 480px; width: 100%;
  padding: 24px 26px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  border: 2px solid #38bdf8;
}
.demo-welcome-badge {
  display: inline-block; margin: 0 0 10px; padding: 4px 10px;
  background: #e0f2fe; color: #0369a1; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.demo-welcome-card h2 {
  margin: 0 0 12px; font-size: 1.35rem; color: #0c4a6e; line-height: 1.3;
}
.demo-welcome-intro {
  margin: 0 0 14px; line-height: 1.55; color: #1f2937; font-size: 0.98rem;
}
.demo-welcome-list {
  margin: 0 0 18px; padding-left: 1.2rem; color: #374151; line-height: 1.5; font-size: 0.92rem;
}
.demo-welcome-list li { margin-bottom: 6px; }

.terms-banner {
  background: #e8f4fc;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  color: #1e3a5f;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.terms-banner strong { font-weight: 600; }
.terms-banner a { color: #1b4f8b; font-weight: 500; }

/* Buttons — solid accent, generous tap targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

.btn:active:not(:disabled) {
  transform: scale(0.94) translateY(1px);
  background: var(--accent-hover);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.22);
}

.btn.secondary {
  background: #fff;
  color: var(--brand-text);
  border: 2px solid var(--accent);
}

.btn.secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.btn.secondary:active:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent-hover);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn.danger { background: var(--bad); }

.btn.danger:hover { filter: brightness(0.95); }

.btn.danger:active:not(:disabled) {
  filter: brightness(0.88);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn.small { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; }
.btn:disabled:not(.is-busy) { opacity: 0.65; cursor: not-allowed; }
.btn.is-busy {
  opacity: 1;
  cursor: wait;
  transform: scale(0.94) translateY(1px);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.22);
}
.btn.secondary.is-busy {
  background: var(--accent-soft);
  color: var(--accent-hover);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
}
.btn.danger.is-busy { filter: brightness(0.88); }

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

.card-link {
  text-decoration: none;
  display: block;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(247, 24, 95, 0.12);
  text-decoration: none;
}

.card-link h2 { color: var(--dark); }
.card-link:hover h2 { color: var(--accent); }

.grid { display: grid; gap: 20px; }
.grid.cols { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.profile-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 16px;
  margin-top: 12px;
}
.profile-req-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}
.profile-req-label input { width: auto; margin: 0; }

.onboard-banner {
  border-left: 4px solid var(--teal, #2A9D8F);
  background: #f0faf8;
}
.onboard-banner h2 { color: var(--navy, #1b4f8b); font-size: 1.15rem; }

label.required::after {
  content: ' *';
  color: var(--bad);
  font-weight: 500;
}

/* Forms */
label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin: 14px 0 6px;
  color: var(--dark);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

/* Checkboxes/radios must not inherit width:100% — that crushes sibling label text on mobile */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 1.1rem;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  accent-color: var(--accent);
  flex-shrink: 0;
}

label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]),
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
  margin: 8px 0;
  line-height: 1.4;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder,
textarea::placeholder {
  color: hsl(210, 10%, 58%);
  opacity: 1;
  font-weight: 300;
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

/* Prev · date · Next — stay on one line on mobile (override .row min-width wrap) */
.period-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.period-nav-row > * {
  flex: 0 0 auto;
  min-width: 0;
}
.period-nav-row > .period-nav-date {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.period-nav-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.birthdate-wrap { flex: 1; min-width: 200px; }
.birthdate-field__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.birthdate-field__part {
  flex: 1 1 88px;
  min-width: 0;
}
.birthdate-field__part--year { flex: 1.2 1 100px; }
.birthdate-field__sublabel {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  margin: 0 0 4px;
}
.birthdate-field select {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}

.sch-block-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr);
  gap: 16px;
  align-items: end;
}
.sch-block-grid:has(#blockNoteWrap:not(.hide)) {
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr);
}
.sch-block-type { grid-column: 1; grid-row: 1; }
.sch-block-note:not(.hide) { grid-column: 2; grid-row: 1; }
.sch-block-from { grid-column: 2; grid-row: 1; }
.sch-block-grid:has(#blockNoteWrap:not(.hide)) .sch-block-from { grid-column: 3; }
.sch-block-through { grid-column: 3; grid-row: 1; }
.sch-block-grid:has(#blockNoteWrap:not(.hide)) .sch-block-through { grid-column: 4; }
.sch-block-type select,
.sch-block-from input[type="date"],
.sch-block-through input[type="date"],
.sch-block-note input {
  width: 100%;
  box-sizing: border-box;
}
.sch-reset-range-line {
  grid-column: 1 / -1;
  grid-row: 2;
  text-align: center;
  margin: 0;
  padding-top: 8px;
}

.sch-block-review {
  border-top: 3px solid var(--primary, #2563eb);
  margin-top: 0;
}
.sch-block-review-summary {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
}
.card.flow-highlight.sch-block-review {
  box-shadow: 0 0 0 2px var(--primary, #2563eb);
}

.sch-block-weekdays {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
}
.sch-block-weekdays-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  flex: 0 0 auto;
}
.sch-block-weekdays-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sch-weekday-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}
.sch-weekday-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sch-weekday-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #374151);
  user-select: none;
}
.sch-weekday-pill input:checked + span {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  color: #fff;
}
.sch-weekday-pill input:focus-visible + span {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.date-jump-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
}
.date-jump-row #todayBtn {
  flex: 0 0 auto;
  padding: 8px 14px;
  white-space: nowrap;
}
.date-jump-label {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
}
.date-jump-label input[type="date"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 1rem;
}

/* Messages */
.msg {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  display: none;
  font-weight: 400;
}

.msg.show { display: block; scroll-margin-top: 12px; }
.msg.msg-inline { margin: 10px 0 0; }
.msg.ok { background: hsl(152, 45%, 95%); color: var(--good); border: 1px solid hsl(152, 35%, 80%); }
.msg.pending { background: hsl(210, 55%, 96%); color: var(--dark); border: 1px solid hsl(210, 40%, 82%); }
.msg.err { background: #fef2f2; color: var(--bad); border: 1px solid hsl(0, 60%, 85%); }
.msg.msg-flash { animation: msg-pop 0.22s ease-out; }
@keyframes msg-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notice-rule {
  padding: 14px 16px;
  margin: 0 0 16px;
  border-radius: var(--radius);
  background: hsl(45, 90%, 94%);
  border: 1px solid hsl(45, 70%, 75%);
  color: hsl(35, 50%, 28%);
  font-size: 0.95rem;
  line-height: 1.5;
}
.notice-rule strong { font-weight: 600; }
.notice-rule-detail { display: block; margin-top: 6px; }

.muted { color: var(--muted); font-weight: 400; }

.booking-summary {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 12px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--light);
  color: var(--dark);
}

.tag.admin { background: var(--accent-soft); color: var(--accent-hover); }
.tag.suspended { background: #fef3c7; color: #92400e; }
.tag.ok { background: #ecfdf5; color: #065f46; }

.launch-banner {
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.launch-banner--ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.launch-banner--wait {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.admin-welcome-card {
  border-left: 4px solid var(--accent);
  background: #f8fafc;
}
.admin-welcome-list {
  margin: 0 0 14px;
  padding-left: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}
.brand-header-mode {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
}
.brand-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  margin: 0;
}
.brand-mode-option input {
  margin-top: 3px;
  width: auto;
  flex-shrink: 0;
}
.brand-name-preview {
  padding: 12px 16px;
  background: var(--brand-blue, #1b4f8b);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 14px;
}
.launch-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.launch-table th,
.launch-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
.launch-table th { width: 34%; font-weight: 500; color: var(--dark); }
.launch-table td:nth-child(2) { width: 88px; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; }
.roster-table { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.roster-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.roster-actions { white-space: nowrap; }

/* My reservations tables */
.my-res-table td { vertical-align: top; }
.my-res-table .my-res-actions { white-space: nowrap; }

/* Members tab roster — flags column + icon actions */
.roster-table--members { overflow-x: auto; }

/* Platform admin — Clients tab (card list, fits viewport) */
.clients-panel { max-width: 100%; }
.clients-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.clients-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
  max-width: 100%;
  box-sizing: border-box;
}
.clients-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.clients-card-identity {
  flex: 1 1 220px;
  min-width: 0;
}
.clients-card-title {
  display: block;
  font-size: 1rem;
  margin: 0 0 4px;
}
.clients-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
}
.clients-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}
.clients-card-stats > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.clients-card-stats dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.clients-card-stats dd {
  margin: 0;
  font-weight: 500;
}
.clients-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}
.clients-meta code {
  font-size: 0.7rem;
  padding: 0 4px;
}
.clients-url {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8125rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-table--members table {
  table-layout: fixed;
  width: 100%;
}
.roster-table--members th,
.roster-table--members td {
  padding: 9px 10px;
  font-size: 0.875rem;
  vertical-align: middle;
}
.roster-table--members .col-check {
  width: 42px;
  padding-left: 12px;
}
.roster-table--members .col-no { width: 9%; white-space: nowrap; }
.roster-table--members .col-name {
  width: 22%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}
.roster-table--members .col-email {
  width: 28%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster-table--members .col-flags {
  width: 170px;
  padding-left: 6px;
  padding-right: 6px;
}
.roster-table--members .col-actions {
  width: 240px;
  min-width: 240px;
  padding-right: 12px;
}
.roster-table--email .col-name { width: 32%; }
.roster-table--email .col-email { width: 38%; }
.roster-table--pending .col-actions {
  width: 170px;
  min-width: 170px;
  padding-right: 12px;
}
.roster-table--reports {
  max-height: 520px;
  overflow: auto;
}
.roster-table--reports .col-sport {
  width: 11%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-table--reports .col-date {
  width: 8%;
  white-space: nowrap;
}
.roster-table--reports .col-reason {
  width: 14%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster-table--audit {
  max-height: 65vh;
  overflow: auto;
}
.roster-table--audit .col-date { width: 14%; white-space: nowrap; }
.roster-table--audit .col-name { width: 14%; }
.roster-table--audit .col-action {
  width: 13%;
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster-table--audit .col-details {
  width: 45%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}
.roster-table--audit .col-ip { width: 10%; white-space: nowrap; font-size: 12px; color: var(--muted); }
.roster-flags {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.roster-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  cursor: default;
}
.roster-flag--word {
  width: auto;
  height: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.roster-flag--terms-ok { background: #ecfdf5; color: #065f46; }
.roster-flag--terms-pending { background: #fef3c7; color: #92400e; }
.roster-flag--status-active { background: #dcfce7; color: #166534; }
.roster-flag--status-invited { background: #dbeafe; color: #1e40af; }
.roster-flag--status-suspended { background: #fef3c7; color: #92400e; }
.roster-flag--status-pending { background: #fce7f3; color: #9d174d; }
.roster-flag--status-removed { background: #f5f5f4; color: #78716c; }
.roster-flag--status-unknown { background: #f5f5f4; color: #78716c; }
.roster-flag--role-member { background: #f5f5f4; color: #57534e; }
.roster-flag--role-admin { background: #e0f2fe; color: #1b4f8b; }
.roster-flag--account-deactivated { background: #fee2e2; color: #991b1b; }
.roster-legend .roster-flag {
  width: 22px;
  height: 22px;
  font-size: 11px;
  vertical-align: middle;
  margin: 0 2px 0 6px;
}
.roster-legend .roster-btn-icon {
  width: 22px;
  height: 22px;
  font-size: 11px;
  vertical-align: middle;
  margin: 0 2px 0 6px;
  pointer-events: none;
}
.roster-legend-label { font-weight: 500; color: var(--dark); }
.roster-legend-sep { margin: 0 10px; color: var(--line); }
.roster-table--members .roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}
.roster-btn-text {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.roster-btn-text:hover:not(:disabled) { background: #f1f5f9; }
.roster-btn-text--remove { color: #b91c1c; border-color: #fca5a5; }
.roster-btn-text--remove:hover:not(:disabled) { background: #fef2f2; }
.roster-btn-text--approve {
  color: #fff;
  background: #166534;
  border-color: #166534;
  font-weight: 600;
}
.roster-btn-text--approve:hover:not(:disabled) { background: #14532d; }
.roster-btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
.roster-btn-icon:active:not(:disabled) { transform: scale(0.94); }
.roster-btn-icon--edit {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}
.roster-btn-icon--edit:hover { background: var(--accent-soft); }
.roster-btn-icon--invite {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.roster-btn-icon--invite:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.roster-btn-icon--remove {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  font-size: 13px;
}
.roster-btn-icon--remove:hover { background: #b91c1c; border-color: #b91c1c; }
.roster-btn-icon--approve {
  background: #ecfdf5;
  color: #166534;
  border-color: #86efac;
}
.roster-btn-icon--approve:hover {
  background: #166534;
  border-color: #166534;
  color: #fff;
}
.roster-btn-icon--admin {
  background: #fff;
  border-color: #94a3b8;
  color: #475569;
  font-size: 18px;
  font-weight: 600;
}
.roster-btn-icon--admin:hover { background: #f1f5f9; border-color: #64748b; }
.roster-btn-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.roster-btn-icon--remove:focus-visible {
  outline-color: #dc2626;
}

.member-profile-dlg {
  width: min(560px, 96vw);
  max-height: 90vh;
  overflow: auto;
}
.member-profile-summary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.member-profile-email {
  margin: 0;
  font-size: 1rem;
  word-break: break-word;
}

.roster-id-thumb {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--light);
}

a:hover .roster-id-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th { font-weight: 500; color: var(--dark); }

.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.42;
  transition: opacity 0.2s ease;
}

.flow-step.active,
.flow-step.done { opacity: 1; }

.flow-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
  background: var(--card);
  color: var(--muted);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.flow-step-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.25;
}

.flow-step-label small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.flow-step.active .flow-step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.flow-step.done .flow-step-num {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
  font-size: 0;
}

.flow-step.done .flow-step-num::before {
  content: '✓';
  font-size: 1rem;
  line-height: 1;
}

.flow-step-connector {
  flex: 0 0 32px;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  margin: 0 8px;
  transition: background 0.2s ease;
}

.flow-steps.connector-on .flow-step-connector { background: var(--good); }

@media (max-width: 720px) {
  .flow-steps {
    padding: 10px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .flow-step-label small { display: none; }
  .flow-step-connector { flex: 0 0 20px; margin: 0 4px; }
}

.card.flow-highlight {
  box-shadow: 0 0 0 3px var(--accent-soft);
  border-color: var(--accent);
}

/* Booking grid */
.book { overflow: auto; }
.book#gridCard,
.card.book {
  /* Let selection rings paint outside badge edges */
  overflow-x: auto;
  overflow-y: visible;
  padding-left: 6px;
  padding-right: 12px;
}
.book table { min-width: 520px; table-layout: fixed; }
.book thead th.time-col,
.book tbody td.time-col { width: 4.5rem; }
.book thead th.court-col {
  text-align: center;
  white-space: nowrap;
  padding: 8px 4px;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book tbody td {
  padding: 6px 4px;
  vertical-align: middle;
}

.slot {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  border: 1px solid hsl(152, 35%, 68%);
  border-radius: var(--radius);
  background: hsl(152, 45%, 95%);
  color: var(--good);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  user-select: none;
  box-sizing: border-box;
}

.slot:hover { outline: 2px solid var(--accent); }
.slot.taken {
  background: #fef3c7;
  color: #92400e;
  border-color: #fbbf24;
  cursor: pointer;
}
.slot.mine {
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  border-color: var(--brand-blue-green);
  cursor: pointer;
}
.slot.event { cursor: pointer; }
.slot.picked { background: var(--accent-soft); color: var(--brand-blue); font-weight: 600; outline: 2px solid var(--brand-blue-green); }
.slot.block-pending {
  font-weight: 600;
  outline: 2px dashed currentColor;
  outline-offset: -3px;
}
.slot.sel { box-shadow: inset 0 0 0 2px var(--accent); }

/* Compact court availability grid (badge layout) */
.cag-wrapper { width: 100%; font-family: inherit; box-sizing: border-box; max-width: 100%; }
.cag-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 12px;
  box-sizing: border-box;
}
.cag-legend { display: flex; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #E5E3DA; }
.cag-legend-item { display: flex; align-items: center; gap: 7px; }
.cag-legend-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.cag-legend-letter {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.cag-legend-badge svg { display: block; }
.cag-legend-label { font-size: 0.9375rem; color: var(--muted); white-space: nowrap; }
.cag-block { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F1EFE8; }
.cag-header { border-bottom: 1px solid #E5E3DA; padding-bottom: 10px; margin-bottom: 2px; }
.cag-time-col {
  width: 4.25rem;
  min-width: 4.25rem;
  flex-shrink: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.cag-time-header { font-size: 0.875rem; color: var(--muted); }
.cag-chunk-stack { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.cag-chunk-row { display: flex; justify-content: space-between; gap: 6px; }
.cag-court-num {
  background: transparent; color: #5F5E5A;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 600; line-height: 1.05; text-align: center; gap: 1px;
}
.cag-court-word { font-weight: 600; }
.cag-court-id { font-weight: 700; line-height: 1; width: 100%; text-align: center; }
.cag-court-num-in {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}
.cag-badge {
  border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 0.12s, transform 0.1s;
}
.cag-badge:not(:disabled):hover { filter: brightness(0.95); }
.cag-badge:not(:disabled):active { transform: scale(0.9); }
.cag-badge:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cag-badge--locked { cursor: default; }
.cag-badge.cag-picked {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px var(--accent);
  z-index: 2;
  position: relative;
}
.cag-badge.cag-sel { box-shadow: 0 0 0 2px #1D4ED8; }
.cag-group-panel { margin-bottom: 12px; border: 1px solid #E5E3DA; border-radius: 10px; overflow: hidden; }
.cag-group-panel > summary.cag-group-summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #FAF9F6; border-bottom: 1px solid #E5E3DA; font-weight: 600;
}
.cag-group-panel > summary.cag-group-summary::-webkit-details-marker { display: none; }
.cag-group-panel[open] > summary.cag-group-summary { border-bottom-color: #E5E3DA; }
.cag-group-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cag-group-title { flex: 1; color: #1B3A6B; }
.cag-group-meta { font-size: 12px; font-weight: 500; color: #5F5E5A; }
.cag-group-panel .cag-block:last-child { border-bottom: none; }
.cag-group-panel .cag-wrapper > .cag-legend { display: none; }
.cag-wrapper--compact .cag-chunk-stack {
  flex: 1;
  min-width: 0;
}
.cag-wrapper--compact .cag-chunk-row {
  display: grid;
  grid-template-columns: repeat(var(--cag-cols, 6), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.cag-wrapper--compact .cag-cell-fluid {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  max-width: 2.25rem;
  justify-self: center;
}
.cag-wrapper--compact .cag-scroll {
  overflow-x: auto;
  padding-right: 12px;
}
.cag-time-select {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  line-height: 1.15;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-decoration: underline;
  text-decoration-color: rgba(27, 79, 139, 0.35);
  text-underline-offset: 2px;
}
.cag-time-select:active { color: var(--accent); }
.cag-range-dragging { user-select: none; -webkit-user-select: none; cursor: crosshair; }
.cag-range-dragging .cag-badge { cursor: crosshair; }
.cag-badge.cag-sel-preview {
  box-shadow: 0 0 0 2px #1d4ed8, inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.cag-time-select.cag-sel-preview {
  background: rgba(29, 78, 216, 0.14);
  border-radius: 4px;
}
.cag-group-panel .cag-wrapper { padding: 0 8px 8px; }
@keyframes sch-row-flash {
  0%, 100% { background: transparent; }
  25%, 75% { background: rgba(42, 157, 143, 0.18); }
}
tr.sch-row-flash { animation: sch-row-flash 1.6s ease; }

.time-col {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
  padding-right: 8px;
}

.center { text-align: center; }
.hide { display: none; }

/* Modal dialog (member edit) */
dialog.member-dlg {
  position: fixed;
  inset: unset;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 24px;
  max-width: 520px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
dialog.member-dlg::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

/* Tabs */
.tabs, .sign-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

.tabs button, .sign-tab {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  min-height: 48px;
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.tabs button:focus-visible, .sign-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tabs button:hover:not(.active), .sign-tab:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

.tabs button:active:not(.active), .sign-tab:active:not(.active) {
  transform: scale(0.97);
  background: var(--accent-soft);
}

.tabs button.active, .sign-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tabs button.active:active, .sign-tab.active:active {
  transform: scale(0.97);
  background: var(--accent-hover);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

.tab-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px #fff;
}
.tab-badge-dot.hide { display: none; }

.sign-panel { margin-top: 12px; }
.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.legal-doc h2 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--navy);
}
.legal-doc p {
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

/* Page intro band */
.page-intro {
  margin-bottom: 8px;
}

.page-intro h1 { margin-bottom: 0.35rem; }

.home-sports {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-sport-link {
  display: block;
  padding: 16px 18px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.home-sport-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.fp-teaser {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fp-teaser-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.fp-teaser-head strong {
  font-size: 0.95rem;
  color: var(--dark);
}
.fp-teaser-head a {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}
.fp-teaser-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fp-teaser-row {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--dark);
  text-decoration: none;
  border-top: 1px solid #f0f2f5;
}
.fp-teaser-row:first-child { border-top: none; }
.fp-teaser-row:hover { color: var(--accent); }

/* Footer */
footer.site {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 24px 20px;
  margin-top: 32px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

footer.site a { color: var(--accent); font-weight: 500; }

footer.site .platform-footer {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: hsl(210, 8%, 55%);
}

/* Admin bulk email */
.email-preview {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  max-width: 560px;
}

.email-preview-body {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--line);
}

.email-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.email-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.85rem;
}

.email-file-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}

.email-file-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
}

.email-file-remove:hover { color: var(--accent); }

.email-progress { margin-top: 16px; }

.email-progress-bar {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.email-progress-bar div {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}

.email-failed-list {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid hsl(205, 60%, 85%);
  border-radius: var(--radius);
  font-size: 0.9rem;
  max-height: 220px;
  overflow: auto;
}
.email-failed-list ul {
  margin: 8px 0 0;
  padding-left: 1.25rem;
}
.email-failed-list li { margin: 4px 0; }

.email-roster {
  max-height: 420px;
  overflow: auto;
  margin-top: 12px;
  background: #fff;
}

.email-roster thead th {
  background: #fff;
  box-shadow: 0 2px 0 var(--line);
}

/* Player board (Find a Player) */
.board-post {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fff;
}
.board-post-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.board-replies {
  border-left: 3px solid var(--accent-soft);
  margin: 12px 0;
  padding-left: 14px;
}
.board-reply {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.board-reply:last-child { border-bottom: none; }
.board-reply-form textarea {
  width: 100%;
  margin-bottom: 8px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.email-roster table { margin: 0; }

.email-roster th:first-child,
.email-roster td:first-child {
  width: 36px;
}

/* Admin — section cards (replaces wide table) */
.admin-sec-cards {
  display: grid;
  gap: 14px;
}
.admin-sec-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}
.admin-sec-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-sec-card-head h3 {
  margin: 0;
  font-size: 1.1rem;
}
.admin-sec-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}
.admin-sec-meta > div {
  margin: 0;
  min-width: 0;
}
.admin-sec-meta dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.admin-sec-meta dd {
  margin: 2px 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.admin-sec-meta-wide {
  grid-column: 1 / -1;
}
.admin-sec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  header.site .header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  header.site .brand {
    width: auto;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }
  .brand img {
    height: 64px;
    margin: 0;
    max-width: min(220px, 62vw);
  }
  header.site.is-compact .header-inner { padding: 4px 16px; }
  header.site.is-compact .brand img { height: 40px; }
  header.site.is-compact nav.main { gap: 10px; }
  header.site .brand.brand-text-only {
    text-align: left;
  }
  header.site .brand.brand-text-only .brand-text {
    text-align: left;
  }
  nav.main {
    width: auto;
    justify-content: flex-end;
  }
  body { font-size: 16px; }

  /* Login / auth pages — compact header, centered logo, no nav */
  body.page-login header.site .header-inner {
    justify-content: center;
    flex-wrap: nowrap;
    padding: 10px 16px 12px;
  }
  body.page-login nav.main { display: none !important; }
  body.page-login .brand img {
    height: 96px;
    max-width: min(440px, 94vw);
  }
  body.page-login .container { padding: 12px 16px 24px; }
  body.page-login .card {
    padding: 16px;
    margin: 10px 0;
  }
  body.page-login h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
  body.page-login h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
  body.page-login .sign-tabs { margin-top: 8px; }
  body.page-login .sign-panel { margin-top: 8px; }
  body.page-login .sign-panel > .muted:first-child { margin-top: 0; }
  body.page-login footer.site { display: none; }

  /* Admin dashboard — lock layout, stack forms, readable section cards */
  html:has(body.page-admin),
  body.page-admin {
    overflow-x: hidden;
    max-width: 100%;
  }
  body.page-admin .container {
    padding: 16px 14px 32px;
    max-width: 100%;
    overflow-x: hidden;
  }
  body.page-admin .card {
    padding: 16px;
    margin: 14px 0;
    min-width: 0;
  }
  body.page-admin .clients-card-actions {
    justify-content: flex-start;
    width: 100%;
  }
  body.page-admin .row > * {
    flex: 1 1 100%;
    min-width: 0;
  }
  body.page-admin .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    margin-bottom: 14px;
    padding-bottom: 0;
  }
  body.page-admin .tabs button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    padding: 10px 12px;
    line-height: 1.25;
  }
  body.page-admin .admin-sec-meta {
    grid-template-columns: 1fr;
  }
  body.page-admin .admin-sec-actions .btn {
    flex: 1 1 auto;
    min-width: 5.5rem;
    text-align: center;
  }

  body.page-admin .sch-block-grid,
  body.page-admin .sch-block-grid:has(#blockNoteWrap:not(.hide)) {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.page-admin .sch-block-type,
  body.page-admin .sch-block-note,
  body.page-admin .sch-block-from,
  body.page-admin .sch-block-through,
  body.page-admin .sch-reset-range-line {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  body.page-admin .sch-block-weekdays {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  body.page-admin .flow-steps {
    padding: 10px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.page-admin .flow-step-label small { display: none; }
  body.page-admin .book {
    overflow: visible;
    padding-left: 4px;
    padding-right: 4px;
  }
  body.page-admin .cag-wrapper--compact .cag-time-col {
    width: auto;
    min-width: 2.75rem;
    font-size: 11px;
    line-height: 1.15;
  }
  body.page-admin .cag-wrapper--compact .cag-time-select {
    min-height: 28px;
    padding: 2px 0;
  }
  body.page-admin .cag-wrapper--compact .cag-block { gap: 8px; padding: 5px 0; width: 100%; max-width: 100%; }
  body.page-admin .cag-wrapper--compact .cag-chunk-row { gap: 6px; }
  body.page-admin .cag-wrapper--compact .cag-legend { gap: 8px 12px; }
  body.page-admin .cag-wrapper--compact .cag-legend-badge { width: 18px; height: 18px; }
  body.page-admin .cag-wrapper--compact .cag-legend-letter { font-size: 10px; }
  body.page-admin .cag-wrapper--compact .cag-legend-label { font-size: 12px; }
  body.page-admin .cag-wrapper--compact .cag-cell-fluid {
    max-width: 1.5rem;
    max-height: 1.5rem;
  }
  body.page-admin .cag-wrapper--compact .cag-badge svg {
    width: 11px;
    height: 11px;
  }

  /* Admin roster tables — stack rows as cards on narrow screens */
  body.page-admin .roster-table--members {
    overflow-x: visible;
    max-height: none;
  }
  body.page-admin .roster-table--members table {
    table-layout: auto;
    min-width: 0;
  }
  body.page-admin .roster-table--members thead {
    display: none;
  }
  body.page-admin .roster-table--members tbody tr {
    display: grid;
    gap: 6px 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    align-items: center;
  }
  body.page-admin .roster-table--members tbody tr:has(.col-check) {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "check name flags"
      "memberNo memberNo memberNo"
      "email email email"
      "actions actions actions";
  }
  body.page-admin .roster-table--members.roster-table--pending tbody tr,
  body.page-admin .roster-table--members tbody tr:not(:has(.col-check)) {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name flags"
      "email email"
      "actions actions";
  }
  body.page-admin .roster-table--members.roster-table--email tbody tr:has(.col-check) {
    grid-template-areas:
      "check name flags"
      "email email email";
  }
  body.page-admin .roster-table--members.roster-table--reports tbody tr {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name email"
      "memberNo sport"
      "joined removed"
      "reason reason"
      "flags flags";
  }
  body.page-admin .roster-table--members.roster-table--audit tbody tr {
    grid-template-columns: 1fr;
    grid-template-areas:
      "date"
      "name"
      "action"
      "details"
      "ip";
  }
  body.page-admin .roster-table--members.roster-table--stack tbody tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }
  body.page-admin .roster-table--members tbody td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0;
    border: none;
    white-space: normal !important;
    word-break: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.4;
    font-size: 0.9rem;
  }
  body.page-admin .roster-table--members tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
  }
  body.page-admin .roster-table--members tbody td.col-check { grid-area: check; width: auto !important; }
  body.page-admin .roster-table--members tbody td.col-name {
    grid-area: name;
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
  }
  body.page-admin .roster-table--members tbody td.col-name::before { display: none; }
  body.page-admin .roster-table--members tbody td.col-no { grid-area: memberNo; }
  body.page-admin .roster-table--members tbody td.col-email { grid-area: email; }
  body.page-admin .roster-table--members tbody td.col-flags {
    grid-area: flags;
    justify-self: end;
    width: auto !important;
  }
  body.page-admin .roster-table--members tbody td.col-flags::before { display: none; }
  body.page-admin .roster-table--members tbody td.col-actions {
    grid-area: actions;
    padding-top: 8px;
    margin-top: 2px;
    border-top: 1px solid var(--line);
  }
  body.page-admin .roster-table--members tbody td.col-sport { grid-area: sport; }
  body.page-admin .roster-table--members tbody td.col-joined { grid-area: joined; }
  body.page-admin .roster-table--members tbody td.col-removed { grid-area: removed; }
  body.page-admin .roster-table--members tbody td.col-reason { grid-area: reason; }
  body.page-admin .roster-table--members.roster-table--audit tbody td.col-date { grid-area: date; }
  body.page-admin .roster-table--members.roster-table--audit tbody td.col-action { grid-area: action; }
  body.page-admin .roster-table--members.roster-table--audit tbody td.col-details { grid-area: details; }
  body.page-admin .roster-table--members.roster-table--audit tbody td.col-ip { grid-area: ip; }
  body.page-admin .roster-table--members .roster-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  body.page-admin .roster-legend {
    font-size: 11px !important;
    line-height: 1.6 !important;
  }
  body.page-admin #tab-members .row .btn,
  body.page-admin #tab-members .btn.secondary,
  body.page-admin #tab-members p[style*="flex-wrap"] .btn {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
  }
  body.page-admin #tab-members p[style*="flex-wrap"] {
    flex-direction: column;
    gap: 8px !important;
  }
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.password-wrap input {
  flex: 1;
  padding-right: 4.5rem;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  background: var(--warm-white, #f9f6f0);
  color: var(--navy, #1b4f8b);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.2;
}
.password-toggle:hover {
  background: #fff;
  border-color: var(--navy, #1b4f8b);
}

/* Player invite lineup */
.player-lineup { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 0; }
.player-lineup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5c6678;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.player-avatar--booker { background: #1b4f8b; }
.player-avatar--declined { background: #9ca3af; }
.player-lineup-main { flex: 1; min-width: 0; }
.player-lineup-name { font-weight: 600; color: #111; margin-bottom: 4px; }
.player-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.player-badge--accepted { background: #d1fae5; color: #065f46; }
.player-badge--pending { background: #fef3c7; color: #92400e; }
.player-badge--declined { background: #f3f4f6; color: #6b7280; }
.player-badge-icon { font-weight: 700; }
.player-lineup-actions { display: flex; gap: 6px; flex-shrink: 0; }
.player-lineup-actions .btn.small { padding: 6px 10px; font-size: 12px; }
.player-search-results {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  margin-top: 6px;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
}
.player-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
}
.player-search-item:hover { background: #f5f7fa; }
.invite-progress-banner {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: #fff;
  margin: 12px 0 8px;
}
.invite-progress--red { background: #ef4444; }
.invite-progress--amber { background: #f59e0b; }
.invite-progress--green { background: #22c55e; }
.invite-progress-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.invite-progress-fill { height: 100%; transition: width 0.4s ease; }
.invite-progress-fill.invite-progress--red { background: #ef4444; }
.invite-progress-fill.invite-progress--amber { background: #f59e0b; }
.invite-progress-fill.invite-progress--green { background: #22c55e; }
.invite-progress-summary { text-align: center; font-size: 13px; margin: 0 0 12px; }
.invite-group-sms {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}
.invite-group-sms .btn { margin-bottom: 6px; }
.invite-group-sms-hint {
  font-size: 12px;
  line-height: 1.45;
  margin: 6px 0 0;
}
.invite-group-sms-inline {
  margin-top: 8px;
}
.invite-group-sms-inline .invite-group-sms {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.invite-group-sms-inline .btn { display: block; width: 100%; max-width: 140px; margin: 0 auto; }

  /* My reservations — stack rows as cards so actions stay on screen */
  .my-res-table { display: block; width: 100%; }
  .my-res-table thead { display: none; }
  .my-res-table tbody { display: block; }
  .my-res-table tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
  }
  .my-res-table tr.invite-row-flash { background: #eff6ff; }
  .my-res-table td {
    display: block;
    padding: 5px 0;
    border: none;
    text-align: left !important;
  }
  .my-res-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .my-res-table td.my-res-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    white-space: normal;
  }
  .my-res-table td.my-res-actions::before {
    width: 100%;
    margin-bottom: 4px;
  }
  .my-res-table td.my-res-actions .btn,
  .my-res-table td.my-res-actions a.btn {
    margin: 0;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    text-align: center;
  }
  .my-res-table .invite-group-sms-inline {
    width: 100%;
    flex-basis: 100%;
  }
  .my-res-table .invite-group-sms-inline .btn {
    max-width: none;
    width: 100%;
  }

.saved-groups-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 12px;
  background: #f5f7fa;
  border-radius: 8px;
}
.saved-groups-row label { margin-bottom: 4px; font-size: 13px; }
.saved-groups-row select { min-width: 160px; max-width: 100%; }
.saved-groups-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.saved-group-edit {
  margin: 0 0 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
#inviteStatusBoard { margin-top: 14px; }
.player-lineup-skeleton {
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: player-shimmer 1.2s infinite;
  margin-bottom: 8px;
}
@keyframes player-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
}

/* Week summary — hybrid list (phone) + strip (desktop) */
.view-mode-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.view-mode-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}
.view-mode-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.35;
}
@media (max-width: 720px) {
  .view-mode-btn[data-view="month"] {
    display: none;
  }
  .view-mode-hint--desktop {
    display: none;
  }
}
@media (min-width: 721px) {
  .view-mode-hint--mobile {
    display: none;
  }
}
.view-mode-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 10px;
}
.view-mode-btn {
  border: 1px solid transparent;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.view-mode-btn:hover:not(.active) {
  border-color: #93c5fd;
  color: #1b4f8b;
}
.view-mode-btn.active {
  background: #1b4f8b;
  color: #fff;
  border-color: #1b4f8b;
  box-shadow: none;
}
.week-hybrid { width: 100%; }
.week-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.week-strip {
  display: none;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 8px;
  padding-bottom: 4px;
}
.week-day-col,
.week-list-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.week-list-day,
.week-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d4dce8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.week-list-day { gap: 8px; }
.week-day {
  text-align: center;
  padding: 10px 8px 12px;
}
.week-list-day:hover:not(.muted),
.week-day:hover:not(.muted) {
  border-color: #1b4f8b;
  box-shadow: 0 2px 8px rgba(27, 79, 139, 0.12);
}
.week-list-day.selected,
.week-day.selected {
  border-color: #1b4f8b;
  box-shadow: 0 0 0 2px rgba(27, 79, 139, 0.2);
}
.week-day--high { background: #f0fdf4; }
.week-day--med { background: #fafafa; }
.week-day--low { background: #fff; }
.week-list-day.today .week-list-date,
.week-day.today .week-day-num {
  color: #1b4f8b;
}
.week-list-day.muted,
.week-day.muted {
  opacity: 0.5;
  cursor: default;
}
.week-list-main { flex: 1; min-width: 0; }
.week-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.week-list-date {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}
.week-today-badge {
  font-size: 11px;
  font-weight: 600;
  color: #1b4f8b;
  background: #e8eef5;
  padding: 2px 8px;
  border-radius: 999px;
}
.week-day-dow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.week-day-num {
  display: block;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}
.week-stacked-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 6px;
  overflow: hidden;
  background: #e7e5e4;
  margin: 0 0 8px;
}
.week-stacked-bar--tall { height: 20px; margin-bottom: 8px; }
.week-bar-seg { height: 100%; min-width: 2px; }
.week-capacity {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 4px;
}
.week-capacity strong { color: #14532d; }
.week-admin-counts {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin: 6px 0;
  font-size: 12px;
  font-weight: 600;
}
.week-day .week-admin-counts { justify-content: center; }
.week-count {
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 1.6em;
  text-align: center;
}
.week-count.open { background: #dcfce7; color: #14532d; }
.week-count.booked { background: #e7e5e4; color: #44403c; }
.week-count.block { background: #e0f2fe; color: #0c4a6e; }
.week-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.week-day .week-pills {
  flex-direction: column;
  align-items: stretch;
}
.week-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 8px;
  border-radius: 6px;
  text-align: left;
  max-width: 100%;
}
.week-event-letter { flex: 0 0 auto; font-weight: 700; }
.week-event-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.week-event-pill-wrap {
  position: relative;
  display: block;
  max-width: 100%;
}
.week-event-pill-wrap:hover .week-event-tip,
.week-event-pill-wrap:focus-within .week-event-tip {
  display: block;
}
.week-event-tip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 30;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #f8fafc;
  background: #1e293b;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  white-space: normal;
}
.week-more { font-size: 12px; }
.week-heatmap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #e7e5e4;
  margin: 0 0 8px;
}
.week-heatmap--compact {
  height: 32px;
  margin-bottom: 8px;
}
.week-heat-cell {
  flex: 1;
  min-height: 2px;
  cursor: default;
}
.week-res-details {
  font-size: 12px;
  border: 1px solid #d4dce8;
  border-radius: 8px;
  background: #f8fafc;
  overflow: visible;
}
.week-res-details > summary {
  padding: 6px 8px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  list-style: none;
}
.week-res-details > summary::-webkit-details-marker { display: none; }
.week-res-details > summary::before {
  content: '▸ ';
  color: #64748b;
}
.week-res-details[open] > summary::before { content: '▾ '; }
.week-res-list {
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
}
.week-res-item {
  position: relative;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: default;
}
.week-res-item:hover,
.week-res-item:focus-within {
  background: #e8eef5;
}
.week-res-item-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e293b;
  font-weight: 500;
}
.week-res-tip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 20;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #f8fafc;
  background: #1e293b;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  white-space: normal;
}
.week-res-item:hover .week-res-tip,
.week-res-item:focus-within .week-res-tip {
  display: block;
}
@media (min-width: 721px) {
  .week-list { display: none; }
  .week-strip { display: grid; }
}
.month-grid {
  width: 100%;
}
.month-dow-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}
.month-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.month-week-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}
.month-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 72px;
  padding: 6px 4px;
  border: 1px solid #d4dce8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  min-width: 0;
}
.month-day--outside {
  background: #f8fafc;
  border-color: #e8eef5;
  cursor: default;
  min-height: 32px;
  padding: 4px;
}
.month-day-head {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.month-day-num {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}
.week-heatmap--month {
  height: 24px;
  margin-bottom: 4px;
}
.month-day .week-pills {
  flex-direction: column;
  align-items: stretch;
}
.month-day .week-event-pill {
  font-size: 10px;
  padding: 3px 5px;
}
.month-day .week-more {
  font-size: 10px;
}
.month-day .week-today-badge {
  font-size: 9px;
  padding: 1px 5px;
}
@media (min-width: 721px) {
  .month-dow-row,
  .month-week-row {
    gap: 6px;
    margin-bottom: 6px;
  }
  .month-dow {
    font-size: 11px;
  }
  .month-day {
    min-height: 88px;
    padding: 8px 6px;
    border-radius: 10px;
  }
  .month-day--outside {
    min-height: 40px;
    padding: 6px;
  }
  .month-day-head {
    gap: 4px;
    margin-bottom: 6px;
  }
  .month-day-num {
    font-size: 14px;
  }
  .week-heatmap--month {
    height: 28px;
    margin-bottom: 6px;
  }
  .month-day .week-event-pill {
    font-size: 12px;
    padding: 5px 8px;
  }
  .month-day .week-more {
    font-size: 12px;
  }
}
