/* ── Shared layout for auth pages ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --forest: #1a4d2e;
  --forest-dark: #0e2e1a;
  --forest-light: #2a6b3e;
  --gold: #d4a843;
  --gold-light: #e8c06a;
  --cream: #faf7f0;
  --stone: #f0ebe0;
  --ink: #1c1c1c;
  --muted: #6b6b5e;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Nav (duplicated from layout for standalone pages) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: rgba(250,247,240,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26,77,46,0.08);
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: var(--forest); letter-spacing: -0.01em; text-decoration: none;
}
.nav-badge {
  display: inline-block; background: var(--gold); color: var(--forest-dark);
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.2em 0.65em; border-radius: 3px;
  margin-left: 0.5rem; vertical-align: middle;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--forest); }
.nav-links .nav-cta { background: var(--forest); color: white; padding: 0.45rem 1.1rem; border-radius: 6px; font-weight: 600; }
.nav-links .nav-cta:hover { background: var(--forest-light); color: white; }
@media (max-width: 600px) { .nav-links { display: none; } }

/* ── Footer (duplicated from layout) ── */
footer { background: var(--forest-dark); padding: 2.5rem; text-align: center; }
.footer-logo { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 0.5rem; }
footer p { font-size: 0.78rem; color: rgba(255,255,255,0.35); }

/* ── Auth page container ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 4rem;
}

/* ── Auth card ── */
.auth-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.06);
  border: 1px solid rgba(26,77,46,0.08);
}
.auth-card-wide { max-width: 580px; }

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.auth-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

/* ── Form elements ── */
.form-group {
  margin-bottom: 1.2rem;
  flex: 1;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--stone);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--forest);
  background: white;
}
.form-group textarea { resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Measurables fieldset ── */
.measurables-group {
  border: 1.5px solid var(--stone);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.measurables-group legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0.4rem;
}

/* ── Buttons ── */
.auth-btn {
  display: block;
  width: 100%;
  padding: 0.8rem;
  background: var(--forest);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
  text-align: center;
  text-decoration: none;
}
.auth-btn:hover { background: var(--forest-light); }

.auth-btn-outline {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.auth-btn-outline:hover { background: var(--forest); color: white; }

/* ── Links, errors, notes ── */
.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-link a { color: var(--forest); font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}
.auth-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}
.auth-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  padding: 0.6rem;
  background: var(--stone);
  border-radius: 6px;
}

/* ── Dashboard ── */
.dashboard-container {
  width: 100%;
  max-width: 780px;
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.dashboard-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.dashboard-empty {
  background: white;
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  border: 1px solid rgba(26,77,46,0.08);
}
.dashboard-empty h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.dashboard-empty p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.dashboard-empty .auth-btn {
  display: inline-block;
  width: auto;
  padding: 0.7rem 1.8rem;
}

/* ── Athlete card ── */
.athlete-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(26,77,46,0.08);
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.athlete-card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.athlete-card-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
}
.athlete-sport-tag {
  background: var(--forest);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
}
.athlete-details {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.athlete-detail { display: flex; flex-direction: column; }
.detail-label { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-value { font-size: 0.95rem; font-weight: 500; color: var(--ink); }

/* ── Measurables in dashboard ── */
.athlete-measurables {
  border-top: 1px solid var(--stone);
  padding-top: 1rem;
  margin-top: 0.5rem;
}
.athlete-measurables h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.measurables-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.measurable { display: flex; flex-direction: column; }
.measurable-label { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.measurable-value { font-size: 0.95rem; font-weight: 600; color: var(--ink); }

/* ── NCAA Tracker placeholder ── */
.tracker-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(26,77,46,0.08);
}
.tracker-section h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}
.tracker-placeholder {
  background: var(--stone);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.tracker-icon {
  color: var(--forest);
  margin-bottom: 0.8rem;
}

/* ── Grade Calendar ── */
.calendar-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.grade-section {
  border: 1px solid var(--stone);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.grade-section.collapsed .milestone-list { display: none; }
.grade-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--stone);
  cursor: pointer;
  user-select: none;
}
.grade-section-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.grade-chevron {
  width: 16px; height: 16px;
  transition: transform 0.2s;
}
.grade-section.collapsed .grade-chevron { transform: rotate(-90deg); }
.grade-section.expanded .grade-section-header { background: rgba(26,77,46,0.08); }
.milestone-list { list-style: none; padding: 0.5rem 0; }
.milestone-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--stone);
}
.milestone-item:last-child { border-bottom: none; }
.milestone-checkbox {
  width: 18px; height: 18px;
  accent-color: var(--forest);
  cursor: pointer;
  flex-shrink: 0;
}
.milestone-label {
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}
.milestone-item.completed .milestone-label {
  color: var(--muted);
  text-decoration: line-through;
}
@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.check-pop { animation: checkPop 0.2s ease-out; }

/* Profile completeness */
.completeness-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
}
.completeness-incomplete { background: #fef2f2; color: #991b1b; }
.completeness-mostly_complete { background: #fffbeb; color: #92400e; }
.completeness-ready { background: #f0fdf4; color: #166534; }

/* Age display */
.age-display {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--stone);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--stone);
  font-weight: 500;
}

/* Student-reported badge */
.student-reported-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  background: #fffbeb;
  color: #92400e;
  margin-left: 0.5rem;
  vertical-align: middle;
}
