:root {
  --bg: #090a0c;
  --panel: rgba(255, 255, 255, .075);
  --panel-strong: rgba(255, 255, 255, .12);
  --text: #f6f3ea;
  --muted: rgba(246, 243, 234, .64);
  --muted-2: rgba(246, 243, 234, .43);
  --line: rgba(255, 255, 255, .12);
  --gold: #d9c58c;
  --lime: #d8ff5f;
  --mint: #b6ffd8;
  --danger: #ff766f;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 255, 95, .11), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(217, 197, 140, .14), transparent 32rem),
    linear-gradient(180deg, #111317 0%, #090a0c 70%);
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(40px);
  opacity: .46;
  z-index: 0;
}
.ambient.one { width: 240px; height: 240px; border-radius: 50%; background: rgba(216, 255, 95, .22); top: -80px; right: -90px; }
.ambient.two { width: 260px; height: 260px; border-radius: 50%; background: rgba(217, 197, 140, .2); bottom: -100px; left: -120px; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
}

.loader-card,
.demo-payment {
  margin-top: 22vh;
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  color: #101010;
  background: linear-gradient(135deg, var(--lime), var(--gold));
  font-weight: 950;
  font-size: 28px;
  box-shadow: 0 14px 40px rgba(216, 255, 95, .22);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(9,10,12,.96), rgba(9,10,12,.78), transparent);
  backdrop-filter: blur(14px);
}
.topbar-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.logo { display: flex; gap: 10px; align-items: center; }
.logo .brand-mark { width: 42px; height: 42px; border-radius: 15px; font-size: 22px; }
.logo b { display: block; letter-spacing: -.03em; }
.logo span { color: var(--muted); font-size: 12px; }
.icon-btn,
.tiny-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s ease;
}
.icon-btn:active,
.tiny-btn:active,
.primary-btn:active,
.secondary-btn:active { transform: scale(.98); }
.tiny-btn { min-height: 34px; font-size: 13px; color: var(--muted); }

.hero {
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.04)),
    radial-gradient(circle at 80% 10%, rgba(216, 255, 95, .24), transparent 42%),
    #101216;
  box-shadow: var(--shadow);
  padding: 22px;
  min-height: 230px;
}
.hero:after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  right: -84px;
  bottom: -90px;
  border: 34px solid rgba(216, 255, 95, .1);
}
.eyebrow { color: var(--lime); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 850; }
.hero h1,
.section-title h2,
.onboarding h1 {
  margin: 10px 0 8px;
  font-size: clamp(32px, 8vw, 48px);
  line-height: .92;
  letter-spacing: -.065em;
}
.hero p { color: var(--muted); max-width: 330px; line-height: 1.5; margin: 0; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.primary-btn,
.secondary-btn,
.ghost-btn {
  appearance: none;
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  min-height: 48px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: .2s ease;
}
.primary-btn { background: linear-gradient(135deg, var(--lime), var(--gold)); color: #101111; box-shadow: 0 16px 44px rgba(216,255,95,.18); }
.secondary-btn { background: rgba(255,255,255,.1); color: var(--text); border: 1px solid var(--line); }
.ghost-btn { background: transparent; color: var(--muted); border: 1px solid transparent; }
.full { width: 100%; }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,.095), rgba(255,255,255,.045));
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
  padding: 16px;
  overflow: hidden;
}
.card.soft { background: rgba(255,255,255,.055); }
.metric { min-height: 112px; }
.metric span { color: var(--muted-2); font-size: 12px; }
.metric strong { display: block; font-size: 28px; letter-spacing: -.05em; margin-top: 8px; }
.metric small { color: var(--muted); display: block; margin-top: 4px; }

.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 24px 0 12px; }
.section-title h2 { font-size: 27px; margin: 0; }
.section-title p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }

.pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill,
.segment {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.pill.active,
.segment.active { color: #101111; background: var(--lime); border-color: var(--lime); font-weight: 850; }

.goal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.goal-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.075);
  border-radius: 24px;
  padding: 16px;
  min-height: 132px;
  text-align: left;
  cursor: pointer;
}
.goal-card.active { border-color: rgba(216,255,95,.8); background: rgba(216,255,95,.12); }
.goal-card b { display: block; font-size: 18px; letter-spacing: -.03em; }
.goal-card span { color: var(--muted); font-size: 13px; line-height: 1.35; display: block; margin-top: 8px; }
.goal-card small { color: var(--lime); display: block; margin-top: 16px; font-weight: 850; }

.field { display: grid; gap: 7px; margin-bottom: 12px; }
.field label, .field span { color: var(--muted); font-size: 13px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 18px;
  min-height: 48px;
  padding: 12px 14px;
  outline: none;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: rgba(216,255,95,.62); box-shadow: 0 0 0 4px rgba(216,255,95,.08); }
