:root {
  --bg: #0f1720;
  --panel: #16212e;
  --line: #243447;
  --text: #e6edf3;
  --muted: #8ba0b6;
  --brand: #1f9dff;
  --ok: #2ecc71;
  --warn: #f1c40f;
  --danger: #e74c3c;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: linear-gradient(90deg, #12202f, #0e1721);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.logo h1 { font-size: 18px; margin: 0; }
.ver { font-size: 12px; color: var(--muted); }
.state { font-size: 13px; padding: 6px 12px; border-radius: 14px; background: #22303f; }
.state.ok { background: rgba(46,204,113,.2); color: var(--ok); }
.state.bad { background: rgba(231,76,60,.2); color: var(--danger); }
.layout { display: flex; min-height: calc(100vh - 73px); }
aside { width: 190px; padding: 18px 12px; border-right: 1px solid var(--line); }
.nav {
  display: block; color: var(--muted); text-decoration: none; padding: 10px 14px;
  border-radius: 8px; margin-bottom: 6px; font-size: 14px;
}
.nav:hover { background: var(--panel); color: var(--text); }
.nav.active { background: var(--panel); color: var(--brand); font-weight: 600; }
main { flex: 1; padding: 22px; }
.panel { display: block; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h2 { font-size: 17px; margin: 0 0 14px; }
.btn {
  background: #22303f; color: var(--text); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #04121f; font-weight: 600; }
.btn.danger { background: #3a2226; border-color: #5a2c33; color: #ff9aa4; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.badge { padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.badge.on { background: rgba(46,204,113,.2); color: var(--ok); }
.badge.off { background: #2a3644; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.card h3 { font-size: 14px; margin: 0 0 8px; line-height: 1.4; }
.card .price { color: var(--warn); font-weight: 700; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 12px; margin: 6px 0; }
.card .reason { font-size: 12px; color: var(--text); border-top: 1px dashed var(--line); padding-top: 8px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 8px; background: #24374a; color: #9fd0ff; margin-right: 6px; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
pre {
  background: #0b1219; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; overflow: auto; max-height: 520px; font-size: 12.5px; line-height: 1.6;
}
input, select, textarea {
  width: 100%; background: #0e1721; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px;
}
input[type="checkbox"] { width: auto; margin-right: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.metric .k { color: var(--muted); font-size: 12px; }
.metric .v { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--brand); }
.hint { color: var(--muted); font-size: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; }
.modal {
  position: fixed; inset: 0; background: rgba(4, 10, 16, .7);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; width: 460px; max-height: 86vh; overflow: auto;
}
.modal-box.wide { width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.x { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }