:root {
  --green: #2f7a44;
  --green-dark: #1f5a30;
  --green-light: #eaf5ec;
  --yellow: #f4c93a;
  --bg: #f6f7f2;
  --card: #ffffff;
  --text: #1e2a1f;
  --muted: #6b756c;
  --border: #e4e7de;
  --danger: #c0392b;
  --danger-dark: #96271d;
  --pink: #b5476b;
  --pink-dark: #96375a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 8px rgba(30, 42, 31, 0.07);
  --shadow-lift: 0 8px 24px rgba(30, 42, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, summary {
  font-family: "Poppins", "Inter", -apple-system, sans-serif;
  letter-spacing: -0.01em;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
}

.ball {
  font-size: 1.5rem;
  line-height: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ghost-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.ghost-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.coach-name-tag {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-right: 6px;
}

/* ---------- layout ---------- */

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 18px 70px;
}

.hero {
  padding: 6px 2px 4px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green-dark);
}

.hero p {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

/* ---------- nudge banner ---------- */

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff7e0;
  border: 1px solid #f0deA0;
  color: #6b5610;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 18px 0;
  font-size: 0.92rem;
}

.banner .banner-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.banner .banner-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.banner button {
  padding: 6px 12px;
  font-size: 0.85rem;
  min-height: auto;
}

.banner .link-btn {
  background: none;
  color: #6b5610;
  text-decoration: underline;
  font-weight: 600;
  padding: 6px 4px;
}

.banner .link-btn:hover {
  background: none;
  color: #423507;
}

/* ---------- cards / grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 20px 0;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card-grid .card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--text);
}

.info-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 4px 0;
}

.info-row .icon {
  flex-shrink: 0;
}

.desc {
  font-size: 0.92rem;
  margin: 10px 0;
  color: var(--text);
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-dark);
}

.price .unit {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

.spots-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
}

.spots-badge.full {
  background: #fbe6e3;
  color: var(--danger-dark);
}

.price-note {
  font-size: 0.8rem;
  margin-top: 6px;
}

.low-enrollment-note {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b5610;
  background: #fff7e0;
  border: 1px solid #f0deA0;
  border-radius: 7px;
  padding: 6px 10px;
  margin-top: 8px;
}

.card > button {
  width: 100%;
  margin-top: 14px;
}

/* Distinct from the plain :disabled gray - this is a status ("you already
   booked this"), not a momentarily-unavailable action. */
button.already-booked:disabled {
  background: #eef0e9;
  color: var(--text-muted, #6b7166);
  opacity: 1;
}

/* ---------- buttons ---------- */

button {
  background: var(--green);
  color: white;
  border: none;
  padding: 11px 18px;
  border-radius: 9px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 44px;
  transition: background 0.15s ease, transform 0.05s ease;
  font-family: inherit;
}

button:hover {
  background: var(--green-dark);
}

button:active {
  transform: scale(0.98);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

button:disabled {
  background: #c3c8bf;
  cursor: not-allowed;
  transform: none;
}

/* Spinner shown inside a button via setButtonLoading() (see ui.js) while a
   request is in flight - uses currentColor so it matches whatever text
   color the button variant (primary/secondary/danger) already has. */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

button.secondary {
  background: #eef0e9;
  color: var(--text);
}

button.secondary:hover {
  background: #e0e3d8;
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: var(--danger-dark);
}

/* A link styled as a button, e.g. the "Add to calendar" link which needs to
   be a real <a href> (not a button+JS click) so it works as a direct file
   request on iOS Safari. */
a.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--green);
  color: white;
  border: none;
  padding: 11px 18px;
  border-radius: 9px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 44px;
  text-decoration: none;
  font-family: inherit;
}

a.btn-link:hover {
  background: var(--green-dark);
}

a.btn-link.secondary {
  background: #eef0e9;
  color: var(--text);
}

a.btn-link.secondary:hover {
  background: #e0e3d8;
}

/* ---------- pricing tiers (coach dashboard) ---------- */

.pricing-tier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.pricing-tier-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border-radius: 9px;
}

.pricing-tier-row label {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  font-size: 0.78rem;
}

.pricing-tier-row input {
  padding: 8px 10px;
}

.pricing-tier-row .remove-tier-btn {
  flex-shrink: 0;
  margin-bottom: 1px;
}

@media (max-width: 480px) {
  .pricing-tier-row {
    flex-wrap: wrap;
  }
  .pricing-tier-row label {
    flex: 1 1 40%;
  }
}

/* ---------- auth (Google + email/password) ---------- */

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border);
  margin-bottom: 4px;
}

