/* =====================================================
   Вкладка «Тело»: ключевые показатели, прогноз веса
   и энергобаланс.
   ===================================================== */

/* ----------------- Ключевые показатели (вкладка «Тело») ----------------- */
.stat-row { display: flex; }
.stat-tile {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  padding: 0 4px;
}
.stat-tile + .stat-tile { border-left: 1px solid var(--border); }
.stat-val { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary); }
.stat-label { font-size: 11px; color: var(--text-muted); }
.stat-delta {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  letter-spacing: -0.2px;
}
.stat-delta.down { color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 13%, transparent); }
.stat-delta.up { color: var(--color-primary-2); background: color-mix(in srgb, var(--color-primary-2) 15%, transparent); }

/* Кнопки-действия (мягкие). */
.row-btns { display: flex; gap: 10px; margin-top: 12px; }
.btn-soft {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  border-radius: var(--r-pill);
  font-weight: 650;
  font-size: 14px;
  padding: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform var(--dur) var(--ease);
}
.btn-soft svg { width: 17px; height: 17px; color: var(--color-primary); }
.btn-soft:active { transform: scale(0.97); }

/* ----------------- Прогноз веса (похудение/набор) ----------------- */
.fc-card { position: relative; overflow: hidden; }
.fc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.fc-head .card-title { margin-bottom: 0; }
.fc-badge {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.fc-badge.cutting {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
}
.fc-badge.bulking {
  color: var(--color-primary-2);
  background: color-mix(in srgb, var(--color-primary-2) 16%, transparent);
}

/* Hero-строка: крупный темп слева + компактный чип цели справа. */
.fc-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 2px 0 12px;
}
.fc-goal-chip { margin-left: auto; }

/* Темп изменения веса — крупная цифра. */
.fc-rate { display: flex; flex-direction: column; gap: 1px; flex: none; }
.fc-rate-val { font-size: 27px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.05; }
.fc-rate-val i { font-size: 13px; font-weight: 700; font-style: normal; margin-left: 3px; }
.fc-rate.down .fc-rate-val { color: var(--color-primary); }
.fc-rate.up .fc-rate-val { color: var(--color-primary-2); }
.fc-rate-sub { font-size: 12.5px; color: var(--text-muted); }

/* Компактный чип цели справа от темпа. */
.fc-goal-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  min-width: 0;
}
.fc-goal-chip .gc-main {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.fc-goal-chip .gc-main svg { width: 14px; height: 14px; flex: none; }
.fc-goal-chip .gc-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.fc-goal-chip.ok {
  background: color-mix(in srgb, var(--color-primary) 9%, transparent);
}
.fc-goal-chip.ok .gc-main { color: var(--color-primary); }
.fc-goal-chip.warn {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.fc-goal-chip.warn .gc-main { color: var(--color-accent); }
.fc-goal-chip.muted { background: var(--surface-2); }
.fc-goal-chip.muted .gc-main { color: var(--text-secondary); }
.fc-goal-chip.muted .gc-main svg { color: var(--text-muted); }

/* Энергобаланс одной полоской: приход (заливка) против нормы (метка). */
.fc-balance { margin-bottom: 10px; }
.fc-bal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.fc-bal-name { font-size: 12.5px; font-weight: 650; color: var(--text-secondary); }
.fc-bal-val { font-size: 16px; font-weight: 800; }
.fc-bal-val i { font-size: 10px; font-weight: 600; color: var(--text-muted); font-style: normal; margin-left: 3px; }
.fc-bal-val.down { color: var(--color-primary); }
.fc-bal-val.up { color: var(--color-primary-2); }
.fc-bal-val.flat { color: var(--text-primary); }
.fc-bal-track {
  position: relative;
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.fc-bal-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--r-pill);
  transition: width var(--dur) var(--ease);
}
.fc-bal-fill.down { background: var(--color-primary); }
.fc-bal-fill.up { background: var(--color-primary-2); }
.fc-bal-fill.flat { background: var(--text-muted); }
/* Метка нормы расхода поверх полосы. */
.fc-bal-mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--text-secondary);
}
.fc-bal-cap {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.fc-bal-cap b { font-weight: 700; color: var(--text-secondary); }

.fc-chart { width: 100%; height: 128px; display: block; touch-action: none; }

/* Подсказка про интерактивность графика. */
.fc-scrub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.fc-scrub svg { width: 13px; height: 13px; flex: none; opacity: 0.8; }

/* Раскрывающаяся справка «как считается». */
.fc-info { margin-top: 4px; }
.fc-info summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-secondary);
  padding: 6px 0;
  user-select: none;
}
.fc-info summary::-webkit-details-marker { display: none; }
.fc-info summary svg { width: 15px; height: 15px; flex: none; color: var(--color-primary); }
.fc-info summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.fc-info[open] summary::after { transform: rotate(-135deg); }
.fc-info p {
  margin: 2px 0 2px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Заблокированное состояние: размытый пример + оверлей с инструкцией. */
.fc-blur {
  filter: blur(7px);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}
.fc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fc-overlay-card {
  text-align: center;
  max-width: 320px;
}
.fc-overlay-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--color-primary) 16%, transparent);
  color: var(--color-primary);
}
.fc-overlay-icon i { width: 24px; height: 24px; }
.fc-overlay-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.fc-overlay-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.fc-missing {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.fc-missing li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.fc-missing li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
}
