/* hopslot — design system */

:root {
  --brand: oklch(0.66 0.17 25);
  --brand-deep: oklch(0.55 0.18 27);
  --brand-soft: oklch(0.94 0.04 30);
  --brand-ink: oklch(0.38 0.13 28);

  --bg: oklch(0.975 0.012 65);
  --surface: #ffffff;
  --surface-2: oklch(0.985 0.006 65);
  --ink: oklch(0.22 0.02 30);
  --ink-2: oklch(0.42 0.02 30);
  --ink-3: oklch(0.58 0.02 30);
  --line: oklch(0.92 0.012 50);
  --line-2: oklch(0.96 0.008 60);

  --ok: oklch(0.68 0.13 155);
  --ok-soft: oklch(0.94 0.045 155);
  --ok-ink: oklch(0.38 0.11 155);

  --warn: oklch(0.75 0.13 75);
  --warn-soft: oklch(0.95 0.05 80);
  --warn-ink: oklch(0.45 0.11 70);

  --danger: oklch(0.62 0.18 22);

  --tag-coral-ink: oklch(0.42 0.13 28);
  --tag-sage-ink: oklch(0.38 0.10 155);
  --tag-sky-ink: oklch(0.40 0.10 235);
  --tag-amber-ink: oklch(0.42 0.11 70);
  --tag-lilac-ink: oklch(0.42 0.10 300);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 36px;

  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(60, 30, 20, 0.04), 0 1px 1px rgba(60, 30, 20, 0.03);
  --shadow-md: 0 2px 6px rgba(60, 30, 20, 0.05), 0 6px 18px rgba(60, 30, 20, 0.06);
  --shadow-lg: 0 8px 28px rgba(60, 30, 20, 0.10), 0 2px 6px rgba(60, 30, 20, 0.05);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
}

body, .br-screen, .br-screen * {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Page wrapper (mobile: full viewport, desktop: centered card) ── */
.br-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.br-screen {
  flex: 1;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── Desktop: centered card layout ── */
@media (min-width: 600px) {
  body {
    background: oklch(0.93 0.018 60);
  }
  .br-page {
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
  }
  .br-screen {
    flex: none;
    width: 430px;
    height: 820px;
    border-radius: 36px;
    box-shadow:
      0 24px 80px -12px rgba(60, 30, 20, 0.18),
      0 4px 16px rgba(60, 30, 20, 0.07);
    overflow: hidden;
  }
}

/* ── Typography ── */
.br-display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

/* ── Navigation header ── */
.br-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 6px;
  flex: 0 0 auto;
}
.br-nav-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.br-nav-btn {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s;
}
.br-nav-btn:hover { background: var(--surface-2); }

/* ── Scrollable body area ── */
.br-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 18px 24px;
}
.br-body.compact { padding-top: 0; }
.br-body::-webkit-scrollbar { display: none; }
.br-body { scrollbar-width: none; }

/* Horizontally-scrolling pill tabs (event detail queues, etc.) */
.br-tabs-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
}
@media (max-width: 899px) {
  .br-tabs-sticky { top: 56px; }
}

/* ── Buttons ── */
.br-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .08s, background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.br-btn:active { transform: scale(0.98); }
.br-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 6px 16px -6px var(--brand);
}
.br-btn-primary:hover { background: var(--brand-deep); }
.br-btn-primary:disabled {
  background: oklch(0.88 0.03 30);
  color: oklch(0.7 0.02 30);
  box-shadow: none;
  cursor: not-allowed;
}
.br-btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 6px 16px -6px var(--danger);
}
.br-btn-danger:hover { background: oklch(0.52 0.18 22); }
.br-btn-danger:disabled {
  background: oklch(0.88 0.03 30);
  color: oklch(0.7 0.02 30);
  box-shadow: none;
  cursor: not-allowed;
}
.br-btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.br-btn-ghost:hover { background: var(--surface-2); }
.br-btn-tint {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.br-btn-tint:hover { background: oklch(0.91 0.05 30); }
.br-btn-block { width: 100%; }
.br-btn-sm { height: 38px; font-size: 13px; padding: 0 14px; gap: 6px; }

/* ── Inputs ── */
.br-field { display: flex; flex-direction: column; gap: 6px; }
.br-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.br-input {
  height: 56px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 18px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: var(--sans);
}
.br-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.br-input::placeholder { color: var(--ink-3); }
textarea.br-input { padding: 14px 18px; min-height: 120px; resize: none; line-height: 1.45; }

/* ── Chip ── */
.br-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  font-family: var(--sans);
}
.br-chip:hover { background: var(--surface-2); }
.br-chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ── Tag pill (compact, for rows) ── */
.br-tag {
  display: inline-flex; align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: oklch(0.95 0.012 60);
  color: var(--ink-2);
}
.br-tag.coral { background: oklch(0.94 0.05 30); color: var(--tag-coral-ink); }
.br-tag.sage  { background: oklch(0.94 0.05 155); color: var(--tag-sage-ink); }
.br-tag.sky   { background: oklch(0.94 0.04 235); color: var(--tag-sky-ink); }
.br-tag.amber { background: oklch(0.94 0.06 75); color: var(--tag-amber-ink); }
.br-tag.lilac { background: oklch(0.94 0.04 300); color: var(--tag-lilac-ink); }

/* ── Status pill ── */
.br-status {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.br-status.ok   { background: var(--ok-soft);   color: var(--ok-ink); }
.br-status.pend { background: var(--warn-soft); color: var(--warn-ink); }
.br-status.no   { background: oklch(0.94 0.02 30); color: oklch(0.5 0.04 30); }
.br-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* ── Card ── */
.br-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 16px;
}

/* ── Divider ── */
.br-divider {
  height: 1px;
  background: var(--line-2);
  margin: 6px 0;
}

/* ── Radio button ── */
.br-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  transition: border .15s;
  flex-shrink: 0;
}
.br-radio.active {
  border: 6.5px solid var(--brand);
}

/* ── Avatar ── */
.br-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  font-family: var(--display);
}

/* ── Logo mark ── */
.br-logo {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 20px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.br-logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--display);
  letter-spacing: -0.04em;
  box-shadow: 0 4px 10px -2px var(--brand);
}

