/* =============================================
   FITNESS COACH PRO - Main Stylesheet
   Progetto: Piano personalizzato Giuseppina
   ============================================= */

/* CSS Custom Properties */
:root {
  --primary: #00ACC1;
  --primary-dark: #0087a3;
  --primary-light: #26C6DA;
  --accent: #FF6F00;
  --accent-light: #FFA000;
  --success: #43A047;
  --success-light: #66BB6A;
  --warning: #FFA000;
  --danger: #E53935;
  --purple: #7B1FA2;
  --purple-light: #AB47BC;
  
  --bg: #F5F7FA;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #5C6270;
  --text-light: #9EA5B5;
  --border: #E8ECF0;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --nav-height: 70px;
  --header-height: 110px;
  
  --font: 'Poppins', sans-serif;
  --transition: all 0.25s ease;
}

/* ====== RESET & BASE ====== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  padding-top: var(--header-height);
  padding-bottom: calc(var(--nav-height) + 16px);
  overflow-x: hidden;
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 2px; }

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { line-height: 1.6; color: var(--text-secondary); }
ul { list-style: none; }

/* ====== TOP HEADER ====== */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 2px 20px rgba(0, 172, 193, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 1.05rem;
  font-weight: 400;
  color: #fff;
}

.brand-sub strong {
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  text-align: right;
  line-height: 1.3;
}

.btn-icon {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.btn-icon:hover { background: rgba(255,255,255,0.3); }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.motivational-banner {
  padding: 6px 20px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.motiv-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.motiv-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.92);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
}

/* ====== MAIN CONTENT ====== */
.main-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ====== PAGES / NAVIGATION ====== */
.page {
  display: none;
  animation: fadeSlideIn 0.3s ease;
  padding-top: 20px;
}

.page.active {
  display: block;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== SECTION HEADERS ====== */
.section-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.section-header h2 {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2 i {
  color: var(--primary);
}

.section-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.section-subheader {
  margin: 24px 0 12px;
}

.section-subheader h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.section-subheader h3 i { color: var(--primary); }

/* ====== DASHBOARD - OBJECTIVE BANNER ====== */
.objective-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.objective-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.obj-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.obj-main {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.obj-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
}

.thermometer-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thermometer {
  width: 24px;
  height: 90px;
  background: rgba(255,255,255,0.3);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.5);
}

.thermo-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #fff, rgba(255,255,255,0.6));
  border-radius: 12px;
  transition: height 1s ease;
  height: 0%;
}

.thermo-label {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.thermo-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 90px;
}

.thermo-scale span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

/* ====== CARDS GRID ====== */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: default;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.card-unit {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.card-delta {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 4px;
}

/* ====== CTA BUTTON ====== */
.btn-start-workout {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  box-shadow: 0 6px 24px rgba(255, 111, 0, 0.4);
  transition: var(--transition);
  margin-bottom: 20px;
}

.btn-start-workout i {
  font-size: 1.4rem;
}

.btn-start-workout:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 111, 0, 0.5);
}

.btn-start-workout:active {
  transform: translateY(0);
}

.btn-sub {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.9;
}

/* ====== WEEKLY STATS ====== */
.weekly-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.wstat {
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.wstat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.wstat-lbl {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 4px 0 8px;
}

.wstat-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.wstat-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 1s ease;
}

.wf-orange { background: var(--accent); }
.wf-purple { background: var(--purple); }

/* ====== CHART CARD ====== */
.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.chart-card-header h3 i { color: var(--primary); }

.chart-tabs {
  display: flex;
  gap: 4px;
}

.chart-tab {
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.chart-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chart-container {
  position: relative;
  width: 100%;
}

/* ====== REMINDER CARD ====== */
.reminder-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  margin-bottom: 12px;
}

.reminder-card.done {
  border-left-color: var(--success);
  opacity: 0.7;
}

.reminder-icon { font-size: 1.5rem; flex-shrink: 0; }

.reminder-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reminder-text strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.reminder-text span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.btn-check {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-check:hover { background: var(--primary-dark); }

.hidden { display: none !important; }

/* ====== WEEK STRIP ====== */
.week-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
  margin-bottom: 8px;
}

.week-strip::-webkit-scrollbar { display: none; }

.ws-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  cursor: default;
}

.ws-day-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ws-day-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.ws-day.today .ws-day-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 172, 193, 0.4);
}

.ws-day.completed .ws-day-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.ws-day.workout-day .ws-day-label {
  color: var(--accent);
  font-weight: 700;
}

.ws-day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-light);
}

.ws-day.workout-day .ws-day-dot {
  background: var(--accent);
}

/* ====== WORKOUT CARDS ====== */
.workout-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.workout-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.workout-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.wcard-header {
  padding: 16px 20px;
  color: #fff;
}

