/* ============================================================
   MISSION CONTROL — style.css
   Dark-only glassmorphism productivity dashboard
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-deep:       #0B1020;
  --bg-secondary:  #121A2E;
  --card-bg:       rgba(255,255,255,0.07);
  --card-border:   rgba(255,255,255,0.10);
  --card-hover:    rgba(255,255,255,0.11);

  --purple:        #7C3AED;
  --purple-glow:   rgba(124,58,237,0.35);
  --purple-light:  #9D5CF6;
  --cyan:          #06B6D4;
  --cyan-glow:     rgba(6,182,212,0.25);
  --success:       #22C55E;
  --warning:       #F59E0B;
  --danger:        #EF4444;

  --text:          #F8FAFC;
  --text-muted:    #94A3B8;
  --text-dim:      #64748B;

  --sidebar-w:     240px;
  --topbar-h:      56px;
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     20px;

  --anim-speed:    0.3s;
  --anim-ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- Background System ---------- */
.bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 1.2s var(--anim-ease);
  will-change: opacity;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(11,16,32,0.88) 0%,
    rgba(11,16,32,0.75) 50%,
    rgba(11,16,32,0.82) 100%
  );
}

/* ---------- Glassmorphism card ---------- */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: background var(--anim-speed) var(--anim-ease),
              border-color var(--anim-speed) var(--anim-ease),
              box-shadow var(--anim-speed) var(--anim-ease);
}
.glass-card:hover {
  background: var(--card-hover);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(18,26,46,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  transition: transform var(--anim-speed) var(--anim-ease);
}
.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--card-border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 8px var(--purple));
}
.logo-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.sidebar-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}
.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background var(--anim-speed);
}
.sidebar-toggle:hover span { background: var(--text); }

.sidebar-nav {
  flex: 1;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--anim-speed), background var(--anim-speed);
  position: relative;
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav-item.active {
  color: var(--text);
  background: rgba(124,58,237,0.18);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--purple);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; opacity: 0.8; }
.nav-label { letter-spacing: 0.01em; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--card-border);
}
.streak-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
}
.streak-fire { font-size: 20px; }
.streak-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--warning);
  font-family: 'JetBrains Mono', monospace;
}
.streak-label { font-size: 11px; color: var(--text-muted); }

/* ---------- Main Layout ---------- */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 24px) 32px 48px;
  position: relative;
  z-index: 10;
  transition: margin-left var(--anim-speed) var(--anim-ease);
}
.main.sidebar-collapsed { margin-left: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(11,16,32,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: left var(--anim-speed) var(--anim-ease);
}
.topbar.sidebar-collapsed { left: 0; }

.topbar-toggle {
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--anim-speed);
  line-height: 1;
}
.topbar-toggle:hover { color: var(--text); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.live-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--cyan);
  letter-spacing: 0.05em;
}
.live-date {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- Content sections ---------- */
.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.35s var(--anim-ease); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

/* ---------- Quote Card ---------- */
.quote-card {
  padding: 28px 32px;
  margin-bottom: 28px;
  border-left: 3px solid var(--purple);
  position: relative;
  overflow: hidden;
}
.quote-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  right: 24px;
  font-size: 100px;
  color: rgba(124,58,237,0.12);
  font-family: Georgia, serif;
  line-height: 1;
}
.quote-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  max-width: 780px;
}
.quote-author {
  margin-top: 12px;
  font-size: 13px;
  color: var(--purple-light);
  font-weight: 500;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--anim-speed) var(--anim-ease);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--text); }
.stat-value.success { color: var(--success); }
.stat-value.accent  { color: var(--purple-light); }
.stat-value.warning { color: var(--warning); }
.stat-value.cyan    { color: var(--cyan); }

/* ---------- Controls Bar ---------- */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--anim-speed), box-shadow var(--anim-speed);
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow);
}

.filter-sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.select-control {
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--anim-speed);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.select-control:focus { border-color: var(--purple); }
.select-control option { background: var(--bg-secondary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 16px var(--purple-glow);
}
.btn-primary:hover { background: var(--purple-light); box-shadow: 0 6px 20px var(--purple-glow); }

.btn-secondary {
  background: rgba(6,182,212,0.15);
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.3);
}
.btn-secondary:hover { background: rgba(6,182,212,0.25); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-xs {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
}

/* ---------- Goals Grid ---------- */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ---------- Goal Card ---------- */
.goal-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--anim-speed) var(--anim-ease),
              box-shadow var(--anim-speed) var(--anim-ease),
              background var(--anim-speed) var(--anim-ease),
              border-color var(--anim-speed) var(--anim-ease);
  animation: cardIn 0.4s var(--anim-ease) both;
  position: relative;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.goal-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.goal-card.completed { border-color: rgba(34,197,94,0.3); }
.goal-card.completed::after {
  content: '✓ Complete';
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(34,197,94,0.15);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  letter-spacing: 0.05em;
}

