/* ====================================
   FITPRO DASHBOARD - MAIN STYLES
   ==================================== */

:root {
  --primary: #6C63FF;
  --primary-dark: #5A52E0;
  --primary-light: #EEF0FF;
  --secondary: #00D4AA;
  --secondary-dark: #00B891;
  --accent: #FF6B6B;
  --accent-yellow: #FFD93D;
  --accent-orange: #FF9A3C;
  --bg: #0F1117;
  --bg-card: #1A1D2E;
  --bg-card2: #212439;
  --bg-sidebar: #13162B;
  --text: #E8E8F0;
  --text-muted: #8890B0;
  --text-dim: #5A6080;
  --border: #2A2E4A;
  --success: #4CAF50;
  --warning: #FF9A3C;
  --danger: #FF6B6B;
  --info: #00C8FF;
  --sidebar-width: 250px;
  --topbar-height: 64px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-card); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: var(--transition);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.logo i {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.6rem;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-close:hover { color: var(--text); background: var(--border); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.nav-item:hover {
  color: var(--text);
  background: var(--border);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
  background: rgba(108, 99, 255, 0.15);
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-info strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.user-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== OVERLAY ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 900;
  backdrop-filter: blur(4px);
}

.overlay.active { display: block; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: var(--transition);
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.menu-toggle:hover { background: var(--border); }

.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

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

.date-display {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-checkin-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-checkin-quick:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

/* ===== PAGE CONTAINER ===== */
.page-container { padding: 24px; max-width: 1200px; }

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title:first-child { margin-top: 0; }

.section-title i {
  color: var(--primary);
  font-size: 1rem;
}

/* ===== DASHBOARD GREETING ===== */
.dashboard-greeting {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

/* ===== SUMMARY CARDS ===== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.card-exercise .card-icon { background: rgba(108, 99, 255, 0.2); color: var(--primary); }
.card-water .card-icon { background: rgba(0, 200, 255, 0.15); color: var(--info); }
.card-meals .card-icon { background: rgba(0, 212, 170, 0.15); color: var(--secondary); }
.card-weight .card-icon { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

.card-info { flex: 1; min-width: 0; }
.card-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.card-value { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.card-progress { display: flex; flex-direction: column; gap: 4px; }

.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s ease;
}

.card-progress span { font-size: 0.72rem; color: var(--text-muted); }

/* ===== WEEK OVERVIEW ===== */
.week-overview {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.week-day {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.week-day:hover { border-color: var(--primary); }
.week-day.today { border-color: var(--primary); background: rgba(108, 99, 255, 0.1); }
.week-day.done { border-color: var(--success); }
.week-day.rest { border-color: var(--accent-yellow); }

.week-day-name { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.week-day-num { font-size: 1.1rem; font-weight: 700; margin: 4px 0; }
.week-day-icon { font-size: 1rem; height: 24px; display: flex; align-items: center; justify-content: center; }

/* ===== GOALS OVERVIEW ===== */
.goals-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

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

.goal-label { font-size: 0.85rem; font-weight: 600; }
.goal-period { font-size: 0.72rem; color: var(--text-muted); background: var(--border); padding: 3px 8px; border-radius: 50px; }
.goal-progress-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }
.goal-status { font-size: 0.8rem; font-weight: 600; margin-top: 6px; }
.goal-status.good { color: var(--success); }
.goal-status.warn { color: var(--warning); }
.goal-status.bad { color: var(--danger); }

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.quick-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}

.quick-btn i {
  font-size: 1.3rem;
  color: var(--primary);
}

.quick-btn:hover {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.1);
  transform: translateY(-3px);
}

/* ===== WEEKEND ALERT ===== */
.weekend-alert {
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.1), rgba(255, 154, 60, 0.1));
  border: 1px solid var(--accent-yellow);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 8px;
}

/* ===== CHECK-IN ===== */
.checkin-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkin-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.block-header i {
  font-size: 1.1rem;
  color: var(--primary);
}

.block-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Exercise Checklist */
.exercise-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.exercise-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.exercise-item:hover { border-color: var(--primary); }
.exercise-item.checked { border-color: var(--success); background: rgba(76, 175, 80, 0.08); }

.exercise-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.exercise-item-info { flex: 1; }
.exercise-item-name { font-size: 0.85rem; font-weight: 600; }
.exercise-item-detail { font-size: 0.72rem; color: var(--text-muted); }
.exercise-item-duration { font-size: 0.78rem; color: var(--primary); font-weight: 600; white-space: nowrap; }

/* Form Groups */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.form-group textarea { min-height: 80px; resize: vertical; }

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-unit input { flex: 1; }
.unit { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; font-weight: 600; }

/* Water Tracker */
.water-tracker { margin-bottom: 16px; }

.water-cups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.water-cup {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.water-cup:hover { border-color: var(--info); transform: scale(1.1); }
.water-cup.filled { border-color: var(--info); background: rgba(0, 200, 255, 0.15); }

.water-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--info);
}
.water-meta { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }

/* Meals Checklist */
.meals-checklist { display: flex; flex-direction: column; gap: 8px; }

.meal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.meal-item:hover { border-color: var(--secondary); }
.meal-item.checked { border-color: var(--success); background: rgba(76, 175, 80, 0.08); }

.meal-item input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 16px;
  height: 16px;
}

.meal-item-info { flex: 1; }
.meal-item-name { font-size: 0.85rem; font-weight: 600; }
.meal-item-detail { font-size: 0.72rem; color: var(--text-muted); }

/* Mood Selector */
.mood-selector {
  display: flex;
  gap: 12px;
}

.mood-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card2);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.mood-btn:hover { border-color: var(--primary); transform: scale(1.15); }
.mood-btn.selected { border-color: var(--primary); background: rgba(108, 99, 255, 0.15); transform: scale(1.2); }

