/* ============================================================
   FOOM Coach — web app
   Design tokens lifted from foom_site (and the iOS DesignSystem):
   ground #0B0B0D · surface #141417 · elevated #1C1C1F
   text   #F2F2EE · accent  #D4FF3A (acid lime)
   ============================================================ */

:root {
  --ground:        #0B0B0D;
  --surface:       #141417;
  --surface-2:     #1C1C1F;
  --surface-3:     #25252A;
  --text:          #F2F2EE;
  --text-dim:      rgba(242, 242, 238, 0.60);
  --text-dimmer:   rgba(242, 242, 238, 0.38);
  --hairline:      rgba(255, 255, 255, 0.08);
  --hairline-2:    rgba(255, 255, 255, 0.14);
  --accent:        #D4FF3A;
  --accent-deep:   #A8D024;
  --accent-dim:    rgba(212, 255, 58, 0.15);
  --accent-glow:   rgba(212, 255, 58, 0.55);
  --danger:        #FF6B6B;
  --danger-dim:    rgba(255, 107, 107, 0.12);
  --success:       #6EF3B0;

  --radius-sm:   10px;
  --radius:      18px;
  --radius-lg:   28px;
  --radius-xl:   40px;

  --max:         1280px;
  --shell-pad:   28px;

  --ease:        cubic-bezier(.2,.7,.2,1);

  --mono:        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  background: var(--ground);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 600px at 90% -10%, rgba(212,255,58,0.06), transparent 60%),
    radial-gradient(800px 500px at -10% 25%, rgba(212,255,58,0.035), transparent 55%),
    var(--ground);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, p { margin: 0; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--ground); }

/* ============================================================
   TYPE SCALE
   ============================================================ */

h1 {
  font-weight: 900;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

h2 {
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
h4 { font-weight: 700; font-size: 16px; letter-spacing: -0.005em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(212,255,58,0.7);
}
.eyebrow.no-dot::before { display: none; }

.lede {
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 64ch;
  margin: 16px 0 0;
}

.muted { color: var(--text-dim); }
.dim   { color: var(--text-dimmer); }
.accent-ink { color: var(--accent); }
.text-mono { font-family: var(--mono); }

/* ============================================================
   SHELL + LAYOUT
   ============================================================ */

.shell {
  width: min(var(--max), calc(100vw - 24px));
  margin: 0 auto;
  padding: 32px var(--shell-pad) 64px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(11, 11, 13, 0.72);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--shell-pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.nav-word {
  position: relative;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 22px;
  padding-bottom: 6px;
}
.nav-word::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-coach-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline-2);
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.02);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 9px 16px;
  border-radius: 999px;
  transition: color .15s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav-link-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.4;
}
.nav-link.active {
  background: var(--accent);
  color: var(--ground);
}
.nav-link.active .nav-link-dot { background: var(--ground); opacity: 0.7; }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.nav-user {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.nav-signout {
  background: transparent;
  border: 1px solid var(--hairline-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.nav-signout:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.04); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ground);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.nav-cta:hover { background: #DDFF54; transform: translateY(-1px); }

@media (max-width: 880px) {
  .nav-inner { grid-template-columns: auto auto; }
  .nav-links { display: none; }
  .nav-user { display: none; }
}

/* ============================================================
   PAGE HEADER + SECTION HEADS
   ============================================================ */

.page-header,
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 0 4px;
  border-bottom: 1px solid var(--hairline);
}

.page-header h1 { margin-bottom: 4px; }
.page-header .lede { max-width: 56ch; }

.header-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-header h2 { margin-bottom: 0; }
.section-header .eyebrow { margin-bottom: 6px; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.005));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(540px 220px at 50% -10%, rgba(212,255,58,0.05), transparent 70%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.card:hover::after { opacity: 1; }

.card-tight { padding: 22px; }

/* ============================================================
   BUTTONS / PILLS
   ============================================================ */

.primary-button,
.ghost-button,
.link-button,
button.primary-button,
button.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: var(--ground);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 12px 36px -16px var(--accent-glow);
}
.primary-button:hover { background: #DDFF54; transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }

.ghost-button,
.link-button {
  background: transparent;
  color: var(--text);
  border-color: var(--hairline-2);
}
.ghost-button:hover,
.link-button:hover {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.03);
  transform: translateY(-1px);
}

.compact-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.danger-button {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.28);
}
.danger-button:hover {
  border-color: rgba(255, 107, 107, 0.55);
  background: var(--danger-dim);
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s var(--ease);
}
.inline-link::after { content: '→'; transition: transform .2s var(--ease); }
.inline-link:hover { gap: 10px; }

/* status / generic pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hairline-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
}
.pill-live    { color: var(--success); border-color: rgba(110,243,176,0.28); background: rgba(110,243,176,0.08); }
.pill-pending { color: var(--text-dim); }
.pill-subtle  { color: var(--text-dim); }

.pill-button {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.pill-button:hover { color: var(--text); border-color: rgba(255,255,255,0.28); }
.pill-button.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--ground);
}

/* ============================================================
   GRIDS
   ============================================================ */

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(800px 320px at 100% 0%, rgba(212,255,58,0.04), transparent 55%),
    var(--surface);
}

.attention-grid,
.dashboard-roster-grid {
  display: grid;
  gap: 18px;
}
.attention-grid       { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-roster-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

.nutrition-grid    { align-items: start; }
.single-column     { display: flex; justify-content: center; }
.narrow            { width: min(640px, 100%); }
.compact-grid      { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack             { display: flex; flex-direction: column; gap: 14px; }

/* ============================================================
   FORMS
   ============================================================ */

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

label > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

input,
textarea,
.select-input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}

input::placeholder,
textarea::placeholder { color: var(--text-dimmer); }

input:focus,
textarea:focus,
.select-input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}

textarea { resize: vertical; }

.radio-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.radio-card:hover { border-color: var(--hairline-2); }
.radio-card input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--accent);
}
.radio-card input:checked ~ div strong { color: var(--accent); }
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(212,255,58,0.04);
}
.radio-card div strong { color: var(--text); font-weight: 700; font-size: 15px; }
.radio-card div .muted { font-size: 13px; }

/* ============================================================
   AUTH
   ============================================================ */

.auth-hero {
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 32px 0 8px;
  position: relative;
}

.auth-hero::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  top: -60px; right: -40px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.10;
  z-index: 0;
  pointer-events: none;
}

.auth-hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0 8px;
  position: relative;
  z-index: 1;
}
.auth-hero-copy h1 { max-width: 11ch; }

.auth-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.auth-hero-panel {
  width: min(380px, 100%);
  align-self: stretch;
  background:
    radial-gradient(circle at top right, rgba(212,255,58,0.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  border: 1px solid var(--hairline-2);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.auth-hero-panel-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-hero-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-hero-panel-copy .muted {
  font-size: 14px;
}

.auth-hero-form {
  margin-top: 18px;
}

.auth-hero-foot {
  margin-top: auto;
}

.auth-benefit-list {
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}
.auth-benefit-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.5;
}
.auth-benefit-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 10px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.auth-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.6fr);
  gap: 24px;
  align-items: stretch;
}

.auth-support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.auth-support-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.auth-support-card h2 {
  max-width: 14ch;
}

.auth-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-proof-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.auth-proof-strip > div {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.025);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-proof-strip strong {
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
}

.auth-proof-strip span {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}

.auth-support-card-accent {
  background:
    radial-gradient(circle at top right, rgba(212,255,58,0.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
}

.auth-support-card-accent .primary-button {
  margin-top: auto;
  align-self: flex-start;
}

/* Auth form card (sign in / sign up shared) */

.auth-form-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: min(560px, 100%);
}

.auth-pane-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-pane-head h2 { margin-top: 4px; }
.auth-pane-head .muted { font-size: 14px; }

.auth-pane-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px dashed var(--hairline-2);
  flex-wrap: wrap;
  font-size: 13.5px;
}
.auth-pane-foot .muted { font-size: 12.5px; }

.auth-switch-link {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s var(--ease);
}
.auth-switch-link:hover { color: var(--text); }