select option { color: #111; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.direction-card {
  position: relative;
  min-height: 148px;
  cursor: pointer;
}
.direction-card .emoji { font-size: 28px; }
.direction-card h3 { margin: 12px 0 8px; font-size: 18px; letter-spacing: -.03em; }
.direction-card p { color: var(--muted); font-size: 13px; line-height: 1.36; margin: 0; }
.direction-card.active { outline: 1px solid var(--lime); background: rgba(216,255,95,.11); }

.trainer-card {
  padding: 0;
  overflow: hidden;
}
.trainer-photo {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.trainer-photo:after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(0deg, rgba(9,10,12,.92), transparent);
}
.trainer-content { padding: 16px; }
.trainer-title { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.trainer-title h3 { margin: 0; font-size: 24px; letter-spacing: -.045em; }
.trainer-title span { color: var(--muted); display: block; margin-top: 4px; font-size: 13px; line-height: 1.32; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.tag { border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.06); padding: 6px 9px; border-radius: 999px; font-size: 12px; }
.quote { color: var(--text); line-height: 1.42; margin: 0 0 14px; }

.price-card { position: relative; }
.price-card.popular { border-color: rgba(216,255,95,.58); background: linear-gradient(145deg, rgba(216,255,95,.13), rgba(255,255,255,.05)); }
.price-card h3 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.price { font-size: 30px; font-weight: 950; letter-spacing: -.06em; margin: 14px 0 4px; }
.price small { font-size: 14px; color: var(--muted); letter-spacing: 0; font-weight: 600; }
.benefit-list { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.benefit-list li { color: var(--muted); font-size: 13px; line-height: 1.3; }
.benefit-list li:before { content: "•"; color: var(--lime); margin-right: 8px; }
.ribbon { position: absolute; right: 14px; top: 14px; color: #0c0c0c; background: var(--lime); font-weight: 850; padding: 7px 10px; border-radius: 999px; font-size: 12px; }

.booking-panel { display: grid; gap: 12px; }
.date-strip { display: flex; gap: 8px; overflow: auto; padding-bottom: 6px; }
.date-btn, .slot-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  border-radius: 18px;
  min-width: 76px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
}
.date-btn.active, .slot-btn.active { background: var(--lime); color: #101111; border-color: var(--lime); font-weight: 850; }
.date-btn small { display: block; color: inherit; opacity: .72; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.progress-ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--lime) var(--progress, 42%), rgba(255,255,255,.1) 0);
  margin: 10px auto;
  position: relative;
}
.progress-ring:before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #111317; }
.progress-ring strong { position: relative; z-index: 1; font-size: 26px; }

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.history-item:last-child { border-bottom: 0; }
.history-item b { display: block; }
.history-item span { color: var(--muted); font-size: 13px; }
.status { border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 850; }
.status.planned { background: rgba(216,255,95,.12); color: var(--lime); }
.status.completed { background: rgba(182,255,216,.12); color: var(--mint); }
.status.missed { background: rgba(255,118,111,.12); color: var(--danger); }

.referral-box {
  border: 1px dashed rgba(216,255,95,.5);
  border-radius: 26px;
  padding: 18px;
  background: rgba(216,255,95,.08);
}
.referral-code { font-size: 26px; letter-spacing: .04em; font-weight: 950; margin: 10px 0; }

.free-plan {
  background: linear-gradient(145deg, rgba(217,197,140,.16), rgba(255,255,255,.05));
}
.workout-preview { max-height: 270px; overflow: auto; padding-right: 6px; color: var(--muted); line-height: 1.48; }
.workout-preview b { color: var(--text); }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 22px), 510px);
  z-index: 40;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(16,18,22,.8);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.36);
}
.nav-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 20px;
  padding: 9px 4px;
  display: grid;
  gap: 2px;
  place-items: center;
  cursor: pointer;
  font-size: 11px;
}
.nav-btn i { font-style: normal; font-size: 19px; }
.nav-btn.active { color: #101111; background: var(--lime); font-weight: 900; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 480px);
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(246,243,234,.94);
  color: #101111;
  box-shadow: 0 20px 60px rgba(0,0,0,.38);
  font-weight: 750;
}

.empty { color: var(--muted); padding: 14px 0; line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.kicker { color: var(--gold); font-weight: 850; font-size: 13px; }

.role-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 10px 6px; vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 700; }

@media (max-width: 380px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .grid.two, .goal-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 34px; }
  .trainer-photo { height: 240px; }
}

.plain-page { display: grid; place-items: center; padding: 20px; }
.demo-payment { max-width: 480px; margin-top: 0; }
