/* ══════════════════ DASHBOARD HEADER ══════════════════ */

#screen-profile {
  background: var(--bg-primary);
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.dash-month {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.5px;
  text-transform: capitalize;
}

.dash-cal-btn {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  color: var(--text-2);
  flex-shrink: 0;
}
.dash-cal-btn svg { width: 20px; height: 20px; }

/* ── Week strip ── */
.dash-week {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 20px 12px;
  flex-shrink: 0;
}
.dash-week::-webkit-scrollbar { display: none; }

.day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 40px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 4px;
  border-radius: 20px;
  transition: background var(--trans);
}

.day-pill .day-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background var(--trans), color var(--trans);
}

.day-pill .day-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.day-pill.active .day-num {
  background: var(--accent);
  color: #1C1C1E;
  font-weight: 800;
}

/* ── Section titles ── */
.dash-section-title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 20px 0 12px;
  letter-spacing: -0.3px;
}

/* ── Stats grid ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Stat card (arc gauge) ── */
.dsc {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dsc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.dsc-gauge {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 4px auto;
}

.dsc-gauge .stat-ring {
  width: 100%;
  height: 100%;
}

.dsc-gauge .stat-ring svg {
  width: 100%;
  height: 100%;
}

.dsc-plus {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  background: #1C1C1E;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--trans), background var(--trans);
  padding-bottom: 1px;
}
.dsc-plus:active { transform: translate(-50%, -50%) scale(0.9); background: #333; }

.dsc-footer {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
}

.dsc-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
}

.dsc-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

/* ── Stacked mini cards (right column) ── */
.dsc-stack {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dsc-mini {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dsc-mini--border {
  border-top: 1px solid rgba(0,0,0,0.06);
}

.dsc-mini-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.dsc-mini-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dsc-mini-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
}

.dsc-mini-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}

.dsc-mini-plus {
  width: 30px; height: 30px;
  background: #1C1C1E;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding-bottom: 1px;
  transition: transform var(--trans);
}
.dsc-mini-plus:active { transform: scale(0.9); }

/* ── Arc ring SVG styles ── */
.stat-ring { width: 100%; height: 100%; }
.stat-ring svg { display: block; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: #E5E5EA; stroke-width: 7; stroke-linecap: round; }
.ring-progress { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }

/* ── Today workout card ── */
.today-workout-card {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--trans);
}
.today-workout-card:active { transform: scale(0.98); }

.tw-inner {
  display: flex;
  gap: 0;
}

.tw-img {
  width: 120px;
  min-height: 110px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tw-img-icon {
  width: 48px; height: 48px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px rgba(173,255,47,0.6));
}
.tw-img-icon svg { width: 100%; height: 100%; display: block; }

.tw-info {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tw-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.tw-percent {
  background: var(--accent);
  color: #1C1C1E;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.tw-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}

.tw-tag {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.tw-stats {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.tw-stat {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Nutrition summary card ── */
.nutrition-summary-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.nutrition-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.nutrition-summary-kcal {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
}

.macro-bars { display: flex; flex-direction: column; gap: 8px; }
.macro-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.macro-bar-label { width: 70px; color: var(--text-2); font-size: 12px; font-weight: 500; }
.macro-bar-track { flex: 1; height: 5px; background: rgba(0,0,0,0.06); border-radius: 99px; overflow: hidden; }
.macro-bar-fill  { height: 100%; border-radius: 99px; }
.macro-bar-value { width: 40px; text-align: right; font-weight: 600; font-size: 12px; color: var(--text-2); }
.protein-bar { background: var(--accent); }
.carbs-bar   { background: #1C1C1E; }
.fat-bar     { background: #8E8E93; }

/* ══════════════════ WORKOUT ══════════════════ */
.workout-meta { display: flex; align-items: center; gap: 10px; padding: 12px 0 14px; }

.workout-focus-tag {
  background: rgba(173,255,47,0.12);
  color: var(--accent-dark);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(173,255,47,0.3);
}

.workout-days-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.workout-days-tabs::-webkit-scrollbar { display: none; }

.day-tab {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--trans);
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}
.day-tab.active { border-color: var(--accent); color: var(--accent-dark); background: rgba(173,255,47,0.08); }

.exercises-list { display: flex; flex-direction: column; gap: 10px; }

.exercise-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color var(--trans);
  box-shadow: var(--shadow-card);
}
.exercise-card:active { border-color: var(--accent); }

.exercise-emoji {
  width: 46px; height: 46px;
  padding: 11px;
  background: rgba(173,255,47,0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent-dark);
}

.exercise-info { flex: 1; }
.exercise-name { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--text-1); }
.exercise-sets { display: flex; gap: 5px; margin-bottom: 8px; flex-wrap: wrap; }

.exercise-tag {
  background: rgba(173,255,47,0.1);
  border: 1px solid rgba(173,255,47,0.25);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-dark);
}

.exercise-instructions { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.workout-complete-section { padding: 20px 0 8px; }

/* ══════════════════ NUTRITION ══════════════════ */
.calories-hero { text-align: center; padding: 20px 0 6px; }
.calories-number {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text-1);
  line-height: 1;
}
.calories-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-2);
  margin-top: 6px;
}

.macros-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 14px 0;
  box-shadow: var(--shadow-card);
}
.macros-legend { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.macro-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-1); }
.macro-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.protein-dot { background: var(--accent); }
.carbs-dot   { background: #1C1C1E; }
.fat-dot     { background: #8E8E93; }

.water-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  font-size: 15px;
  box-shadow: var(--shadow-card);
  color: var(--text-1);
}
.water-icon { width: 26px; height: 26px; color: var(--accent-dark); flex-shrink: 0; }

.nutrition-advice-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  margin-top: 14px;
  box-shadow: var(--shadow-card);
}
.nutrition-advice-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
}
.nutrition-advice-card p { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ══════════════════ PROGRESS ══════════════════ */
.progress-level-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.progress-level-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(173,255,47,0.1), transparent);
  border-radius: 50%;
}
#progress-level-text {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 10px;
  text-align: center;
  font-weight: 500;
}

.progress-stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 14px; }

.weight-log-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.weight-log-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-1);
}
.weight-input-row { display: flex; gap: 8px; }
.weight-input-row input { width: auto; flex: 1; font-size: 18px; padding: 10px 12px; }
.weight-input-row .btn-primary { padding: 10px 16px; border-radius: var(--radius-sm); white-space: nowrap; }

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.chart-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-1);
}
.chart-empty { font-size: 13px; color: var(--text-3); text-align: center; padding: 20px 0; }
#weight-chart { display: block; width: 100%; }

.history-section { margin-bottom: 20px; }
.history-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-1);
}
.workout-history-list { display: flex; flex-direction: column; gap: 6px; }

.history-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-card);
}
.history-item-icon { width: 20px; height: 20px; color: var(--accent-dark); flex-shrink: 0; }
.history-item-info { flex: 1; }
.history-item-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.history-item-date { font-size: 12px; color: var(--text-2); }
.history-item-dur  { font-size: 12px; color: var(--text-2); }
