:root {
  --bg: #0e1014;
  --card: #171a21;
  --line: #2a3140;
  --text: #e8eaef;
  --muted: #8b93a7;
  --accent: #7aa2ff;
  --ok: #3dd68c;
  --bad: #ff6b7a;
  --warn: #f5c36e;
  --radius: 14px;
  font-family: "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
/* author 的 display:flex 会压过原生 [hidden]，登录成功后登录层还挡着 */
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 20px 80px; }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card { width: min(420px, 100%); }
.login-card button[type="submit"] { width: 100%; }
.advanced { margin: 4px 0 16px; color: var(--muted); font-size: 13px; }
.advanced summary { cursor: pointer; margin-bottom: 8px; }
.hero { margin-bottom: 28px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.hero-actions { display: flex; align-items: center; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-n { display: block; font-size: 28px; font-weight: 600; }
.stat-l { color: var(--muted); font-size: 12px; }
.eyebrow { color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; margin: 0 0 8px; }
h1 { font-size: 32px; margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 16px; font-weight: 600; }
h3 { font-size: 14px; margin: 0; }
.lede, .hint { color: var(--muted); font-size: 14px; line-height: 1.5; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
input, select {
  background: #10131a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
input:focus, select:focus { outline: 2px solid #3d5aab; border-color: var(--accent); }
.grid { display: grid; gap: 12px; }
.two { grid-template-columns: 1fr 1fr; }
.four { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
button {
  background: var(--accent);
  color: #0b1020;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.status { margin: 0; font-size: 13px; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.fresh { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fresh-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.keys { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.keys li {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  background: #10131a;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
button.tiny { padding: 6px 10px; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.empty { color: var(--muted); text-align: center; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.tag.active { background: #143528; color: var(--ok); }
.tag.revoked { background: #3a151a; color: var(--bad); }
.actions { display: flex; gap: 6px; }
@media (max-width: 720px) {
  .two, .four, .stats { grid-template-columns: 1fr 1fr; }
  .hero { flex-direction: column; }
}
