/* ============================================
   CALOFICIT — Design System & Styles
   ============================================ */

:root {
  /* Primary palette — energetic & motivating */
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --primary-bg: rgba(108, 92, 231, 0.08);

  /* Accent — success/energy */
  --accent: #00B894;
  --accent-light: #55EFC4;
  --accent-dark: #00A381;
  --accent-bg: rgba(0, 184, 148, 0.08);

  /* Warm accent — calories/fire */
  --warm: #FF7675;
  --warm-light: #FAB1A0;
  --warm-dark: #E05554;
  --warm-bg: rgba(255, 118, 117, 0.08);

  /* Orange — workouts */
  --orange: #F39C12;
  --orange-light: #FFEAA7;
  --orange-bg: rgba(243, 156, 18, 0.08);

  /* Blue — info/water */
  --blue: #0984E3;
  --blue-light: #74B9FF;
  --blue-bg: rgba(9, 132, 227, 0.08);

  /* Neutrals */
  --bg: #F8F9FD;
  --bg-card: #FFFFFF;
  --bg-sidebar: #1E1E2E;
  --bg-sidebar-hover: #2A2A3E;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #B2BEC3;
  --text-sidebar: #CDD1D6;
  --border: #E8ECF1;
  --border-light: #F0F2F5;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.15);

  /* Layout */
  --sidebar-width: 240px;
  --sidebar-collapsed: 68px;
  --top-bar-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ============================================
   App Layout
   ============================================ */
#app {
  display: flex;
  height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 100;
}

#sidebar.collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.logo-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

#sidebar.collapsed .logo-text,
#sidebar.collapsed .nav-label,
#sidebar.collapsed .streak-label,
#sidebar.collapsed .streak-num {
  display: none;
}

.sidebar-toggle {
  color: var(--text-sidebar);
  font-size: 18px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-sidebar-hover); }

.nav-links {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-sidebar);
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: #fff;
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.nav-icon { font-size: 18px; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(243,156,18,0.15), rgba(255,118,117,0.15));
  border-radius: var(--radius-sm);
  color: var(--orange);
}

.streak-fire { font-size: 20px; }
.streak-num { font-size: 22px; font-weight: 800; }
.streak-label { font-size: 12px; color: var(--text-muted); }

/* ============================================
   Main Content
   ============================================ */
#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#top-bar {
  height: var(--top-bar-height);
  min-height: var(--top-bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  font-size: 22px;
  color: var(--text);
  padding: 6px;
}

#page-title {
  font-size: 22px;
  font-weight: 700;
}

.today-date {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

#page-container {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   Grid Layouts
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

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

/* ============================================
   Stat Cards (Dashboard)
   ============================================ */
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.cal { background: var(--warm-bg); }
.stat-icon.meal { background: var(--accent-bg); }
.stat-icon.workout { background: var(--orange-bg); }
.stat-icon.water { background: var(--blue-bg); }
.stat-icon.weight { background: var(--primary-bg); }

.stat-info { flex: 1; }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-target {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.35);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.25);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.35);
}

.btn-warm {
  background: linear-gradient(135deg, var(--warm), var(--warm-dark));
  color: #fff;
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 16px;
}

.btn-danger {
  color: var(--warm);
}
.btn-danger:hover {
  background: var(--warm-bg);
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-input::placeholder { color: var(--text-muted); }

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group { flex: 1; }

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.cal { background: linear-gradient(90deg, var(--warm), var(--warm-light)); }
.progress-fill.accent { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.progress-fill.primary { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-fill.orange { background: linear-gradient(90deg, var(--orange), var(--orange-light)); }
.progress-fill.blue { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ============================================
   Tags / Badges
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.tag-purple { background: var(--primary-bg); color: var(--primary); }
.tag-green { background: var(--accent-bg); color: var(--accent); }
.tag-red { background: var(--warm-bg); color: var(--warm); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }
.tag-blue { background: var(--blue-bg); color: var(--blue); }

/* ============================================
   Lists
   ============================================ */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.list-item:hover {
  background: var(--border-light);
}

.list-item + .list-item {
  border-top: 1px solid var(--border-light);
}

/* ============================================
   Checkbox (Shopping List style)
   ============================================ */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 12px;
  color: transparent;
}

.checkbox-wrapper input { display: none; }
.checkbox-wrapper input:checked + .custom-checkbox {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.checkbox-wrapper.checked .checkbox-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: var(--transition);
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Day Selector
   ============================================ */
.day-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.day-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  transition: var(--transition);
}

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

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

.day-btn.today {
  position: relative;
}

.day-btn.today::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ============================================
   Meal Cards
   ============================================ */
.meal-slot {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.meal-slot:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.meal-slot.filled {
  border-style: solid;
  border-color: var(--border);
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: default;
}

.meal-slot-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meal-slot-name {
  font-weight: 600;
  font-size: 15px;
}

.meal-slot-cals {
  font-size: 13px;
  color: var(--text-secondary);
}

.meal-slot-add {
  font-size: 28px;
  color: var(--text-muted);
  line-height: 1;
}

.meal-slot-add-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.meal-slot-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

/* ============================================
   Workout Log
   ============================================ */
.exercise-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}

.exercise-row + .exercise-row {
  border-top: 1px solid var(--border-light);
}

.set-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-bg);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

/* ============================================
   Calorie Chart (simple CSS bars)
   ============================================ */
.cal-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding: 10px 0;
}

.cal-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}