.wcard-header.hiit {
  background: linear-gradient(135deg, #FF6F00, #FF8F00);
}

.wcard-header.strength {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.wcard-header.cardio {
  background: linear-gradient(135deg, #7B1FA2, #AB47BC);
}

.wcard-header.extra-h {
  background: linear-gradient(135deg, #2E7D32, #43A047);
}

.wcard-day {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.wcard-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.wcard-meta {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 4px;
}

.wcard-body {
  padding: 16px 20px;
}

.wcard-phases {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.phase {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.phase-name {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.phase-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.exercise-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.ep-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.wcard-actions {
  display: flex;
  gap: 10px;
}

.btn-workout-detail {
  flex: 1;
  padding: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-workout-detail:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-workout-start {
  flex: 1.5;
  padding: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 172, 193, 0.3);
}

.btn-workout-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 172, 193, 0.4);
}

/* EXTRA ACTIVITIES */
.extra-activities {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.extra-act {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.extra-act:hover {
  background: #E8F5E9;
}

.extra-icon { font-size: 1.5rem; flex-shrink: 0; }

.extra-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.extra-info strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.extra-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-log-extra {
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}

.btn-log-extra:hover { background: #2E7D32; }

/* ====== EXERCISE FILTER & GRID ====== */
.exercise-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
  margin-bottom: 4px;
}

.exercise-filter::-webkit-scrollbar { display: none; }

.ex-filter {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.ex-filter.active,
.ex-filter:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.exercise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 20px;
}

.ex-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}

.ex-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ex-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.ex-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ex-card-muscles {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.ex-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ex-diff-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.ex-diff-badge.easy { background: #E8F5E9; color: var(--success); }
.ex-diff-badge.medium { background: #FFF3E0; color: var(--accent); }
.ex-diff-badge.hard { background: #F3E5F5; color: var(--purple); }

.ex-kcal {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
}

/* ====== NUTRITION ====== */
.calorie-tracker-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.caltrac-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-bar-wrap {
  height: 10px;
  background: var(--bg);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 5px;
  transition: width 0.6s ease;
}

.caltrac-macros {
  display: flex;
  justify-content: space-around;
}

.macro-item {
  text-align: center;
}

.macro-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: block;
}

.macro-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* WATER TRACKER */
.water-tracker-card {
  background: linear-gradient(135deg, #E0F7FA, #B2EBF2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.water-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.water-glasses {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.water-glass {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255,255,255,0.6);
}

.water-glass.filled {
  background: var(--primary);
  border-color: var(--primary-dark);
}

.water-glass:hover {
  transform: scale(1.1);
}

.water-tip {
  font-size: 0.72rem;
  color: var(--primary-dark);
  text-align: center;
  margin-top: 10px;
}

/* MEAL CARDS */
.meal-plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.meal-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.meal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.meal-header.breakfast { background: linear-gradient(90deg, #FFF8E1, #FFFDE7); border-left: 4px solid #FFC107; }
.meal-header.snack1 { background: linear-gradient(90deg, #E8F5E9, #F1F8E9); border-left: 4px solid #66BB6A; }
.meal-header.lunch { background: linear-gradient(90deg, #E3F2FD, #EDE7F6); border-left: 4px solid var(--primary); }
.meal-header.snack2 { background: linear-gradient(90deg, #F3E5F5, #FCE4EC); border-left: 4px solid #AB47BC; }
.meal-header.dinner { background: linear-gradient(90deg, #EDE7F6, #E8EAF6); border-left: 4px solid #5C6BC0; }

.meal-time-badge {
  background: rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.meal-info {
  flex: 1;
}

.meal-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.meal-kcal {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.meal-check {
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--border);
  transition: var(--transition);
}

.meal-check.checked { color: var(--success); }

.meal-options {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meal-option {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}

.meal-option.selected {
  border-color: var(--primary);
  background: rgba(0, 172, 193, 0.05);
}

.meal-option:hover {
  border-color: var(--primary-light);
}

.opt-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meal-option.selected .opt-num {
  background: var(--primary);
}

.opt-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opt-detail strong {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.opt-detail span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* GOLDEN RULES */
.golden-rules-card {
  background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid #C8E6C9;
}

.golden-rules-card h3 {
  margin-bottom: 12px;
  color: #2E7D32;
}

.golden-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.golden-rules li {
  font-size: 0.82rem;
  color: var(--text-primary);
  padding: 6px 0;
  border-bottom: 1px dashed #C8E6C9;
}

.golden-rules li:last-child { border-bottom: none; }

/* DAILY NOTES */
.daily-notes-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.daily-notes-card h3 {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-notes-card h3 i { color: var(--primary); }

.daily-notes-input,
textarea,
input[type="text"],
input[type="number"] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg);
  resize: vertical;
  transition: var(--transition);
  outline: none;
}

.daily-notes-input { min-height: 80px; }
textarea { min-height: 80px; }

input:focus, textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.btn-save-notes, .btn-save-log {
  margin-top: 12px;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-save-notes:hover, .btn-save-log:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 172, 193, 0.35);
}

/* ====== PROGRESS - LOG FORM ====== */
.log-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.log-form-card h3 {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.log-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.log-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-field.full-width {
  grid-column: 1 / -1;
}

.log-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.range-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

/* ====== ANALYTICS GRID ====== */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.an-icon { font-size: 1.5rem; margin-bottom: 6px; }
.an-val { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }
.an-lbl { font-size: 0.7rem; color: var(--text-secondary); margin-top: 3px; }

/* ====== HISTORY ====== */
.history-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.history-card h3 {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-card h3 i { color: var(--primary); }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.hi-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 60px;
  flex-shrink: 0;
}

.hi-weight {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.hi-delta {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.hi-delta.loss { background: #E8F5E9; color: var(--success); }
.hi-delta.gain { background: #FFEBEE; color: var(--danger); }
.hi-delta.same { background: var(--bg); color: var(--text-secondary); }

.empty-state {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.empty-state span { font-size: 2rem; display: block; margin-bottom: 8px; }

/* ====== CALENDAR ====== */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.btn-cal-nav {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-cal-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cal-month-year {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.leg-dot.completed { background: var(--success); }
.leg-dot.planned { background: var(--primary); }
.leg-dot.skipped { background: var(--danger); }
.leg-dot.extra { background: var(--accent); }

.calendar-grid {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-header {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 4px 0 8px;
  letter-spacing: 0.5px;
}

#calDays {
  display: contents;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  color: var(--text-primary);
}

.cal-day:hover { background: var(--bg); }

.cal-day.today {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 172, 193, 0.35);
}

.cal-day.completed { background: var(--success); color: #fff; }
.cal-day.planned { background: rgba(0, 172, 193, 0.15); color: var(--primary-dark); }
.cal-day.skipped { background: #FFEBEE; color: var(--danger); }
.cal-day.extra-day { background: #FFF3E0; color: var(--accent); }
.cal-day.other-month { color: var(--text-light); }

.cal-day .day-dot {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* MONTHLY STATS */
.monthly-stats-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.monthly-stats-card h3 {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.monthly-stats-card h3 i { color: var(--primary); }

.mstats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mstat-item {
  text-align: center;
  padding: 10px 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.mstat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.mstat-lbl {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ACHIEVEMENTS */
.achievements-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.achievements-card h3 {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.achievements-card h3 i { color: var(--accent); }

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.badge-item {
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  cursor: default;
}

.badge-item.earned {
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255, 111, 0, 0.15);
}

.badge-item:not(.earned) { opacity: 0.4; filter: grayscale(0.8); }

.badge-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.badge-name { font-size: 0.65rem; font-weight: 700; color: var(--text-secondary); line-height: 1.3; }
.badge-date { font-size: 0.6rem; color: var(--accent); margin-top: 4px; }

/* ====== INFO SECTION ====== */
.profile-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.profile-avatar { font-size: 3rem; margin-bottom: 8px; }
.profile-name { font-size: 1.4rem; font-weight: 800; }
.profile-sub { font-size: 0.78rem; opacity: 0.85; margin-top: 4px; }

.profile-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.3);
}

.ps-item { text-align: center; }
.ps-val { display: block; font-size: 1.2rem; font-weight: 800; }
.ps-lbl { font-size: 0.65rem; opacity: 0.85; }

.info-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--bg), var(--bg-card));
  border-bottom: 1px solid var(--border);
}

.info-icon { font-size: 1.4rem; }

.info-card-header h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

.info-content {
  padding: 16px 18px;
}

.info-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.6;
}

.info-content ul {
  margin-bottom: 12px;
  padding-left: 4px;
}

.info-content ul li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 4px 0;
  line-height: 1.4;
}

.info-highlight {
  background: #E8F5E9;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 10px 0;
  border-left: 3px solid var(--success);
}

.info-highlight strong {
  font-size: 0.82rem;
  color: #2E7D32;
  display: block;
  margin-bottom: 6px;
}

.info-highlight ul li {
  font-size: 0.8rem;
  color: #2E7D32;
}

.warn-list li {
  color: var(--warning) !important;
}

.warn-list li::before { content: '⚠️ '; }

.info-emergency {
  background: #FFEBEE;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 10px;
  border-left: 3px solid var(--danger);
}

.info-emergency strong {
  font-size: 0.82rem;
  color: var(--danger);
  display: block;
  margin-bottom: 4px;
}

.info-emergency p {
  font-size: 0.78rem;
  color: #B71C1C;
  margin-bottom: 0;
}

.tip-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.tip-item:last-child { border-bottom: none; }

.tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-item div strong {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 3px;
}

.tip-item div p {
  font-size: 0.78rem;
  margin-bottom: 0;
}

/* SETTINGS */
.settings-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.settings-card h3 {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.settings-card h3 i { color: var(--primary); }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child { border-bottom: none; }

.setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.setting-label i {
  color: var(--primary);
  width: 16px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider { background-color: var(--primary); }
input:checked + .toggle-slider:before { transform: translateX(20px); }

.btn-setting {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}

.btn-setting:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-setting.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-setting.danger:hover {
  background: var(--danger);
  color: #fff;
}

.app-version {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.75rem;
}

/* ====== BOTTOM NAVIGATION ====== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0 8px;
  border-top: 1px solid var(--border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 600;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.nav-item i {
  font-size: 1.2rem;
  transition: var(--transition);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active i {
  transform: translateY(-2px);
}

.nav-item:hover { color: var(--primary); }

/* ====== MODALS ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.small-modal {
  max-height: 75vh;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.modal-header h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.modal-close {
  background: var(--bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); }

.modal-body {
  padding: 16px 20px;
}

.modal-footer {
  padding: 14px 20px 24px;
  border-top: 1px solid var(--border);
}

.btn-modal-start {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-modal-start:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* SESSION MODAL */
.session-modal {
  background: linear-gradient(180deg, #0A1628 0%, #1A2342 100%);
  color: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.session-h {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.session-h h2 { color: #fff; }
.session-h .modal-close {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.session-body {
  padding: 24px 20px;
  text-align: center;
}

.session-exercise-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.session-exercise-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  min-height: 40px;
}

.session-phase-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: rgba(0, 172, 193, 0.3);
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
  margin-bottom: 24px;
}

.timer-display {
  font-size: 4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}

.timer-progress {
  margin-bottom: 12px;
}

.timer-arc {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 200px;
}

.session-round {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  margin-bottom: 24px;
}

.session-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-timer-ctrl {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-timer-ctrl.pause {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 172, 193, 0.4);
}

.btn-timer-ctrl.next {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-timer-ctrl:hover { transform: scale(1.05); }

.session-exercise-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 0 4px;
}

.sel-ex-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  text-align: left;
}

.sel-ex-item.active-ex {
  background: rgba(0, 172, 193, 0.25);
  border: 1px solid var(--primary-light);
}

.sel-ex-item.done-ex {
  opacity: 0.4;
}

.sel-ex-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sel-ex-item.done-ex .sel-ex-num {
  background: var(--success);
  color: #fff;
}

.sel-ex-name { font-size: 0.82rem; color: rgba(255,255,255,0.85); font-weight: 500; }
.sel-ex-time { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-left: auto; }

/* CELEBRATION MODAL */
.celebration-modal {
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  text-align: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.celebration-confetti {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

.celebration-content {
  padding: 40px 24px 32px;
  position: relative;
}

.celebration-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.celebration-content h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.celebration-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ====== WORKOUT DETAIL MODAL CONTENT ====== */
.workout-detail-header {
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.workout-detail-header .wd-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.wd-meta-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 600;
}

.phase-section {
  margin-bottom: 16px;
}

.phase-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exercise-detail-item {
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 3px solid var(--primary);
}

.edi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.edi-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.edi-timing {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.edi-muscles {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.edi-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edi-step {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 3px 0;
  display: flex;
  gap: 6px;
}

.edi-step-num {
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.edi-tips {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.75rem;
  color: var(--accent);
}

.edi-variants {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.edi-variant {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  font-size: 0.7rem;
  text-align: center;
}

.edi-variant.easy { background: #E8F5E9; color: var(--success); }
.edi-variant.hard { background: #F3E5F5; color: var(--purple); }
.edi-variant strong { display: block; font-size: 0.65rem; margin-bottom: 2px; }

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ====== SELECT ====== */
select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239EA5B5' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

/* ====== RESPONSIVE ====== */
@media (min-width: 480px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .exercise-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none;
  }

  /* Add sidebar nav on tablet/desktop */
  .top-header {
    position: fixed;
    height: 60px;
  }

  body {
    padding-top: 60px;
  }

  .main-content {
    max-width: 720px;
    padding: 20px 24px;
  }

  .cards-grid { grid-template-columns: repeat(4, 1fr); }

  .mstats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .main-content { max-width: 900px; }
  .exercise-grid { grid-template-columns: repeat(4, 1fr); }
  .badges-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ====== UTILITIES ====== */
.fw-700 { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ====== ANIMATIONS ====== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse { animation: pulse 2s ease infinite; }

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.loading-skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #fff 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
