:root {
  --bg: #0b0d12;
  --card: #12161d;
  --muted: #8791a3;
  --text: #eef2f7;
  --accent: #84a7ff;
  --accent-2: #7ce7be;
  --border: rgba(255,255,255,.07);
  --hover: rgba(255,255,255,.05);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: radial-gradient(circle at top, #121827 0%, #0b0d12 55%); color: var(--text); }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; transition: grid-template-columns .18s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 88px 1fr; }
.sidebar { border-right: 1px solid var(--border); background: rgba(10,12,18,.82); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display:flex; flex-direction:column; gap:18px; transition: width .18s ease, padding .18s ease; }
.sidebar-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.brand { display:flex; align-items:center; gap:12px; padding: 8px 10px; min-width: 0; }
.brand-copy { min-width: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display:grid; place-items:center; background: linear-gradient(135deg, rgba(132,167,255,.18), rgba(124,231,190,.12)); border:1px solid var(--border); flex-shrink: 0; }
.brand small { display:block; color: var(--muted); margin-top: 2px; }
.nav { display:grid; gap:8px; }
.nav-btn { display:flex; align-items:center; gap:10px; width:100%; border:1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text); border-radius: 14px; padding: 12px 12px; cursor:pointer; text-align:left; font: inherit; overflow: hidden; }
.nav-btn:hover { background: var(--hover); }
.nav-btn.active { background: linear-gradient(135deg, rgba(132,167,255,.18), rgba(124,231,190,.10)); border-color: rgba(132,167,255,.25); }
.nav-btn.disabled { opacity: .45; cursor:not-allowed; }
.sidebar-foot { margin-top:auto; color: var(--muted); font-size:.82rem; padding: 0 10px; }
.sidebar-toggle { flex-shrink: 0; }
.sidebar.collapsed { padding-inline: 10px; }
.sidebar.collapsed .brand-copy,
.sidebar.collapsed .nav-btn span,
.sidebar.collapsed .sidebar-foot { display: none; }
.sidebar.collapsed .brand { padding-inline: 4px; }
.sidebar.collapsed .nav-btn { justify-content: center; padding-inline: 0; }
.main { padding: 28px 18px 42px; }
.topbar { margin-bottom: 20px; }
.eyebrow { color: var(--accent-2); margin:0 0 8px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; font-size:.82rem; }
h1 { margin:0; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing:-.03em; }
.grid, .columns { display:grid; gap:14px; }
.top-grid { grid-template-columns: 1.1fr 1.9fr; margin-bottom:14px; }
.shopping-top { margin-bottom:14px; }
.columns.two { grid-template-columns: 1.1fr .9fr; margin-top: 14px; }
.columns.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.home-command-strip { margin-top: 14px; }
.card { background: rgba(18,22,29,.92); border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.18); backdrop-filter: blur(10px); }
.card.accent { background: linear-gradient(135deg, rgba(132,167,255,.16), rgba(124,231,190,.08)); }
.subdued-panel { opacity: .88; }
.card h2 { margin:0; font-size:1.02rem; letter-spacing:-.02em; }
.panel { min-height: 220px; }
.compact-panel { min-height: 170px; }
.home-panel-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 10px;
}
.home-panel-footer small { color: var(--muted); font-size:.8rem; }
.home-note p { color: var(--muted); margin: 12px 0 0; }
.home-nav-card { cursor: pointer; }
.home-nav-card:hover { border-color: rgba(132,167,255,.20); background: rgba(255,255,255,.035); }
.section-head { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:12px; }
.section-head small, .stat-label, .mini-head { color: var(--muted); font-size:.82rem; }
.stats { display:flex; gap:20px; flex-wrap:wrap; }
.stats strong { display:block; margin-top:4px; font-size:1.7rem; }
.quick-form { display:grid; grid-template-columns: minmax(0, 1.8fr) minmax(110px, .6fr) minmax(110px, .7fr) 48px; gap:10px; align-items:center; }
.quick-launch-card { display:grid; gap:12px; align-content:center; }
.create-launch-btn {
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(132,167,255,.18), rgba(124,231,190,.10));
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0 18px;
  text-align: left;
  justify-self: start;
  width: auto;
  min-width: 0;
}
.create-launch-btn.secondary { background: rgba(255,255,255,.04); }
.create-launch-btn:hover { background: linear-gradient(135deg, rgba(132,167,255,.22), rgba(124,231,190,.14)); }
.inbox-form { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 48px; margin-bottom: 12px; }
.stack { display:grid; gap:10px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.mini-columns { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.mini-columns.triple { grid-template-columns: repeat(3, 1fr); }
input, textarea, select { border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.035); color: var(--text); padding: 12px 13px; font: inherit; width: 100%; outline: none; }
input:focus, textarea:focus, select:focus { border-color: rgba(132,167,255,.45); box-shadow: 0 0 0 3px rgba(132,167,255,.12); }
textarea { resize: vertical; min-height: 88px; }
.list, .audit-list { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.compact-list { gap:8px; }
.list { min-height: 92px; }
.list li, .audit-list li { border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid var(--border); }
.list li { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:12px 12px 12px 14px; }
.list li:hover, .audit-list li:hover { background: var(--hover); }
.list li.selected { border-color: rgba(132,167,255,.45); box-shadow: 0 0 0 1px rgba(132,167,255,.18) inset; }
.list li.home-urgent { border-color: rgba(255,120,120,.28); background: rgba(120,30,30,.10); }
.list li.home-soon { border-color: rgba(255,200,120,.24); background: rgba(120,90,20,.08); }
.home-badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.74rem;
  color: var(--text);
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding: 4px 8px;
  border-radius: 999px;
}
.home-badge.urgent { border-color: rgba(255,120,120,.28); color: #ffd3d3; }
.home-badge.soon { border-color: rgba(255,200,120,.28); color: #ffe3a8; }
.item-main { min-width: 0; display:grid; gap:4px; }
.item-title { font-weight:600; line-height:1.25; }
.item-meta { color: var(--muted); font-size:.82rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.item-actions, .icon-row { display:flex; gap:6px; align-items:center; flex-shrink:0; }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; padding:0; font-size: 1rem; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.icon-btn.primary { background: linear-gradient(135deg, rgba(132,167,255,.22), rgba(124,231,190,.14)); }
.icon-btn.danger { color: #ffb1b1; }
.filter-chip {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 14px;
  font: inherit;
  white-space: nowrap;
  flex: 0 0 auto;
}
.filter-chip:hover { background: rgba(255,255,255,.08); }
.filter-chip.active {
  background: linear-gradient(135deg, rgba(132,167,255,.22), rgba(124,231,190,.14));
  border-color: rgba(132,167,255,.24);
}
.audit-list li { display:grid; gap:6px; padding:12px 14px; }
.audit-list p { margin:0; color: var(--muted); font-size:.88rem; }
.audit-list small { color: var(--muted); }
.empty, .empty-panel { color: var(--muted); font-style: italic; }
.empty { justify-content:center; padding:16px; }
.empty-panel { padding: 16px; border:1px dashed var(--border); border-radius:16px; background: rgba(255,255,255,.02); }
.hidden { display:none; }
.dragging { opacity: .55; }
.droppable { min-height: 150px; }
.view { display:none; }
.view.active { display:block; }
.task-form { grid-template-columns: minmax(0, 1.6fr) minmax(120px, .7fr) minmax(120px, .8fr) 48px; }
.project-form { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 48px; margin-bottom: 12px; }
.kanban { display:grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap:10px; overflow:auto; padding-bottom: 4px; }
.kanban-col { display:grid; gap:8px; align-content:start; }
.kanban-stack { display:grid; gap:8px; min-height: 110px; }
.eisenhower-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.eisenhower-cell { min-height: 220px; }
.do-cell { border-color: rgba(255,120,120,.24); }
.schedule-cell { border-color: rgba(124,231,190,.22); }
.delegate-cell { border-color: rgba(255,200,120,.22); }
.eliminate-cell { border-color: rgba(255,255,255,.10); }
.task-card { border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid var(--border); padding:12px; display:grid; gap:10px; }
.task-card.priority-1 { border-color: rgba(255,120,120,.30); }
.task-card.priority-2 { border-color: rgba(255,200,120,.28); }
.task-card.priority-3 { border-color: rgba(132,167,255,.22); }
.task-card.priority-4 { border-color: rgba(255,255,255,.10); }
.task-card.task-overdue { background: rgba(120,30,30,.12); }
.task-card.task-due-soon { background: rgba(120,90,20,.10); }
.archive-strip { display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }
.archive-chip { border:1px solid var(--border); background: rgba(255,255,255,.03); border-radius: 999px; padding: 8px 12px; color: var(--muted); }
.archive-chip strong { color: var(--text); font-size: inherit; }
.inline-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.wide-btn { width: auto; min-width: 110px; padding: 0 16px; }
.list li { cursor: default; }
.list li.clickable-row { cursor: pointer; }
.list li.clickable-row:hover { border-color: rgba(132,167,255,.18); }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(18,22,29,.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  color: var(--text);
}
.toast.success { border-color: rgba(124,231,190,.28); }
.toast.warn { border-color: rgba(255,200,120,.28); }
.toast.error { border-color: rgba(255,120,120,.28); }
.reminder-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 14, 0.84);
  backdrop-filter: blur(8px);
  padding: 24px;
}
.reminder-overlay.hidden { display: none; }
.reminder-overlay-card {
  width: min(720px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(132,167,255,.22);
  background: linear-gradient(180deg, rgba(20,26,38,.98), rgba(13,17,25,.98));
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  padding: 32px;
  display: grid;
  gap: 18px;
  text-align: center;
}
.task-overlay-card { text-align: left; }
.reminder-overlay-badge {
  justify-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(132,167,255,.12);
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: .08em;
  font-size: .82rem;
}
.reminder-overlay-card h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}
.reminder-overlay-card p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.35rem);
}
.reminder-overlay-card small {
  color: var(--muted);
  font-size: 1rem;
}
.modal-actions-primary,
.modal-actions-secondary,
.modal-actions-danger {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.modal-actions-primary { justify-content:flex-start; }
.modal-actions-secondary { justify-content:flex-start; }
.modal-actions-danger { justify-content:flex-end; }
.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.reminder-overlay-actions {
  display:grid;
  gap:12px;
  margin-top: 4px;
}
.project-detail-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.project-detail-panel.hidden {
  display: none;
}
.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.project-stat-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.03);
}
.project-stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}
.project-task-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 1100px) { .top-grid, .columns.two { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .project-summary-grid, .project-task-groups { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); } .sidebar.collapsed .brand-copy, .sidebar.collapsed .nav-btn span, .sidebar.collapsed .sidebar-foot { display: initial; } .nav { grid-template-columns: repeat(3, 1fr); } .main { padding-top: 18px; } }
@media (max-width: 760px) { .quick-form, .inbox-form { grid-template-columns: 1fr 1fr; } .form-row, .mini-columns { grid-template-columns:1fr; } .list li { align-items:flex-start; } }
@media (max-width: 560px) { .main, .sidebar { padding-inline: 12px; } .quick-form, .inbox-form, .nav { grid-template-columns: 1fr; } .list li { flex-direction:column; } .item-actions { width:100%; justify-content:flex-end; } .section-head { align-items:flex-start; flex-direction:column; } }

.habit-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.habit-heatmap {
  display:grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap:8px;
}
.habit-heatmap-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  display:grid;
  place-items:center;
  font-size:.75rem;
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
.habit-heatmap-cell.zero { background: rgba(255,255,255,.02); }
.habit-heatmap-cell.low { background: rgba(255,200,120,.14); color: #ffe3a8; border-color: rgba(255,200,120,.24); }
.habit-heatmap-cell.done { background: rgba(124,231,190,.16); color: #cffbe9; border-color: rgba(124,231,190,.26); }
.compact-disclosure {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
  padding: 10px 12px;
}
.compact-disclosure summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  list-style:none;
  color: var(--text);
  font-weight:600;
}
.compact-disclosure summary::-webkit-details-marker { display:none; }
.compact-summary-list { margin-top: 10px; min-height: 0; }
@media (max-width: 900px) { .habit-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .habit-heatmap { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
