/* ============================================================
   style.css — TaskFlow To-Do Dashboard
   ============================================================ */

/* ── 1. CSS Custom Properties (Design Tokens) ─────────────── */
:root {
  /* Colors */
  --sidebar-bg:    #0f172a;
  --sidebar-hover: #1e293b;
  --accent:        #7c3aed;
  --accent-light:  #a78bfa;
  --accent-glow:   rgba(124, 58, 237, 0.25);

  --bg-main:       #f1f5f9;
  --bg-card:       #ffffff;
  --border:        #e2e8f0;

  --text-primary:  #0f172a;
  --text-secondary:#64748b;
  --text-muted:    #94a3b8;

  /* Priority */
  --prio-low:      #10b981;
  --prio-low-bg:   #d1fae5;
  --prio-med:      #f59e0b;
  --prio-med-bg:   #fef3c7;
  --prio-high:     #ef4444;
  --prio-high-bg:  #fee2e2;

  /* Status */
  --completed-color: #10b981;
  --pending-color:   #f59e0b;

  /* Notification */
  --notif-overdue-bg:  #fff1f2;
  --notif-overdue-bdr: #fda4af;
  --notif-today-bg:    #fff7ed;
  --notif-today-bdr:   #fdba74;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Transitions */
  --transition: 0.22s ease;

  /* Sidebar width */
  --sidebar-w: 260px;
  --input-label-bg: #f1f5f9;
}

/* ── 1b. Dark Theme Overrides ─────────────────────────────── */
[data-theme="dark"] {
  --bg-main:        #0d1117;
  --bg-card:        #161b22;
  --border:         #30363d;
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;
  --sidebar-bg:     #010409;
  --sidebar-hover:  #161b22;
  --prio-low-bg:    rgba(16,185,129,.15);
  --prio-med-bg:    rgba(245,158,11,.15);
  --prio-high-bg:   rgba(239,68,68,.15);
  --notif-overdue-bg:  rgba(239,68,68,.1);
  --notif-overdue-bdr: rgba(239,68,68,.3);
  --notif-today-bg:    rgba(245,158,11,.1);
  --notif-today-bdr:   rgba(245,158,11,.3);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --input-label-bg: #21262d;
}