/* Signup-specific layout: form-leaning, with side benefits panel */

.auth-hero--compact {
  padding-bottom: 0;
  border-bottom: 0;
  align-items: flex-start;
}
.auth-hero--compact h1 { font-size: clamp(36px, 4.6vw, 64px); max-width: 16ch; }
.auth-hero--compact .lede { margin-top: 8px; }

.auth-signup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}
.auth-signup-layout .auth-form-card { width: auto; }

.auth-signup-panel {
  width: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.auth-signup-stats {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px dashed var(--hairline-2);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.auth-signup-stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-signup-stats strong {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}
.auth-signup-stats strong small {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .auth-signup-layout { grid-template-columns: 1fr; }
  .auth-signup-panel  { align-self: auto; }
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-card-header { display: flex; flex-direction: column; gap: 6px; }
.auth-card-header > div h2 { margin-top: 4px; }

.auth-signin-card { gap: 22px; }

.auth-secondary-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(400px 220px at 90% 0%, rgba(212,255,58,0.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
}
.auth-secondary-card .ghost-button { margin-top: auto; align-self: flex-start; }

.auth-create-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.auth-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.auth-create-header > div h2 { margin-top: 4px; }

.auth-signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.auth-create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline-2);
}
.auth-create-actions .primary-button { min-width: 220px; }

/* ============================================================
   STATS STRIP (foom_site numbers vibe)
   ============================================================ */

.stat-card {
  padding: 28px 26px;
  border: 0;
  border-right: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card:last-child { border-right: 0; }
.stat-card::after { display: none; }

.stat-label {
  font-family: var(--mono);
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10.5px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 900;
  font-family: var(--mono);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-top: 8px;
}

/* ============================================================
   FLASH
   ============================================================ */

.flash-stack { display: flex; flex-direction: column; gap: 10px; }

.flash {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.flash-error   { color: var(--danger);  border-color: rgba(255,107,107,0.28); background: var(--danger-dim); }
.flash-success { color: var(--success); border-color: rgba(110,243,176,0.28); background: rgba(110,243,176,0.08); }

/* ============================================================
   COACH DASHBOARD
   ============================================================ */

.dashboard-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.dashboard-search {
  width: min(320px, 100%);
  padding: 11px 14px 11px 40px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
  background:
    var(--surface)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2F2EE' stroke-opacity='0.5' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>")
    no-repeat 14px center / 16px 16px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.dashboard-search:focus { outline: none; border-color: var(--accent); }

.attention-card,
.dashboard-client-card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.004));
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.attention-card:hover,
.dashboard-client-card:hover {
  border-color: rgba(212,255,58,0.32);
  transform: translateY(-2px);
}

.attention-card-header,
.dashboard-client-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.attention-card-header strong a,
.dashboard-client-header strong a {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.attention-card-header strong a:hover,
.dashboard-client-header strong a:hover { color: var(--accent); }

.dashboard-client-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--hairline);
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 4px;
}
.mini-stat span,
.dashboard-client-meta span,
.attention-meta span {
  display: block;
  color: var(--text-dimmer);
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.mini-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.025em;
  color: var(--text);
}
.mini-stat strong:not(:empty) { color: var(--text); }

.dashboard-client-meta,
.attention-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0 0;
  border-top: 1px dashed var(--hairline-2);
}
.dashboard-client-meta > div,
.attention-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.dashboard-client-meta strong,
.attention-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dashboard-session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-session-chip {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  position: relative;
}
.dashboard-session-chip::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0.7;
}
.dashboard-session-chip strong {
  display: block;
  padding-left: 8px;
  font-size: 14px;
  font-weight: 700;
}
.dashboard-session-chip span {
  display: block;
  padding-left: 8px;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--mono);
}

.dashboard-alert {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-dim);
  border: 1px solid rgba(255,107,107,0.22);
  color: #FFB4B4;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dashboard-alert::before {
  content: '!';
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--danger);
  color: var(--ground);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}

.dashboard-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.attention-card .pill { align-self: flex-start; }

/* ============================================================
   ROSTER ROWS / LIST ROWS
   ============================================================ */