.goal-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.goal-category-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.badge-programming { background: rgba(124,58,237,0.2); color: var(--purple-light); border: 1px solid rgba(124,58,237,0.3); }
.badge-fitness      { background: rgba(34,197,94,0.15); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }
.badge-reading      { background: rgba(6,182,212,0.15); color: var(--cyan); border: 1px solid rgba(6,182,212,0.25); }
.badge-business     { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }
.badge-personal     { background: rgba(248,250,252,0.08); color: var(--text-muted); border: 1px solid var(--card-border); }

.goal-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
  word-break: break-word;
}

.goal-progress-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Circular progress */
.circular-progress {
  position: relative;
  flex-shrink: 0;
  width: 68px;
  height: 68px;
}
.circular-progress svg {
  transform: rotate(-90deg);
  width: 68px;
  height: 68px;
}
.circular-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 6; }
.circular-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 170;
  stroke-dashoffset: 170;
  transition: stroke-dashoffset 0.9s var(--anim-ease), stroke 0.5s;
}
.circular-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}

.goal-numbers {
  flex: 1;
}
.goal-current {
  font-size: 28px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  line-height: 1;
}
.goal-target {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Linear progress bar */
.linear-bar-wrap { }
.linear-bar-track {
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}
.linear-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s var(--anim-ease), background 0.4s;
}

/* Goal action buttons */
.goal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.goal-actions-top {
  display: flex;
  gap: 6px;
  flex: 1;
}
.goal-actions-meta {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
}

/* ---------- Empty state ---------- */
.goals-empty {
  text-align: center;
  padding: 80px 20px;
  animation: fadeIn 0.4s var(--anim-ease);
}
.empty-icon { font-size: 40px; opacity: 0.2; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.empty-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 24px; }

/* ---------- Achievements ---------- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.achievement-item {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.achievement-item.locked { opacity: 0.35; filter: grayscale(1); }
.achievement-emoji { font-size: 36px; }
.achievement-name { font-size: 13px; font-weight: 600; color: var(--text); }
.achievement-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.achievement-date { font-size: 10px; color: var(--purple-light); font-family: 'JetBrains Mono', monospace; }

/* Achievement toast */
.achievement-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 500;
  background: rgba(18,26,46,0.95);
  border: 1px solid rgba(124,58,237,0.5);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--purple-glow);
  animation: toastIn 0.4s var(--anim-ease);
  max-width: 320px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.toast-emoji { font-size: 24px; }
.toast-content { flex: 1; }
.toast-title { font-size: 11px; font-weight: 600; color: var(--purple-light); text-transform: uppercase; letter-spacing: 0.08em; }
.toast-message { font-size: 14px; font-weight: 500; color: var(--text); margin-top: 2px; }

/* ---------- Settings ---------- */
.settings-group {
  padding: 8px;
  display: flex;
  flex-direction: column;
  max-width: 560px;
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid var(--card-border);
}
.settings-item:last-child { border-bottom: none; }
.settings-label { font-size: 14px; color: var(--text); font-weight: 500; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  transition: background 0.3s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(124,58,237,0.35); border-color: var(--purple); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--purple-light); }

/* ---------- Backup ---------- */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.backup-card {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.danger-card { border-color: rgba(239,68,68,0.25); }
.backup-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.backup-title { font-size: 16px; font-weight: 600; color: var(--text); }
.backup-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.2s;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 480px;
  animation: modalIn 0.3s var(--anim-ease);
}
.modal-sm { max-width: 360px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--card-border);
}
.modal-heading { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  font-size: 16px;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }

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

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.field-input {
  padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input::placeholder { color: var(--text-dim); }
.field-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.confirm-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  :root { --sidebar-w: 100vw; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: calc(var(--topbar-h) + 16px) 16px 40px; }
  .topbar { left: 0; padding: 0 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 20px; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .filter-sort-wrap { flex-wrap: wrap; }
  .search-wrap { min-width: unset; }
  .goals-grid { grid-template-columns: 1fr; }
  .quote-card { padding: 20px; }
}
@media (max-width: 400px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Utility ---------- */
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-cyan    { color: var(--cyan); }
.text-muted   { color: var(--text-muted); }

/* Animation speed overrides */
body.anim-fast  { --anim-speed: 0.12s; }
body.anim-slow  { --anim-speed: 0.6s; }
body.anim-off * { transition: none !important; animation: none !important; }

/* Progress color helpers */
.progress-low    { stroke: var(--danger); }
.progress-mid    { stroke: var(--warning); }
.progress-good   { stroke: var(--cyan); }
.progress-great  { stroke: var(--success); }

.bar-low    { background: linear-gradient(90deg, var(--danger),  #FF8A65); }
.bar-mid    { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.bar-good   { background: linear-gradient(90deg, var(--cyan),    #67E8F9); }
.bar-great  { background: linear-gradient(90deg, var(--success), #86EFAC); }
.bar-purple { background: linear-gradient(90deg, var(--purple),  var(--purple-light)); }
