:root {
  --bg: #f4f6f9;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #d8dee8;
  --accent: #1e3a5f;
  --panel: #fff;
  --ok: #059669;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #1e3a5f;
  color: #e8eef5;
  flex-wrap: wrap;
  gap: 10px;
}
.top .muted { opacity: .85; margin-left: 10px; font-size: .9rem; }
.top a.nav {
  color: #93c5fd;
  text-decoration: none;
  margin-right: 12px;
  font-size: .9rem;
}
.top a.nav.active, .top a.nav:hover { color: #fff; text-decoration: underline; }
main { padding: 20px; max-width: 1100px; margin: 0 auto; }
.hint { color: var(--muted); font-size: .92rem; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.panel h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--accent); }
.row { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters select,
.filters input[type="text"],
.filters input[type="password"],
label input[type="text"],
label input[type="password"] {
  margin-left: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: .78rem;
}
.badge-muted { background: #eef2f7; color: var(--muted); }
.pager { margin-top: 12px; }
.pager button:disabled { opacity: .45; cursor: default; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { border: 1px solid var(--line); padding: 8px 10px; font-size: .86rem; text-align: left; vertical-align: top; }
th { background: #eef2f7; color: var(--accent); white-space: nowrap; }
td.mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; word-break: break-all; }
.empty { color: #94a3b8; }
.actions button { margin: 0 4px 4px 0; }
button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
}
button.ghost, button.ghost-dark {
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
}
.top button.ghost { color: #e8eef5; border-color: #475569; }
.msg { margin-top: 8px; min-height: 1.2em; }
.msg.err { color: #b91c1c; }
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.login-box h1 { margin: 0 0 6px; font-size: 1.2rem; color: var(--accent); }
.login-box label { display: block; margin-top: 12px; font-size: .9rem; }
.login-box input { width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.login-box button { width: 100%; margin-top: 16px; }
.err { color: #b91c1c; font-size: .9rem; }
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-width: 420px; }
dialog::backdrop { background: rgba(15, 23, 42, .35); }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-size: .86em; }
