/* ==========================================
   TASKMASTER JR. — STYLE.CSS
   ========================================== */

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

/* ── DESIGN TOKENS ── */
:root {
  --bg: #0f0f1a;
  --bg2: #16162a;
  --bg3: #1e1e38;
  --card: #1c1c30;
  --card-hover: #232340;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0ff;
  --text-muted: #9090b8;
  --text-dim: #6060a0;

  --primary: #7c5cfc;
  --primary-glow: rgba(124,92,252,0.35);
  --primary-light: #a587ff;

  --low: #22c55e;
  --low-bg: rgba(34,197,94,0.12);
  --low-border: rgba(34,197,94,0.3);

  --medium: #eab308;
  --medium-bg: rgba(234,179,8,0.12);
  --medium-border: rgba(234,179,8,0.3);

  --high: #f97316;
  --high-bg: rgba(249,115,22,0.12);
  --high-border: rgba(249,115,22,0.3);

  --urgent: #ef4444;
  --urgent-bg: rgba(239,68,68,0.12);
  --urgent-border: rgba(239,68,68,0.4);

  --success: #22c55e;
  --danger: #ef4444;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px var(--primary-glow);

  --sidebar-width: 260px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124,92,252,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(239,68,68,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── CANVAS ── */
#confettiCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ── APP LAYOUT ── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  gap: 24px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}
.mascot {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 12px rgba(124,92,252,0.8));
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.app-name {
  font-size: 1.3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.app-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* XP Section */
.xp-section {
  background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(165,135,255,0.05));
  border: 1px solid rgba(124,92,252,0.25);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.xp-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.level-badge {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
}
.xp-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}
.xp-bar-bg {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 10px var(--primary-glow);
}
.streak-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
}
.streak-num {
  color: #fb923c;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Nav */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.nav-btn:hover {
  background: var(--card);
  color: var(--text);
  transform: translateX(4px);
}
.nav-btn.active {
  background: linear-gradient(135deg, rgba(124,92,252,0.25), rgba(124,92,252,0.1));
  color: var(--primary-light);
  border: 1px solid rgba(124,92,252,0.3);
  box-shadow: 0 4px 16px rgba(124,92,252,0.15);
}
.nav-icon { font-size: 1.1rem; }

.sidebar-add {
  width: 100%;
  justify-content: center;
  font-size: 0.95rem;
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  min-height: 100vh;
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hidden { display: none !important; }

/* ── VIEW HEADER ── */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
}
.view-title {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.view-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 4px;
}

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; margin-top: 6px; }
.stat-due .stat-num { color: #60a5fa; }
.stat-overdue .stat-num { color: var(--urgent); }
.stat-done .stat-num { color: var(--low); }
.stat-upcoming .stat-num { color: var(--medium); }

/* ── SECTION LABELS ── */
.section-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin: 24px 0 12px;
}

/* ── TASK CARDS ── */
.task-list { display: flex; flex-direction: column; gap: 12px; }

.task-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.task-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.task-card.priority-low::before { background: var(--low); }
.task-card.priority-medium::before { background: var(--medium); }
.task-card.priority-high::before { background: var(--high); }
.task-card.priority-urgent::before { background: var(--urgent); }

.task-card.priority-urgent { border-color: var(--urgent-border); background: var(--urgent-bg); }
.task-card.priority-high { border-color: var(--high-border); }
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--card-hover); }
.task-card.priority-urgent:hover { background: rgba(239,68,68,0.16); }

.task-card.done {
  opacity: 0.5;
  filter: grayscale(0.4);
}
.task-card.done .task-title { text-decoration: line-through; }

/* Urgent pulse animation */
.task-card.priority-urgent:not(.done) {
  animation: urgentPulse 2s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

.complete-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0;
  transition: var(--transition);
  color: #fff;
}
.complete-btn:hover { border-color: var(--low); background: var(--low-bg); font-size: 1rem; }
.task-card.done .complete-btn {
  background: var(--low);
  border-color: var(--low);
  font-size: 1rem;
}

.task-body { flex: 1; min-width: 0; }
.task-title {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.task-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
}
.chip-priority-low { background: var(--low-bg); color: var(--low); }
.chip-priority-medium { background: var(--medium-bg); color: var(--medium); }
.chip-priority-high { background: var(--high-bg); color: var(--high); }
.chip-priority-urgent { background: var(--urgent-bg); color: var(--urgent); font-weight: 900; }

.task-countdown {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
}
.countdown-ok { background: rgba(96,165,250,0.12); color: #60a5fa; }
.countdown-soon { background: var(--medium-bg); color: var(--medium); }
.countdown-close { background: var(--high-bg); color: var(--high); }
.countdown-overdue { background: var(--urgent-bg); color: var(--urgent); }

.task-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: var(--transition);
}
.task-card:hover .task-actions { opacity: 1; }
.icon-btn-sm {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Nunito', sans-serif;
}
.icon-btn-sm:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.icon-btn-sm.delete:hover { background: var(--urgent-bg); color: var(--urgent); border-color: var(--urgent-border); }

