* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f1520; --panel: #171f2e; --panel2: #1d2738; --line: #2a3circle;
  --line: #29354a; --txt: #e7ecf5; --dim: #8fa1bd; --acc: #3b82f6;
  --up: #ef4444; --down: #22c55e; --gold: #f59e0b;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--txt);
  font-family: "PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  font-size: 14px; line-height: 1.5; }
.layout { display: flex; height: 100vh; }
.side { width: 200px; flex: none; background: #101826; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 6px; }
.brand { font-size: 15px; font-weight: 700; padding: 6px 10px 14px; display: flex; gap: 8px; align-items: center; }
.brand-ico { font-size: 20px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; gap: 10px; align-items: center; color: var(--dim); text-decoration: none;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.nav-item:hover { background: var(--panel2); color: var(--txt); }
.nav-item.active { background: var(--acc); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; color: #5b6b85; font-size: 12px; padding: 8px 10px; }
.main { flex: 1; overflow: auto; padding: 18px 22px; }
.mod-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mod-head h2 { font-size: 20px; }
.tip { color: var(--dim); font-size: 13px; }
.hidden { display: none !important; }
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ipt { background: var(--panel); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 8px 12px; width: 300px; font-size: 14px; outline: none; }
.ipt:focus { border-color: var(--acc); }
.btn { background: var(--panel2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--acc); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.hint { color: var(--dim); font-size: 13px; }
.hint label { margin-right: 8px; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--dim); padding: 8px 12px; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--acc); color: #fff; }
.chart { width: 100%; height: 320px; }
.chart-main { height: 430px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow: hidden; }
.pt { color: var(--dim); font-size: 13px; margin-bottom: 8px; }
table.tbl, table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { color: var(--dim); font-weight: 500; text-align: left; padding: 7px 8px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid #22304a; }
.kv td { padding: 4px 8px; border-bottom: 1px dashed #22304a; }
.kv td:first-child { color: var(--dim); width: 130px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.tabs button.on { color: #fff; background: var(--acc); border-color: var(--acc); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.card h4 { font-size: 14px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.card .rows { font-size: 22px; font-weight: 700; }
.card .meta { color: var(--dim); font-size: 12px; margin-top: 6px; line-height: 1.6; }
.card .cov { height: 6px; border-radius: 3px; background: #22304a; margin-top: 10px; overflow: hidden; }
.card .cov i { display: block; height: 100%; border-radius: 3px; }
.pre { background: #0b111c; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  font-size: 12px; max-height: 420px; overflow: auto; color: #9fd6a3; white-space: pre-wrap; }
/* 数据字典 */
.dict-usage { margin-bottom: 12px; }
.dict-usage .u-title { font-weight: 600; margin-bottom: 6px; }
.dict-usage .u-items { color: var(--dim); font-size: 13px; line-height: 1.9; }
.dict-usage details { margin-top: 6px; }
.dict-usage summary { cursor: pointer; color: var(--acc); font-size: 13px; }
.dict-body { display: flex; gap: 14px; align-items: flex-start; }
.dict-nav { width: 300px; flex: none; max-height: calc(100vh - 220px); overflow: auto; }
.dict-nav .dg { margin-bottom: 6px; }
.dict-nav .dg-h { color: var(--dim); font-size: 12px; padding: 6px 8px; }
.dict-nav .dg-t { display: block; width: 100%; text-align: left; background: transparent; border: 0;
  color: var(--txt); padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dict-nav .dg-t:hover { background: var(--panel2); }
.dict-nav .dg-t.on { background: var(--acc); color: #fff; }
.dict-detail { flex: 1; max-height: calc(100vh - 220px); overflow: auto; }
.dict-detail .dt { font-size: 17px; font-weight: 700; margin-bottom: 4px; word-break: break-all; }
.dict-detail .dm { color: var(--dim); font-size: 12px; margin-bottom: 10px; word-break: break-all; }
.dict-detail .dn { background: var(--panel2); border-left: 3px solid var(--acc); padding: 8px 10px;
  border-radius: 6px; font-size: 13px; margin-bottom: 10px; line-height: 1.8; }
.dict-detail .dcp { font-size: 13px; margin-bottom: 4px; color: var(--dim); }
.dict-detail .sqlbox { position: relative; background: #0b111c; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px; }
.dict-detail .sqlbox pre { color: #9fd6a3; font-size: 12px; overflow: auto; white-space: pre; margin: 0; }
.dict-detail .copy { position: absolute; top: 8px; right: 8px; }
.dict-detail .wrap { overflow: auto; max-height: 340px; }
/* 接入管理 */
.ovl { position: fixed; inset: 0; background: rgba(5,10,18,.6); display: flex;
  align-items: center; justify-content: center; z-index: 50; }
.modal { width: min(640px, 94vw); max-height: 90vh; overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.m-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600;
  font-size: 15px; margin-bottom: 12px; }
.x { background: transparent; border: 0; color: var(--dim); cursor: pointer; font-size: 15px; }
.row { margin-bottom: 12px; }
.row > label { display: block; color: var(--dim); font-size: 13px; margin-bottom: 6px; }
.dims { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 10px; }
.dims label { color: var(--txt); font-size: 13px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.m-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.cred { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  font-size: 13px; line-height: 1.9; margin-bottom: 12px; }
.cred b { color: var(--gold); }
.acc-card h4 span { color: var(--dim); font-weight: 400; font-size: 12px; }
.acc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { background: var(--panel2); border: 1px solid var(--line); color: var(--dim);
  font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.tag.all { color: #fff; background: rgba(59,130,246,.25); border-color: var(--acc); }
.acc-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lk { color: var(--acc); margin-left: 6px; text-decoration: none; }
.lk:hover { text-decoration: underline; }
.addr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.addr code { background: #0b111c; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px;
  font-size: 13px; color: #7dd3fc; word-break: break-all; }
input[type="date"] { background: var(--panel); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 6px 10px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b3a54; border-radius: 6px; }