/* ── Tabs ── */
.br-tabs {
  display: inline-flex;
  background: oklch(0.94 0.012 60);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.br-tab {
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.br-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ── Sticky bottom CTA ── */
.br-cta-bar {
  flex: 0 0 auto;
  padding: 14px 18px 22px;
  background: linear-gradient(to top, var(--bg) 60%, color-mix(in oklab, var(--bg) 0%, transparent));
  border-top: 1px solid var(--line-2);
}

/* ── OTP boxes ── */
.br-otp {
  display: flex;
  gap: 10px;
  justify-content: center;
  position: relative;
}
.br-otp .cell {
  width: 46px; height: 56px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
  user-select: none;
}
.br-otp .cell.filled { border-color: var(--brand); }
.br-otp .cell.cursor { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.br-otp .cell.cursor::after {
  content: '';
  width: 2px; height: 24px;
  background: var(--brand);
  display: block;
  margin-left: 2px;
  animation: brBlink 1s steps(2) infinite;
}
.br-otp .cell.cursor.filled::after { display: none; }

/* ── Toggle switch ── */
.br-switch {
  width: 42px; height: 24px;
  border-radius: 999px;
  background: oklch(0.88 0.012 60);
  position: relative;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
  border: none;
  padding: 0;
}
.br-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: left .15s;
}
.br-switch.on { background: var(--brand); }
.br-switch.on::after { left: 20px; }

/* ── Row selection ── */
.br-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .12s;
}
.br-row:hover { background: var(--surface-2); }

/* ── Sparkle dots ── */
.br-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ── Helpers ── */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.br-hidden { display: none; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.flex-1 { flex: 1 1 auto; min-width: 0; }
.text-sm { font-size: 13px; } .text-xs { font-size: 11.5px; }
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-2); }
.center { text-align: center; }
.fw-6 { font-weight: 600; }
.fw-5 { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Animations ── */
@keyframes brPop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes brSlide {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes brFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
@keyframes brBlink {
  0%, 60%    { opacity: 1; }
  61%, 100%  { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   App Shell (sidebar layout — replaces phone-card for app pages)
════════════════════════════════════════════════════════ */

.app-body { background: var(--bg); }

.app-shell {
  display: flex;
  min-height: 100dvh;
}

/* Sidebar */
.br-sidebar {
  width: 228px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: none;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}
@media (min-width: 900px) {
  .br-sidebar { display: flex; }
}

.br-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.br-sidebar-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 8px -2px var(--brand);
}

.br-sidebar-logo-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.br-sidebar-nav {
  flex: 1;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.br-sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  white-space: nowrap;
}
.br-sidebar-item:hover { background: var(--brand-soft); color: var(--ink); }
.br-sidebar-item.active {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}

.br-sidebar-sub {
  position: relative;
  padding-left: 18px;
  margin: 1px 0;
}
.br-sidebar-sub::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.br-sidebar-sub-item {
  display: block;
  padding: 5px 10px 5px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.12s, background 0.12s;
}
.br-sidebar-sub-item:hover { color: var(--ink); background: var(--brand-soft); }
.br-sidebar-sub-item.active { color: var(--brand-ink); font-weight: 600; }

.br-sidebar-sep {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}

.br-sidebar-footer {
  padding: 8px 10px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.br-sidebar-soon-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn-ink);
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* Main content */
.br-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.br-page-wrap {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 899px) {
  .br-page-wrap {
    padding: 0 16px;
    padding-top: 56px;
    padding-bottom: 72px;
  }
}

/* Override br-body scrolling behaviour inside new layout */
.br-page-wrap .br-body {
  flex: none;
  height: auto;
  overflow: visible;
  padding-left: 0;
  padding-right: 0;
}

/* Full-bleed sticky CTA bar for admin-shell pages (events/roster.html) — a
   sibling of .br-page-wrap inside .br-main, not nested inside it, so it spans
   .br-main's full width (edge-to-edge next to the sidebar) instead of being
   capped to the 860px content column. Matches the mock's own DOM shape,
   where footerStyle sits outside wrapStyle. .br-page-wrap's own flex: 1
   already stretches it to fill any leftover height above this bar, so no
   extra positioning is needed for the "content shorter than viewport" case;
   position: sticky covers the "content taller than viewport" case. */
.br-page-cta-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 14px 32px 20px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
@media (max-width: 899px) {
  .br-page-cta-bar {
    bottom: 56px;
    padding: 14px 16px;
  }
}

/* Page header */
.br-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 32px 0 20px;
}
@media (max-width: 899px) {
  .br-page-header { padding: 20px 0 14px; }
}

.br-page-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
}
@media (max-width: 899px) {
  .br-page-title { font-size: 22px; }
}

.br-page-meta {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 3px;
}

.br-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
}

/* Subnav tabs */
.br-page-subnav {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}
.br-page-subnav::-webkit-scrollbar { display: none; }
.br-page-subnav { scrollbar-width: none; }

.br-subnav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.br-subnav-tab:hover { color: var(--ink); }
.br-subnav-tab.active {
  color: var(--brand-ink);
  border-bottom-color: var(--brand);
}

/* Mobile topbar */
.br-mobile-topbar { display: none; }
@media (min-width: 900px) { .br-mobile-only { display: none !important; } }
@media (max-width: 899px) {
  .br-mobile-topbar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 56px;
    background: rgba(251, 248, 243, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
}

.br-mobile-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}