.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 700;
}
.empty-emoji { font-size: 2.5rem; margin-bottom: 8px; }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.filter-group select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
}

/* ── CALENDAR ── */
.cal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.month-label {
  font-size: 1.1rem;
  font-weight: 800;
  min-width: 160px;
  text-align: center;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-day-header {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
}
.cal-day {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 80px;
  padding: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.cal-day:hover { background: var(--card-hover); border-color: rgba(124,92,252,0.3); }
.cal-day.today {
  border-color: var(--primary);
  background: rgba(124,92,252,0.1);
  box-shadow: 0 0 12px rgba(124,92,252,0.2);
}
.cal-day.other-month { opacity: 0.35; }
.cal-day.has-tasks { border-color: rgba(96,165,250,0.3); }
.cal-day-num {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
}
.cal-day.today .cal-day-num { color: var(--primary-light); font-size: 0.95rem; }
.cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.cal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.dot-low { background: var(--low); }
.dot-medium { background: var(--medium); }
.dot-high { background: var(--high); }
.dot-urgent { background: var(--urgent); }

/* ── SIDE PANEL ── */
#panelOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.side-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 380px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 300;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.side-panel.open { transform: translateX(0); }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel-header h3 { font-size: 1.1rem; font-weight: 800; }

/* ── SETTINGS ── */
.settings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-light);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}
.setting-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  text-align: right;
  max-width: 200px;
}
.range-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  cursor: pointer;
}
.range-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-light);
  min-width: 50px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px; height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.text-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 14px;
  outline: none;
  transition: var(--transition);
  max-width: 160px;
}
.text-input:focus { border-color: var(--primary); }

.sound-tests { display: flex; flex-direction: column; gap: 10px; }
.sound-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sound-test-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 100px;
  border: 2px solid;
  cursor: pointer;
  transition: var(--transition);
}
.sound-test-btn:hover { transform: scale(1.05); }
.sound-test-btn.priority-low { background: var(--low-bg); color: var(--low); border-color: var(--low-border); }
.sound-test-btn.priority-medium { background: var(--medium-bg); color: var(--medium); border-color: var(--medium-border); }
.sound-test-btn.priority-high { background: var(--high-bg); color: var(--high); border-color: var(--high-border); }
.sound-test-btn.priority-urgent { background: var(--urgent-bg); color: var(--urgent); border-color: var(--urgent-border); }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mini-stat {
  text-align: center;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.mini-stat div:first-child {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-light);
}
.mini-stat div:last-child {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.task-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow), var(--shadow-glow);
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0;
  margin-bottom: 20px;
}
.modal-header h2 { font-size: 1.2rem; font-weight: 900; }
.close-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  width: 34px; height: 34px;
  cursor: pointer;
  transition: var(--transition);
}
.close-btn:hover { background: var(--urgent-bg); color: var(--urgent); border-color: var(--urgent-border); }

#taskForm { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.required { color: var(--urgent); }

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 14px;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
::placeholder { color: var(--text-dim); font-weight: 600; }
textarea { resize: vertical; min-height: 80px; }

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ── CELEBRATION MODAL ── */
.celebration-modal {
  background: linear-gradient(135deg, #1e1e38, #16162a);
  border: 1px solid rgba(124,92,252,0.4);
  border-radius: 28px;
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow), 0 0 40px rgba(124,92,252,0.3);
  animation: bounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bounceIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.cel-emoji { font-size: 4rem; margin-bottom: 12px; animation: spin 0.6s ease; }
@keyframes spin {
  from { transform: rotate(-20deg) scale(0.5); }
  to   { transform: rotate(0) scale(1); }
}
.celebration-modal h2 { font-size: 1.8rem; font-weight: 900; margin-bottom: 8px; }
.celebration-modal p { color: var(--text-muted); font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.xp-gain {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  padding: 10px 28px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px var(--primary-glow);
}

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9b6ef3);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 22px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(124,92,252,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,92,252,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.btn-danger {
  background: var(--urgent-bg);
  color: var(--urgent);
  border: 1px solid var(--urgent-border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 1rem;
  padding: 8px 14px;
  cursor: pointer;
  transition: var(--transition);
}
.icon-btn:hover { background: var(--card-hover); color: var(--text); }

/* pulse animation for add button */
.pulse-btn {
  animation: pulseBtn 2.5s ease-in-out infinite;
}
@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 4px 16px rgba(124,92,252,0.35); }
  50% { box-shadow: 0 8px 32px rgba(124,92,252,0.7); }
}

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 220px; }
}
@media (max-width: 700px) {
  .app-wrapper { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 16px; gap: 12px; }
  .nav-menu { flex-direction: row; flex: none; }
  .nav-btn { padding: 10px 14px; font-size: 0.82rem; }
  .main-content { padding: 20px; }
  .form-row { flex-direction: column; }
  .side-panel { width: 100%; }
}
