/* CoachMe — Dark theme, iPhone-optimized (390px) */

:root {
  --bg:           #0d0d0d;
  --surface:      #1a1a1a;
  --surface-2:    #242424;
  --border:       #2a2a2a;
  --green:        #4CAF50;
  --green-dark:   #388E3C;
  --green-dim:    rgba(76, 175, 80, 0.15);
  --purple:       #6B46C1;
  --purple-dim:   rgba(107, 70, 193, 0.85);
  --red:          #EF5350;
  --text:         #ffffff;
  --text-2:       #aaaaaa;
  --text-3:       #666666;
  --radius:       16px;
  --radius-sm:    10px;
  --nav-height:   68px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Scrollable page content ─────────────────────────── */
.page {
  padding: 0 16px;
  overflow-x: hidden;
}

/* ── App Header ──────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}

.app-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.app-header__logo-icon {
  font-size: 22px;
}

.app-header__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}

.app-header__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Greeting ─────────────────────────────────────────── */
.greeting {
  padding: 20px 16px 0;
}

.greeting__sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.greeting__main {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.card--green {
  background: var(--green);
  border-color: transparent;
  position: relative;
  overflow: hidden;
}

.card--purple {
  background: var(--purple-dim);
  border: 1px solid rgba(107, 70, 193, 0.4);
}

.card--flat {
  background: var(--surface-2);
  border-color: transparent;
}

/* ── Today's Workout Card ────────────────────────────── */
.workout-card {
  color: #fff;
}

.workout-card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

.workout-card__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.workout-card__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.workout-card__meta {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workout-card__meta-sep { opacity: 0.6; }

.workout-card__image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}

/* ── Next Exercise ───────────────────────────────────── */
.next-exercise {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.next-exercise__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.next-exercise__name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}

.next-exercise__detail {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); opacity: 0.9; }

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--secondary {
  background: var(--surface-2);
  color: var(--text);
}

.btn--danger {
  background: var(--red);
  color: #fff;
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
}

.btn-sm {
  height: 40px;
  font-size: 14px;
  border-radius: 10px;
  padding: 0 16px;
  width: auto;
}

/* ── Freier Gym-Baukasten ───────────────────────────────── */
.gym-builder-page {
  padding-bottom: calc(96px + var(--safe-bottom));
}

.gym-builder-header {
  padding-bottom: 4px;
}

.gym-builder-main {
  padding-top: 8px;
}

.gym-builder-hero {
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 16px;
  overflow: hidden;
}

.gym-builder-hero h1 {
  font-size: 34px;
  line-height: 1.02;
  margin-top: 10px;
  letter-spacing: 0;
}

.gym-builder-hero p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.35;
  max-width: 95%;
}

.gym-builder-hero__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.gym-builder-hero__meta span {
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: rgba(0,0,0,.12);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.gym-builder-panel,
.gym-builder-sofia {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.gym-builder-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gym-builder-section-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.gym-builder-section-head span {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.gym-builder-selected {
  display: grid;
  gap: 8px;
}

.gym-builder-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.gym-builder-row img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
}

.gym-builder-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.gym-builder-row__top strong {
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gym-builder-row__top button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  flex-shrink: 0;
}

.gym-builder-controls {
  display: grid;
  grid-template-columns: 68px 62px 1fr;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.gym-builder-controls > span,
.gym-builder-weight {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}

.gym-builder-weight {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  overflow: hidden;
  border-color: rgba(76,175,80,.45);
  background: var(--green-dim);
}

.gym-builder-weight button {
  height: 100%;
  color: #fff;
  background: rgba(76,175,80,.18);
  font-size: 13px;
  font-weight: 800;
}

.gym-builder-weight output {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.gym-builder-empty {
  padding: 18px 8px;
  color: var(--text-3);
  text-align: center;
  font-size: 13px;
}

.gym-builder-search {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 0 12px;
}

.gym-builder-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 2px;
}

.gym-builder-chip {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.gym-builder-chip--active {
  background: var(--green-dark);
  border-color: var(--green);
  color: #fff;
}

.gym-builder-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.gym-builder-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.gym-builder-tile[hidden] {
  display: none;
}

.gym-builder-tile img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  background: var(--surface);
}

.gym-builder-tile__body {
  padding: 10px;
}

.gym-builder-tile__body strong {
  display: block;
  min-height: 34px;
  font-size: 13px;
  line-height: 1.25;
}

.gym-builder-tile__body span {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  margin-top: 3px;
}

.gym-builder-tile__body button {
  width: 100%;
  min-height: 34px;
  margin-top: 9px;
  border-radius: 9px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.gym-builder-sofia {
  border-left: 3px solid var(--purple);
}

.gym-builder-sofia p {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.35;
}

.gym-builder-error,
.gym-builder-success {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
}

.gym-builder-error {
  background: rgba(239,83,80,.12);
  border: 1px solid var(--red);
  color: var(--red);
}

.gym-builder-success {
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: var(--green);
}

.gym-builder-savebar {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 430px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 10px;
  padding: 10px 16px calc(12px + var(--safe-bottom));
  background: rgba(13,13,13,.94);
  border-top: 1px solid var(--border);
  z-index: 40;
}

.gym-builder-savebar label {
  min-width: 0;
}

.gym-builder-savebar label span {
  display: none;
}

.gym-builder-savebar input,
.gym-builder-savebar button {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
}

.gym-builder-savebar input {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  font-size: 15px;
}

.gym-builder-savebar button {
  background: var(--green);
  color: #fff;
}

.gym-builder-savebar button:disabled {
  opacity: .65;
}

/* ── Daily Overview (3-col stats) ────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
}

.stat-card__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.stat-card__value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.stat-card__value--green { color: var(--green); }

.stat-card__bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.stat-card__bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ── Section labels ──────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

/* ── Shake Reminder (purple banner) ─────────────────── */
.shake-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shake-banner__content {}

.shake-banner__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 4px;
}

.shake-banner__body {
  font-size: 16px;
  font-weight: 700;
}

.shake-banner__sub {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}

.shake-banner__icon {
  font-size: 36px;
  flex-shrink: 0;
}

/* ── Weekly progress ─────────────────────────────────── */
.week-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
}

.week-label {
  font-size: 14px;
  color: var(--text-2);
}

.week-checkmarks {
  display: flex;
  gap: 6px;
}

.week-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.week-check--empty {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
}

/* ── Cycle dots ──────────────────────────────────────── */
.cycle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 4px;
}

.cycle-bar__label {
  font-size: 13px;
  color: var(--text-2);
}

.cycle-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cycle-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
}