/* Mobile bottom tabs */
.br-bottom-tabs { display: none; }
@media (max-width: 899px) {
  .br-bottom-tabs {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid rgba(0,0,0,0.07);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* Roster-slot assigned-trainee card's remove button (events/roster.html) */
.roster-remove-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.roster-remove-btn:hover { background: var(--surface-2); color: var(--danger); }

.br-bottom-tabs-inner {
  display: flex;
  align-items: stretch;
  height: 56px;
}

.br-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  position: relative;
  transition: color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.br-tab-btn::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.br-tab-btn.active { color: var(--brand-ink); }
.br-tab-btn.active::before { transform: translateX(-50%) scaleX(1); }

/* More sheet (mobile) */
.br-more-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 299;
}
.br-more-sheet {
  display: none;
  position: fixed;
  bottom: 56px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.14);
  padding: 8px 0 12px;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (max-width: 899px) {
  .br-more-backdrop { display: block; }
  .br-more-sheet { display: block; }
  .br-more-sheet.open { transform: translateY(0); }
}
.br-more-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 6px auto 12px;
}
.br-more-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s;
}
.br-more-sheet-item:hover,
.br-more-sheet-item:active { background: var(--brand-soft); }
.br-more-sheet-item.active { color: var(--brand-ink); font-weight: 600; }

/* Date/time picker trigger button, used by events/create.html and events/edit.html.
   The sheet itself is window.BrRecurringPicker (static/js/recurring_schedule_picker.js),
   which reuses the br-dtsheet, br-dt-day-grid and br-dt-month-nav classes below. */
.ev-datetime-trigger {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--ink);
    text-align: left;
    font-family: inherit;
    padding: 0;
    cursor: pointer;
}
.ev-datetime-trigger.placeholder { color: var(--ink-3); }

.br-dtsheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 20, .45);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.br-dtsheet-backdrop.open { opacity: 1; pointer-events: auto; }

.br-dtsheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    z-index: 201;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 34px rgba(0, 0, 0, .18);
    transform: translate(-50%, 100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s cubic-bezier(.32, .72, 0, 1), opacity .2s ease;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
}
.br-dtsheet.open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }

@media (min-width: 900px) {
    .br-dtsheet-backdrop { background: transparent; }
    .br-dtsheet {
        top: 50%;
        bottom: auto;
        width: 440px;
        max-width: calc(100vw - 24px);
        border-radius: 16px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, .2), 0 0 0 1px var(--line-2);
        transform: translate(-50%, calc(-50% + 6px)) scale(.98);
        transform-origin: center;
        padding-bottom: 0;
    }
    .br-dtsheet.open { transform: translate(-50%, -50%) scale(1); }
    .br-dtsheet-handle { display: none; }
}

.br-dtsheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin: 10px auto 0;
    flex-shrink: 0;
}
.br-dtsheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 4px;
    flex-shrink: 0;
}
.br-dtsheet-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.br-dtsheet-back, .br-dtsheet-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}
.br-dtsheet-body { padding: 8px 20px 16px; overflow-y: auto; }
.br-dtsheet-footer { padding: 12px 20px 16px; border-top: 1px solid var(--line-2); flex-shrink: 0; }

.br-dt-day-grid-header, .br-dt-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.br-dt-day-grid-header span {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-3);
    padding: 4px 0;
}
.br-dt-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.br-dt-month-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-2);
    cursor: pointer;
    flex-shrink: 0;
}
.br-dt-month-nav-btn:hover { background: var(--surface-2); }
.br-dt-month-nav-btn:disabled { opacity: .3; cursor: not-allowed; background: none; }
.br-dt-month-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
}