.roster-table,
.list-row {
  display: flex;
  flex-direction: column;
}

.roster-row,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}
.roster-row:first-child,
.list-row:first-child { border-top: 0; padding-top: 0; }

.row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   SESSIONS / EXERCISE PLAN
   ============================================================ */

.session-card-stack { display: flex; flex-direction: column; gap: 14px; }

.session-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.004));
  border: 1px solid var(--hairline);
  position: relative;
  transition: border-color .25s var(--ease);
}
.session-card:hover { border-color: var(--hairline-2); }

.session-card-top,
.session-title-row,
.session-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.session-card-copy { flex: 1; min-width: 0; }

.session-title {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.session-subtitle {
  margin-top: 6px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.session-status-pill {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  font-weight: 700;
  padding: 0 12px;
}
.session-status-planned   { color: var(--text-dim); }
.session-status-completed { background: var(--accent); border-color: transparent; color: var(--ground); }
.session-status-completed::before { background: var(--ground); opacity: 0.7; }
.session-status-skipped   { color: var(--danger); border-color: rgba(255,107,107,0.28); background: var(--danger-dim); }

.session-plan-shell {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.014);
  border: 1px dashed var(--hairline-2);
}

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

.session-plan-card { min-height: 100%; }
.session-plan-empty { padding: 4px 0; color: var(--text-dim); font-size: 13.5px; }

.exercise-preview-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.exercise-preview-card strong { font-size: 15px; font-weight: 700; }

.exercise-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.exercise-preview-card .muted {
  font-family: var(--mono);
  font-size: 12.5px;
}

.exercise-preview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.session-card-footer {
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline-2);
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.session-status-controls { justify-content: flex-start; flex: 1; }
.session-utility-actions { justify-content: flex-end; }

/* exercise plan editor */

.exercise-plan-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.014);
  border: 1px dashed var(--hairline-2);
}

.exercise-plan-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exercise-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exercise-card-header {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.exercise-card-header .grow { flex: 1; }

.exercise-sets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exercise-set-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  background: var(--ground);
  border: 1px solid var(--hairline);
}

/* ============================================================
   NUTRITION
   ============================================================ */

.nutrition-preview-kcal {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--hairline-2);
}
.nutrition-preview-kcal strong {
  font-size: clamp(56px, 6vw, 84px);
  font-weight: 900;
  font-family: var(--mono);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.nutrition-preview-kcal span {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.macro-preview-card,
.macro-mini-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.macro-preview-card .stat-label,
.macro-mini-card span {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dimmer);
  font-weight: 700;
}
.macro-preview-card strong,
.macro-mini-card strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.macro-preview-card.emphasize,
.macro-mini-card.emphasize {
  border-color: rgba(212,255,58,0.30);
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(212,255,58,0.08), transparent 70%),
    var(--surface);
}
.macro-preview-card.emphasize strong,
.macro-mini-card.emphasize strong {
  color: var(--accent);
}

/* ============================================================
   MEALS
   ============================================================ */

.meal-review-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .2s var(--ease);
}
.meal-review-card:hover { border-color: var(--hairline-2); }

.meal-row-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.meal-row-content > div strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.meal-row-content > div .muted {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.meal-photo-thumb {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hairline-2);
  background: var(--surface-2);
  flex: 0 0 auto;
  transition: transform .25s var(--ease);
}
.meal-photo-thumb:hover { transform: scale(1.02); }
.meal-photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   KEY VALUE LIST
   ============================================================ */

.key-value-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.key-value-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--hairline-2);
}
.key-value-list > div:last-child { padding-bottom: 0; border-bottom: 0; }

