/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0B1F3A;
  --blue:   #0077B6;
  --cyan:   #00B4D8;
  --green:  #00C896;
  --amber:  #FFC000;
  --red:    #E05252;
  --white:  #FFFFFF;
  --gray:   #8090A0;
  --dkgray: #1E3A5F;
  --card:   #162D4A;
}

html, body {
  height: 100%;
  background: var(--navy);
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS ──────────────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: 80px;
}
.screen.active { display: block; }

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}
/* Widened 26 Aug 2026 -- the 480px cap above applied on every screen
   size with no breakpoint, so the whole app rendered as a fixed
   mobile-width column even on a full desktop browser. Kept as the
   mobile default; opens up on tablet/desktop instead of staying
   pinned to phone width. Mirrors coach_app's pre-existing
   .reg-form-container breakpoint (see that file), extended here to
   every screen, not just the registration form. */
@media (min-width: 700px) {
  .container { max-width: 760px; padding: 24px; }
}

/* ── REGISTRATION PROGRESS INDICATOR (added 25 Aug 2026) ──────
   Shared across every screen in index.html/app.js's swimmer-
   registration flow -- see updateProgressIndicator() in js/app.js,
   which fills this in and shows/hides it based on which .screen is
   currently active, and which of the two step lists (SELF vs
   GUARDIAN_FOR_CHILD) applies. Mirrors coach_app/public/css/style.css's
   identical block -- kept visually consistent between the two apps,
   even though each app has its own separate stylesheet. */
.reg-progress {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 14px 16px;
  background: var(--dkgray);
  border-bottom: 2px solid var(--cyan);
}
.reg-progress-step { display: flex; align-items: center; gap: 6px; }
.reg-progress-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  background: var(--navy);
  border: 2px solid var(--gray);
  color: var(--gray);
}
.reg-progress-step-label { font-size: 12px; color: var(--gray); white-space: nowrap; }
.reg-progress-step-active .reg-progress-step-num { border-color: var(--cyan); color: var(--cyan); }
.reg-progress-step-active .reg-progress-step-label { color: var(--cyan); font-weight: 600; }
.reg-progress-step-done .reg-progress-step-num { border-color: var(--green); background: var(--green); color: var(--navy); }
.reg-progress-step-done .reg-progress-step-label { color: var(--green); }
.reg-progress-step-arrow { color: var(--gray); font-size: 14px; margin: 0 2px; }
@media (max-width: 480px) {
  /* Numbers + checkmarks alone still convey progress on small screens. */
  .reg-progress-step-label { display: none; }
}

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--dkgray);
  border-bottom: 1px solid var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: bold;
  color: var(--cyan);
  text-decoration: none; /* .nav-brand became a link to pixactly.ai, 27 Aug 2026,
                             when it swapped from "Pool Champ" text to the
                             Pixactly logo/link to match .pixactly-header's
                             left-aligned placement (see index.html) */
}
/* Bumped to match brand.css's canonical .nav-logo (26 Aug 2026) --
   was 24px/opacity 0.8, smaller and dimmer than pixactly.ai's own
   navbar and than the .pixactly-header/.brand-byline treatment used
   on the login screen. Same .navbar padding as .pixactly-header, so
   this fits without any layout changes. */
.nav-logo { height: 40px; width: auto; }
.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-pixactly-link {
  color: var(--cyan);
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  opacity: 0.85;
}
.nav-pixactly-link:hover { opacity: 1; }

/* Pixactly top header (added 26 Aug 2026) -- shown whenever #navbar
   above is hidden (login, pending-approval); .navbar-right/.nav-
   pixactly-link above carry the same link once the real navbar is
   visible, so the two are never shown at once (toggled inversely in
   js/app.js's showScreen()). Same padding/background/border as
   .navbar so switching between the two reads as one continuous header,
   not two different bars. Content styled like the now-removed centered
   .brand-byline (full opacity, bold cyan, 40px logo -- see
   POOL_CHAMP_ACTION_ITEMS.md item 72/74), just left-aligned instead of
   centered. */