/* Month-calendar grid — shared by Events and Availability/roster month views */
.view-toggle { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.view-toggle-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: none; background: transparent; color: var(--ink-3); font-size: 12.5px; font-weight: 700; font-family: var(--sans); text-decoration: none; cursor: pointer; }
.view-toggle-btn.active { background: var(--surface); color: var(--brand-ink); box-shadow: 0 1px 3px rgba(60, 30, 20, 0.12); }
.cal-grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-weekday-lbl { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding-bottom: 4px; }
.cal-day-cell { min-height: 80px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; cursor: pointer; padding: 6px 5px; font-family: var(--sans); box-sizing: border-box; }
.cal-day-cell.empty { visibility: hidden; cursor: default; }
.cal-day-cell.selected { border-color: var(--brand); background: var(--brand-soft); }
.cal-day-cell.today:not(.selected) { border-color: var(--ink-2); }
.cal-day-num { font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; text-align: left; margin-bottom: 2px; }
.cal-day-sessions { display: flex; flex-direction: column; gap: 2px; }
.cal-day-session-pill { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-radius: 5px; padding: 2px 4px; line-height: 1.25; text-align: left; }
.cal-day-session-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.cal-day-session-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cal-day-more { font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 1px 4px; }
.cal-day-panel { display: none; }
.cal-day-panel.selected { display: block; }
@media (max-width: 480px) {
    .cal-day-cell { min-height: 54px; padding: 4px 3px; }
}
.group-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1.5px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; font-family: var(--sans); }
.group-chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.group-chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* Roster Month tab: grid + day panel stack on narrow/tablet, sit side-by-side on wide desktop */
.roster-month-layout { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1180px) {
    .roster-month-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
    .roster-month-layout > .roster-day-panel-col { position: sticky; top: 16px; }
}
.br-page-wrap.roster-wide { max-width: 1240px; }
.roster-month-layout .cal-day-cell { min-height: 92px; }
.roster-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.roster-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.roster-dot { width: 7px; height: 7px; border-radius: 50%; }
.roster-dot.done { background: var(--brand); }
.roster-dot.need { background: oklch(0.62 0.13 70); }
.roster-dot.none { background: oklch(0.72 0.01 30); }
.roster-cell-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 2px; }
.roster-cell-head .cal-day-num { margin-bottom: 0; }
.roster-open-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.roster-cell-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-day-session-pill.done { background: var(--bg); color: var(--ink); }
.cal-day-session-pill.need { background: var(--warn-soft); color: var(--warn-ink); }
.cal-day-session-pill.none { background: var(--bg); color: var(--ink-3); }
.cal-day-session-pill.coral { background: oklch(0.94 0.05 30); color: var(--tag-coral-ink); }
.cal-day-session-pill.sage  { background: oklch(0.94 0.05 155); color: var(--tag-sage-ink); }
.cal-day-session-pill.sky   { background: oklch(0.94 0.04 235); color: var(--tag-sky-ink); }
.cal-day-session-pill.amber { background: oklch(0.94 0.06 75); color: var(--tag-amber-ink); }
.cal-day-session-pill.lilac { background: oklch(0.94 0.04 300); color: var(--tag-lilac-ink); }
.roster-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.roster-day-title { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.roster-day-list { display: flex; flex-direction: column; gap: 8px; }
.roster-session-card { display: block; padding: 14px 16px; text-decoration: none; color: inherit; }
.roster-assigned-box { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: var(--ok-soft); }
.roster-assigned-meta { color: var(--ok-ink); }
.roster-candidates { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.roster-candidate-row { display: flex; align-items: center; gap: 10px; }
.roster-registered { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.roster-registered-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.roster-day-empty { text-align: center; padding: 32px 24px; color: var(--ink-3); font-size: 13.5px; background: var(--surface); border-radius: var(--r-lg); border: 1px dashed var(--line); }
.roster-next-open { margin-top: 12px; width: 100%; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; text-align: left; }
.roster-next-open:hover:not(:disabled) { background: var(--surface-2); }
.roster-next-open:disabled { color: var(--ink-3); cursor: default; }
@media (max-width: 899px) {
    .roster-month-layout .cal-day-cell { min-height: 54px; padding: 4px 3px; }
}