.cycle-dot--active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.cycle-dot--done {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* ── Bottom Navigation ───────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  background: rgba(18, 18, 18, 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 100;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.15s;
  text-decoration: none;
}

.bottom-nav__item--active {
  color: var(--green);
}

.bottom-nav__icon {
  font-size: 22px;
  line-height: 1;
}

/* ── Exercise list (workout.php) ─────────────────────── */
.exercise-list { list-style: none; }

.exercise-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.exercise-row:last-child { border-bottom: none; }

.exercise-row__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
}

.exercise-row__icon {
  font-size: 24px;
  flex-shrink: 0;
}

.exercise-row__body { flex: 1; }

.exercise-row__name {
  font-size: 15px;
  font-weight: 600;
}

.exercise-row__sets {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 1px;
}

.exercise-row__check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exercise-row__check--done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-size: 13px;
}

/* ── Set tracker (exercise.php) ──────────────────────── */
.set-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.set-control__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  text-align: center;
}

.set-control__value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.set-control__value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  text-align: center;
  flex: 1;
}

.set-control__btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-2);
  flex-shrink: 0;
}

.set-control__btn:active { background: var(--border); }

/* ── Progression hint ────────────────────────────────── */
.progression-hint {
  background: var(--green-dim);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px 0;
}

.progression-hint__tag {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.progression-hint__text {
  font-size: 13px;
  color: var(--text-2);
}

/* ── Set rows ────────────────────────────────────────── */
.set-rows { margin-top: 8px; }

.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.set-row__num {
  font-size: 13px;
  color: var(--text-3);
  width: 16px;
  flex-shrink: 0;
}

.set-row__data {
  flex: 1;
  font-size: 15px;
  color: var(--text-2);
}

.set-row__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.set-row__check--done {
  background: var(--green);
  border-color: var(--green);
}

/* ── Timer (bike.php) ────────────────────────────────── */
.timer-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 6px solid var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 24px auto;
  position: relative;
}

.timer-ring__phase {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 4px;
}

.timer-ring__time {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
}

.timer-ring__next-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 6px;
}

.timer-ring__next {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 600;
}

/* ── Nutrition (nutrition.php) ───────────────────────── */
.nutrition-goal {
  margin-bottom: 8px;
}

.nutrition-goal__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.nutrition-goal__name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
}

.nutrition-goal__values {
  font-size: 13px;
  color: var(--text-2);
}

.nutrition-goal__big {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

.nutrition-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.nutrition-bar__fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.nutrition-bar__pct {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
  text-align: right;
}

.meal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.meal-row:last-child { border-bottom: none; }

.meal-row__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}

.meal-row__icon img { width: 100%; height: 100%; object-fit: cover; }

.meal-row__body { flex: 1; }

.meal-row__name {
  font-size: 15px;
  font-weight: 600;
}

.meal-row__macros {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 1px;
}

.meal-row__add {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-2);
  flex-shrink: 0;
}

/* ── Progress / Photo comparison ─────────────────────── */
.photo-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.photo-slot {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface-2);
  position: relative;
}

.photo-slot img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.photo-slot__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px 10px 8px;
  font-size: 12px;
  font-weight: 600;
}

.photo-slot__date {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 1px;
}

/* ── Coach chat ──────────────────────────────────────── */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 80px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
}

