/* Sphere parent portal PWA â€” design system.
 * Tokens from the approved UI reference: deep navy primary, white rounded
 * cards (~20px radius), small orange accents, light gray-blue background. */

:root {
  --navy: #16324f;
  --navy-deep: #0f2438;
  --navy-soft: #e9eef5;
  --orange: #f2994a;
  --orange-soft: #fdf1e2;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #1c2b3f;
  --muted: #8b95a7;
  --line: #e6ebf2;
  --radius: 20px;
  --danger: #d64545;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

[data-approval-complete]:disabled { opacity: .45; cursor: not-allowed; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: #dde4ed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Responsive site shell: full mobile width, comfortable desktop workspace. */
.portal-layout {
  width: 100%;
  max-width: 1280px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 0 18px 28px;
}

/* ---- Brand header ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 6px;
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.brand-mark img { width: 34px; height: 34px; }
.brand-name {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.15;
}
.brand-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 600;
}
.brand-avatar {
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Greeting ---- */
.greeting {
  padding: 16px 18px 4px;
}
.greeting h1 {
  margin: 0;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.greeting p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* ---- Section labels ---- */
.section-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-label a {
  color: var(--navy);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 600;
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(22, 50, 79, 0.06);
  border: 1px solid rgba(22, 50, 79, 0.05);
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* Navy hero card (next session spotlight) */
.hero-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  border-radius: 26px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  top: -50px;
  right: -40px;
}
.hero-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 9px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-title {
  margin: 0 0 4px;
  font-size: 27px;
  font-weight: 800;
}
.hero-time {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.hero-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin: 16px 0;
}
.hero-location {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-location .pin {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.hero-location .place { font-weight: 700; font-size: 16.5px; }
.hero-location .room { color: rgba(255, 255, 255, 0.7); font-size: 14px; }

/* Session list rows */
.session-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.date-block {
  background: var(--navy-soft);
  border-radius: 15px;
  width: 72px;
  height: 82px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
.date-block .dow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.date-block .day { font-size: 29px; font-weight: 800; line-height: 1.15; }
.date-block .mon { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.session-info { flex: 1; min-width: 0; }
.session-info .title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.session-info .meta { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.chev { color: var(--muted); font-size: 22px; flex: 0 0 auto; }

/* ---- Child selector / pickers ---- */
.picker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid rgba(22, 50, 79, 0.05);
  box-shadow: 0 1px 3px rgba(22, 50, 79, 0.06);
}
.picker .avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 700;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.picker .who .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.picker .who .name { font-size: 19px; font-weight: 700; }
.picker .caret { margin-left: auto; color: var(--muted); font-size: 16px; }

/* Admin family drop-in manager is a form, not the horizontal child picker. */
.fam-dropin-picker {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.fam-dropin-picker .check-row { width: 100%; }
.fam-dropin-picker .check-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.fam-dropin-picker .row-btns {
  flex-wrap: wrap;
}

/* ---- Bottom tab bar (parent shell) ---- */
.tabbar {
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 0 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 14px;
}
.tab svg { width: 26px; height: 26px; }
.tab.active { color: var(--navy); }
.tab.active .tab-icon {
  background: var(--navy-soft);
  border-radius: 12px;
  padding: 3px 12px;
}
.tab.active svg { stroke: var(--navy); }

/* ---- Admin top nav (8 pages + wizard) ---- */
.admin-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-overflow-scrolling: touch;
}
.admin-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bg);
  white-space: nowrap;
}
.admin-nav a.active {
  background: var(--navy);
  color: #fff;
}
.admin-nav a.wizard {
  background: var(--orange-soft);
  color: #b25c12;
  font-weight: 700;
}

/* Admin top bar with logout button â€” always visible, thumb-friendly on mobile */
.admin-topbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 18px 0;
}
.admin-logout-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 20px;
  font-size: 15px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 14px;
  text-decoration: none;
}
.btn-primary { background: var(--navy); color: #fff; width: 100%; }
.btn-primary:active { background: var(--navy-deep); }
.btn-orange { background: var(--orange); color: #fff; width: 100%; }
.btn-light {
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
  width: 100%;
}

/* ---- Forms ---- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.input, .select, .textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.otp-input {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
}

/* ---- Badges / tags ---- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge-navy { background: var(--navy-soft); color: var(--navy); }
.badge-orange { background: var(--orange-soft); color: #b25c12; }
.badge-gray { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge-red { background: #fbe9e9; color: var(--danger); }

/* ---- Utility ---- */
.placeholder-note {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  background: rgba(255, 255, 255, 0.6);
}
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 18px; }

/* ---- Login / forms (stage 2) ---- */
.alert-error {
  background: #fbe9e9;
  color: var(--danger);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14.5px;
  margin: 0 0 14px;
}
.dev-hint {
  background: var(--navy-soft);
  color: var(--navy);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13.5px;
  margin: 14px 0 0;
}
.text-btn {
  background: none;
  border: none;
  padding: 10px 0;
  color: var(--navy);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.text-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.profile-row:last-of-type { border-bottom: none; }
.profile-row .k { color: var(--muted); font-weight: 600; }

/* ---- Stage 3: schedule / children / registration ---- */

/* Child scope pills */
.pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pills-row::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Hero extras */
.hero-toprow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.hero-toprow .hero-pill { margin-bottom: 0; }
.coach-line-hero { color: rgba(255, 255, 255, 0.85); font-size: 15px; font-weight: 600; margin-top: 12px; }
.coach-line { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 6px; }

/* Child name tags on merged cards */
.kid-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.kid-tag { background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.session-info .kid-tags { margin: 8px 0 0; }
.session-info .kid-tag { background: var(--navy-soft); color: var(--navy); }

/* Empty state */
.empty-state { text-align: center; padding: 38px 24px; color: var(--muted); }
.empty-state p { margin: 6px 0; }
.empty-state strong { color: var(--ink); font-size: 17px; }

/* Registration-open banner */
.reg-banner {
  background: var(--orange-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 0 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reg-banner strong { font-size: 16.5px; color: var(--ink); }
.reg-banner p { margin: 4px 0 0; font-size: 14px; }

/* Step indicator */
.stepper { display: flex; align-items: flex-start; margin: 16px 0 20px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; min-width: 56px; }
.step-n {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy-soft); color: var(--muted);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step.active .step-n { background: var(--navy); color: #fff; }
.step.done .step-n { background: var(--orange); color: #fff; }
.step-t { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.step.active .step-t { color: var(--navy); }
.step-line { flex: 1; height: 2px; background: var(--line); margin-top: 14px; min-width: 12px; }

/* Class day picker (Tue/Fri/Both toggles) */
.seg-row { display: flex; gap: 8px; margin-bottom: 12px; }
.seg {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; font-family: var(--font); font-size: 14px; font-weight: 700;
  color: var(--muted); cursor: pointer;
}
.seg.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.class-opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 14px; margin-bottom: 10px; cursor: pointer; font-family: var(--font); color: var(--ink);
}
.class-opt:last-child { margin-bottom: 0; }
.class-opt.on { border-color: var(--navy); background: #f7fafd; }
.class-opt-check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line);
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; margin-top: 1px;
}
.class-opt.on .class-opt-check { background: var(--navy); border-color: var(--navy); }
.class-opt-day { font-weight: 800; font-size: 16px; display: block; }
.class-opt-body { flex: 1; min-width: 0; }
.class-detail { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* Policy cards */
.policy-scroll {
  max-height: 220px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; line-height: 1.6; color: var(--ink);
  background: #fbfcfe; margin: 10px 0 14px; white-space: pre-wrap;
  -webkit-overflow-scrolling: touch;
}
.policy-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.agree-btn { width: 100%; }
.login-panel, .schedule-next, .schedule-upcoming { min-width: 0; }
.schedule-layout section { min-width: 0; }
.policy-document { white-space: normal; line-height: 1.8; }
.policy-document p { margin: 0 0 16px; color: inherit; }
.policy-document h4 { font-size: 14px; line-height: 1.5; margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.policy-document h4:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.policy-document ul { margin: 0 0 18px; padding-left: 24px; }
.policy-document li { margin: 0 0 8px; padding-left: 4px; }
.policy-document .policy-important { font-weight: 700; }
.policy-confirmation { padding: 14px; border-left: 3px solid var(--navy, #183650); background: #eef3f8; border-radius: 8px; line-height: 1.7; font-size: 14px; }

/* Child cards */
.child-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.child-head h3 { margin: 0; }
.enrolled-line { margin: 8px 0 4px !important; font-size: 14px; color: var(--ink) !important; font-weight: 600; }
.health-note { margin: 8px 0 2px !important; font-size: 14.5px; }
.row-btns { display: flex; gap: 10px; }
.btn-sm { padding: 11px 18px; font-size: 15px; width: auto; flex: 1; }

/* Multi-row forms */
.kid-block { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; background: #fbfcfe; }
.kid-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kid-block-head strong { font-size: 15px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-kid { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.review-kid:last-child { border-bottom: none; }
.link-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

/* Flow navigation + success */
.flow-nav { display: flex; gap: 10px; margin-top: 18px; }
.flow-nav .btn { flex: 1; }
.flow-main { padding-top: 4px; }
.success-wrap { text-align: center; padding: 34px 10px; }
.success-check {
  width: 74px; height: 74px; border-radius: 50%;
  background: #e6f4ea; color: #1e8e3e; font-size: 38px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.success-wrap h1 { margin: 0 0 8px; font-size: 28px; }
.success-sum { text-align: left; margin: 18px 0; }
.warn-list { background: #fbe9e9; border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--danger); margin: 14px 0; text-align: left; }

/* ---- Admin backend (stage 4) ---- */

/* Danger button */
.btn-danger { background: var(--danger); color: #fff; width: 100%; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card { text-align: center; margin-bottom: 0; }
.stat-num { font-size: 34px; font-weight: 800; color: var(--navy); }
.stat-lab { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }

/* Per-day enrollment */
.perday-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.perday-row:last-child { border-bottom: none; }
.perday-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.perday-head strong { font-size: 16px; }
.perday-coaches { display: flex; flex-wrap: wrap; gap: 8px; }
.coach-count { background: var(--navy-soft); color: var(--navy); font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 14px; }
.coach-count summary { cursor: pointer; }
.coach-count[open] { flex-basis: 100%; }
.coach-child-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 0 3px; font-weight: 500; }
.coach-child-list span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; }
.price-edit-row { position: relative; border-top: 1px solid var(--line); padding: 32px 0 14px; }
.price-edit-row:first-child { border-top: 0; }
.price-main { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 10px; }
.price-main .input, .price-note { min-height: 46px; padding: 10px 12px; }
.price-note { margin-top: 9px; }
.price-remove { position: absolute; right: 0; top: 7px; color: var(--danger); font-size: 12.5px; }
@media (max-width: 520px) { .price-main { grid-template-columns: minmax(0, 1fr) 112px; } }

/* Todo list */
.todo-list { padding: 6px 18px; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.todo-row:last-child { border-bottom: none; }
.todo-icon { font-size: 18px; flex: 0 0 auto; }
.todo-text { flex: 1; font-size: 14.5px; line-height: 1.45; }
.todo-row .chev { font-size: 18px; }

/* Modal confirm */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 36, 56, 0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { background: #fff; border-radius: var(--radius); padding: 22px; max-width: 380px; width: 100%; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }
.modal-card h3 { margin: 0 0 10px; font-size: 19px; }
.modal-body p { margin: 0; font-size: 15px; line-height: 1.55; }

/* Checkbox rows (coach pickers, modal check) */
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 15px; cursor: pointer; }
.check-row input[type="checkbox"] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: 0 0 auto; }

/* Coach list */
.coach-list { padding: 8px 18px; }
.coach-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.coach-row:last-child { border-bottom: none; }
.coach-row.inactive .coach-main strong { color: var(--muted); }
.coach-main { flex: 1; min-width: 0; }
.coach-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.coach-actions .text-btn { padding: 6px 0; font-size: 14px; }
.coach-schedule { flex: 0 0 100%; width: 100%; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.coach-schedule h4 { margin: 14px 0 4px; }
.search-match { background: #fff8dd; border-color: #ead79a; }
.price-log-row { position: relative; padding: 14px 76px 14px 0; border-bottom: 1px solid var(--line); }
.price-log-row:last-child { border-bottom: 0; }
.price-log-actions { position: absolute; top: 9px; right: 0; display: flex; gap: 4px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--danger); }
.signed-record-link { margin-top: 4px; font-size: 12.5px; }
.signed-record-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.signed-policy-content { line-height: 1.8; }
.calendar-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-head h3 { margin: 0; font-size: 18px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-week span { text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; padding: 4px 0; }
.cal-day { min-height: 86px; border: 1px solid var(--line); border-radius: 8px; padding: 5px; background: #fff; overflow: hidden; }
.cal-day.outside { background: #f4f6f8; opacity: .55; }
.cal-num { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.cal-event { width: 100%; border: 0; border-radius: 6px; background: #e8f1f8; color: var(--navy); padding: 4px; margin: 2px 0; text-align: left; font: inherit; cursor: pointer; }
.cal-event strong, .cal-event small { display: block; font-size: 10px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.cal-pop { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #edf4f9; }
@media (max-width: 520px) { .calendar-card { padding: 10px; } .cal-week, .cal-grid { gap: 2px; } .cal-day { min-height: 68px; padding: 3px; } .cal-event strong, .cal-event small { font-size: 8px; } }
@media print {
  .brand, .admin-nav, .admin-topbar, .signed-record-actions { display: none !important; }
  body, .app-main { background: #fff !important; }
  .app-main { max-width: none !important; padding: 0 !important; }
  .signed-record-page .card { box-shadow: none; break-inside: avoid; }
}

/* Toggle switch (coach active) */
.switch { position: relative; width: 46px; height: 27px; border-radius: 999px; border: none; background: #ccd6e2; cursor: pointer; padding: 0; transition: background 0.2s; }
.switch.on { background: var(--navy); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.switch.on .knob { left: 22px; }

/* Session list */
.sess-list { display: flex; flex-direction: column; gap: 10px; }
.sess-row { background: var(--card); border-radius: 16px; border: 1px solid rgba(22, 50, 79, 0.05); box-shadow: 0 1px 3px rgba(22, 50, 79, 0.06); overflow: hidden; }
.is-cancelled { background: #edf0f3 !important; color: #687384; border-color: #d6dce3 !important; }
.enr-class-row.is-cancelled { border-radius: 14px; padding: 14px !important; }
.is-cancelled .kid-tag, .is-cancelled .badge { background: #dce1e7; color: #596575; }
.sess-toggle { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: none; padding: 12px 14px; font-family: var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.sess-toggle .session-info { text-align: left; }
.date-block.sm { width: 60px; height: 68px; }
.date-block.sm .day { font-size: 24px; }
.sess-detail { border-top: 1px solid var(--line); padding: 14px; }
.sess-row:not(.open) .sess-detail { display: none; }

/* Roster groups */
.roster-group { margin-bottom: 14px; }
.roster-group:last-of-type { margin-bottom: 4px; }
.roster-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.roster-head strong { font-size: 15.5px; }
.cap { font-size: 13px; font-weight: 700; color: var(--muted); }
.cap.over { color: var(--danger); }
.roster-kids { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-tag.dark { background: var(--navy-soft); color: var(--navy); }
.sess-edit { background: #fbfcfe; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }

/* Enrollment rows */
.enr-row { margin-bottom: 12px; }
.enr-dropin-only { background: #fff8ed; border: 1.5px solid #f3dfbd; }
.enr-controls { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.enr-coach { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.enr-coach .select { margin-top: 6px; font-size: 15px; padding: 11px 13px; }
.enr-controls .btn-sm { flex: 0 0 auto; }
.enr-controls .text-btn { flex: 0 0 auto; padding: 11px 0; font-size: 14px; }

/* Family cards */
.fam-card { padding: 0; overflow: hidden; }
.fam-toggle { display: block; width: 100%; background: none; border: none; padding: 16px 18px 0; font-family: var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.fam-toggle .picker .who { text-align: left; }
.fam-toggle .chev { margin-left: auto; color: var(--muted); font-size: 20px; align-self: center; }
.fam-rows { padding: 4px 18px 0; }
.fam-detail { border-top: 1px solid var(--line); margin-top: 10px; padding: 4px 18px 16px; }
.fam-child-toggle { width: 100%; border: 0; background: none; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fam-child-toggle > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.fam-child-toggle small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fam-child-detail { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.kid-dropin-only { background: #fff8ed; border-color: #f3dfbd; }
.fam-dropin-row .k { min-width: 105px; }

/* Policy coverage table */
.cov-table { padding: 6px 18px; }
.cov-head, .cov-toggle { display: grid; grid-template-columns: 1fr 64px 64px 24px; align-items: center; gap: 8px; }
.cov-head { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--line); }
.cov-head .cov-cell, .cov-row .cov-cell { text-align: center; }
.cov-row { border-bottom: 1px solid var(--line); }
.cov-row:last-child { border-bottom: none; }
.cov-toggle { width: 100%; background: none; border: none; padding: 13px 0; font-family: var(--font); color: var(--ink); cursor: pointer; font-size: 15px; }
.cov-name { text-align: left; font-weight: 700; }
.cov-toggle .chev { color: var(--muted); font-size: 18px; text-align: right; }
.sig-yes { color: #1e8e3e; font-weight: 800; font-size: 17px; }
.sig-no { color: var(--danger); font-weight: 800; font-size: 17px; }
.cov-kids { padding: 4px 0 14px; }
.cov-kid { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14.5px; }
.cov-kid span:first-child { flex: 1; font-weight: 600; }
.cov-sig { font-size: 13px; color: var(--muted); }

/* Overview navigation and compact reminders */
.perday-head, .overview-child-link, .coach-child-list a { color: var(--ink); text-decoration: none; }
.perday-head .chev, .overview-child-link .chev { margin-left: auto; color: var(--muted); }
.perday-head:hover, .overview-child-link:hover { color: var(--navy); }
.stat-card summary .stat-num, .stat-card summary .stat-lab { display: block; }
.todo-item { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: 0; }
.todo-item .todo-row { flex: 1 1 0; min-width: 0; border: 0; padding: 14px 0; }
.todo-item .todo-text { min-width: 0; overflow-wrap: anywhere; }
.reminder-dismiss { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font: 22px/1 var(--font); cursor: pointer; }
.reminder-dismiss:hover { background: var(--navy-soft); color: var(--navy); }
.reminder-dismiss:focus-visible, .overview-child-link:focus-visible, .perday-head:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
@media (max-width: 480px) { .todo-item { gap: 8px; } .todo-row { gap: 8px; } .todo-text { font-size: 14px; } }

.reminder-dismiss[data-dismissed="false"] { flex: 0 0 auto; width: auto; max-width: 74px; font-size: 12px; padding: 6px 8px; white-space: nowrap; }

/* Tablet and desktop: a website workspace, not a stretched phone screen. */
.login-tabs, .lang-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--navy-soft); }
.login-tab, .lang-btn { border: 0; border-radius: 10px; padding: 9px 12px; min-height: 40px; background: transparent; color: var(--navy); font: 600 13px var(--font); cursor: pointer; }
.login-tab.active, .lang-btn.active { background: white; box-shadow: 0 1px 4px rgba(22, 50, 79, .1); }
.login-tab:focus-visible, .lang-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.login-website-link { margin: 18px 0 0; text-align: center; }
.login-website-link a { display: inline-block; padding: 8px; color: var(--navy); font-size: 14px; text-underline-offset: 4px; }
@media (min-width: 768px) {
  .portal-layout { box-shadow: 0 0 48px rgba(22, 50, 79, .07); }
  .portal-layout > .brand { padding: 28px 36px 20px; }
  .portal-layout > .app-main { padding: 20px 36px 48px; }
  .portal-layout .greeting { padding-left: 0; padding-right: 0; }
  .greeting h1 { font-size: 36px; }
  .card { padding: 24px; }
  .parent-layout > .brand { order: 0; }
  .parent-layout > .tabbar { order: 1; }
  .parent-layout > .app-main { order: 2; }
  .parent-layout .tabbar {
    top: 0; bottom: auto; padding: 10px 36px; gap: 12px;
    border-top: 0; border-bottom: 1px solid var(--line);
  }
  .parent-layout .tab {
    flex: 0 1 190px; flex-direction: row; gap: 10px;
    justify-content: center; font-size: 15px; padding: 10px 18px;
  }
  .parent-layout .tab.active { background: var(--navy-soft); }
  .parent-layout .tab.active .tab-icon { padding: 0; background: transparent; }
  .parent-layout .tab-icon { display: flex; }
  .parent-layout .tab svg { width: 22px; height: 22px; }
  .parent-layout a.btn[href="#/register"] { width: auto; }
  .schedule-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
  .schedule-layout .section-label { margin-top: 12px; }
  .hero-card { padding: 28px; }
  .hero-location { flex-wrap: wrap; }
  .session-grid .session-row { margin-bottom: 16px; }
  .admin-nav { padding: 12px 36px; }
  .admin-topbar { padding: 14px 36px 0; }
  .admin-logout-btn { width: auto; }
  .registration-layout { max-width: 1100px; }
  .form-2col { gap: 20px; }
  .policy-document { padding: 22px 26px; font-size: 15px; }
  .policy-document > p, .policy-document > h4, .policy-document > ul { max-width: 90ch; margin-left: auto; margin-right: auto; }
  .login-layout { max-width: 1200px; }
  .login-layout .login-main {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: center; align-items: center; gap: 64px;
    padding: 48px 60px 100px !important;
  }
  .login-main > .greeting h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.15; }
  .login-main > .greeting p { font-size: 18px; line-height: 1.65; max-width: 32ch; }
  .login-panel .card { padding: 30px; }
}
@media (min-width: 1100px) {
  .admin-nav { flex-wrap: wrap; overflow-x: visible; }
  .admin-nav a { padding: 9px 12px; }
  .portal-layout { margin: 24px auto; min-height: calc(100dvh - 48px); border-radius: 24px; }
  .portal-layout > .brand { border-radius: 24px 24px 0 0; }
}
@media (max-width: 767px) {
  .parent-layout .tabbar { margin-top: auto; }
  .portal-layout .profile-row { flex-wrap: wrap; overflow-wrap: anywhere; }
  .portal-layout .policy-head { align-items: flex-start; }
}

/* Compact pricing tools: never stretch a button against the title. */
.pricing-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pricing-heading h3 { margin: 0; }
.pricing-heading .btn, .pricing-card .pricing-poster-link { width: auto; flex: 0 0 auto; min-width: 0; }
.pricing-heading .btn { padding-inline: 18px; }
.pricing-card .pricing-hint { font-size: 13px; line-height: 1.5; margin: 10px 0; }
.pricing-help { margin: 12px 0 16px; font-size: 13px; line-height: 1.6; }
.pricing-help summary { color: var(--navy); cursor: pointer; width: fit-content; }
.pricing-help ul { margin: 10px 0; padding-left: 20px; max-width: 680px; }
.pricing-help li + li { margin-top: 8px; }
.pricing-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-top: 8px; }
.pricing-fields label { min-width: 0; }
.pricing-fields .input, .pricing-fields .select { min-width: 0; width: 100%; }


.approval-feedback:empty { margin: 0; }
.approval-requests { list-style: none; margin: 16px 0; padding: 0; border-top: 1px solid var(--line); }
.approval-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(135px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 12px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.approval-request-name, .approval-request-coach { display: grid; gap: 4px; min-width: 0; }
.approval-request-name span, .approval-request-coach span { font-size: 13px; }
.approval-request-coach .select { width: 100%; min-width: 0; }
.approval-request-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.approval-request-actions .btn { width: auto; min-width: 0; text-align: center; }
@media (max-width: 640px) {
  .approval-request { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .approval-request-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.approval-request-program { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.approval-request-program .icon-btn { width: 32px; height: 32px; }
.approval-request-program .icon-btn span { font-size: 18px; }

.payment-reminder-dialog {
  max-width: 560px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.payment-reminder-dialog #reminder-preview p + p { margin-top: 12px; }

.approval-request { grid-template-columns: minmax(0, 1fr) minmax(130px, 180px); }
.approval-family-payment {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.approval-family-payment > div:first-child { display: grid; gap: 4px; }

.approval-summary-status {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-inline-start: 10px;
  color: var(--muted);
  font-size: 13px;
}

.approval-payment-only {
  padding: 2px 8px;
  border: 1px solid #dca94c;
  border-radius: 999px;
  background: #fff2d6;
  color: #744800;
  font-weight: 700;
}

.card.approval-family-awaiting-payment {
  background: #fff9e9;
  border-color: #dca94c;
}