/* ── 1c. Uiverse Night/Day Toggle Switch ───────────────────── */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 4em;
  height: 2.2em;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0,0,0,.2);
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #2a2a2a;
  transition: 0.4s;
  border-radius: 30px;
  overflow: hidden;
}
.slider:before {
  position: absolute;
  content: "";
  height: 1.2em;
  width: 1.2em;
  border-radius: 20px;
  left: 0.5em;
  bottom: 0.5em;
  transition: 0.4s;
  transition-timing-function: cubic-bezier(0.81,-0.04,0.38,1.5);
  box-shadow: inset 8px -4px 0px 0px #fff;
}
.switch input:checked + .slider { background-color: #00a6ff; }
.switch input:checked + .slider:before {
  transform: translateX(1.8em);
  box-shadow: inset 15px -4px 0px 15px #ffcf48;
}
.star { background-color:#fff; border-radius:50%; position:absolute; width:5px; height:5px; transition:all 0.4s; }
.star_1 { left:2.5em; top:0.5em; }
.star_2 { left:2.2em; top:1.2em; }
.star_3 { left:3em;   top:0.9em; }
.switch input:checked ~ .slider .star { opacity:0; }
.cloud { width:3.5em; position:absolute; bottom:-1.4em; left:-1.1em; opacity:0; transition:all 0.4s; }
.switch input:checked ~ .slider .cloud { opacity:1; }

/* Sidebar theme toggle row */
.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}
.theme-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

/* ── 1d. inputGroup Floating Label ────────────────────────── */
.inputGroup {
  font-family: 'Inter','Segoe UI',sans-serif;
  margin: 1em 0 0.4em;
  position: relative;
  width: 100%;
}
.inputGroup input {
  font-size: 100%;
  padding: 0.85em 1em;
  outline: none;
  border: 2px solid var(--border);
  background-color: transparent;
  border-radius: 20px;
  width: 100%;
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}
.inputGroup label {
  font-size: 100%;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.8em;
  margin-left: 0.5em;
  pointer-events: none;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}
.inputGroup input:focus ~ label,
.inputGroup input:not(:placeholder-shown) ~ label {
  transform: translateY(-145%);
  margin: 0;
  margin-left: 1.3em;
  padding: 0.4em;
  background-color: var(--input-label-bg);
  border-radius: 6px;
  font-size: 88%;
  color: var(--accent);
}
.inputGroup input:focus { border-color: var(--accent); }

/* Google Login Button */
.btn-google {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #444;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-google:hover { background: #f8fafc; box-shadow: var(--shadow-sm); }
.google-icon { width: 18px; height: 18px; }

/* Divider for social login */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.divider::before { margin-right: 1.5em; }
.divider::after { margin-left: 1.5em; }

/* Forgot password link */
.forgot-pw {
  display: block;
  text-align: right;
  margin-top: -12px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition);
}
.forgot-pw:hover { text-decoration: underline; }

/* ── 1e. Login Page ────────────────────────────────────────── */
.login-page { min-height:100vh; display:flex; background:var(--bg-main); }
.login-shell { display:flex; width:100%; min-height:100vh; }
.login-brand {
  flex: 1;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #4c1d95 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content:'';
  position:absolute;
  width:400px; height:400px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(124,58,237,.3),transparent 70%);
  top:-100px; right:-100px;
}
.brand-content { position:relative; z-index:1; color:#fff; text-align:center; }
.brand-logo    { font-size:72px; margin-bottom:16px; animation:logoPulse 2s ease-in-out infinite; }
.brand-title   { font-size:36px; font-weight:800; margin-bottom:12px; }
.brand-tagline { font-size:17px; color:#c4b5fd; margin-bottom:32px; line-height:1.6; }
.brand-features { list-style:none; text-align:left; display:inline-block; }
.brand-features li { padding:8px 0; font-size:15px; color:#ddd6fe; }
@keyframes logoPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }

.login-card {
  width: 460px;
  min-height: 100vh;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
  box-shadow: -4px 0 20px rgba(0,0,0,.08);
  transition: background var(--transition);
}
.login-logo-mobile {
  display:none;
  font-size:22px; font-weight:800; text-align:center; margin-bottom:28px;
  background:linear-gradient(135deg,var(--accent),var(--accent-light));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.auth-tabs {
  display:flex;
  background:var(--bg-main);
  border-radius:var(--radius-sm);
  padding:4px;
  margin-bottom:24px;
  transition: background var(--transition);
}
.auth-tab {
  flex:1; padding:10px;
  border-radius:6px; font-size:14px; font-weight:600;
  color:var(--text-secondary);
  transition:all var(--transition);
}
.auth-tab.active { background:var(--bg-card); color:var(--accent); box-shadow:var(--shadow-sm); }
.auth-error { font-size:13px; color:var(--prio-high); min-height:18px; margin:4px 0 8px; }
.btn-auth {
  width:100%; padding:13px; margin-top:8px;
  background:linear-gradient(135deg,var(--accent),#6d28d9);
  color:#fff; font-size:15px; font-weight:700;
  border-radius:var(--radius-md);
  box-shadow:0 4px 14px var(--accent-glow);
  transition:opacity var(--transition),transform var(--transition);
}
.btn-auth:hover { opacity:.9; transform:translateY(-1px); }
.auth-switch { text-align:center; font-size:13px; color:var(--text-secondary); margin-top:20px; }
.link-btn { color:var(--accent); font-weight:600; font-size:13px; text-decoration:underline; }

/* ── 1f. Sidebar user email + logout ───────────────────────── */
.sidebar-user {
  font-size:11px;
  color:#4b5563;
  text-align:center;
  padding:0 4px;
  word-break:break-all;
  margin-top:6px;
}
.btn-logout {
  width:100%;
  padding:10px;
  background:rgba(239,68,68,.12);
  color:#fca5a5;
  font-size:13px;
  font-weight:600;
  border-radius:var(--radius-sm);
  border:1px solid rgba(239,68,68,.2);
  margin-top:6px;
  transition:background var(--transition);
}
.btn-logout:hover { background:rgba(239,68,68,.22); }

/* ── 1g. Quick Action Cards (in dashboard) ─────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.quick-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.quick-card-icon { font-size: 32px; flex-shrink: 0; }
.quick-card-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
.quick-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: block;
}
@media(max-width:600px){ .quick-actions{grid-template-columns:1fr;} }

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

html { scroll-behavior: smooth; }

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

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

/* ── 3. App Shell (Sidebar + Main) ───────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── 4. Sidebar ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  transition: transform var(--transition);
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 10px;
}
.logo-icon { font-size: 26px; }
.logo-text  {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav */
.sidebar-nav { flex: 1; }
.sidebar-nav ul { display: flex; flex-direction: column; gap: 6px; }

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-btn:hover   { background: var(--sidebar-hover); color: #fff; }
.nav-btn.active  { background: var(--accent); color: #fff; }

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

/* Divider line between nav groups */
.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 14px;
}

.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}
.nav-btn.active .nav-badge { background: rgba(255,255,255,.25); }

/* Allow <a> tags styled as nav buttons */
.nav-btn.nav-link { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--radius-sm); color:#94a3b8; font-size:14px; font-weight:500; text-decoration:none; transition:background var(--transition),color var(--transition); width:100%; }
.nav-btn.nav-link:hover { background:var(--sidebar-hover); color:#fff; }
.nav-btn.nav-link.active { background:var(--accent); color:#fff; }

/* Sidebar footer */
.sidebar-footer { margin-top:24px; padding-top:20px; border-top:1px solid rgba(255,255,255,.08); display:flex; flex-direction:column; gap:6px; }

.btn-add-task {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-add-task:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-add-task:active { transform: translateY(0); }

/* ── 5. Main Content ──────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px 48px;
  min-width: 0;
}

/* ── 6. Top Bar ───────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.page-title    { font-size: 26px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; margin-left: auto; }

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 4px;
  transition: var(--transition);
}

/* ── 7. Stats Row ─────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.completed-card::before { background: linear-gradient(90deg, var(--prio-low), #34d399); }
.pending-card::before   { background: linear-gradient(90deg, var(--prio-med), #fbbf24); }
.percent-card::before   { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.stat-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.stat-info { display: flex; flex-direction: column; gap: 4px; }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Progress bar inside percent card */
.progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.5s ease;
}

/* ── 8. Notification Banner ───────────────────────────────── */
.notification-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--notif-overdue-bdr);
  background: var(--notif-overdue-bg);
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
}
.notif-icon    { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.notif-content { flex: 1; font-size: 13.5px; line-height: 1.6; color: #7f1d1d; }
.notif-content strong { display: block; margin-bottom: 2px; font-size: 14px; }
.notif-content .notif-item { display: block; }
.notif-close {
  font-size: 18px;
  color: #7f1d1d;
  opacity: .6;
  transition: opacity var(--transition);
}
.notif-close:hover { opacity: 1; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 9. Filter & Sort Bar ─────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.filter-pills { display: flex; gap: 8px; }
.pill {
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.pill:hover  { border-color: var(--accent); color: var(--accent); }
.pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.sort-control { display: flex; align-items: center; gap: 10px; }
.sort-label   { font-size: 13px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.sort-select {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border var(--transition);
}
.sort-select:focus { border-color: var(--accent); }

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

/* ── 11. Task Card ────────────────────────────────────────── */
.task-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  position: relative;
  animation: fadeInCard 0.3s ease;
}
.task-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.task-card.completed { opacity: .65; }
.task-card.completed .task-title { text-decoration: line-through; color: var(--text-muted); }

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

/* Card top row: checkbox + title + actions */
.card-top {
  display: flex;
  align-items: center; /* Changed from flex-start to center for neon checkbox */
  gap: 14px;
}

/* Custom checkbox */
.task-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
  position: relative;
}
.task-checkbox:checked {
  background: var(--completed-color);
  border-color: var(--completed-color);
}
.task-checkbox:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.task-title-wrap { flex: 1; min-width: 0; }
.task-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
  margin-bottom: 4px;
}
.task-desc {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-word;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card action buttons */
.card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.card-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.card-btn:hover { transform: scale(1.1); }
.card-btn.edit   { background: #ede9fe; color: var(--accent); }
.card-btn.edit:hover   { background: var(--accent); color: #fff; }
.card-btn.delete { background: #fee2e2; color: var(--prio-high); }
.card-btn.delete:hover { background: var(--prio-high); color: #fff; }

/* Card meta row */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Priority Badge */
.priority-badge {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.priority-badge.low      { background: var(--prio-low-bg); color: #065f46; }
.priority-badge.medium   { background: var(--prio-med-bg); color: #78350f; }
.priority-badge.high     { background: var(--prio-high-bg); color: #7f1d1d; }

/* Due date chip */
.due-chip {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.due-chip.overdue { color: var(--prio-high); font-weight: 600; }
.due-chip.today   { color: var(--prio-med); font-weight: 600; }

/* Status badge */
.status-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.status-badge.pending   { background: #fef3c7; color: #78350f; }
.status-badge.completed { background: #d1fae5; color: #065f46; }

/* ── 12. Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p  { font-size: 14px; color: var(--text-muted); }

/* ── 13. Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: scale(.95) translateY(10px);
  transition: transform 0.28s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 20px; font-weight: 800; }
.modal-close {
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--prio-high); }

/* Form */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.required { color: var(--prio-high); }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: #f8fafc;
  outline: none;
  transition: border var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); background: #fff; }

.field-error { font-size: 12px; color: var(--prio-high); min-height: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* Buttons */
.btn-primary {
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-primary:hover  { opacity: .9; transform: translateY(-1px); }
.btn-primary:active { transform: none; }

.btn-secondary {
  padding: 11px 24px;
  background: var(--bg-main);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--border); color: var(--text-primary); }

.btn-danger {
  padding: 11px 24px;
  background: var(--prio-high);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
}
.btn-danger:hover { opacity: .85; }

/* Confirm Modal */
.confirm-modal {
  max-width: 400px;
  text-align: center;
  padding: 40px 32px;
}
.confirm-icon { font-size: 48px; margin-bottom: 16px; }
.confirm-modal h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.confirm-modal p  { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.6; }
.confirm-modal .modal-actions { justify-content: center; }

/* ── 14. Toast ────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  min-width: 260px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
.toast.success { background: linear-gradient(135deg, #059669, #10b981); }
.toast.error   { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast.info    { background: linear-gradient(135deg, #2563eb, #3b82f6); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* ── 15. Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── 16. Sidebar Overlay (mobile) ─────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* ── 17. Responsive Styles ────────────────────────────────── */
@media (max-width: 900px) {
  .login-brand { display:none; }
  .login-card  { width:100%; }
  .login-logo-mobile { display:block; }
}
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  /* Show overlay behind sidebar on mobile */
  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }

  .main-content { margin-left: 0; padding: 20px 16px 80px; }

  .hamburger { display: flex; }
  .top-bar { margin-bottom: 20px; }
  .page-title { font-size: 20px; }

  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px 14px; }
  .stat-value { font-size: 22px; }

  .task-grid { grid-template-columns: 1fr; }

  .filter-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row  { grid-template-columns: 1fr; }
  .modal { padding: 24px 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary, .btn-danger { width: 100%; text-align: center; }
}
/* ── 18. Habit Grid & Cards ──────────────────────────────── */
.habit-stat-card::before { background: linear-gradient(90deg, #f59e0b, #7c3aed); }

.habit-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.habit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.habit-card.done-today { border-left: 4px solid #10b981; }

.habit-top { display: flex; align-items: flex-start; gap: 12px; }
.habit-name { flex: 1; font-size: 16px; font-weight: 700; word-break: break-word; }

.streak-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #ea580c;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  padding: 4px 12px;
  border-radius: 50px;
  white-space: nowrap;
}
[data-theme="dark"] .streak-badge { background: rgba(234, 88, 12, 0.15); border-color: rgba(234, 88, 12, 0.3); }

.streak-details { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-secondary); }
.streak-details strong { color: var(--text-primary); font-weight: 700; }

.habit-actions { display: flex; gap: 10px; align-items: center; }
.done-today-wrap { flex: 1; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.done-today-wrap .neon-checkbox-wrapper { pointer-events: all; }
.done-today-label { font-size: 13.5px; font-weight: 600; color: var(--text-secondary); }
.is-done .done-today-label { color: var(--primary); }

.card-action-btns { display: flex; gap: 8px; }

/* Custom Checkbox Placeholder removal */
.checkbox-container-single { display: none; }
.hidden-checkbox { position: absolute; opacity: 0; height: 0; width: 0; }
.checkbox-box {
  width: 30px; height: 30px; border: 2px solid var(--border); border-radius: 6px;
  display: inline-flex; justify-content: center; align-items: center;
  background-color: var(--bg-card); transition: 0.3s;
}
.checkmark { width: 22px; height: 22px; stroke-width: 4; stroke: white; opacity: 0; transition: 0.3s; transform: scale(0.5); }
.hidden-checkbox:checked + .custom-checkbox-visual-only .checkbox-box { background-color: #4caf50; border-color: #4caf50; }
.hidden-checkbox:checked + .custom-checkbox-visual-only .checkmark { opacity: 1; transform: scale(1); }

/* ── 19. Floating Action Button (FAB) ────────────────────── */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  font-size: 26px;
  border: none;
  box-shadow: 0 8px 24px var(--accent-glow);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fab-main:hover { transform: scale(1.1); box-shadow: 0 12px 32px var(--accent-glow); }
.fab-main.active { transform: rotate(45deg); background: var(--text-secondary); filter: grayscale(1); }

.fab-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.fab-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }

.fab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.fab-label {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  white-space: nowrap;
}

.fab-sub {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}
.fab-sub.task  { background: #10b981; }
.fab-sub.habit { background: #f59e0b; }
.fab-sub:hover { transform: scale(1.1); }

/* ── 20. Neon Checkbox ───────────────────────────────────── */
.neon-checkbox {
  --primary: #00ffaa;
  --primary-dark: #00cc88;
  --primary-light: #88ffdd;
  --size: 26px; /* Slightly smaller for task cards */
  position: relative;
  width: var(--size);
  height: var(--size);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.neon-checkbox input { display: none; }
.neon-checkbox__frame { position: relative; width: 100%; height: 100%; }

.neon-checkbox__box {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  border: 1.5px solid var(--primary-dark);
  transition: all 0.4s ease;
}

[data-theme="light"] .neon-checkbox__box {
  background: rgba(255, 255, 255, 0.9);
  border-color: #cbd5e1;
}

.neon-checkbox__check-container {
  position: absolute;
  inset: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neon-checkbox__check {
  width: 80%;
  height: 80%;
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transform-origin: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.neon-checkbox__glow {
  position: absolute;
  inset: -2px;
  border-radius: 6px;
  background: var(--primary);
  opacity: 0;
  filter: blur(8px);
  transform: scale(1.2);
  transition: all 0.4s ease;
}

.neon-checkbox__borders {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  overflow: hidden;
}

.neon-checkbox__borders span {
  position: absolute;
  width: 40px;
  height: 1px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.neon-checkbox__borders span:nth-child(1) { top: 0; left: -100%; animation: borderFlow1 2s linear infinite; }
.neon-checkbox__borders span:nth-child(2) { top: -100%; right: 0; width: 1px; height: 40px; animation: borderFlow2 2s linear infinite; }
.neon-checkbox__borders span:nth-child(3) { bottom: 0; right: -100%; animation: borderFlow3 2s linear infinite; }
.neon-checkbox__borders span:nth-child(4) { bottom: -100%; left: 0; width: 1px; height: 40px; animation: borderFlow4 2s linear infinite; }

.neon-checkbox__particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  top: 50%;
  left: 50%;
  box-shadow: 0 0 6px var(--primary);
}

.neon-checkbox__rings { position: absolute; inset: -20px; pointer-events: none; }
.neon-checkbox__rings .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--primary);
  opacity: 0;
  transform: scale(0);
}

.neon-checkbox__sparks span {
  position: absolute;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
}

/* Hover */
.neon-checkbox:hover .neon-checkbox__box { border-color: var(--primary); transform: scale(1.05); }

/* Checked */
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__box { border-color: var(--primary); background: rgba(0, 255, 170, 0.1); }
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__check { stroke-dashoffset: 0; transform: scale(1.1); }
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__glow { opacity: 0.2; }
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__borders span { opacity: 1; }
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__particles span { animation: particleExplosion 0.6s ease-out forwards; }
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__rings .ring { animation: ringPulse 0.6s ease-out forwards; }
.neon-checkbox input:checked ~ .neon-checkbox__frame .neon-checkbox__sparks span { animation: sparkFlash 0.6s ease-out forwards; }

@keyframes borderFlow1 { 0% { transform: translateX(0); } 100% { transform: translateX(200%); } }
@keyframes borderFlow2 { 0% { transform: translateY(0); } 100% { transform: translateY(200%); } }
@keyframes borderFlow3 { 0% { transform: translateX(0); } 100% { transform: translateX(-200%); } }
@keyframes borderFlow4 { 0% { transform: translateY(0); } 100% { transform: translateY(-200%); } }

@keyframes particleExplosion {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x, 20px)), calc(-50% + var(--y, 20px))) scale(0); opacity: 0; }
}

@keyframes ringPulse { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
@keyframes sparkFlash {
  0% { transform: rotate(var(--r, 0deg)) translateX(0) scale(1); opacity: 1; }
  100% { transform: rotate(var(--r, 0deg)) translateX(30px) scale(0); opacity: 0; }
}

/* Positions */
.neon-checkbox__particles span:nth-child(1)  { --x: 25px; --y: -25px; }
.neon-checkbox__particles span:nth-child(2)  { --x: -25px; --y: -25px; }
.neon-checkbox__particles span:nth-child(3)  { --x: 25px; --y: 25px; }
.neon-checkbox__particles span:nth-child(4)  { --x: -25px; --y: 25px; }
.neon-checkbox__particles span:nth-child(5)  { --x: 35px; --y: 0px; }
.neon-checkbox__particles span:nth-child(6)  { --x: -35px; --y: 0px; }
.neon-checkbox__particles span:nth-child(7)  { --x: 0px; --y: 35px; }
.neon-checkbox__particles span:nth-child(8)  { --x: 0px; --y: -35px; }
.neon-checkbox__particles span:nth-child(9)  { --x: 20px; --y: -30px; }
.neon-checkbox__particles span:nth-child(10) { --x: -20px; --y: 30px; }
.neon-checkbox__particles span:nth-child(11) { --x: 30px; --y: 20px; }
.neon-checkbox__particles span:nth-child(12) { --x: -30px; --y: -20px; }

.neon-checkbox__sparks span:nth-child(1) { --r: 0deg; top: 50%; left: 50%; }
.neon-checkbox__sparks span:nth-child(2) { --r: 90deg; top: 50%; left: 50%; }
.neon-checkbox__sparks span:nth-child(3) { --r: 180deg; top: 50%; left: 50%; }
.neon-checkbox__sparks span:nth-child(4) { --r: 270deg; top: 50%; left: 50%; }

.neon-checkbox__rings .ring:nth-child(1) { animation-delay: 0s; }
.neon-checkbox__rings .ring:nth-child(2) { animation-delay: 0.1s; }
.neon-checkbox__rings .ring:nth-child(3) { animation-delay: 0.2s; }
