:root {
  --bg: #070a12;
  --bg2: #0b1020;
  --surface: rgba(255, 255, 255, 0.06);
  --surface2: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.12);
  --text: #eaf0ff;
  --muted: rgba(234, 240, 255, 0.72);
  --primary: #2dd4bf;
  --primary2: #60a5fa;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 20% 0%, rgba(45, 212, 191, 0.16), transparent 55%),
    radial-gradient(800px 550px at 85% 10%, rgba(96, 165, 250, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

.container { max-width: 980px; margin: 0 auto; padding: 0 18px 40px; }

.top { padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(7, 10, 18, 0.6); backdrop-filter: blur(10px); position: sticky; top: 0; }
.back { text-decoration: none; color: var(--muted); font-weight: 800; }
.back:hover { color: var(--text); }

.card {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  box-shadow: var(--shadow);
}

.head h1 { margin: 0 0 6px; letter-spacing: -0.4px; }
.muted { color: var(--muted); margin: 0; }

.form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 12px 12px;
  font: inherit;
}

input::placeholder { color: rgba(234, 240, 255, 0.55); }

.toolbar {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.check {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.check[data-done="true"] {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.85), rgba(96, 165, 250, 0.75));
  border-color: rgba(255, 255, 255, 0.18);
}

.title { font-weight: 800; }
.title.done { color: rgba(234, 240, 255, 0.55); text-decoration: line-through; }

.btn {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.btn:hover { background: rgba(255, 255, 255, 0.10); }
.btn.primary { background: linear-gradient(90deg, rgba(45, 212, 191, 0.9), rgba(96, 165, 250, 0.85)); }
.btn.ghost { background: rgba(255, 255, 255, 0.03); }
.btn.small { padding: 10px 12px; border-radius: 12px; font-size: 13px; }

.icon-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input):focus-visible { outline: 3px solid rgba(45, 212, 191, 0.5); outline-offset: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

@media (max-width: 520px) {
  .form { grid-template-columns: 1fr; }
}
