@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255,255,255,0.04);
  --border-glass: rgba(255,255,255,0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --accent-4: #10b981;
  --accent-5: #f59e0b;
  --accent-6: #ef4444;
  --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #06b6d4, #10b981);
  --gradient-3: linear-gradient(135deg, #f59e0b, #ef4444);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

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

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(6,182,212,0.06) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; font-weight: 700; }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--gradient-1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.sidebar-logo h2 {
  font-size: 1.2rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 0 4px 4px 0;
}

.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99,102,241,0.1);
  color: var(--text-primary);
  border-color: rgba(99,102,241,0.2);
}

.nav-item.active::before { opacity: 1; }

.nav-item .icon { font-size: 1.25rem; width: 24px; text-align: center; }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 32px 40px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(99,102,241,0.2);
  box-shadow: var(--shadow-glow);
}

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

.card-header h3 { font-size: 1.1rem; }

/* ── Grid Layouts ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.purple::before { background: var(--gradient-1); }
.stat-card.teal::before { background: var(--gradient-2); }
.stat-card.orange::before { background: var(--gradient-3); }
.stat-card.blue::before { background: linear-gradient(135deg, #3b82f6, #6366f1); }

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

.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.stat-card.purple .stat-icon { background: rgba(99,102,241,0.15); }
.stat-card.teal .stat-icon { background: rgba(6,182,212,0.15); }
.stat-card.orange .stat-icon { background: rgba(245,158,11,0.15); }
.stat-card.blue .stat-icon { background: rgba(59,130,246,0.15); }

.stat-card .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-grid-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── Page sections ── */
.page-section { display: none; animation: fadeIn 0.4s ease; }
.page-section.active { display: block; }

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

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

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 5px rgba(99,102,241,0.3); } 50% { box-shadow: 0 0 20px rgba(99,102,241,0.5); } }

.animate-in { animation: slideUp 0.5s ease forwards; }

/* ── Form Elements ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.input-group {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
}

.input-group:hover, .input-group:focus-within {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.05);
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.input-group label .emoji { font-size: 1.3rem; }

.input-group input[type="number"],
.input-group input[type="date"],
.input-group input[type="text"],
.input-group select,
.input-group textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: all var(--transition);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.input-group textarea { resize: vertical; min-height: 100px; }

/* Range slider */
.range-container { position: relative; }

.range-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  outline: none;
  margin: 12px 0;
}

.range-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  background: var(--gradient-1);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99,102,241,0.4);
}

.range-value {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-1);
}

/* Mood selector */
.mood-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mood-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-glass);
  background: var(--bg-glass);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mood-btn:hover { transform: scale(1.15); border-color: var(--accent-1); }
.mood-btn.active {
  border-color: var(--accent-1);
  background: rgba(99,102,241,0.2);
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(99,102,241,0.3);
}

/* Habit checkboxes */
.habit-list { display: flex; flex-direction: column; gap: 10px; }

.habit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.habit-item:hover { background: rgba(99,102,241,0.1); }

.habit-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.habit-item.checked .habit-check {
  background: var(--gradient-1);
  border-color: var(--accent-1);
}

.habit-item.checked .habit-check::after {
  content: '✓';
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.habit-item.checked span { text-decoration: line-through; color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99,102,241,0.4);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover { background: rgba(255,255,255,0.08); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--accent-6);
  border: 1px solid rgba(239,68,68,0.2);
}

.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ── Charts ── */
.chart-container {
  position: relative;
  width: 100%;
  padding: 16px 0;
}

.chart-container canvas { max-height: 350px; }

/* Time range pills */
.time-range {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.time-pill {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.time-pill:hover { border-color: var(--accent-1); color: var(--text-primary); }
.time-pill.active {
  background: rgba(99,102,241,0.15);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* ── Insights ── */
.insight-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: all var(--transition);
}

.insight-card:hover { border-color: rgba(99,102,241,0.2); }

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

.insight-icon.positive { background: rgba(16,185,129,0.15); }
.insight-icon.warning { background: rgba(245,158,11,0.15); }
.insight-icon.negative { background: rgba(239,68,68,0.15); }
.insight-icon.info { background: rgba(99,102,241,0.15); }

.insight-title { font-weight: 600; margin-bottom: 4px; }
.insight-text { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Achievements ── */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.achievement {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.achievement.unlocked {
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.05);
}

.achievement.locked { opacity: 0.4; }

.achievement .badge { font-size: 2.5rem; margin-bottom: 8px; }
.achievement .badge-name { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.achievement .badge-desc { color: var(--text-muted); font-size: 0.75rem; }

/* ── Streak ── */
.streak-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(239,68,68,0.1));
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md);
}

.streak-fire { font-size: 2rem; animation: pulse 2s infinite; }
.streak-count {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.streak-label { color: var(--text-secondary); font-size: 0.85rem; }

/* ── Quote ── */
.quote-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}

.quote-card .quote-mark {
  font-size: 3rem;
  line-height: 1;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: serif;
}

.quote-card .quote-text { font-style: italic; margin: 8px 0; font-size: 1rem; }
.quote-card .quote-author { color: var(--text-muted); font-size: 0.85rem; }

/* ── Settings ── */
.settings-section {
  margin-bottom: 32px;
}

.settings-section h3 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass);
}

