:root {
  color-scheme: light dark;
  --bg: #0f1216;
  --panel: #171b21;
  --border: #2a2f38;
  --text: #e6e9ee;
  --muted: #9aa4b2;
  --accent: #4f8cff;
  --ok: #34c759;
  --err: #ff5c5c;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--accent); }
nav .brand { font-weight: 600; margin-right: auto; }

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

h1, h2 { font-weight: 600; }

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

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--muted); font-weight: 500; }

label { display: block; margin: 0.75rem 0 0.25rem; font-size: 0.9rem; color: var(--muted); }
input, select, button {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #10141a;
  color: var(--text);
}
input, select { width: 100%; max-width: 420px; }

button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
  margin-top: 1rem;
}
button:hover { filter: brightness(1.1); }
button.secondary { background: transparent; color: var(--text); border-color: var(--border); }
button.danger { background: var(--err); border-color: var(--err); }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; }
.badge.ok { background: rgba(52,199,89,0.15); color: var(--ok); }
.badge.err { background: rgba(255,92,92,0.15); color: var(--err); }
.badge.muted { background: rgba(154,164,178,0.15); color: var(--muted); }

.flash { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.9rem; }
.flash.success { background: rgba(52,199,89,0.12); border: 1px solid var(--ok); }
.flash.error { background: rgba(255,92,92,0.12); border: 1px solid var(--err); }

.hint { color: var(--muted); font-size: 0.85rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.actions form { display: inline; }

.login-wrap { max-width: 360px; margin: 4rem auto; }