.google-btn .icon {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- my bookings ---------- */

.my-bookings {
  margin-top: 44px;
}

.my-bookings h2 {
  margin-bottom: 4px;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.inline-form input {
  flex: 1;
  min-width: 200px;
}

.inline-form button {
  flex-shrink: 0;
}

/* ---------- forms ---------- */

input,
textarea {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 16px; /* prevents iOS auto-zoom on focus */
  width: 100%;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: border-color 0.15s ease;
}

input:focus,
textarea:focus {
  border-color: var(--green);
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

label input,
label textarea {
  margin-top: 6px;
  font-weight: 400;
}

label .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}

.stacked-form {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row > label {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

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

.hidden {
  display: none !important;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

.success {
  color: var(--green-dark);
  font-weight: 600;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 26px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lift);
  animation: slideUp 0.18s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal h2, .modal h3 {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  color: var(--muted);
  font-size: 1.5rem;
  padding: 0;
  line-height: 1;
  min-height: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.venmo-box {
  background: var(--green-light);
  border: 1px solid #cfe4c9;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
}

.venmo-box p {
  margin: 5px 0;
}

/* Stacks the "Invite your friends!" and "Done" buttons on the booking
   confirmation screen, one above the other, instead of them sitting side by
   side (both are plain <button> elements, which are inline-block by
   default). */
.stacked-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.invite-btn {
  background: var(--pink);
  color: white;
}

.invite-btn:hover {
  background: var(--pink-dark);
}

/* Compact variant used inline on a My Bookings row, instead of the full-size
   box on the post-booking confirmation screen. */
.venmo-box-compact {
  margin: 10px 0;
  padding: 10px 12px;
}

.venmo-box-compact .btn-link {
  width: auto;
  margin-top: 6px;
}

.confirm-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}

.confirm-modal .confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.confirm-modal .confirm-actions button {
  min-width: 100px;
}

.choice-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.choice-actions button {
  width: 100%;
}

.choice-actions .link-btn {
  text-align: center;
  padding-top: 4px;
}

/* ---------- toasts ---------- */

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  width: min(360px, calc(100vw - 32px));
  align-items: center;
}

.toast {
  background: var(--text);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  width: 100%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: var(--green-dark);
}

.toast-error {
  background: var(--danger-dark);
}

/* ---------- booking / roster rows ---------- */

.booking-row,
.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.booking-row:last-child,
.manage-row:last-child {
  border-bottom: none;
}

.manage-row.past {
  opacity: 0.55;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row-actions button,
.booking-row button {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-height: 36px;
}

/* ---------- coach page specifics ---------- */

.login-card {
  max-width: 380px;
  margin: 48px auto;
  text-align: left;
}

.login-card h2 {
  margin-top: 0;
}

.login-card .ball-big {
  font-size: 2.2rem;
  display: block;
  text-align: center;
  margin-bottom: 6px;
}

.settings-card summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 4px 0;
  list-style: none;
}

.settings-card summary::-webkit-details-marker {
  display: none;
}

.settings-card summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s ease;
  color: var(--green);
}

.settings-card[open] summary::before {
  transform: rotate(90deg);
}

.settings-card hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

#dashboard .card {
  margin-bottom: 20px;
}

#dashboard h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

/* ---------- logo mark (no emoji) ---------- */

.logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--green-dark);
}

/* ---------- nav ---------- */

.topbar {
  flex-wrap: wrap;
  row-gap: 8px;
}

.main-nav {
  display: flex;
  gap: 2px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 4px;
}

.student-name-tag {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin-right: 4px;
}

@media (max-width: 760px) {
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .nav-link {
    flex: 1;
    text-align: center;
  }
}

/* ---------- inline icons ---------- */

.icon {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 2px;
}

.icon-lg {
  width: 42px;
  height: 42px;
  color: var(--green);
  display: block;
  margin: 0 auto 10px;
}

/* ---------- filter pills ---------- */

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.pill {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: auto;
}

.pill:hover {
  background: var(--green-light);
}

.pill.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.pill-count {
  opacity: 0.65;
  font-weight: 500;
}

/* ---------- schedule layout: calendar + list ---------- */

.schedule-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 860px) {
  .schedule-layout {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }

  /* Sticky calendar sidebar only makes sense once it's sitting next to the
     list in a two-column layout. On narrow/mobile screens the two panels
     stack vertically, so sticky would pin the calendar in place and cover
     half the screen while scrolling - keep it in normal flow there. Scoped
     to .schedule-layout so it doesn't affect the coach dashboard's calendar
     card, which isn't part of that two-column layout. */
  .schedule-layout .calendar-panel {
    position: sticky;
    top: 84px;
  }
}

.calendar-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  margin-bottom: 10px;
}

.icon-btn {
  background: none;
  color: var(--text);
  min-height: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 1.2rem;
  border-radius: 8px;
  line-height: 1;
}

