/* Last synced against Pixactly's shared brand.css: 26 Aug 2026.
   .nav-brand/.nav-logo/.btn-primary/.brand-byline below match that
   file's shared-base section (colors, weights, logo treatment)
   exactly; page-layout values (.container width, .navbar/.card
   padding, grid gaps) are deliberately NOT forced to match -- see
   swimmer_app/public/css/style.css's matching note and
   POOL_CHAMP_ACTION_ITEMS.md item 73. .btn-text was found missing
   entirely during this sync -- register.html's "Resend email"/"Resend
   code" buttons (and index.html's new "Apply to coach" button, item
   71) were rendering as unstyled default browser buttons as a result;
   now added, matching swimmer_app's. */

/* ── 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 {
  min-height: 100%;
  background: var(--navy);
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 16px;
}

.screen { display: none; min-height: 100vh; padding-bottom: 40px; }
.screen.active { display: block; }
.container { max-width: 720px; margin: 0 auto; padding: 20px; }
/* Widened 26 Aug 2026 -- 720px was already better than swimmer_app's
   480px but still capped with no breakpoint. Opens up further on
   tablet/desktop instead of staying fixed. */
@media (min-width: 700px) {
  .container { max-width: 960px; padding: 28px; }
}

/* ── REGISTRATION PROGRESS INDICATOR (added 18 Aug 2026) ─────
   Shared across every screen in register.html/register.js's
   coach-registration flow -- see updateProgressIndicator() in
   js/register.js, which fills this in and shows/hides it based on
   which .screen is currently active. */
.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 Coach" 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; }
.coach-tag {
  background: var(--cyan);
  color: var(--navy);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.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; always shown on
   register.html, which has no navbar at all). .navbar-right/.nav-
   pixactly-link above carry the same link once the real navbar is
   visible, so the two are never shown at once on index.html (toggled
   inversely in js/coach.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;
}

/* ── 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; margin-bottom: 8px; }
/* ── PIXACTLY BYLINE (corrected 26 Aug 2026) ─────────────────────
   Same correction as swimmer_app/public/css/style.css's matching
   block, kept visually consistent between the two apps -- see that
   file's comment for the full rationale (action item 72, plus the
   actual shared brand.css Pixactly supplied). Values now match that
   file's .nav-brand/.nav-logo directly: full opacity, bold cyan text,
   40px logo, no de-emphasis. */
.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 was missing entirely until this sync (26 Aug 2026) -- same
   pattern as .btn-text (item 73): register.html's screen-login "New
   here?" divider (added for item 71) was rendering as an unstyled
   default <div> (full-size white text) instead of swimmer_app's small
   centered gray label. Matches swimmer_app/public/css/style.css's
   block. */
.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;
}
.card h3 { color: var(--cyan); margin-bottom: 12px; font-size: 15px; }

/* ── RESPONSIVE REGISTRATION LAYOUT (added 18 Aug 2026) ───────
   Test slice, scoped to screen-form in register.html for now (see
   that file's comments). .login-container elsewhere (the plain
   sign-in cards, etc.) is untouched -- stays at its original fixed
   480px so this doesn't ripple out beyond what was asked for. */
.reg-form-container { max-width: 480px; }
@media (min-width: 700px) {
  .reg-form-container { max-width: 900px; }
}
.form-row { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 700px) {
  .form-row { flex-direction: row; gap: 16px; }
  .form-row .form-group { flex: 1; }
}

/* ── 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 {
  width: 100%;
  padding: 12px;
  background: var(--dkgray);
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--white);
  font-size: 15px;
}
textarea {
  width: 100%;
  padding: 12px;
  background: var(--dkgray);
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--white);
  font-size: 14px;
  resize: vertical;
  font-family: Arial, sans-serif;
}
textarea:focus, .form-group input:focus {
  outline: none;
  border-color: var(--cyan);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--cyan);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 14px 20px; /* was 12px 20px -- drifted from swimmer_app's 14px and
                          shared_brand/brand.css's canonical 14px. admin_app
                          had this identical drift, fixed 27 Aug 2026;
                          coach_app was the copy missed that day. Fixed
                          29 Aug 2026. */
  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 (same gap fixed the same day in swimmer_app/public/css/style.css),
   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. */