.chat-bubble--coach {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-bubble--user {
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-input-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.chat-input::placeholder { color: var(--text-3); }

.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Page header (sub-pages) ─────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}

.page-header__back {
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-header__title {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
}

.page-header__meta {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Pause timer ─────────────────────────────────────── */
.pause-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.pause-bar__label {
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pause-bar__time {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Tab bar (within a page) ─────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 12px 0;
}

.tab-bar__item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-bar__item--active {
  color: var(--text);
  border-bottom-color: var(--green);
}

/* ── Spacers & utilities ─────────────────────────────── */
.mt-4  { margin-top: 4px;  }
.mt-8  { margin-top: 8px;  }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.text-sm   { font-size: 13px; }
.text-xs   { font-size: 11px; }
.text-muted { color: var(--text-2); }
.text-green { color: var(--green); }
.fw-700    { font-weight: 700; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ── Quick actions row (bottom panel style) ───────────── */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.quick-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-action--green {
  background: var(--green-dim);
  border-color: rgba(76, 175, 80, 0.3);
}

.quick-action__icon { font-size: 22px; }
.quick-action__label { font-size: 13px; font-weight: 700; }
.quick-action__sub   { font-size: 11px; color: var(--text-2); }


/* ── Coming soon placeholder ─────────────────────────── */
.coming-soon {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-3);
}

.coming-soon__icon { font-size: 48px; margin-bottom: 12px; }

/* ── Daily Checkin — rating buttons ─────────────────────────────── */
.rating-row {
    display: flex;
    gap: 8px;
}
/* Hide the actual radio inputs */
.rating-radio {
    display: none;
}
/* The <label> is the visible button */
.rating-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    background: var(--surface-2);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background .1s, border-color .1s, color .1s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.rating-btn:active {
    background: var(--border);
}
/* Selected state — driven by :checked on the preceding radio */
.rating-radio:checked + .rating-btn {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.coming-soon__text { font-size: 16px; }

/* ── Onboarding ──────────────────────────────────────── */
.onboarding-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 8px;
}
.onboarding-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: var(--text-3);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
}
.onboarding-step--active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.onboarding-step--done {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
}
.onboarding-step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 60px;
}
.photo-slot {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    display: block;
    -webkit-tap-highlight-color: transparent;
}
.photo-slot__inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.goal-option {
    display: block;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .12s, background .12s;
    -webkit-tap-highlight-color: transparent;
}
.goal-option--selected {
    border-color: var(--green);
    background: rgba(76, 175, 80, .12);
}
.goal-option__label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Watch Sync Flash Banner */
.watch-flash-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--green-dim);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
}
.watch-flash-banner__icon { font-size: 1.25rem; flex-shrink: 0; }
.watch-flash-banner__text { flex: 1; margin: 0; font-size: 0.9rem; color: var(--text); }
.watch-flash-banner__close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

/* 3-Foto Slots */
.photo-slots-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.photo-slot-3__preview {
  aspect-ratio: 3/4;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 0.3rem;
  transition: border-color 0.15s;
}
.photo-slot-3__preview:hover { border-color: var(--green); }
.photo-slot-3__preview.has-photo { border-style: solid; border-color: var(--green); }
.photo-slot-3__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.photo-slot-3__icon { font-size: 1.6rem; }
.photo-slot-3__label { font-size: 0.75rem; color: var(--text-2); text-align: center; }

/* ── Quick-Check Foto ────────────────────────────────── */
.quickcheck-slot {
  aspect-ratio: 3/4;
  max-width: 200px;
  margin: 0 auto;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 0.4rem;
  transition: border-color 0.15s;
}
.quickcheck-slot:hover { border-color: var(--purple); }
.quickcheck-slot.has-photo { border-style: solid; border-color: var(--purple); }
.quickcheck-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.quickcheck-slot__icon { font-size: 2rem; }
.quickcheck-slot__label { font-size: 0.8rem; color: var(--text-2); }
.quickcheck-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--purple-dim);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}

/* Vergleichsansicht */
.photo-compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.photo-compare-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.photo-compare-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.photo-compare-item span { font-size: 0.75rem; color: var(--text-2); text-align: center; }
.photo-placeholder {
  aspect-ratio: 3/4;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 0.8rem;
}

/* Dashboard redesign */
.dashboard-redesign {
  background:
    radial-gradient(circle at 70% 0%, rgba(76, 175, 80, 0.12), transparent 28%),
    linear-gradient(180deg, #080d0f 0%, var(--bg) 48%, #080808 100%);
}

.dashboard-redesign > .app-header,
.dashboard-redesign > .greeting,
.dashboard-redesign > main.page:not(.dashboard-page) {
  display: none;
}

.dashboard-page {
  padding: 0 18px 18px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 18px 12px;
}

.dashboard-greeting-kicker {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.35rem;
  line-height: 1.2;
}

.dashboard-greeting-title {
  color: var(--green);
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.dashboard-avatar {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(76,175,80,.28), rgba(255,255,255,.06));
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
}

.dashboard-avatar:disabled {
  cursor: wait;
  opacity: .72;
}

.dashboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-avatar--empty::before {
  content: "S";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 800;
}

.dashboard-avatar__status {
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #101416;
}

.sofia-hero,
.today-panel,
.yazio-activity-card,
.week-progress-panel,
.nutrition-panel,
.dashboard-mini-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(25, 34, 36, 0.95), rgba(14, 18, 20, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.sofia-hero {
  position: relative;
  min-height: 250px;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  margin-top: 16px;
}

.sofia-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11, 28, 22, 0.98) 0%, rgba(11, 28, 22, 0.9) 48%, rgba(11, 28, 22, 0.22) 100%),
    radial-gradient(circle at 24% 18%, rgba(76, 175, 80, 0.22), transparent 32%);
  pointer-events: none;
}

