:root {
  color-scheme: dark;
  --bg: #0e1117;
  --panel: #161c26;
  --text: #e8edf4;
  --muted: #93a1b5;
  --accent: #4cc2ff;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}
.app { width: 100%; max-width: 640px; }
.app-header h1 { margin: 0 0 4px; font-size: 1.8rem; }
.tagline { margin: 0 0 24px; color: var(--muted); }
.add-panel, .list-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
#add-form { display: flex; flex-wrap: wrap; gap: 8px; }
#add-form input {
  flex: 1 1 160px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a3547;
  background: #0b0f15;
  color: var(--text);
}
#add-button, #clear-expired {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #06202f;
  font-weight: 600;
  cursor: pointer;
}
#clear-expired { background: #2a3547; color: var(--text); }
.error { color: var(--danger); margin: 8px 0 0; }
.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
}
.deadline-list { list-style: none; margin: 0; padding: 0; }
.deadline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid #232d3d;
}
.deadline-item:last-child { border-bottom: none; }
.item-info { line-height: 1.5; }
.countdown { color: var(--accent); font-weight: 600; }
.countdown.expired { color: var(--danger); }
.rules-link { margin-left: 10px; color: var(--muted); }
.delete-button {
  background: transparent;
  border: 1px solid #2a3547;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.delete-button:hover { color: var(--danger); border-color: var(--danger); }
.empty { color: var(--muted); text-align: center; padding: 12px 0; }
