:root {
  --bg: #0f172a;
  --card: #1e293b;
  --line: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6366f1;
  --high: #ef4444;
  --medium: #f59e0b;
  --low: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.app { width: 100%; max-width: 560px; }

header { text-align: center; margin-bottom: 28px; }
header h1 { font-size: 2rem; }
.sub { color: var(--muted); font-size: .85rem; margin-top: 4px; }

.task-form {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.task-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
}
.task-form input:focus { outline: 2px solid var(--accent); }
.task-form select {
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}
.task-form button {
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.task-form button:hover { filter: brightness(1.1); }

.filters { display: flex; gap: 8px; margin-bottom: 16px; }
.filters button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .85rem;
}
.filters button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.task-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.task {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  padding: 12px 14px;
  border-radius: 10px;
}
.task.high { border-left-color: var(--high); }
.task.medium { border-left-color: var(--medium); }
.task.low { border-left-color: var(--low); }
.task input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.task .label { flex: 1; }
.task.done .label { text-decoration: line-through; color: var(--muted); }
.task .tag {
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
}
.task .del {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
}
.task .del:hover { color: var(--high); }

.empty { text-align: center; color: var(--muted); margin-top: 24px; display: none; }
