:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e2e4e9;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --danger: #dc2626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2026;
    --text: #eef0f3;
    --muted: #9aa1ad;
    --border: #2b2f37;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-card {
  max-width: 360px;
  margin: 10vh auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.auth-card h1 {
  margin-top: 0;
  font-size: 1.25rem;
}

form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input, select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.9rem;
}

button.danger {
  background: var(--danger);
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar h1 {
  font-size: 1.1rem;
  margin: 0;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1rem;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form input {
  width: auto;
  flex: 1 1 160px;
}

.inline-form select {
  width: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

td button {
  margin-right: 0.4rem;
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}