.key-value-list dt {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.key-value-list dd {
  margin: 0;
  font-weight: 800;
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ============================================================
   CHARTS
   ============================================================ */

.chart-canvas {
  width: 100%;
  min-height: 280px;
  max-height: 280px;
}

.empty-state {
  padding: 14px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.app-footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.app-footer-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.app-footer-word {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.app-footer-underline {
  width: 44px; height: 6px;
  border-radius: 3px;
  background: var(--accent);
}
.app-footer-line {
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  margin: 0;
}
.app-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.app-footer-links a:hover,
.app-footer-links a:focus-visible { color: var(--accent); }

/* ============================================================
   PUBLIC POLICIES
   ============================================================ */

.policy-header { align-items: flex-start; }
.policy-effective {
  margin-top: 16px;
  color: var(--text-dimmer);
  font-family: var(--mono);
  font-size: 12px;
}
.policy-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 820px);
  gap: 24px;
  align-items: start;
  justify-content: center;
}
.policy-nav {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policy-nav strong {
  margin-bottom: 4px;
  color: var(--text-dimmer);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.policy-nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 650;
}
.policy-nav a:hover,
.policy-nav a:focus-visible { color: var(--accent); }
.policy-copy {
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.policy-copy section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.policy-copy section + section {
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.policy-copy p,
.policy-copy li {
  color: var(--text-dim);
  line-height: 1.7;
}
.policy-copy a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(212,255,58,0.4);
  text-underline-offset: 3px;
}
.policy-copy ul,
.policy-copy ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}
.policy-copy ul { list-style: disc; }
.policy-copy ol { list-style: decimal; }
.policy-copy strong { color: var(--text); }
.policy-table-wrap { overflow-x: auto; }
.policy-copy table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.policy-copy th,
.policy-copy td {
  padding: 13px 14px;
  border: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.policy-copy th {
  color: var(--text);
  background: var(--surface-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.policy-copy td { color: var(--text-dim); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid .stat-card { border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
  .stats-grid .stat-card:nth-child(2n)        { border-right: 0; }
  .stats-grid .stat-card:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 900px) {
  .auth-grid,
  .detail-grid,
  .attention-grid,
  .dashboard-roster-grid,
  .auth-entry-grid,
  .auth-support-grid,
  .auth-signup-grid,
  .compact-grid,
  .macro-preview-grid,
  .meal-macro-grid,
  .session-plan-grid,
  .dashboard-client-stats {
    grid-template-columns: 1fr;
  }

  .policy-layout { grid-template-columns: 1fr; }
  .policy-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .policy-nav strong { width: 100%; }

  .page-header,
  .hero,
  .auth-hero,
  .roster-row,
  .list-row,
  .header-actions,
  .auth-create-header,
  .auth-create-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-hero { gap: 18px; }
  .auth-hero-panel { width: 100%; }
  .auth-proof-strip { grid-template-columns: 1fr; }
  .auth-support-card h2 { max-width: none; }

  h1 { max-width: none; }

  .session-card-footer,
  .session-title-row,
  .exercise-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .exercise-set-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid .stat-card { border-right: 0; }
  .stats-grid .stat-card:last-child { border-bottom: 0; }

  .nav-coach-tag { display: none; }
  .policy-copy { padding: 22px; }
}

/* ============================================================
   MOTION PREFS
   ============================================================ */

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

/* Athlete surfaces share the existing Foom palette and controls. */
.workout-card { display:flex; justify-content:space-between; align-items:center; gap:1rem; text-decoration:none; color:inherit; }
.meal-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:1rem; }
.meal-photo { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:12px; }
.check-label { display:flex; flex-direction:row; gap:.75rem; align-items:center; line-height:1.6; }
.check-label input { width:1.25rem; height:1.25rem; flex-shrink:0; }
.adherence-row { display:grid; grid-template-columns:5rem 1fr 4rem; gap:1rem; align-items:center; }
meter { width:100%; accent-color:#d4ff3a; }
.table-scroll { overflow-x:auto; }
.table-scroll table { width:100%; text-align:left; border-collapse:collapse; }
.table-scroll th,.table-scroll td { padding:.7rem; border-bottom:1px solid #ffffff18; }
summary { cursor:pointer; padding:.5rem 0; font-weight:700; }
[hidden] { display:none !important; }
@media(max-width:760px) {
 .nav-inner { flex-wrap:wrap; gap:12px; }
 .nav-links { display:flex !important; order:3; width:100%; overflow-x:auto; white-space:nowrap; gap:14px; padding-bottom:8px; }
 .nav-user { display:none; }
 .header-actions { flex-wrap:wrap; }
 .workout-card { align-items:flex-start; }
 .compact-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .set-form .check-label { grid-column:1/-1; }
 .single-column h1 { overflow-wrap:anywhere; }
 button,input,select { min-height:44px; }
}

/* Shared interaction states. Keep form controls legible at every viewport. */
input[type="checkbox"], input[type="radio"] { width:20px; height:20px; min-height:20px; padding:0; flex-shrink:0; accent-color:var(--accent); cursor:pointer; }
:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
button:disabled { opacity:.5; cursor:not-allowed; }
.sync-bar { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-bottom:-18px; min-height:20px; font-size:12px; color:var(--text-dim); }
.sync-status::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--accent); margin-right:7px; }
.sync-status[data-state="error"]::before { background:#ff6668; }
.sync-status[data-state="saving"]::before { background:#e9c66e; }
.sync-retry { background:none; border:0; padding:0; min-height:24px; color:var(--accent); text-decoration:underline; cursor:pointer; }
.save-feedback { position:fixed; z-index:100; bottom:24px; left:50%; transform:translateX(-50%); max-width:min(520px,calc(100vw - 32px)); padding:13px 20px; background:#252a1a; border:1px solid #d4ff3a66; border-radius:12px; box-shadow:0 8px 32px #0008; color:var(--text); font-size:14px; }
.save-feedback[data-state="error"] { background:#352122; border-color:#ff6668; }
form[aria-busy="true"] button[type="submit"],form[aria-busy="true"] button:not([type]) { cursor:wait; opacity:.65; }
body[data-signed-in="true"] .page-header h1 { font-size:clamp(32px,4vw,56px); max-width:none; }
.notification-list { display:flex; flex-direction:column; gap:12px; }
.notification-item { padding:22px 24px; }
.notification-item h2 { margin:8px 0; font-size:20px; }
.notification-item p:not(.eyebrow) { color:var(--text-dim); }
.notification-item a { display:inline-block; margin-top:14px; font-size:14px; color:var(--accent); }
@media(max-width:760px) {
 .nav-links { gap:4px; scrollbar-width:none; }
 .nav-links::-webkit-scrollbar { display:none; }
 .nav-link { padding:10px 13px; }
 .sync-bar { margin-bottom:-12px; }
 .save-feedback { bottom:16px; width:max-content; }
}
.primary-button.link-button { background:var(--accent); color:var(--ground); }
.primary-button.link-button:hover { background:var(--accent-deep); }
#flash-messages:not(:has(.flash)) { display:none; }
.radio-card { flex-direction:row; align-items:flex-start; }
.account-page { width:min(760px,100%); margin:0 auto; }
.account-page h1 { font-size:clamp(32px,4vw,56px); }
.account-email { overflow-wrap:anywhere; color:var(--text-dim); }
.account-page .card { padding:clamp(20px,4vw,32px); }
.form-save-error { grid-column:1 / -1; padding:10px 12px; border:1px solid #ff666855; border-radius:8px; background:var(--danger-dim); color:var(--danger); font-size:13px; }
@media(max-width:1120px) { .nav-user { display:none; } }
@media(max-width:880px) {
 .nav-inner { grid-template-columns:1fr auto; gap:10px; padding:12px 20px; }
 .nav-brand { grid-column:1; grid-row:1; }
 .nav-actions { grid-column:2; grid-row:1; }
 .nav-links { display:flex !important; grid-column:1 / -1; grid-row:2; justify-self:stretch; width:100%; min-width:0; overflow-x:auto; white-space:nowrap; padding:4px; gap:2px; scrollbar-width:none; }
 .nav-links::-webkit-scrollbar { display:none; }
 .nav-link { flex-shrink:0; min-height:40px; padding:9px 13px; }
 :root { --shell-pad:16px; }
 .shell { width:100%; padding-top:22px; }
 .page { gap:24px; }
}
@media(max-width:600px) {
 .nav-links { gap:0; }
 .nav-link { flex:1 0 auto; justify-content:center; min-width:44px; min-height:44px; padding:9px 8px; font-size:12px; }
}
