:root {
  --bg: #0b1220;
  --panel: #10192c;
  --card: #0f172a;
  --line: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #06b6d4;
  --accent-strong: #22d3ee;
  --danger: #ef4444;
  --success: #22c55e;
  --shadow: 0 10px 40px rgba(0,0,0,0.35);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 20% 20%, rgba(34,211,238,0.08), transparent 30%),
              radial-gradient(circle at 80% 0%, rgba(99,102,241,0.08), transparent 25%),
              var(--bg);
  color: var(--text);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0 8px;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  z-index: 2;
}

.brand .logo { font-weight: 700; font-size: 20px; letter-spacing: 0.5px; }
.brand .subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }

.top-actions { display: flex; gap: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.filters { margin: 12px 0 18px; display: flex; flex-direction: column; gap: 12px; }
.filters-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b1322;
  color: var(--text);
  font-size: 14px;
}
textarea { resize: vertical; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn.primary { background: linear-gradient(120deg, var(--accent), var(--accent-strong)); color: #0b1220; box-shadow: 0 10px 30px rgba(34,211,238,0.35); }
.btn.ghost { background: #111827; color: var(--text); border: 1px solid var(--line); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.main { display: flex; flex-direction: column; gap: 12px; }
.side { display: flex; flex-direction: column; gap: 12px; }

.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-title h2, .section-title h3 { margin: 4px 0; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: 0.4px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #0d1727; color: var(--text); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.chip.active { border-color: var(--accent); color: var(--accent-strong); }
.chip.ghost { opacity: 0.8; }

.task-list { display: flex; flex-direction: column; gap: 12px; }

.task-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #0f192b, #0e1424);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  position: relative;
}

.task-main { display: flex; flex-direction: column; gap: 6px; }
.task-title { font-weight: 700; }
.task-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: #111b2c; border: 1px solid var(--line); color: var(--text); font-size: 12px; }
.badge.duration { color: #22d3ee; border-color: rgba(34,211,238,0.4); }
.badge.importance-high { color: #f87171; border-color: rgba(248,113,113,0.4); }
.badge.importance-medium { color: #fbbf24; border-color: rgba(251,191,36,0.4); }
.badge.importance-low { color: #22c55e; border-color: rgba(34,197,94,0.4); }
.badge.status-done { color: var(--success); border-color: rgba(34,197,94,0.4); }
.badge.due-soon { color: #fbbf24; border-color: rgba(251,191,36,0.4); }
.badge.due-late { color: #f87171; border-color: rgba(248,113,113,0.4); }

.form { display: flex; flex-direction: column; gap: 10px; }
.form.inline { flex-direction: row; flex-wrap: wrap; }
.form.inline input { flex: 1 1 120px; }
.form.inline button { flex: 0 0 auto; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }

.pill-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 8px 12px; background: #0d1727; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

.checkbox { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line); background: #0b1220; appearance: none; cursor: pointer; position: relative; }
.checkbox:checked { background: var(--accent); border-color: var(--accent-strong); }
.checkbox:checked::after { content: '✓'; position: absolute; top: -2px; left: 4px; color: #0b1220; font-weight: 700; }

.toast { position: fixed; bottom: 20px; right: 20px; background: #0d1829; border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hidden { display: none; }
.toast button { margin-left: 8px; }

.stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-chip { padding: 8px 10px; border-radius: 10px; background: #0d1727; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.stat-chip strong { color: var(--text); margin-left: 6px; }

.task-actions { display: flex; gap: 6px; position: absolute; right: 12px; top: 10px; }
.icon-btn { background: #0d1727; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.05s ease, border-color 0.2s ease; }
.icon-btn:hover { transform: translateY(-1px); border-color: var(--accent); }

.fab { position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%; border: none; background: linear-gradient(120deg, var(--accent), var(--accent-strong)); color: #0b1220; font-size: 26px; font-weight: 700; box-shadow: 0 10px 30px rgba(34,211,238,0.35); cursor: pointer; }

.tooltip { color: var(--muted); font-size: 12px; margin-top: -6px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { position: relative; }
  .task-card { grid-template-columns: 28px 1fr; }
  .task-actions { top: auto; bottom: 10px; right: 10px; }
}
