:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #6b7485;
  --line: #dfe7f3;
  --blue: #1456f0;
  --blue-soft: #eaf1ff;
  --green: #08a35d;
  --orange: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 48px rgba(30, 52, 94, 0.10);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 86, 240, 0.12), transparent 30%),
    linear-gradient(135deg, #f7faff 0%, #eef3f9 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  padding: 26px 18px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 16px;
  display: grid; place-items: center;
  color: white; font-weight: 900;
  background: linear-gradient(135deg, #1456f0, #22d3ee);
  box-shadow: 0 12px 28px rgba(20, 86, 240, 0.28);
}
.brand-title { font-size: 17px; font-weight: 800; }
.brand-subtitle { margin-top: 3px; font-size: 12px; color: var(--muted); }
.nav { display: grid; gap: 8px; }
.nav-item {
  border: 0; border-radius: 14px; padding: 13px 14px;
  color: #435069; background: transparent;
  text-align: left; cursor: pointer; transition: .18s ease;
}
.nav-item:hover { background: #eef4ff; color: var(--blue); }
.nav-item.active { background: var(--blue); color: white; box-shadow: 0 14px 28px rgba(20, 86, 240, 0.22); }
.side-note {
  margin-top: 24px; padding: 14px; border-radius: 16px;
  color: var(--muted); background: #f6f8fc; font-size: 12px; line-height: 1.7;
}
.main { padding: 24px; min-width: 0; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
p { margin: 8px 0 0; color: var(--muted); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.input {
  height: 42px; padding: 0 14px; border: 1px solid #cfdaf0; border-radius: 13px;
  outline: none; background: rgba(255,255,255,.9); color: var(--ink);
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(20, 86, 240, .10); }
.api-input { width: 320px; }
.btn {
  height: 42px; border: 0; border-radius: 13px; padding: 0 16px;
  color: white; background: var(--blue); cursor: pointer; font-weight: 700;
  box-shadow: 0 10px 24px rgba(20, 86, 240, .18);
}
.btn.ghost { color: var(--blue); background: var(--blue-soft); box-shadow: none; }
.btn.danger { color: var(--red); background: #fee2e2; }
.login-card { min-height: 62vh; display: grid; place-items: center; }
.login-panel {
  width: min(520px, 100%); padding: 34px; border-radius: 28px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.login-panel h2 { margin: 14px 0 8px; font-size: 30px; letter-spacing: -0.04em; }
.login-badge {
  display: inline-flex; padding: 7px 12px; border-radius: 999px;
  color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 800;
}
.login-panel .input { width: 100%; margin-top: 22px; }
.login-btn { width: 100%; margin-top: 12px; }
.hint { margin-top: 14px; color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }
.status-line {
  margin-bottom: 14px; color: var(--muted); font-size: 13px;
}
.grid { display: grid; gap: 14px; }
.stats-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.card {
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line);
  border-radius: 22px; padding: 18px; box-shadow: var(--shadow);
}
.stat-num { font-size: 28px; font-weight: 900; color: var(--blue); }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.toolbar h2 { margin: 0; font-size: 20px; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 13px 14px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: top; font-size: 13px; }
th { color: #536078; background: #f8fbff; font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.pill {
  display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: var(--blue); background: var(--blue-soft);
}
.pill.green { color: var(--green); background: #e9f8f0; }
.pill.orange { color: var(--orange); background: #fff4df; }
.pill.red { color: var(--red); background: #fee2e2; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini {
  height: 30px; padding: 0 10px; border: 0; border-radius: 10px;
  color: var(--blue); background: var(--blue-soft); cursor: pointer; font-weight: 800; font-size: 12px;
}
.mini.red { color: var(--red); background: #fee2e2; }
.mini.green { color: var(--green); background: #e9f8f0; }
.empty { padding: 42px; text-align: center; color: var(--muted); }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-direction: column; }
  .api-input { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