.pixactly-header {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  background: var(--dkgray);
  border-bottom: 1px solid var(--blue);
}
.pixactly-header a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--cyan);
  text-decoration: none;
}
.pixactly-header img {
  height: 40px;
  width: auto;
}

/* ── BOTTOM NAV ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--dkgray);
  border-top: 1px solid var(--blue);
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 11px;
  cursor: pointer;
  gap: 4px;
}
.nav-item.active { color: var(--cyan); }
.nav-icon { font-size: 20px; }
/* Added 25 Aug 2026 -- dimmed look for the "Book" nav tab (and the
   dashboard's own "+ Book session" link, via .btn-text-disabled below)
   while a swimmer's identity_verified isn't true yet. See
   updateBookingAccessUI() in app.js -- this is a visual cue only, the
   actual gate is the click-time check in the same function (and the
   firestore.rules bookings.create rule server-side). */
.nav-item-disabled { opacity: 0.4; }
.btn-text-disabled { opacity: 0.4; }

/* ── BOOKING CALENDAR (added 25 Aug 2026) ─────────────────────
   screen-booking's date picker -- see renderBookingCalendar() in
   app.js. */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 6px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-day, .calendar-day-empty {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
}
.calendar-day {
  background: var(--dkgray);
  border: 1px solid var(--blue);
  color: var(--white);
  cursor: pointer;
}
.calendar-day:hover:not(:disabled) { border-color: var(--cyan); }
.calendar-day-today { border-color: var(--cyan); font-weight: bold; }
.calendar-day-disabled, .calendar-day:disabled {
  background: none;
  border-color: var(--dkgray);
  color: var(--gray);
  cursor: not-allowed;
  opacity: 0.5;
}

/* Added 25 Aug 2026 -- booking-details' time picker, swapped from a
   plain <select> to a tappable grid once "Stroke type" was dropped and
   time became the only field left. Same visual language as
   .calendar-day above (dkgray/blue outline, cyan on hover) so the two
   booking screens feel consistent.
   UPDATED 25 Aug 2026 -- widened from 4 fixed slots to 30-min slots
   from 10:00 AM to 3:30 PM (12 slots); moved from 2 to 3 columns so
   that many buttons still lays out as a compact block instead of one
   tall column. */
.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.time-slot {
  padding: 12px 4px;
  background: var(--dkgray);
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.time-slot:hover { border-color: var(--cyan); }
.time-slot-selected {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--navy);
}

/* ── LOGIN ────────────────────────────────────────────────── */
.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}
@media (min-width: 700px) {
  .login-container { max-width: 480px; padding: 72px 20px; }
}
.login-container h1 {
  font-size: 28px;
  color: var(--cyan);
  letter-spacing: 2px;
}
.tagline {
  color: var(--gray);
  font-style: italic;
  margin-top: 4px;
}
/* ── PIXACTLY BYLINE (corrected 26 Aug 2026) ─────────────────────
   Previously de-emphasized (opacity 0.55, 16px logo, plain <p>, no
   link) on the theory that pixactly.ai itself keeps its logo small
   and confined outside its header nav -- action item 72
   (POOL_CHAMP_ACTION_ITEMS.md) flagged this as a mismatch against the
   real site and, per the user's direct instruction plus the actual
   shared brand.css Pixactly supplied, this is now corrected: that
   file's .nav-brand/.nav-logo rules (the real, current, shared-across
   -TTChamp-and-PoolChamp treatment) use FULL opacity, bold cyan text,
   and a 40px logo -- there is no "de-emphasized byline" pattern
   anywhere in Pixactly's actual design system. Values below now match
   .nav-brand/.nav-logo from that shared file directly. Markup changed
   from a plain <p> to a real link to https://pixactly.ai (see
   index.html/interest.html), matching the real site's clickable
   logo. */
