* { margin:0; padding:0; box-sizing:border-box; }
:root { --bg:#f5f7fa; --card:#fff; --border:#e8ecf1; --text:#1f2937; --muted:#6b7280;
  --primary:#2563eb; --up:#e0342b; --shadow:0 1px 3px rgba(16,24,40,.06); }
body { font-family:"PingFang SC","Microsoft YaHei",-apple-system,"Segoe UI",sans-serif;
  background:var(--bg); color:var(--text); font-size:14px; }
.hidden { display:none !important; }
button,input,select,textarea { font-family:inherit; }

/* 登录 */
.login-page { position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(700px 400px at 20% 20%,#dbeafe,transparent 60%),
             radial-gradient(700px 400px at 80% 80%,#e0e7ff,transparent 60%),#f3f6fc; }
.login-card { width:min(390px,92vw); background:#fff; border-radius:16px; padding:34px 30px 26px;
  box-shadow:0 18px 50px rgba(30,58,138,.14); }
.login-logo { width:50px; height:50px; border-radius:13px; background:linear-gradient(135deg,#2563eb,#4f46e5);
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:18px; margin-bottom:16px; }
.login-card h1 { font-size:23px; }
.login-sub { color:var(--muted); font-size:12px; margin:5px 0 22px; }
.login-card label { display:block; font-size:12px; color:var(--muted); margin:12px 0 6px; }
.login-card input { width:100%; padding:11px 12px; border:1px solid var(--border); border-radius:8px;
  font-size:14px; outline:none; background:#fafbfc; }
.login-card input:focus { border-color:var(--primary); background:#fff; box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.login-err { color:var(--up); font-size:12px; min-height:18px; margin-top:8px; }
.login-foot { text-align:center; color:#9ca3af; font-size:11px; margin-top:16px; }

/* 布局 */
.topbar { height:64px; background:#fff; border-bottom:1px solid var(--border); display:flex;
  align-items:center; justify-content:space-between; padding:0 26px; position:sticky; top:0; z-index:10; }
.brand { display:flex; align-items:center; gap:10px; }
.brand-icon { width:34px; height:34px; border-radius:9px; background:#2563eb; color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; }
.brand-name { font-size:15px; font-weight:600; }
.brand-sub { font-size:10px; color:#9ca3af; }
.topbar-right { display:flex; align-items:center; gap:10px; }
.chip { background:#eff6ff; color:#2563eb; border-radius:14px; padding:5px 11px; font-size:12px; }
.content { padding:22px 26px 50px; max-width:1400px; margin:0 auto; }

.btn { padding:8px 14px; border:1px solid var(--border); border-radius:8px; background:#fff;
  cursor:pointer; font-size:13px; color:var(--text); transition:.15s; }
.btn:hover { border-color:var(--primary); color:var(--primary); }
.btn-primary { background:var(--primary); color:#fff; border-color:var(--primary); }
.btn-primary:hover { background:#1d4ed8; color:#fff; }
.btn-sm { padding:6px 11px; font-size:12px; }
.btn.danger { color:#dc2626; }
.btn.danger:hover { border-color:#dc2626; color:#dc2626; }
.btn-block { width:100%; margin-top:10px; padding:12px; font-size:15px; }

.cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.stat { background:#fff; border:1px solid var(--border); border-radius:12px; padding:16px 18px; box-shadow:var(--shadow); }
.stat .label { font-size:12px; color:var(--muted); }
.stat .value { font-size:24px; font-weight:600; margin-top:8px; word-break:break-all; }
.stat.tone-blue { border-top:3px solid #3b82f6; }
.stat.tone-purple { border-top:3px solid #8b5cf6; }
.stat.tone-green { border-top:3px solid #10b981; }
.stat.tone-amber { border-top:3px solid #f59e0b; }

.panel { background:#fff; border:1px solid var(--border); border-radius:12px;
  padding:18px 20px; margin-bottom:16px; box-shadow:var(--shadow); }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.panel-head h3 { font-size:15px; font-weight:600; }
.panel-sub { font-size:12px; color:var(--muted); }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.toolbar input, .toolbar select { padding:7px 10px; border:1px solid var(--border); border-radius:7px; font-size:12px; outline:none; }
.toolbar input:focus { border-color:var(--primary); }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; min-width:680px; }
th { text-align:left; color:var(--muted); font-weight:500; font-size:12px;
  padding:10px 12px; border-bottom:1px solid var(--border); background:#f8fafc; }
td { padding:10px 12px; border-bottom:1px solid #f3f4f6; }
tr:hover td { background:#fafbfc; }
.cell-title { max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.muted { color:var(--muted); font-size:12px; }
.mono { font-family:ui-monospace,Consolas,monospace; font-size:12px; }
.cat { background:#f1f5f9; color:#475569; border-radius:5px; padding:2px 8px; font-size:11px; }
.pager { text-align:right; color:var(--muted); font-size:12px; padding-top:12px; }
.empty { text-align:center; color:var(--muted); padding:26px; font-size:13px; }

.mini-list .item { display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:9px 0; border-bottom:1px solid #f3f4f6; font-size:12px; }
.mini-list .item:last-child { border:0; }
.mini-list .t { color:var(--text); }
.mini-list .s { font-size:11px; color:var(--muted); }
.tag { font-size:10px; padding:2px 7px; border-radius:4px; background:#f1f5f9; color:#475569; }
.tag.bad { background:#fee2e2; color:#b91c1c; }

/* 弹窗 */
.modal { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center;
  justify-content:center; z-index:100; padding:16px; }
.modal-card { width:min(480px,100%); background:#fff; border-radius:14px; padding:20px 22px; max-height:90vh; overflow:auto; }
.modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.modal-head h3 { font-size:16px; }
.modal-x { border:0; background:transparent; font-size:22px; cursor:pointer; color:var(--muted); }
.modal-body label { display:block; font-size:12px; color:var(--muted); margin:12px 0 6px; }
.modal-body input, .modal-body textarea { width:100%; padding:9px 11px; border:1px solid var(--border);
  border-radius:7px; font-size:13px; outline:none; }
.modal-body input:focus, .modal-body textarea:focus { border-color:var(--primary); }
#modalBody label { display:block; font-size:12px; color:var(--muted); margin:12px 0 6px; }
#modalBody input, #modalBody textarea { width:100%; padding:9px 11px; border:1px solid var(--border);
  border-radius:7px; font-size:13px; outline:none; }
.modal-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }

.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
  background:#1f2937; color:#fff; padding:10px 18px; border-radius:8px; font-size:13px;
  opacity:0; pointer-events:none; transition:.25s; z-index:200; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

@media (max-width:768px) {
  .topbar { padding:0 14px; }
  .chip { display:none; }
  .content { padding:14px 12px 40px; }
  .cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .stat { padding:13px; }
  .stat .value { font-size:20px; }
  .panel { padding:14px; }
  .toolbar input { flex:1; min-width:120px; }
}
