:root {
  --bg: #0f1420;
  --panel: #1a2030;
  --line: #2a3346;
  --text: #e6eaf2;
  --muted: #8d99b3;
  --accent: #4f8cff;
  --danger: #ff5d6c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.muted { color: var(--muted); font-weight: 400; font-size: 0.9em; }
.error { color: var(--danger); min-height: 1.2em; margin: 6px 0 0; font-size: 0.9em; }

.centered { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
#login-view .card { width: 340px; }
#login-view h1 { margin: 0 0 4px; font-size: 1.3rem; }

label { display: block; margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }
input, select {
  width: 100%;
  margin-top: 4px;
  padding: 9px 11px;
  background: #0d1119;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}
button {
  margin-top: 14px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.link { background: none; border: 0; padding: 4px 6px; color: var(--accent); margin: 0; }
button.link.danger { color: var(--danger); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar button { margin: 0; }

.grid {
  display: grid; gap: 20px; padding: 22px;
  grid-template-columns: 1fr 1.4fr; max-width: 1100px; margin: 0 auto;
}
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card h2 { margin: 0 0 14px; font-size: 1.05rem; }

.row { display: flex; gap: 8px; }
.row input, .row select { margin-top: 0; }
.row button { margin-top: 0; white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.list { list-style: none; margin: 14px 0 0; padding: 0; }
.list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px;
}
.list li.active { border-color: var(--accent); }
.list .meta { display: flex; flex-direction: column; min-width: 0; }
.list .meta b { font-weight: 600; }
.list .actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pill {
  font-size: 0.75rem; padding: 2px 8px; border-radius: 999px;
  background: #0d1119; border: 1px solid var(--line); color: var(--muted);
}
.clickable { cursor: pointer; }
