:root {
  --bg: #0c0e13;
  --panel: #14171f;
  --panel-2: #1a1e29;
  --border: #262b38;
  --text: #e6e8ee;
  --muted: #8b91a3;
  --accent: #6ee7a8;
  --accent-dim: #2f3f38;
  --danger: #ff6b6b;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.auth-card {
  width: min(360px, 90vw);
}

.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card .muted { margin: 0 0 20px; }

label { display: block; margin: 14px 0; font-size: 13px; color: var(--muted); }
input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}
input:focus { outline: none; border-color: var(--accent); }

button {
  padding: 10px 18px;
  background: var(--accent);
  color: #08110d;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
button.ghost:hover { color: var(--text); }
button.link { background: transparent; color: var(--accent); padding: 4px 8px; }

.error { color: var(--danger); font-size: 13px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand { font-weight: 700; font-size: 16px; }
.spacer { flex: 1; }

.wrap { max-width: 1100px; margin: 24px auto; padding: 0 24px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.stat .num { font-size: 24px; font-weight: 700; font-family: var(--mono); }
.stat .lbl { color: var(--muted); font-size: 13px; }

h2 { margin: 0 0 16px; font-size: 17px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td.mono { font-family: var(--mono); font-size: 12px; }
td.actions { text-align: right; }

.detail {
  margin-top: 24px;
  display: none;
}
.detail.open { display: block; }
.detail pre {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  max-height: 480px;
  font-family: var(--mono);
  font-size: 12px;
}
.muted { color: var(--muted); }
a.btn { color: var(--accent); text-decoration: none; font-size: 13px; }