.sofia-hero__copy {
  position: relative;
  z-index: 2;
  width: 62%;
  padding: 24px 0 24px 22px;
  min-width: 0;
}

.sofia-hero__eyebrow {
  color: var(--green);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.sofia-hero h2 {
  max-width: 230px;
  font-size: clamp(1.45rem, 7.1vw, 2.05rem);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.sofia-hero p {
  max-width: 220px;
  color: rgba(255, 255, 255, 0.78);
  font-size: .95rem;
  line-height: 1.45;
  margin-top: 14px;
}

.dashboard-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  max-width: 100%;
  margin-top: 18px;
  padding: 0 20px;
  border-radius: 26px;
  background: linear-gradient(135deg, #67e082, var(--green));
  color: #07130b;
  font-size: 1rem;
  font-weight: 800;
}

.sofia-hero__visual {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  width: 48%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  background: linear-gradient(145deg, rgba(76,175,80,.12), transparent);
}

.sofia-hero__visual img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  object-position: center top;
}

.sofia-hero__visual--empty::before {
  content: "Sofia";
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 236px;
  color: var(--green);
  font-size: 2rem;
  font-weight: 800;
}

.dashboard-section {
  margin-top: 26px;
}

.dashboard-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-section__header h2 {
  color: rgba(255, 255, 255, 0.68);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dashboard-section__header a {
  color: var(--green);
  font-size: 1rem;
  font-weight: 650;
}

.today-panel {
  display: block;
  border-radius: 18px;
  padding: 16px;
}

.today-panel__top {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.today-panel__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.18);
  color: var(--green);
  font-size: .8rem;
  font-weight: 800;
}

.today-panel h3 {
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 800;
}

.today-panel p {
  color: rgba(255, 255, 255, 0.56);
  font-size: .94rem;
  margin-top: 6px;
}

.today-panel__badge {
  align-self: start;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(76, 175, 80, 0.14);
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.today-panel__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.today-panel__metrics div {
  min-width: 0;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.today-panel__metrics div:first-child {
  border-left: 0;
  padding-left: 0;
}

.today-panel__metrics strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.today-panel__metrics span {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: .78rem;
  margin-top: 6px;
}

.today-quick-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.today-quick-actions__button {
  width: 100%;
  border: 1px solid rgba(85, 212, 131, 0.42);
  border-radius: 14px;
  background: rgba(85, 212, 131, 0.13);
  color: var(--green);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  padding: 12px 14px;
}

.today-quick-actions__button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.today-quick-actions__message {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.today-quick-actions__message.is-error {
  color: var(--red);
}

.daily-plan-reason {
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.daily-plan-reason__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-plan-reason__head strong {
  font-size: .9rem;
}

.daily-plan-reason__head span {
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-plan-reason > p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: .92rem;
  line-height: 1.42;
}

.daily-plan-reason details {
  margin-top: 10px;
}

.daily-plan-reason summary {
  color: rgba(255, 255, 255, 0.58);
  font-size: .86rem;
  font-weight: 700;
  list-style-position: inside;
}

.daily-plan-reason__event {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
}

.daily-plan-reason__event span {
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-plan-reason__event p {
  color: rgba(255, 255, 255, 0.66);
  font-size: .86rem;
  line-height: 1.35;
}

.yazio-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.yazio-activity-card {
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  border-radius: 16px;
  padding: 14px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.yazio-activity-card:disabled {
  opacity: .68;
  cursor: wait;
}

.yazio-activity-card span,
.yazio-activity-card small {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: .78rem;
  line-height: 1.25;
}

.yazio-activity-card span {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.yazio-activity-card strong {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.05;
  margin: 10px 0 5px;
  overflow-wrap: anywhere;
}

.yazio-activity-card small {
  color: var(--green);
  font-weight: 700;
}

.yazio-activity-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.yazio-activity-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .08);
}

.yazio-activity-list__item strong,
.yazio-activity-list__item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.yazio-activity-list__item strong {
  color: var(--text);
  font-size: .88rem;
}

.yazio-activity-list__item span {
  color: rgba(255, 255, 255, .58);
  font-size: .8rem;
  text-align: right;
}

.dashboard-inline-log {
  margin-top: 10px;
}

.dashboard-inline-log > button,
.dashboard-bike-form button {
  color: var(--green);
  font-weight: 700;
}

.dashboard-bike-form {
  display: none;
  grid-template-columns: 76px auto 1fr;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
}

.dashboard-bike-form input {
  width: 76px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  text-align: center;
}

#bike-log-msg {
  display: none;
  grid-column: 1 / -1;
  color: var(--green);
  font-size: .85rem;
}

.week-progress-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 18px;
  padding: 18px 14px;
}

.week-progress-panel div {
  position: relative;
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.week-progress-panel div:first-child {
  border-left: 0;
}

.week-progress-panel span,
.week-progress-panel small {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: .82rem;
}

.week-progress-panel strong {
  display: block;
  margin-top: 14px;
  font-size: 1.35rem;
}

.week-progress-panel i,
.nutrition-ring {
  --ring: calc(var(--pct) * 1%);
  background: conic-gradient(var(--green) var(--ring), rgba(255,255,255,.09) 0);
}

.week-progress-panel i {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin-top: 12px;
  position: relative;
}

.week-progress-panel i::after,
.nutrition-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #121719;
}

.nutrition-panel {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border-radius: 18px;
  padding: 20px 16px;
}

.nutrition-ring {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.nutrition-ring strong,
.nutrition-ring span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.nutrition-ring strong {
  color: var(--green);
  font-size: 1.45rem;
}

.nutrition-ring span {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: .78rem;
}

.nutrition-panel__bars {
  display: grid;
  gap: 16px;
}

.nutrition-panel__bars label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.72);
  font-size: .92rem;
}

.nutrition-panel__bars b {
  color: var(--text);
  white-space: nowrap;
}

.nutrition-panel__bars i {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}

.nutrition-panel__bars i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65dc7d, var(--green));
}

.dashboard-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
}