/* Save Button */
.btn-save-checkin {
  grid-column: 1 / -1;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.btn-save-checkin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.4);
}

.save-feedback {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 24px;
}

/* ===== EXERCISES PAGE ===== */
.exercise-schedule-tabs,
.nutrition-tabs,
.goals-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* Weekly Schedule Grid */
.weekly-schedule {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.schedule-day {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 200px;
}

.schedule-day-header {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.schedule-day-name { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.schedule-day-type { font-size: 0.7rem; color: var(--primary); margin-top: 2px; }
.schedule-day.rest-day { border-color: var(--accent-yellow); }
.schedule-day.rest-day .schedule-day-name { color: var(--accent-yellow); }

.schedule-exercise-item {
  padding: 7px 8px;
  background: var(--bg-card2);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.72rem;
}

.schedule-exercise-name { font-weight: 600; color: var(--text); }
.schedule-exercise-detail { color: var(--text-muted); margin-top: 2px; }

/* Exercise Filter */
.exercise-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover { border-color: var(--primary); color: var(--text); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* Exercise Grid */
.exercise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.exercise-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }

.exercise-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.exercise-thumb img { width: 100%; height: 140px; object-fit: cover; }

.exercise-card-body { padding: 14px; }
.exercise-card-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.exercise-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 50px;
}

.badge-cardio { background: rgba(255, 107, 107, 0.15); color: var(--danger); }
.badge-forca { background: rgba(108, 99, 255, 0.15); color: var(--primary); }
.badge-core { background: rgba(0, 212, 170, 0.15); color: var(--secondary); }
.badge-alongamento { background: rgba(255, 217, 61, 0.15); color: var(--accent-yellow); }

.exercise-card-time { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

/* ===== NUTRITION PAGE ===== */
.macros-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.macro-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.macro-icon { font-size: 1.8rem; margin-bottom: 8px; }
.macro-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.macro-value { font-size: 1.1rem; font-weight: 700; margin: 4px 0; }
.macro-sub { font-size: 0.7rem; color: var(--text-muted); }

.meal-plan-grid { display: flex; flex-direction: column; gap: 12px; }

.meal-plan-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.meal-plan-icon {
  font-size: 2rem;
  width: 50px;
  text-align: center;
  flex-shrink: 0;
}

.meal-plan-content { flex: 1; }
.meal-plan-time { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.meal-plan-name { font-size: 1rem; font-weight: 700; margin: 3px 0; }
.meal-plan-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }
.meal-plan-calories { font-size: 0.8rem; color: var(--primary); font-weight: 600; margin-top: 6px; }

/* Food Guide */
.food-guide-content { display: flex; flex-direction: column; gap: 20px; }

.food-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.food-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.food-group-title { font-size: 0.95rem; font-weight: 700; }
.food-group-icon { font-size: 1.3rem; }
.food-list { display: flex; flex-wrap: wrap; gap: 8px; }
.food-chip {
  padding: 5px 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.food-chip.good { border-color: var(--success); color: var(--success); }
.food-chip.moderate { border-color: var(--warning); color: var(--warning); }
.food-chip.avoid { border-color: var(--danger); color: var(--danger); }

/* Weekend Guide */
.weekend-guide { display: flex; flex-direction: column; gap: 16px; }

.weekend-rule {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.weekend-rule-icon { font-size: 1.8rem; flex-shrink: 0; }
.weekend-rule-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.weekend-rule-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }

/* ===== HYDRATION PAGE ===== */
.hydration-page-content { display: flex; flex-direction: column; gap: 16px; }

.hydration-big-display {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.hydration-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 6px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  background: conic-gradient(var(--info) 0%, var(--border) 0%);
  transition: var(--transition);
}

.hydration-circle-inner {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
}

.hydration-percent { font-size: 2rem; font-weight: 800; color: var(--info); }
.hydration-ml { font-size: 0.8rem; color: var(--text-muted); }
.hydration-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.hydration-tip {
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hydration-tip i { color: var(--info); margin-top: 2px; flex-shrink: 0; }
.hydration-tip-text { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }

/* ===== WEIGHT PAGE ===== */
.weight-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.weight-form-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.weight-form-row {
  display: grid;
  grid-template-columns: 160px 160px 1fr auto;
  gap: 12px;
  align-items: end;
}

.bmi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.bmi-number { font-size: 2.5rem; font-weight: 800; }
.bmi-number.normal { color: var(--success); }
.bmi-number.sobrepeso { color: var(--warning); }
.bmi-number.obeso { color: var(--danger); }

.bmi-info { flex: 1; }
.bmi-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.bmi-category { font-size: 1rem; font-weight: 700; margin: 4px 0; }
.bmi-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.chart-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.weight-log-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.weight-log-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.log-table { width: 100%; border-collapse: collapse; }
.log-table th { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.log-table td { padding: 10px 12px; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.log-table tr:last-child td { border-bottom: none; }

/* ===== GOALS PAGE ===== */
.goal-period-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.goal-period-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.goal-period-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 600;
}

.goal-period-badge.good { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.goal-period-badge.warn { background: rgba(255, 154, 60, 0.15); color: var(--warning); }
.goal-period-badge.bad { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

.goals-list { display: flex; flex-direction: column; gap: 12px; }

.goal-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-item-info { flex: 1; min-width: 0; }
.goal-item-label { font-size: 0.85rem; font-weight: 600; }
.goal-item-value { font-size: 0.78rem; color: var(--text-muted); }
.goal-item-bar { flex: 2; }

.goal-pct-label { font-size: 0.78rem; font-weight: 700; width: 40px; text-align: right; flex-shrink: 0; }

/* ===== REPORTS PAGE ===== */
.report-period-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.period-btn {
  padding: 9px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.period-btn:hover { border-color: var(--primary); color: var(--text); }
.period-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.report-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

.report-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-large { padding: 14px 28px; font-size: 0.95rem; }

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open { display: flex; animation: fadeIn 0.25s ease; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-body { padding: 24px; }

.modal-exercise-header { margin-bottom: 16px; }
.modal-exercise-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.modal-video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.modal-video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.modal-exercise-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }
.modal-tips { background: var(--bg-card2); border-radius: var(--radius-sm); padding: 14px; }
.modal-tips-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.modal-tip { font-size: 0.82rem; color: var(--text-muted); padding: 4px 0; display: flex; gap: 8px; }
.modal-tip::before { content: "✅"; flex-shrink: 0; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 9999;
  max-width: 320px;
  transform: translateX(calc(100% + 32px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
}

.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .exercise-grid { grid-template-columns: repeat(2, 1fr); }
  .report-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .main-wrapper { margin-left: 0; }
  .menu-toggle { display: flex; }
  .weekly-schedule { grid-template-columns: repeat(2, 1fr); }
  .goals-overview { grid-template-columns: 1fr 1fr; }
  .checkin-container { grid-template-columns: 1fr; }
  .weight-form-row { grid-template-columns: 1fr 1fr; }
  .macros-summary { grid-template-columns: repeat(2, 1fr); }
  .report-charts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-container { padding: 16px; }
  .summary-cards { grid-template-columns: 1fr 1fr; }
  .week-overview { grid-template-columns: repeat(4, 1fr); }
  .goals-overview { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .exercise-grid { grid-template-columns: 1fr; }
  .weekly-schedule { grid-template-columns: 1fr; }
  .macros-summary { grid-template-columns: repeat(2, 1fr); }
  .report-stats { grid-template-columns: repeat(2, 1fr); }
  .weight-form-row { grid-template-columns: 1fr; }
  .hydration-tips { grid-template-columns: 1fr; }
  .report-actions { flex-direction: column; }
  .date-display { display: none; }
  .topbar { padding: 0 16px; }
}

@media print {
  .sidebar, .topbar, .quick-actions, .report-actions { display: none !important; }
  .main-wrapper { margin-left: 0; }
  body { background: white; color: black; }
}
