:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #22c55e;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
}

.brand__logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary);
}

.page {
  width: min(960px, 92vw);
  margin: 2.5rem auto;
  display: grid;
  gap: 2rem;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  padding: 2rem;
}

.card__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.card__subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

form {
  display: grid;
  gap: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

button:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.todo__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.todo__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.todo-item__title {
  flex: 1;
  font-weight: 500;
}

.todo-item--done {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.todo-item--done .todo-item__title {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-item__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.chip {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary-dark);
  font-weight: 600;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  margin-top: 12px;
}


.auth-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.notice {
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-dark);
}

.alert {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.alert--error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.alert--success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.32);
  color: var(--accent);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .todo__form {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}

.auth-links {
}

