:root {
  --background: #f8faf9;
  --foreground: #0f1a14;
  --muted: #5f6e65;
  --surface: #ffffff;
  --border: rgba(15, 26, 20, 0.08);
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #14b8a6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.load-in {
  opacity: 1;
  transform: none;
}

.reveal {
  opacity: 1;
  transform: none;
}

.anim-ready .load-in {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-up 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.anim-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
}

.anim-ready .reveal.is-visible {
  animation: fade-up 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.small {
  max-width: 840px;
}

.container.narrow {
  max-width: 1120px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--emerald), var(--emerald-dark));
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link:hover {
  background: #f1f5f3;
  color: var(--foreground);
}

.nav-link.active {
  background: #ecfdf5;
  color: #047857;
}

.nav-link-plain {
  background: transparent;
  color: #5e6e66;
  font-weight: 600;
}

.nav-separator {
  width: 1px;
  height: 38px;
  background: #d9dfdc;
  margin: 0 6px;
}

.nav-signup-btn {
  text-decoration: none;
  border-radius: 18px;
  background: linear-gradient(145deg, #10b981, #09b07b);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  box-shadow: 0 7px 16px rgba(16, 185, 129, 0.25);
}

.account-menu {
  position: relative;
}

.account-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #16231d;
}

.account-avatar {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.account-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.account-caret {
  font-size: 0.85rem;
  color: #64746c;
  transform: translateY(-2px);
}

.account-trigger.open .account-caret {
  transform: rotate(180deg) translateY(2px);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid #dce3df;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(15, 26, 20, 0.12);
  overflow: hidden;
  z-index: 100;
}

.account-dropdown-head {
  padding: 16px 18px 14px;
}

.account-dropdown-head h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.account-dropdown-head p {
  margin: 8px 0 0;
  color: #5f6f67;
  font-size: 0.9rem;
}

.account-row {
  width: 100%;
  border: 0;
  border-top: 1px solid #e3e9e6;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  text-decoration: none;
  color: #5f6f67;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.account-logout-form {
  margin: 0;
}

.account-row-danger {
  color: #e11717;
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(30rem 30rem at 90% 20%, rgba(16, 185, 129, 0.15), transparent 65%),
    radial-gradient(25rem 25rem at 5% 90%, rgba(20, 184, 166, 0.12), transparent 60%),
    linear-gradient(145deg, #ecfdf5 0%, #ffffff 55%, rgba(204, 251, 241, 0.3) 100%);
  animation: float-drift 9s ease-in-out infinite;
}

.hero-content {
  position: relative;
  padding: 88px 20px 98px;
}

.hero-center {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: 0.8rem;
  font-weight: 600;
}

.hero-center h1 {
  margin: 20px 0 20px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-center h1 span {
  display: block;
  background: linear-gradient(90deg, #059669, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-center p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--emerald), var(--emerald-dark));
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.25);
}

.btn-outline {
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
}

.btn-ghost {
  color: var(--foreground);
  background: #fff;
  border: 1px solid var(--border);
}

.sport-badges {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sport-badge {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 26, 20, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.sport-icon {
  width: 18px;
  height: 18px;
  color: #059669;
  display: inline-flex;
}

.sport-icon svg {
  width: 100%;
  height: 100%;
}

.sport-icon svg circle,
.sport-icon svg path {
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section {
  padding: 92px 0;
}

.section.white {
  background: #fff;
}

.section-head {
  text-align: center;
  margin-bottom: 52px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0 auto;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: transform 220ms ease, border-color 220ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.26);
}

.feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8faf2;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.feature-card h3,
.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-num {
  display: block;
  color: #d1fae5;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
}

.step-card {
  transition: transform 260ms ease;
}

.step-card:hover {
  transform: translateY(-3px);
}

.center-action {
  text-align: center;
  margin-top: 52px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 38px;
  max-width: 820px;
  margin: 0 auto;
}

.check-grid div {
  padding: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
  color: #10b981;
  display: inline-flex;
}

.check-icon svg {
  width: 100%;
  height: 100%;
}

.check-icon svg circle,
.check-icon svg path {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fbfcfb;
}

.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 10px;
  padding-bottom: 10px;
}

.page-calculate {
  padding: 40px 0 56px;
}

.section-calculate h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.calc-intro {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.96rem;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 26, 20, 0.06);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.wide,
.actions {
  grid-column: span 2;
}

.label {
  font-size: 0.85rem;
  font-weight: 600;
}

.input,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.input:focus,
.select:focus {
  outline: 2px solid rgba(16, 185, 129, 0.24);
  border-color: rgba(16, 185, 129, 0.6);
}

.actions {
  display: flex;
  gap: 10px;
}

.result-wrap {
  margin-top: 16px;
  min-height: 140px;
}

.result-placeholder {
  margin: 0;
  color: var(--muted);
  padding: 20px;
}

.card {
  border-top: 1px solid var(--border);
  padding: 18px 20px 20px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.phase-block {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfdfc;
}

.phase-block h3 {
  margin: 0 0 4px;
}

.phase-block h4 {
  margin: 10px 0 6px;
  font-size: 0.95rem;
}

.metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #f9fcfa;
}

.metric small {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.metric strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 1.13rem;
  color: #047857;
}

.muted {
  color: var(--muted);
}

.recovery {
  margin: 0 0 12px;
}

.warning {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 0.84rem;
}

.rationale {
  margin: 0;
  padding-left: 18px;
}

.copy-wrap {
  margin-top: 12px;
}

.plan-text {
  margin-top: 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
}

.errors {
  margin: 0;
  padding-left: 18px;
  color: #b42318;
}

@media (max-width: 900px) {
  .feature-grid,
  .steps-grid,
  .check-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 14px;
  }

  .hero-content {
    padding: 56px 14px 70px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .main-nav {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.wide,
  .actions {
    grid-column: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .load-in,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Figma-style calculate + result UI */
.figma-calc-page {
  background: linear-gradient(180deg, #f8faf9 0%, #f6f8f7 100%);
}

.figma-calc-head {
  margin-bottom: 18px;
}

.figma-calc-head h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.figma-calc-shell {
  border-radius: 16px;
  padding: 24px;
}

.figma-form {
  display: grid;
  gap: 16px;
}

.figma-group {
  display: grid;
  gap: 10px;
}

.group-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--foreground);
}

.group-hint {
  margin: -4px 0 0;
  color: #74847b;
  font-size: 0.74rem;
}

.option-grid {
  display: grid;
  gap: 8px;
}

.option-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  min-height: 48px;
  padding: 10px 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #44524a;
  cursor: pointer;
  transition: all 180ms ease;
}

.option-card strong {
  display: block;
  font-size: 0.82rem;
  color: #24352c;
}

.option-card span {
  display: block;
  font-size: 0.66rem;
  margin-top: 4px;
  color: #65756c;
}

.option-input:checked + .option-card {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.option-card-intensity {
  min-height: 66px;
}

.option-card-small {
  min-height: 62px;
}

#intensity-easy:checked + .intensity-easy {
  border-color: #34d399;
  background: #ecfdf5;
  color: #047857;
}

#intensity-moderate:checked + .intensity-moderate {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

#intensity-hard:checked + .intensity-hard {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}

.figma-fields-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-unit-wrap {
  position: relative;
}

.field-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  color: #6f7f76;
}

.field-unit-wrap .input {
  padding-right: 52px;
  font-size: 0.88rem;
}

.figma-advanced {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.figma-advanced summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #5f6e65;
}

.advanced-grid {
  margin-top: 12px;
}

.figma-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.figma-actions .btn-primary {
  flex: 1;
}

.figma-actions .btn {
  min-width: 110px;
}

.figma-result-wrap {
  border-radius: 16px;
  margin-top: 12px;
}

.figma-results-shell {
  padding-top: 0;
}

.figma-metrics {
  margin-top: 10px;
}

.figma-phase-stack {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.figma-phase-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.phase-before {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.phase-during {
  background: #fffbeb;
  border-color: #fde68a;
}

.phase-after {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.phase-next {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.figma-phase-head h3 {
  margin: 0;
  font-size: 1.03rem;
}

.figma-phase-head p {
  margin: 3px 0 0;
  color: #5f6e65;
  font-size: 0.8rem;
}

.figma-phase-metrics {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.figma-phase-metrics > div {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}

.figma-phase-metrics span {
  display: block;
  font-size: 0.7rem;
  color: #6b7a71;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.figma-phase-metrics strong {
  display: block;
  margin-top: 3px;
  font-size: 0.9rem;
}

.figma-phase-section {
  margin-top: 10px;
}

.figma-phase-section h4 {
  margin: 0 0 6px;
  font-size: 0.84rem;
}

.fuel-list {
  display: grid;
  gap: 6px;
}

.fuel-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 9px;
  padding: 7px 9px;
}

.fuel-badge {
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fuel-food {
  background: #ffedd5;
  color: #9a3412;
}

.fuel-fluid {
  background: #dbeafe;
  color: #1d4ed8;
}

.fuel-name {
  font-size: 0.82rem;
  color: #24352c;
}

.fuel-amount {
  font-size: 0.78rem;
  color: #5f6e65;
}

@media (max-width: 900px) {
  .figma-phase-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .figma-fields-2,
  .option-grid-2,
  .option-grid-3,
  .figma-phase-metrics,
  .fuel-item {
    grid-template-columns: 1fr;
  }

  .figma-actions {
    flex-direction: column;
  }

  .figma-actions .btn {
    width: 100%;
  }

  .fuel-item {
    gap: 4px;
    justify-items: start;
  }
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  background: #eff2f1;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-wrap {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.auth-wrap-login {
  max-width: 470px;
}

.auth-logo {
  width: 70px;
  height: 70px;
  margin: 0 auto 22px;
  border-radius: 18px;
  background: linear-gradient(145deg, #10b981, #0ea271);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.3);
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.85rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #0f1a14;
}

.auth-subtitle {
  margin: 10px 0 24px;
  color: #66756d;
  font-size: 1.12rem;
  font-weight: 500;
}

.auth-card {
  text-align: left;
  background: #ffffff;
  border: 1px solid rgba(15, 26, 20, 0.08);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 26, 20, 0.07);
  padding: 26px 28px 28px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-label {
  font-size: 1.03rem;
  font-weight: 700;
  color: #18251f;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  text-align: center;
  color: #90a29a;
  font-size: 0.9rem;
}

.auth-input {
  width: 100%;
  border: 1px solid #dce3df;
  border-radius: 14px;
  padding: 13px 14px 13px 42px;
  font: inherit;
  font-size: 1.05rem;
  color: #1a2822;
  background: #ffffff;
}

.auth-input::placeholder {
  color: #8b9b93;
}

.auth-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.auth-row-end {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.auth-row-end a,
.auth-check a,
.auth-switch a {
  color: #0ea977;
  text-decoration: none;
  font-weight: 700;
}

.auth-row-end a:hover,
.auth-check a:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-check {
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #5f6f67;
  font-size: 0.95rem;
}

.auth-check input {
  margin-top: 2px;
}

.auth-submit {
  margin-top: 8px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 15px 18px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(145deg, #10b981, #079c6a);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
  cursor: pointer;
}

.auth-submit span {
  margin-left: 6px;
}

.auth-error,
.auth-success {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-error {
  background: #fef2f2;
  color: #9f1d1d;
  border: 1px solid #fecaca;
}

.auth-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #a7f3d0;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 22px 0 14px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #e3e9e6;
}

.auth-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 12px;
  color: #72817a;
  font-size: 0.96rem;
}

.auth-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-social {
  border: 1px solid #dce3df;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #2d3a34;
}

.auth-switch {
  margin: 24px 0 0;
  color: #5f6f67;
  font-size: 1.02rem;
  font-weight: 600;
}

@media (max-width: 560px) {
  .auth-title {
    font-size: 2rem;
  }

  .auth-subtitle {
    font-size: 1rem;
  }

  .auth-card {
    padding: 20px 18px;
  }

  .auth-socials {
    grid-template-columns: 1fr;
  }
}

/* Settings page */
.settings-page {
  min-height: 100vh;
  background: #f3f5f4;
  padding: 18px 0 28px;
}

.settings-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 14px;
}

.settings-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-tab {
  text-decoration: none;
  border-radius: 18px;
  background: #dff2e8;
  color: #047857;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 10px 14px;
  line-height: 1;
}

.athlete-chip {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #edf1ef;
  border: 1px solid #d8e0dc;
  border-radius: 18px;
  padding: 8px 10px;
}

.athlete-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.athlete-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1b2822;
}

.athlete-card {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid #dce3df;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 24, 20, 0.06);
}

.athlete-card-head {
  padding: 16px 16px 14px;
}

.athlete-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 600;
}

.athlete-card-head p {
  margin: 4px 0 0;
  color: #5f6f67;
  font-size: 0.9rem;
  font-weight: 500;
}

.athlete-card-row {
  width: 100%;
  border-top: 1px solid #e6ece8;
  background: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #5f6f67;
  font-size: 0.95rem;
  font-weight: 500;
}

.athlete-signout-form {
  margin: 0;
}

.athlete-signout-form .athlete-card-row {
  border: 0;
}

.athlete-card-row.danger {
  color: #e11717;
  border-top: 1px solid #e6ece8;
  cursor: pointer;
  text-align: left;
}

.athlete-row-icon {
  width: 20px;
  text-align: center;
}

.settings-content {
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid #dce3df;
  border-radius: 16px;
  padding: 20px;
}

.settings-head h1 {
  margin: 0;
  font-size: 2.2rem;
}

.settings-head p {
  margin: 6px 0 18px;
  color: #67766f;
  font-weight: 600;
}

.settings-card {
  border: 1px solid #e1e7e4;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
}

.settings-card-title {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid #e7ece9;
}

.settings-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e7f6ef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-card-title h3 {
  margin: 0;
  font-size: 1.2rem;
}

.settings-card-title p {
  margin: 2px 0 0;
  color: #687770;
  font-size: 0.94rem;
}

.settings-card-body {
  padding: 14px;
}

.settings-presets-form {
  display: grid;
  gap: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-card-body p {
  margin: 0 0 10px;
  color: #65746d;
  font-weight: 600;
  line-height: 1.45;
}

.settings-note {
  font-size: 0.9rem;
}

.settings-google-btn {
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  font: inherit;
}

.plan-free {
  border: 1px solid #9ce9c8;
  background: #eafaf3;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.plan-free strong {
  display: block;
  color: #0d7a53;
}

.plan-free p {
  margin: 4px 0 0;
  color: #31a67a;
  font-size: 0.9rem;
}

.plan-badge {
  background: #c7f3de;
  color: #148f62;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.plan-pro {
  margin-top: 12px;
  border: 1px solid #e1e7e4;
  border-radius: 12px;
  padding: 12px;
}

.plan-pro-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.plan-pro-head h4 {
  margin: 0;
  font-size: 1.38rem;
}

.plan-pro-head p {
  margin: 4px 0 0;
}

.plan-price {
  text-align: right;
}

.plan-price strong {
  display: block;
  font-size: 2rem;
}

.plan-price span {
  color: #687770;
  font-size: 0.86rem;
  font-weight: 600;
}

.plan-pro ul {
  margin: 10px 0;
  padding-left: 18px;
  color: #3f4e47;
  font-weight: 600;
  line-height: 1.6;
}

.settings-upgrade-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  color: #fff;
  background: #10b981;
  font: inherit;
  font-weight: 700;
}

.billing-history {
  margin-top: 14px;
  border: 1px solid #e1e7e4;
  border-radius: 12px;
  padding: 12px;
}

.billing-history h4 {
  margin: 0;
}

.billing-history p {
  margin: 22px 0 0;
  text-align: center;
  color: #7b8b83;
}

@media (max-width: 740px) {
  .settings-tab,
  .athlete-name {
    font-size: 1.2rem;
  }

  .athlete-card-head h2 {
    font-size: 1.8rem;
  }

  .athlete-card-head p,
  .athlete-card-row {
    font-size: 1.2rem;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}
