:root {
  --bg: #0c1218;
  --bg-soft: #121a22;
  --line: #243040;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9cfd;
  --accent-dim: #1a5f9e;
  --ok: #3ecf8e;
  --danger: #e85d6a;
  --warn: #e6b84d;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a3048 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #152018 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.brand {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
}

.brand span { color: var(--accent); }

.sub {
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.topbar .meta { color: var(--muted); font-size: 0.9rem; }

.panel {
  margin-bottom: 2rem;
}

.panel h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.panel p.hint {
  color: var(--muted);
  margin: -0.35rem 0 0.9rem;
  font-size: 0.9rem;
}

form.stack {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
}

textarea { min-height: 110px; resize: vertical; font-family: var(--mono); font-size: 0.85rem; }

input:focus, select:focus, textarea:focus {
  outline: 1px solid var(--accent-dim);
  border-color: var(--accent);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

button, .btn {
  appearance: none;
  border: 1px solid var(--accent-dim);
  background: linear-gradient(180deg, #2a78c8, #1f5f9e);
  color: #fff;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 560;
  cursor: pointer;
}

button.secondary, .btn.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

button.danger {
  background: transparent;
  border-color: #7a3038;
  color: var(--danger);
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

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

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

th { color: var(--muted); font-weight: 550; font-size: 0.8rem; }

.mono { font-family: var(--mono); font-size: 0.85rem; }

.badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

.badge.ok { color: var(--ok); border-color: #2a6a4a; }
.badge.warn { color: var(--warn); border-color: #6a5520; }

.msg {
  margin: 0.75rem 0;
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.9rem;
}

.msg.error { border-color: #7a3038; color: #f0b0b6; }
.msg.ok { border-color: #2a6a4a; color: #b6efd2; }

.creds {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border: 1px dashed var(--accent-dim);
  border-radius: 8px;
  background: rgba(61, 156, 253, 0.06);
}

.creds pre {
  margin: 0.4rem 0 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-box {
  width: min(400px, 100%);
}

.login-box .brand { font-size: 1.8rem; margin-bottom: 0.35rem; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 640px) {
  .shell { padding: 1.25rem 1rem 3rem; }
  table { display: block; overflow-x: auto; }
}