.btn-primary:disabled {
  background: var(--dkgray);
  color: var(--gray);
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-full { width: 100%; }
.btn-back {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  display: block;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}
/* .btn-text was missing entirely until this sync (26 Aug 2026) --
   register.html's "Resend email"/"Resend code" buttons and index.html's
   "Apply to coach" button (item 71) were rendering unstyled as a result.
   Matches swimmer_app/public/css/style.css's block. */
.btn-text {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.btn-small {
  background: var(--dkgray);
  border: 1px solid var(--blue);
  color: var(--cyan);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.btn-small:hover { border-color: var(--cyan); }

/* ── WELCOME ──────────────────────────────────────────────── */
.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; }
.stat-pill {
  background: var(--amber);
  color: var(--navy);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

/* ── 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 REVIEW CARDS ─────────────────────────────────── */
.review-card {
  background: var(--card);
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.review-card:hover { border-color: var(--cyan); }
.review-card h4 { font-size: 15px; margin-bottom: 4px; }
.review-card p { font-size: 13px; color: var(--gray); }
.review-badge {
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.badge-pending { background: #3D2E00; color: var(--amber); }
.badge-reviewed { background: #003820; color: var(--green); }

/* ── SWIMMER HEADER ───────────────────────────────────────── */
.swimmer-header {
  background: var(--card);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.swimmer-header h2 { font-size: 20px; color: var(--cyan); }
.swimmer-header p { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ── METRICS GRID ─────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 20px;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.metric-value { font-size: 22px; 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; }

/* ── LAP REVIEW CARDS ─────────────────────────────────────── */
.lap-review-card {
  background: var(--card);
  border: 1px solid var(--dkgray);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.lap-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.lap-num { font-weight: bold; color: var(--cyan); font-size: 14px; }
.lap-stats { font-size: 12px; color: var(--gray); }
.lap-note-existing {
  background: var(--dkgray);
  border-left: 3px solid var(--cyan);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  margin-bottom: 8px;
}
.lap-note-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--navy);
  border: 1px solid var(--blue);
  border-radius: 6px;
  color: var(--white);
  font-size: 13px;
  resize: none;
  font-family: Arial, sans-serif;
  margin-top: 6px;
}
.lap-note-input:focus { outline: none; border-color: var(--cyan); }

/* ── HISTORY TABLE ────────────────────────────────────────── */
.history-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--dkgray);
  font-size: 13px;
}
.history-row:last-child { border-bottom: none; }
.history-date { color: var(--gray); }
.history-metric { color: var(--cyan); font-weight: bold; }

/* ── 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;
  padding: 8px;
  background: #003820;
  border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   POSE CORRECTION UI — append to coach_app/public/css/style.css
   Added 18 Jul 2026. Uses the same --navy/--cyan/etc variables
   already defined in the existing stylesheet.
   ═══════════════════════════════════════════════════════════════ */
 
.pose-correction-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--gray);
}
 
.pose-canvas-wrapper {
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
 
#pose-canvas {
  max-width: 100%;
  height: auto;
  cursor: grab;
  touch-action: none; /* prevents scroll/zoom gestures interfering with drag */
}
 
.pose-correction-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray);
}
 
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
 
.legend-dot-normal {
  background: var(--green);
}
 
.legend-dot-corrected {
  background: var(--amber);
}
 
.pose-correction-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
 
/* Pose review button on each lap card */
.pose-review-btn {
  display: block;
  margin-top: 10px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
   COACH REGISTRATION + ADMIN APPROVAL — append to
   coach_app/public/css/style.css
   Added 11 Aug 2026. Uses the same --navy/--cyan/etc variables
   already defined at the top of this stylesheet.
   ═══════════════════════════════════════════════════════════════ */

/* Select dropdowns didn't have a rule before — matches .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 select:focus { outline: none; border-color: var(--cyan); }

/* Checkbox groups (stroke selection, consent) */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--white);
  cursor: pointer;
}
.checkbox-item input[type="checkbox"] {
  width: auto;
  accent-color: var(--cyan);
}

/* Extra status badges — badge-pending/badge-reviewed already exist above */
.badge-approved { background: #003820; color: var(--green); }
.badge-rejected { background: #3D0000; color: var(--red); }

/* Admin filter tabs */
.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab-btn {
  background: var(--dkgray);
  border: 1px solid var(--blue);
  color: var(--gray);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
  font-weight: bold;
}

/* Admin coach-application cards */
.reg-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.reg-card-details p {
  font-size: 13px;
  color: var(--white);
  margin-bottom: 6px;
}
.reg-card-details p strong {
  color: var(--gray);
  font-weight: normal;
  margin-right: 4px;
}
.reg-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   VIDEO MARKING — append to coach_app/public/css/style.css
   Added 11 Aug 2026. A coach draws freehand feedback directly over
   the video (not baked into it — see index.html's comment on
   #screen-video-marking for why). Uses the same --navy/--cyan/etc
   variables already defined at the top of this stylesheet.
   ═══════════════════════════════════════════════════════════════ */

.marking-video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  /* Fixes the wrapper to the video's aspect ratio so the canvas
     overlay (position: absolute, 100% width/height) always lines up
     with the video underneath it, at any screen width. */
  aspect-ratio: 16 / 9;
}
#marking-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* contain (not cover/fill) so a video whose real aspect ratio isn't
     exactly 16:9 letterboxes instead of stretching/distorting. The
     one real video tested against (1920x1080 after
     normalize_video_with_ffmpeg's scale step) IS exactly 16:9, so in
     practice this box and the canvas on top of it line up pixel-for-
     pixel with no letterbox bars. */
  object-fit: contain;
}
#marking-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  /* Off by default — video controls (play/pause/scrub) need clicks
     to reach the video underneath. Turned on only while "Start
     Drawing" mode is active (coach.js toggles a .drawing-active class
     on the wrapper). */
  pointer-events: none;
  touch-action: none;
}
.marking-video-wrapper.drawing-active #marking-canvas {
  pointer-events: auto;
  cursor: crosshair;
}

.marking-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.marking-color-row {
  display: flex;
  gap: 8px;
}
.marking-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.marking-color-swatch.active {
  border-color: var(--white);
}
.marking-toolbar-actions {
  display: flex;
  gap: 8px;
}

.marking-item {
  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;
  gap: 10px;
}
.marking-item-info { flex: 1; }
.marking-item-time {
  color: var(--cyan);
  font-weight: bold;
  font-size: 13px;
}
.marking-item-note {
  font-size: 13px;
  color: var(--white);
  margin-top: 2px;
}
.marking-item-meta {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px;
}
.marking-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}