.icon-btn:hover {
  background: var(--green-light);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-cell {
  aspect-ratio: 1;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  min-height: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: default;
  padding: 0;
}

.cal-cell.empty {
  visibility: hidden;
}

.cal-cell.has-clinics {
  cursor: pointer;
  font-weight: 600;
}

.cal-cell.has-clinics:hover {
  background: var(--green-light);
}

.cal-cell.today .cal-day-num {
  box-shadow: inset 0 0 0 1.5px var(--green);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-cell.selected {
  background: var(--green);
  color: white;
}

.cal-cell.selected:hover {
  background: var(--green-dark);
}

/* Shows which days a range pill (Today/This week/This month) covers -
   lighter than .selected (a specific clicked date) so the two read as
   different things: one exact day vs. a whole window. */
.cal-cell.range-highlight {
  background: var(--green-light);
}

.cal-cell.range-highlight:hover {
  background: #dcefdf;
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.cal-cell.selected .cal-dot {
  background: white;
}

.coach-calendar-panel {
  max-width: 360px;
  margin-bottom: 16px;
}

.coach-cal-day-list h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.coach-cal-day-list .manage-row {
  margin-bottom: 10px;
}

.link-btn {
  background: none;
  color: var(--green-dark);
  text-decoration: underline;
  font-weight: 600;
  font-size: 0.85rem;
  min-height: auto;
  padding: 8px 0 0;
}

.link-btn:hover {
  background: none;
  color: var(--green);
}

.snapshot-panel h2 {
  margin-top: 0;
}

/* ---------- type badges ---------- */

.type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
  color: white;
  /* Background color is set inline per-badge (see typeColor() in app.js /
     coach.js) - class types are fully coach-editable, so colors are derived
     from each type's id rather than hardcoded here. */
}

/* ---------- clinic types page ---------- */

.type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .type-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dupr-range {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 8px;
}

/* ---------- status badges (my bookings) ---------- */

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  margin-left: 8px;
  vertical-align: middle;
}

.status-badge.waitlisted {
  background: #fff4d9;
  color: #8a6a10;
}

.status-badge.cancelled {
  background: #fbe6e3;
  color: var(--danger-dark);
}

#bookModalWaitlistNote {
  background: #fff7e0;
  border: 1px solid #f0dea0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.88rem;
  color: #6b5610;
}

/* ---------- coach: insights (compact, collapsible) ---------- */
/* Same tight visual language as the quick-stats row above Your Bookings -
   a 3-column grid keeps 5 boxes to two short rows instead of one long
   wrapping strip, and the whole card lives inside a <details> (see
   .settings-card below) so it's collapsed until the coach wants it. */

.insights-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.insights-stat {
  background: var(--green-light);
  border: 1px solid #cfe4c9;
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.insights-stat-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--green-dark);
}

.insights-stat-number {
  font-family: "Poppins", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.insights-stat-sub {
  font-size: 0.66rem;
  color: var(--muted);
}

.insights-stat-detail {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-top: 2px;
}

.insights-section {
  margin-top: 14px;
}

.insights-section h3 {
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.insights-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.insights-row:last-child {
  border-bottom: none;
}

.insights-row-detail {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

/* ---------- coach: quick-stats row (Today/This week/This month) ---------- */
/* Deliberately stays 3-across even on narrow phones (unlike .stats-row,
   which stacks to one column below 560px) - small and tight on purpose so
   three fit side by side without crowding. Doubles as a shortcut into the
   matching pill below (see quickStatsRow click handler in coach.js). */

.quick-stats-card {
  padding: 14px;
}

.mini-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-stat {
  background: var(--green-light);
  border: 1px solid #cfe4c9;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  min-height: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
}

.mini-stat:hover {
  background: #dcefdf;
}

.mini-stat-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--green-dark);
}

.mini-stat-number {
  font-family: "Poppins", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.mini-stat-unit {
  font-size: 0.68rem;
  color: var(--muted);
}

.mini-stat-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-top: 3px;
}

/* ---------- coach: share link + notifications ---------- */

.share-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-light);
  border: 1px solid #cfe4c9;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  flex-wrap: wrap;
}

.share-link-box code {
  flex: 1;
  min-width: 180px;
  font-size: 0.88rem;
  color: var(--green-dark);
  word-break: break-all;
}

.notification-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.notification-row:last-child {
  border-bottom: none;
}

.notification-row .meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.channel-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef0e9;
  color: var(--text);
  margin-right: 6px;
}

/* ---------- landing page (root domain) ---------- */

.landing-hero {
  text-align: center;
  padding: 56px 18px 40px;
}

.landing-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--green-dark);
}

.landing-hero p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.landing-logo {
  width: 46px;
  height: 46px;
  margin: 0 auto;
}

.landing-logo::after {
  inset: 11px;
}

.landing-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px 56px;
}

.landing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0 0 40px;
}

@media (min-width: 640px) {
  .landing-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.landing-cards .card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.landing-cta {
  text-align: center;
  padding: 32px 24px;
  background: var(--green-light);
  border-radius: var(--radius);
}

.landing-cta h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--green-dark);
}

.landing-cta p {
  color: var(--muted);
  margin: 0 0 18px;
}

.landing-cta a.btn-link {
  display: inline-block;
  background: var(--green);
  color: white;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 9px;
  font-weight: 600;
}

.landing-cta a.btn-link:hover {
  background: var(--green-dark);
}

.landing-contact {
  text-align: center;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.95rem;
}

.landing-contact a {
  color: var(--green-dark);
  font-weight: 600;
}

.landing-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 24px 18px 40px;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 18px 32px;
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
