:root { --bg:#f5f6f8; --card:#fff; --line:#e5e7eb; --text:#1f2937; --muted:#6b7280;
  --brand:#2563eb; --ok:#059669; --warn:#d97706; --bad:#dc2626; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.5 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:var(--bg); color:var(--text); }
a { color:var(--brand); text-decoration:none; cursor:pointer; }
.layout { display:flex; min-height:100vh; }
.side { width:200px; background:#111827; color:#d1d5db; padding:16px 0; flex-shrink:0; }
.side h1 { font-size:16px; color:#fff; margin:0 20px 16px; }
.side a { display:block; padding:10px 20px; color:#d1d5db; }
.side a.on, .side a:hover { background:#1f2937; color:#fff; }
.side .who { margin:24px 20px 0; font-size:12px; color:#9ca3af; }
.main { flex:1; padding:24px; min-width:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; }
.card h2 { font-size:15px; margin:0 0 12px; }
.stats { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; margin-bottom:16px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:14px; }
.stat .k { color:var(--muted); font-size:12px; } .stat .v { font-size:20px; font-weight:600; margin-top:4px; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
th { color:var(--muted); font-weight:500; font-size:12px; background:#fafafa; }
.tbl { overflow-x:auto; }
button, .btn { border:1px solid var(--line); background:#fff; border-radius:6px; padding:6px 12px; cursor:pointer; font:inherit; }
button.primary { background:var(--brand); color:#fff; border-color:var(--brand); }
button.danger { color:var(--bad); }
button:disabled { opacity:.5; cursor:default; }
input, select, textarea { border:1px solid var(--line); border-radius:6px; padding:7px 10px; font:inherit; width:100%; }
select[multiple] { height:120px; }
.form label { display:block; margin:10px 0 4px; color:var(--muted); font-size:12px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.row > input { width:auto; flex:1; min-width:160px; }
.tag { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; background:#eef2ff; color:var(--brand); }
.tag.ok { background:#ecfdf5; color:var(--ok); } .tag.bad { background:#fef2f2; color:var(--bad); }
.tag.warn { background:#fffbeb; color:var(--warn); }
.muted { color:var(--muted); } .neg { color:var(--bad); }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:12px; }
.tabs a { padding:8px 14px; color:var(--muted); border-bottom:2px solid transparent; }
.tabs a.on { color:var(--brand); border-color:var(--brand); }
.pager { display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top:10px; }
.login { max-width:340px; margin:12vh auto; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; z-index:10; }
.modal-box { background:#fff; border-radius:8px; padding:20px; width:min(480px,92vw); max-height:90vh; overflow:auto; }
.modal-box h3 { margin:0 0 8px; }
.actions { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }
.hidden { display:none !important; }
.toast { position:fixed; top:16px; right:16px; background:#111827; color:#fff; padding:10px 16px; border-radius:6px; z-index:20; max-width:420px; }
.toast.err { background:var(--bad); }
pre { background:#f9fafb; border:1px solid var(--line); padding:10px; border-radius:6px; overflow:auto; font-size:12px; }
@media (max-width: 760px) { .layout { flex-direction:column; } .side { width:auto; } .main { padding:12px; } }