.brand-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--cyan);
  text-decoration: none;
}
.brand-byline img {
  height: 40px;
  width: auto;
}
.divider {
  text-align: center;
  color: var(--gray);
  margin: 16px 0;
  font-size: 13px;
}

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--blue);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

/* ── FORMS ────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  background: var(--dkgray);
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--white);
  font-size: 15px;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--cyan);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--cyan);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: var(--blue); color: var(--white); }
/* Added 28 Aug 2026 -- .btn-primary previously had no :disabled style at
   all, so a genuinely disabled button (e.g. "Get OTP" after that
   channel verifies, or "Continue" before both channels verify on
   screen-contact-account) rendered pixel-identical to an enabled one --
   functionally correct (unclickable) but looked broken/confusing.
   Mirrors the existing .calendar-day:disabled treatment elsewhere in
   this file (dim + not-allowed cursor). */
.btn-primary:disabled {
  background: var(--dkgray);
  color: var(--gray);
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-full { width: 100%; }
.btn-google {
  background: var(--white);
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google span { font-weight: bold; font-size: 18px; color: #4285F4; }
.btn-back {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: block;
}
.btn-text {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}

/* ── WELCOME BANNER ───────────────────────────────────────── */
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 16px;
}
.welcome-sub { color: var(--gray); font-size: 13px; }
.welcome-banner h2 { font-size: 22px; color: var(--white); margin-top: 4px; }
.skill-badge {
  background: var(--blue);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

/* ── STATS ROW ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}
.stat-value {
  font-size: 22px;
  font-weight: bold;
  color: var(--cyan);
}
.stat-label { font-size: 11px; color: var(--gray); margin-top: 4px; }

/* ── SECTION HEADER ───────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-header h3 { font-size: 16px; color: var(--white); }

/* ── SESSION CARDS ────────────────────────────────────────── */
.session-card {
  background: var(--card);
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.session-card:hover { border-color: var(--cyan); }
.session-card-left h4 { font-size: 15px; margin-bottom: 4px; }
.session-card-left p { font-size: 12px; color: var(--gray); }
.session-card-right { text-align: right; }
.quality-badge {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 10px;
}
.quality-HIGH { background: #003820; color: var(--green); }
.quality-MEDIUM { background: #3D2E00; color: var(--amber); }
.quality-LOW { background: #3D0000; color: var(--red); }

/* ── METRICS GRID ─────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.metric-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--cyan);
}
.metric-good { color: var(--green); }
.metric-warn { color: var(--amber); }
.metric-label { font-size: 11px; color: var(--gray); margin-top: 4px; }
.metric-unit { font-size: 11px; color: var(--gray); }

/* ── LAP CARDS ────────────────────────────────────────────── */
.lap-card {
  background: var(--card);
  border: 1px solid var(--dkgray);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lap-num { font-weight: bold; color: var(--cyan); font-size: 14px; }
.lap-stats { font-size: 12px; color: var(--gray); }
.lap-note { font-size: 12px; color: var(--white); margin-top: 6px; }

/* ── COACH NOTES ──────────────────────────────────────────── */
.coach-note-card {
  background: var(--card);
  border-left: 3px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.coach-note-card p { font-size: 14px; line-height: 1.5; }
.coach-note-card .note-meta {
  font-size: 11px;
  color: var(--gray);
  margin-top: 6px;
}

/* ── UTILITY ──────────────────────────────────────────────── */
.meta-text { color: var(--gray); font-size: 13px; margin-bottom: 8px; }
.loading { color: var(--gray); text-align: center; padding: 32px; }
.empty-state { color: var(--gray); text-align: center; padding: 32px; font-size: 14px; }
.error-msg { color: var(--red); font-size: 13px; margin-bottom: 12px; padding: 8px; background: #3D0000; border-radius: 6px; }
.success-msg { color: var(--green); font-size: 13px; margin-bottom: 12px; padding: 8px; background: #003820; border-radius: 6px; }