.dashboard-mini-card strong,
.dashboard-mini-card span {
  display: block;
}

.dashboard-mini-card span {
  color: rgba(255,255,255,.58);
  font-size: .86rem;
  margin-top: 3px;
}

.dashboard-mini-card b {
  color: var(--green);
  font-size: .86rem;
  white-space: nowrap;
}

.dashboard-mini-card--warning {
  border-color: rgba(255, 152, 0, .38);
}

.dashboard-link-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.dashboard-link-row a {
  min-height: 46px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .76);
  font-size: .82rem;
  font-weight: 700;
}

@media (max-width: 520px) {
  .sofia-hero {
    min-height: 340px;
  }

  .sofia-hero::before {
    background:
      linear-gradient(90deg, rgba(11, 28, 22, 0.98) 0%, rgba(11, 28, 22, 0.93) 55%, rgba(11, 28, 22, 0.56) 100%),
      radial-gradient(circle at 24% 18%, rgba(76, 175, 80, 0.18), transparent 32%);
  }

  .sofia-hero__copy {
    width: 61%;
    padding: 22px 0 20px 20px;
  }

  .sofia-hero h2,
  .sofia-hero p {
    max-width: 100%;
  }

  .sofia-hero h2 {
    font-size: 1.54rem;
    line-height: 1.06;
  }

  .sofia-hero__visual {
    opacity: .64;
    width: 45%;
  }

  .dashboard-cta {
    min-height: 44px;
    padding: 0 14px;
    font-size: .9rem;
  }

  .week-progress-panel,
  .nutrition-panel {
    grid-template-columns: 1fr;
  }
}

/* Workout builder redesign */
.workout-builder-page {
  background:
    radial-gradient(circle at 68% 0%, rgba(76, 175, 80, 0.12), transparent 28%),
    linear-gradient(180deg, #080d0f 0%, var(--bg) 52%, #080808 100%);
}

.workout-builder-header {
  background: transparent;
}

.workout-builder-main {
  padding: 0 18px 18px;
}

.workout-builder-hero,
.workout-builder-section,
.workout-builder-sofia,
.workout-builder-empty {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(25, 34, 36, 0.95), rgba(14, 18, 20, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.workout-builder-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
}

.workout-builder-hero::before {
  content: "";
  position: absolute;
  inset: -40% auto auto 28%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.1);
  pointer-events: none;
}

.workout-builder-hero__top,
.workout-builder-section__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workout-builder-tag {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(76, 175, 80, 0.14);
  color: var(--green);
  font-size: .78rem;
  font-weight: 850;
}

.workout-builder-tag--muted {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .72);
}

.workout-builder-eyebrow {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workout-builder-hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  max-width: 330px;
  color: var(--text);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 880;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.workout-builder-hero p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.74);
  font-size: .98rem;
  line-height: 1.45;
}

.workout-builder-progress {
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.workout-builder-progress span {
  display: block;
  color: rgba(255, 255, 255, .62);
  font-size: .86rem;
}

.workout-builder-progress i {
  display: block;
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.workout-builder-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65dc7d, var(--green));
}

.workout-builder-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.workout-builder-actions .btn {
  min-width: 0;
  height: 48px;
  font-size: .95rem;
}

.workout-builder-section,
.workout-builder-sofia,
.workout-builder-empty {
  margin-top: 16px;
  border-radius: 18px;
  padding: 16px;
}

.workout-builder-section__header h2,
.workout-builder-section h2 {
  color: rgba(255, 255, 255, 0.72);
  font-size: .9rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workout-builder-section__header a,
.workout-builder-section__header button,
.workout-builder-section__header span {
  color: var(--green);
  font-size: .88rem;
  font-weight: 800;
}

.workout-builder-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.workout-builder-day {
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
}

.workout-builder-day strong,
.workout-builder-day span {
  display: block;
}

.workout-builder-day strong {
  color: var(--text);
  font-size: .78rem;
}

.workout-builder-day span {
  color: rgba(255, 255, 255, .52);
  font-size: .68rem;
}

.workout-builder-day--active {
  border-color: rgba(76, 175, 80, .46);
  background: rgba(76, 175, 80, .13);
}

.workout-builder-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.workout-builder-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}