.goal-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.goal-input-row label { flex: 1; font-weight: 500; }

.goal-input-row input {
  width: 80px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  text-align: center;
  outline: none;
}

.goal-input-row input:focus { border-color: var(--accent-1); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 1000;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--accent-4); }
.toast.error { border-left: 4px solid var(--accent-6); }

/* ── Mobile hamburger ── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  width: 44px; height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  z-index: 200;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Today mini cards ── */
.today-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.today-mini {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.today-mini .mini-emoji { font-size: 1.4rem; margin-bottom: 6px; }
.today-mini .mini-val { font-family: 'Outfit'; font-size: 1.3rem; font-weight: 700; }
.today-mini .mini-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Weekly report ── */
.report-grade {
  text-align: center;
  padding: 24px;
}

.grade-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit';
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.grade-A { background: rgba(16,185,129,0.2); color: var(--accent-4); border: 2px solid var(--accent-4); }
.grade-B { background: rgba(6,182,212,0.2); color: var(--accent-3); border: 2px solid var(--accent-3); }
.grade-C { background: rgba(245,158,11,0.2); color: var(--accent-5); border: 2px solid var(--accent-5); }
.grade-D { background: rgba(239,68,68,0.2); color: var(--accent-6); border: 2px solid var(--accent-6); }

/* ── Light Theme ── */
[data-theme="light"] {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(0,0,0,0.03);
  --border-glass: rgba(0,0,0,0.08);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 30px rgba(99,102,241,0.08);
}

[data-theme="light"] body::before {
  background: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.04) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(6,182,212,0.03) 0%, transparent 50%);
}

[data-theme="light"] .sidebar {
  background: rgba(255,255,255,0.95);
}

[data-theme="light"] .range-container input[type="range"] {
  background: rgba(0,0,0,0.1);
}

[data-theme="light"] .input-group input[type="number"],
[data-theme="light"] .input-group input[type="date"],
[data-theme="light"] .input-group input[type="text"],
[data-theme="light"] .input-group select,
[data-theme="light"] .input-group textarea,
[data-theme="light"] .goal-input-row input {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

[data-theme="light"] .habit-item { background: rgba(0,0,0,0.03); }
[data-theme="light"] .mood-btn { background: rgba(0,0,0,0.03); }

/* ── Theme Toggle Button ── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
}

.theme-toggle:hover {
  background: rgba(99,102,241,0.1);
  color: var(--text-primary);
}

.theme-toggle .toggle-track {
  width: 40px; height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,0.15);
  position: relative;
  transition: background var(--transition);
  margin-left: auto;
}

.theme-toggle .toggle-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gradient-1);
  position: absolute;
  top: 2px; left: 2px;
  transition: transform var(--transition);
}

[data-theme="light"] .theme-toggle .toggle-track { background: rgba(0,0,0,0.15); }
[data-theme="light"] .theme-toggle .toggle-thumb { transform: translateX(18px); }

/* ── Calendar Heatmap ── */
.heatmap-container {
  padding: 8px 0;
}

.heatmap-months {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
  padding-left: 28px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.heatmap-grid {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: 4px;
  font-size: 0.6rem;
  color: var(--text-muted);
  min-width: 22px;
}

.heatmap-day-labels span {
  height: 14px;
  display: flex;
  align-items: center;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.heatmap-cell {
  width: 14px; height: 14px;
  border-radius: 3px;
  background: var(--bg-glass);
  border: 1px solid rgba(255,255,255,0.03);
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  z-index: 2;
}

.heatmap-cell.level-0 { background: var(--bg-glass); }
.heatmap-cell.level-1 { background: rgba(99,102,241,0.25); border-color: rgba(99,102,241,0.15); }
.heatmap-cell.level-2 { background: rgba(99,102,241,0.45); border-color: rgba(99,102,241,0.25); }
.heatmap-cell.level-3 { background: rgba(99,102,241,0.65); border-color: rgba(99,102,241,0.35); }
.heatmap-cell.level-4 { background: rgba(99,102,241,0.85); border-color: rgba(99,102,241,0.5); }

.heatmap-cell.future { opacity: 0.3; cursor: default; }

.heatmap-tooltip {
  position: fixed;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  z-index: 1000;
  display: none;
  white-space: nowrap;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.heatmap-legend .heatmap-cell { cursor: default; }
.heatmap-legend .heatmap-cell:hover { transform: none; }

/* ── Reminder Settings ── */
.reminder-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.reminder-row input[type="time"] {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  outline: none;
}

[data-theme="light"] .reminder-row input[type="time"] {
  background: rgba(0,0,0,0.04);
}

.reminder-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.reminder-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.reminder-status .dot.on { background: var(--accent-4); }
.reminder-status .dot.off { background: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-full { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .mobile-toggle { display: flex; }
  .main-content { margin-left: 0; padding: 24px 16px; padding-top: 72px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.5rem; }
  .heatmap-cell { width: 11px; height: 11px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .mood-selector { gap: 4px; }
  .mood-btn { width: 44px; height: 44px; font-size: 1.2rem; }
  .heatmap-cell { width: 9px; height: 9px; }
}
