:root {
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .08);
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --danger: #ef4444;
  --radius: 10px;
}
[data-theme="dark"] {
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, .14);
  --text: #e3e6ee;
  --muted: #8b91a5;
  --border: #2a2f3e;
  --surface: #171a23;
  --surface-alt: #0f1117;
  --danger: #f87171;
}
* { margin: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body { color: var(--text); background: var(--surface-alt); min-height: 100vh; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* scrollbars — slim, themed, padded thumb */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 8px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.theme-toggle {
  background: none; border: 1.5px solid var(--border); border-radius: var(--radius);
  width: 38px; height: 38px; cursor: pointer; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); }
a { color: var(--accent); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: var(--radius); border: none; cursor: pointer;
  font-size: 14px; font-weight: 600;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; border: 1.5px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { background: none; border: 1.5px solid var(--border); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; background: var(--surface); color: var(--text); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }

.form-error {
  display: none; background: #fef2f2; color: var(--danger); border: 1px solid #fecaca;
  border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.form-error.show { display: block; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 16px; padding: 28px; width: 420px; max-width: 92vw;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .25);
}
.modal h2 { font-size: 18px; margin-bottom: 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