.workout-builder-row--done {
  border-color: rgba(76, 175, 80, .42);
  background: rgba(76, 175, 80, .09);
}

.workout-builder-check,
.workout-builder-more {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  font-weight: 900;
}

.workout-builder-check {
  border: 1px solid rgba(76, 175, 80, .35);
  background: rgba(76, 175, 80, .08);
}

.workout-builder-row--done .workout-builder-check {
  background: var(--green);
  color: #061108;
  border-color: var(--green);
}

.workout-builder-more {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .045);
}

.workout-builder-row__body {
  min-width: 0;
}

.workout-builder-row__body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: .98rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-builder-row__body small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .58);
  font-size: .8rem;
  line-height: 1.3;
}

.workout-builder-row--done .workout-builder-row__body strong {
  color: rgba(255, 255, 255, .72);
}

.workout-builder-row--done .workout-builder-row__body small {
  color: rgba(255, 255, 255, .44);
}

.workout-builder-add {
  min-height: 46px;
  display: grid;
  place-items: center;
  margin-top: 10px;
  border: 1px solid rgba(76, 175, 80, .44);
  border-radius: 14px;
  color: var(--green);
  font-size: .92rem;
  font-weight: 850;
}

.workout-builder-edit-panel {
  display: grid;
  gap: 9px;
}

.workout-builder-edit-panel h2 {
  margin-bottom: 3px;
}

.workout-builder-edit-panel button,
.workout-builder-edit-panel a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  text-align: left;
}

.workout-builder-edit-panel strong,
.workout-builder-edit-panel span {
  display: block;
}

.workout-builder-edit-panel strong {
  color: var(--text);
  font-size: .95rem;
}

.workout-builder-edit-panel span {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, .58);
  font-size: .8rem;
  line-height: 1.35;
}

.workout-builder-alternatives p,
.workout-builder-sofia p,
.workout-builder-empty p {
  margin-top: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: .92rem;
  line-height: 1.45;
}

.workout-builder-sofia {
  border-color: rgba(76, 175, 80, .28);
  background: linear-gradient(145deg, rgba(17, 28, 18, .95), rgba(13, 18, 14, .98));
}

.workout-builder-sofia span {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: var(--green);
  font-size: .78rem;
  font-weight: 850;
}

.workout-builder-empty strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
}

.workout-builder-empty .btn {
  margin-top: 14px;
}

@media (max-width: 380px) {
  .workout-builder-main {
    padding-inline: 14px;
  }

  .workout-builder-actions {
    grid-template-columns: 1fr;
  }

  .workout-builder-hero h1 {
    font-size: 1.72rem;
  }

  .workout-builder-week {
    gap: 4px;
  }
}

/* ── Plan editor redesign ────────────────────────────── */
.plan-page {
  padding-bottom: 112px;
}

.plan-hero {
  padding: 4px 2px 8px;
}

.plan-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.plan-hero h1 {
  margin: 0;
  max-width: 420px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
}

.plan-hero p:not(.plan-kicker) {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.45;
}

.plan-section {
  margin-top: 18px;
}

.plan-phase-card,
.plan-empty-card,
.plan-day-panel,
.plan-week-list,
.plan-feedback-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.028));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

.plan-phase-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
}

.plan-activity-adjustment {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(76,175,80,0.28);
  background: rgba(76,175,80,0.08);
}

.plan-activity-adjustment strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.plan-activity-adjustment p {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.35;
}

.plan-activity-adjustment .plan-sofia-mark {
  width: 52px;
  height: 52px;
}

.plan-sofia-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,0.12), transparent 24%),
    linear-gradient(145deg, rgba(76,175,80,0.22), rgba(255,255,255,0.035));
  border: 1px solid rgba(76,175,80,0.22);
  color: var(--green);
  font-size: 30px;
  font-weight: 900;
}

.plan-sofia-mark--small {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  font-size: 22px;
}

.plan-phase-card__body span,
.plan-day-editor__weekday {
  display: block;
  color: var(--text-2);
  font-size: 13px;
}

.plan-phase-card__body strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 23px;
  line-height: 1.15;
}

.plan-phase-card__body small {
  display: block;
  margin-top: 5px;
  color: var(--text-2);
  font-size: 13px;
}

.plan-progress {
  height: 7px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.11);
}

.plan-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.plan-empty-card {
  margin-top: 14px;
  padding: 16px;
}

.plan-empty-card strong,
.plan-no-exercises strong,
.plan-feedback-card strong,
.plan-sheet-tip strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.plan-empty-card p,
.plan-no-exercises p,
.plan-feedback-card p,
.plan-freestyle-sheet p,
.plan-sheet-tip p {
  margin: 7px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}

.plan-empty-card .btn {
  margin-top: 14px;
}

.plan-week-list {
  overflow: hidden;
}

