﻿:root {
  --bg: #f3f5f8;
  --ink: #1c2430;
  --muted: #6c7685;
  --primary: #2b5f98;
  --accent: #f0b429;
  --card: #ffffff;
  --border: #e2e6ee;
  --success: #22c55e;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif; background: var(--bg); color: var(--ink); }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #102235, #0b1826);
  color: #dfe8f3; padding: 24px; display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.sidebar-brand .logo { width: 40px; height: 40px; background: #1e4870; border-radius: 12px; }
.sidebar-brand .name { font-weight: 700; }
.sidebar-brand .sub { font-size: 12px; color: #94a3b8; }
.sidebar-menu { display: flex; flex-direction: column; gap: 10px; }
.sidebar-menu a {
  color: #dfe8f3; text-decoration: none; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
}
.sidebar-menu a:hover { background: rgba(255,255,255,0.12); }
.sidebar-footer { margin-top: auto; font-size: 12px; color: #94a3b8; }
.sidebar-footer .user { font-size: 14px; color: #fff; margin: 6px 0; }
.sidebar-footer .logout { color: #f6c453; text-decoration: none; }
.main { display: flex; flex-direction: column; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 16px 24px; display: flex; justify-content: space-between; align-items: center;
}
.topbar .title { font-size: 18px; font-weight: 700; }
.badge { background: #e7eef8; color: #2b5f98; padding: 6px 10px; border-radius: 12px; font-size: 12px; }
.badge.ghost { background: #f6f2e9; color: #a67c00; }
.content { padding: 24px; display: grid; gap: 20px; }
.section-title { font-weight: 700; font-size: 16px; margin: 8px 0; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: 0 10px 24px rgba(30,72,112,0.06);
}
.card h3 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.mt { margin-top: 12px; }
input, select {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fbfcfe;
}
.btn {
  display: inline-block; border: none; padding: 10px 16px; border-radius: 10px; background: #dbe7f4; color: #1c2430; cursor: pointer;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.outline { background: #f8f0dd; color: #7a5c00; }
.btn.danger { background: #fee2e2; color: #b42318; }
.result {
  background: #0f1a27; color: #d1e6ff; padding: 12px; border-radius: 12px; min-height: 120px; overflow: auto;
}
.result-header { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: 12px; }
.status { padding: 4px 8px; border-radius: 10px; background: rgba(255,255,255,0.12); }
.status.ok { background: rgba(34,197,94,0.18); color: #86efac; }
.status.fail { background: rgba(239,68,68,0.18); color: #fca5a5; }
.msg, .http { color: #c9d6ea; }
.result-body { background: rgba(255,255,255,0.04); padding: 10px; border-radius: 10px; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: rgba(255,255,255,0.06); border-radius: 8px; }
.kv span { color: #9fb2cc; }
.kv em { color: #e4f0ff; font-style: normal; }
.empty { color: #9fb2cc; font-size: 12px; }
.table-wrap { overflow: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 6px 8px; text-align: left; }
.table-wrap th { color: #a9bdd7; position: sticky; top: 0; background: #0f1a27; }
.stats { display: flex; gap: 20px; }
.stats .num { font-size: 20px; font-weight: 700; display: block; }
.stats .label { color: var(--muted); font-size: 12px; }
.tips { margin: 0; padding-left: 18px; color: var(--muted); }
.tip { color: var(--muted); }
.login-wrap { display: grid; place-items: center; height: 80vh; }
.login-card {
  background: var(--card); border-radius: 18px; padding: 36px; width: min(360px, 90%);
  box-shadow: 0 30px 60px rgba(15,32,52,0.12);
}
.login-brand { font-size: 18px; font-weight: 700; }
.login-sub { color: var(--muted); margin-bottom: 20px; }
.login-card label { display: block; margin: 12px 0 6px; }
.form-msg { margin-top: 10px; color: #b42318; }
.card-kpi { display: grid; gap: 6px; }
.card-kpi .value { font-size: 24px; font-weight: 700; }
.card-kpi .label { color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .sidebar-menu { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
}
