:root {
  --bg: #0a0e17;
  --panel: #121a2b;
  --panel2: #0f1626;
  --line: #20293d;
  --text: #e7eaf3;
  --muted: #8590a8;
  --accent: #4f8cff;
  --ok: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: 13px; }
input, select, textarea {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button { cursor: pointer; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 360px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px;
}
.login-card .logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 600; margin: 0 auto 14px;
}
.login-card h1 { font-size: 16px; font-weight: 600; text-align: center; margin: 0 0 6px; }
.login-card p { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.btn {
  border: 0; border-radius: 9px; padding: 9px 16px; font-size: 13px;
  background: var(--accent); color: #fff; font-weight: 500;
}
.btn:hover { background: #3d7ae8; }
.btn.block { width: 100%; padding: 11px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); }
.btn.danger { background: transparent; border: 1px solid #4b2027; color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }
.alert {
  background: #2a1418; border: 1px solid #4b2027; color: var(--bad);
  border-radius: 9px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; display: none;
}

/* 主页面 */
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 18px 70px; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top .logo {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
}
.top h1 { font-size: 15px; font-weight: 600; margin: 0; flex: 1; }
.top .who { color: var(--muted); font-size: 12.5px; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab {
  border: 0; background: transparent; color: var(--muted); padding: 10px 14px;
  border-bottom: 2px solid transparent; font-size: 13px;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.panel h2 { font-size: 13.5px; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 8px 0 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 130px; }
.row label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }

table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 11.5px; white-space: nowrap; }
tbody tr:hover { background: rgba(79, 140, 255, .04); }
td.actions { white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11.5px; background: #1b2438; color: var(--muted); }
.tag.ok { background: rgba(52, 211, 153, .12); color: var(--ok); }
.tag.warn { background: rgba(251, 191, 36, .12); color: var(--warn); }
.tag.bad { background: rgba(248, 113, 113, .12); color: var(--bad); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #1c2740; color: var(--text); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 9px; font-size: 12.5px; opacity: 0;
  pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 12.5px; }
@media (max-width: 760px) {
  .row > div { min-width: 100%; }
  table { font-size: 12px; }
  th, td { padding: 8px 5px; }
}