.plan-week-row {
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.plan-week-row:last-child {
  border-bottom: 0;
}

.plan-week-row--selected {
  background: rgba(76,175,80,0.08);
}

.plan-week-row__day {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 800;
}

.plan-week-row__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #061108;
  font-size: 11px;
  font-weight: 900;
}

.plan-week-row__icon--bike {
  background: rgba(76,175,80,0.84);
}

.plan-week-row__icon--home {
  background: var(--purple);
  color: #fff;
}

.plan-week-row__icon--rest {
  background: var(--surface-2);
  color: var(--text-2);
}

.plan-week-row__body {
  min-width: 0;
}

.plan-week-row__body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-week-row__body small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-week-row__chevron {
  color: var(--text-3);
  font-size: 22px;
}

.plan-status {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.plan-status--planned {
  background: rgba(76,175,80,0.14);
  color: var(--green);
}

.plan-status--adjusted {
  background: rgba(244,197,66,0.14);
  color: #f4c542;
}

.plan-status--optional {
  background: rgba(107,70,193,0.18);
  color: #c7a8ff;
}

.plan-status--rest {
  background: var(--surface-2);
  color: var(--text-2);
}

.plan-freestyle-open {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 800;
}

.plan-freestyle-open span {
  font-size: 22px;
  line-height: 1;
}

.plan-day-panel {
  margin-top: 20px;
  padding: 16px;
  scroll-margin-top: 14px;
}

.plan-day-editor__header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
}

.plan-day-editor__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(76,175,80,0.14);
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.plan-day-editor__header h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.12;
}

.plan-day-editor__header p {
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
}

.plan-exercise-label {
  margin-top: 20px;
}

.plan-exercise-list {
  display: grid;
  gap: 8px;
}

.plan-exercise-row {
  display: grid;
  grid-template-columns: 28px 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.025);
}

.plan-exercise-row__num {
  color: var(--text-2);
  font-size: 15px;
  text-align: center;
}

.plan-exercise-placeholder {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76,175,80,0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(76,175,80,0.13), rgba(255,255,255,0.035)),
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(255,255,255,0.03) 10px 11px);
  color: var(--green);
  font-size: 18px;
}

.plan-exercise-row__body {
  min-width: 0;
}

.plan-exercise-row__body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-exercise-row__body small {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 13px;
}

.plan-exercise-tag {
  display: inline-block;
  margin-top: 7px;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
}

.plan-exercise-tag--good,
.plan-exercise-tag--neutral {
  background: rgba(76,175,80,0.13);
  color: var(--green);
}

.plan-exercise-tag--warn {
  background: rgba(244,197,66,0.14);
  color: #f4c542;
}

.plan-exercise-tag--danger {
  background: rgba(244,67,54,0.14);
  color: var(--red);
}

.plan-exercise-actions {
  display: grid;
  gap: 5px;
}

.plan-exercise-actions button {
  min-width: 76px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
}

.plan-exercise-actions button[data-action="remove"] {
  color: var(--red);
}

.plan-add-exercise {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,0.24);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 800;
}

.plan-field {
  display: block;
  margin-top: 14px;
}

.plan-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}

.plan-field textarea,
.plan-field input,
.plan-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 12px;
  outline: none;
}

.plan-field textarea {
  min-height: 86px;
  resize: vertical;
}

.plan-field textarea:focus,
.plan-field input:focus,
.plan-field select:focus {
  border-color: var(--green);
}

.plan-save-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.plan-save-actions .btn {
  width: 100%;
}

.plan-sofia-feedback {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(76,175,80,0.24);
  border-radius: var(--radius-sm);
  background: rgba(76,175,80,0.08);
}

.plan-sofia-feedback--kritisch {
  border-color: rgba(244,197,66,0.3);
  background: rgba(244,197,66,0.08);
}

.plan-sofia-feedback--nicht_empfohlen {
  border-color: rgba(244,67,54,0.34);
  background: rgba(244,67,54,0.08);
}

.plan-sofia-feedback span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.plan-sofia-feedback--kritisch span {
  color: #f4c542;
}

.plan-sofia-feedback--nicht_empfohlen span {
  color: var(--red);
}

.plan-sofia-feedback p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.plan-no-exercises {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
}

.plan-no-exercises .btn {
  margin-top: 14px;
  width: 100%;
}

.plan-feedback-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.plan-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0,0,0,0.56);
}

.plan-freestyle-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 80;
  width: min(100%, 480px);
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, var(--surface), #0d1113);
  box-shadow: 0 -18px 70px rgba(0,0,0,0.44);
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}

.plan-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.plan-sheet-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.plan-sheet-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.plan-freestyle-form .btn {
  width: 100%;
  margin-top: 14px;
}

.plan-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.plan-form-message {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
}

.plan-form-message--ok {
  background: rgba(76,175,80,0.12);
  color: var(--green);
}

.plan-form-message--error {
  background: rgba(244,67,54,0.12);
  color: var(--red);
}

.plan-sheet-tip {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(76,175,80,0.18);
  border-radius: var(--radius-sm);
  background: rgba(76,175,80,0.07);
}

.hidden {
  display: none !important;
}