.cal-bar {
  width: 100%;
  max-width: 40px;
  border-radius: 6px 6px 0 0;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
  position: relative;
}

.cal-bar.under { background: linear-gradient(180deg, var(--accent), var(--accent-dark)); }
.cal-bar.over { background: linear-gradient(180deg, var(--warm), var(--warm-dark)); }
.cal-bar.exact { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }

.cal-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.cal-bar-value {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ============================================
   Weight Chart (CSS)
   ============================================ */
.weight-chart {
  position: relative;
  height: 200px;
  border-bottom: 2px solid var(--border);
  border-left: 2px solid var(--border);
  margin: 20px 0 10px 40px;
}

.weight-point {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, 50%);
  z-index: 2;
}

.weight-line {
  position: absolute;
  height: 2px;
  background: var(--primary-light);
  transform-origin: left center;
  z-index: 1;
}

.weight-y-label {
  position: absolute;
  left: -45px;
  font-size: 11px;
  color: var(--text-muted);
  transform: translateY(50%);
}

.weight-x-label {
  position: absolute;
  bottom: -25px;
  font-size: 11px;
  color: var(--text-muted);
  transform: translateX(-50%);
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 300px;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast.success { background: var(--accent); }
.toast.error { background: var(--warm); }
.toast.info { background: var(--primary); }

.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* ============================================
   Motivational Banner
   ============================================ */
.motivation-banner {
  background: linear-gradient(135deg, var(--primary), #8B5CF6, var(--accent));
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.motivation-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.motivation-banner h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  position: relative;
}

.motivation-banner p {
  font-size: 15px;
  opacity: 0.9;
  position: relative;
}

/* ============================================
   Quick Actions Grid
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: var(--transition);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.quick-action-btn:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-icon { font-size: 28px; }

/* ============================================
   Section Headers
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

/* ============================================
   Macro Rings (simple)
   ============================================ */
.macro-display {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 12px 0;
}

.macro-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.macro-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  position: relative;
}

.macro-circle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--primary);
  transform: rotate(var(--rotation, 0deg));
}

.macro-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: -260px;
    height: 100vh;
    z-index: 200;
    box-shadow: var(--shadow-lg);
  }

  #sidebar.mobile-open {
    left: 0;
  }

  .mobile-menu-btn { display: block; }

  #page-container { padding: 16px; }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .exercise-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .exercise-row > :first-child {
    grid-column: 1 / -1;
  }

  .motivation-banner {
    padding: 20px;
  }

  .motivation-banner h2 {
    font-size: 20px;
  }

  .day-selector {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
}

/* ============================================
   Scrollbar
   ============================================ */
#page-container::-webkit-scrollbar { width: 6px; }
#page-container::-webkit-scrollbar-track { background: transparent; }
#page-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
#page-container::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

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

.page-content {
  animation: fadeIn 0.3s ease;
}

/* ============================================
   Water Tracker
   ============================================ */
.water-glasses {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.water-glass {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.3;
}

.water-glass.filled {
  border-color: var(--blue);
  background: var(--blue-bg);
  opacity: 1;
}

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

/* ============================================
   Inline Editable
   ============================================ */
.inline-number {
  width: 70px;
  padding: 6px 8px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.inline-number:focus {
  border-color: var(--primary);
  outline: none;
}

/* ============================================
   Login Screen
   ============================================ */
.login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1E1E2E 0%, #2D1B69 50%, #1E1E2E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-screen.hidden { display: none; }

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(108, 92, 231, 0.2);
  max-width: 400px;
  width: 90%;
}

.login-logo {
  font-size: 56px;
  margin-bottom: 12px;
}

.login-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-google:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