@media (max-width: 380px) {
  .plan-week-row {
    grid-template-columns: 28px 34px minmax(0, 1fr) auto;
  }

  .plan-week-row__chevron {
    display: none;
  }

  .plan-status {
    padding: 4px 6px;
    font-size: 11px;
  }

  .plan-day-editor__header {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .plan-day-editor__header > .plan-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .plan-exercise-row {
    grid-template-columns: 24px 48px minmax(0, 1fr);
  }

  .plan-exercise-actions {
    grid-column: 2 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .plan-exercise-actions button {
    min-width: 0;
  }
}

/* ── Coach Themes ─────────────────────────────────────────── */
.coach-sofia {
    --coach-primary: var(--green);
    --coach-dark:    var(--green-dark);
    --coach-dim:     var(--green-dim);
}
.coach-max {
    --coach-primary: var(--red);
    --coach-dark:    var(--red);
    --coach-dim:     rgba(192, 57, 43, 0.15);
}
.coach-max .sofia-hero {
    background: linear-gradient(135deg, #7b1a1a 0%, #c0392b 60%, #1a0a0a 100%);
}
.coach-max .sofia-hero::before {
    background: linear-gradient(180deg, transparent 60%, #1a0a0a 100%);
}
.coach-max .dashboard-cta {
    background: var(--red);
    border-color: var(--red);
}
.coach-max .today-panel {
    border-left-color: var(--red);
}

/* ── Quick-Log Kacheln ─────────────────────────────────────── */
.quick-log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 0;
}

.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.quick-card__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-card__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

.quick-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  height: 34px;
}

.quick-stepper__btn {
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.quick-stepper__btn:active { background: var(--border); }

.quick-stepper__val {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}

.quick-stepper__unit {
  font-size: 10px;
  color: var(--text-3);
  padding-right: 6px;
}

.quick-card__btn {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: auto;
}

.quick-card__btn:active { transform: scale(0.97); opacity: 0.85; }

.quick-card__btn--done {
  background: var(--surface-2);
  color: var(--green);
  border: 1px solid var(--green);
}

.coach-max .quick-card__btn { background: var(--red); }

/* ── Bike Simple-Karte ─────────────────────────────────────── */
.bike-simple-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
}

.bike-simple-card__info span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

.bike-simple-card__info strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 3px;
  color: var(--text);
}

.bike-simple-card__info small {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.bike-simple-card__btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.bike-simple-card__btns button {
  height: 38px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 14px;
  transition: opacity 0.15s, transform 0.1s;
}

.bike-simple-card__btns button:active { transform: scale(0.97); opacity: 0.85; }

.btn-bike-done { background: var(--green); color: #fff; }
.btn-bike-skip { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border) !important; }

/* ── Wochen-Pillen ─────────────────────────────────────────── */
.week-pills-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.week-pill {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
}

.week-pill--done { background: var(--green); }
.week-pill--today { background: var(--text-3); }
.coach-max .week-pill--done { background: var(--red); }

/* ── Ernährung vereinfacht ─────────────────────────────────── */
.nutr-simple {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nutr-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nutr-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.nutr-row__head span {
  font-size: 13px;
  color: var(--text-2);
}

.nutr-row__head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.nutr-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.nutr-bar__fill {
  height: 100%;
  border-radius: 2px;
  background: var(--green);
  transition: width 0.6s ease;
}

.nutr-bar__fill--kcal { background: var(--text-3); }
.nutr-bar__fill--steps { background: var(--purple); }

/* ── Dashboard Sektion ─────────────────────────────────────── */
.dash-section {
  margin-top: 20px;
}

.dash-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dash-section__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
}

.dash-section__link {
  font-size: 13px;
  color: var(--green);
  font-weight: 700;
}

/* ── Heute-Panel vereinfacht ───────────────────────────────── */
.today-card-simple {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.coach-max .today-card-simple { border-left-color: var(--red); }

.today-card-simple__left strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.today-card-simple__left span {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 3px;
  display: block;
}

.today-card-simple__right {
  font-size: 28px;
  flex-shrink: 0;
}

/* ── Link-Reihe ────────────────────────────────────────────── */
.dash-link-row {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 8px;
}

.dash-link-row a {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  text-align: center;
  text-decoration: none;
  transition: color 0.15s;
}

.dash-link-row a:active { color: var(--text); }

/* ── Wochenseite ───────────────────────────────────────────── */
.week-day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.week-day-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.week-day-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.week-day-card__label--today {
  color: var(--text);
}

.week-day-card__status {
  font-size: 12px;
  font-weight: 700;
}

.week-day-card__status--done { color: var(--green); }
.week-day-card__status--open { color: var(--text-3); }

.week-day-card__plan,
.week-day-card__extra {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 6px;
  border-top: 0.5px solid var(--border);
}

.week-day-card__col-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

.week-day-card__plan-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.week-day-card__extra-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.week-day-card__extra-row span:first-child { color: var(--text); }
.week-day-card__extra-row span:last-child  { color: var(--text-3); }

.week-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 14px;
}

.week-summary-row:last-child { border-bottom: none; }
.week-summary-row span { color: var(--text-2); }
.week-summary-row strong { color: var(--text); font-weight: 700; }
