body.dash { background: var(--paper); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 20px 28px 8px; max-width: 1360px; margin: 0 auto; flex-wrap: wrap; }
.dhead h1 { font: 600 28px/1.1 var(--font); margin: 0; letter-spacing: -.01em; }
.dhead p { margin: 4px 0 0; color: var(--ink-2); }
.dhead nav { display: flex; gap: 14px; align-items: center; }
.sync { font-size: 13.5px; color: var(--ink-2); }
.dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 12px 28px 40px; max-width: 1360px; margin: 0 auto; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; min-width: 0; }
.card-h h2 { font: 600 17px/1.25 var(--font); margin: 0; }
.card-h p { margin: 2px 0 14px; color: var(--ink-2); font-size: 14px; }
.card-h.row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.tools { display: flex; gap: 8px; align-items: center; }
.tools select { padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }

.tiles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.tile { padding: 18px 20px; border-left: 1px solid var(--rule-2); }
.tile:first-child { border-left: 0; }
.tile .v { font: 600 44px/1 var(--font-num); letter-spacing: -.01em; }
.tile .v small { font-size: 22px; color: var(--ink-3); font-weight: 500; }
.tile .l { color: var(--ink); font-weight: 500; margin-top: 6px; }
.tile .s { color: var(--ink-2); font-size: 13.5px; }
.tile .delta { font: 600 14px var(--font-num); color: var(--good); }
.tile.alert .v { color: var(--bad); }
.tile .status { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; margin-top: 4px; }

.chart { position: relative; height: 300px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--rule-2); }
.chart .axis text { fill: var(--ink-3); font: 12px var(--font); }
.chart .lbl { font: 600 12.5px var(--font); fill: var(--ink); }
.chart .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); text-align: center; padding: 20px; }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 14px; height: 3px; border-radius: 2px; background: var(--sw); display: inline-block; }
.legend-row i.sq { width: 10px; height: 10px; border-radius: 2px; }

.fun { list-style: none; margin: 0; padding: 0; }
.fun li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 11px; font-size: 14px; }
.fun .n { font: 600 18px/1 var(--font-num); }
.fun .n small { color: var(--ink-3); font-size: 13px; font-weight: 500; margin-left: 4px; }
.fun .track { grid-column: 1 / -1; height: 14px; background: var(--rule-2); border-radius: 0 4px 4px 0; }
.fun .track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--sw); min-width: 2px; }

.el { display: grid; grid-template-columns: 170px 1fr 120px; gap: 4px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule-2); }
.el:first-child { border-top: 0; }
.el .name { font-weight: 500; }
.el .name small { display: block; color: var(--ink-3); font-weight: 400; font-size: 13px; }
.el .stack { display: flex; height: 18px; gap: 2px; }
.el .stack i { display: block; height: 100%; background: var(--sw); }
.el .stack i:first-child { border-radius: 4px 0 0 4px; } .el .stack i:last-child { border-radius: 0 4px 4px 0; }
.el .stack i:only-child { border-radius: 4px; }
.el .tot { text-align: right; font: 600 16px var(--font-num); }
.el .keys { grid-column: 2 / 3; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--ink-2); }
.el .keys span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--sw); margin-right: 5px; }
.el .keys b { color: var(--ink); font-weight: 600; font-family: var(--font-num); }

.qtable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.qtable td { padding: 7px 0; border-top: 1px solid var(--rule-2); }
.qtable tr:first-child td { border-top: 0; }
.qtable td.n { text-align: right; font: 600 18px var(--font-num); }
.qtable small { display: block; color: var(--ink-3); font-size: 12.5px; }

.feed { list-style: none; margin: 0; padding: 0; max-height: 330px; overflow: auto; font-size: 14px; }
.feed li { display: grid; grid-template-columns: 62px 120px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule-2); }
.feed li:first-child { border-top: 0; }
.feed time { color: var(--ink-3); font-family: var(--font-num); }
.feed .src { color: var(--ink-3); font-size: 12.5px; }
.feed .id { font-weight: 600; font-family: var(--font-num); font-size: 15px; }
.feed .to { display: inline-flex; gap: 6px; align-items: center; }
.feed .to i { width: 9px; height: 9px; border-radius: 50%; background: var(--sw); }

.tablewrap { overflow: auto; max-height: 560px; border: 1px solid var(--rule-2); border-radius: 6px; }
.dptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dptable th { position: sticky; top: 0; background: #f6f8f8; text-align: left; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; cursor: pointer; user-select: none; }
.dptable th.num, .dptable td.num { text-align: right; }
.dptable th[aria-sort="ascending"]::after { content: ' ▲'; font-size: 10px; }
.dptable th[aria-sort="descending"]::after { content: ' ▼'; font-size: 10px; }
.dptable td { padding: 6px 10px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.dptable td.num { font-family: var(--font-num); font-size: 15px; }
.dptable tr:hover td { background: #f7fafc; }
.dptable a { font-weight: 600; font-family: var(--font-num); font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 6px; }
.pill i { width: 10px; height: 10px; border-radius: 2px; background: var(--sw); }
.mini { display: inline-block; width: 60px; height: 6px; background: var(--rule-2); border-radius: 3px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--ink-2); }

.tip { position: fixed; z-index: 50; background: var(--ink); color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 13.5px; pointer-events: none; min-width: 150px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.tip b { display: block; margin-bottom: 3px; }
.tip div { display: flex; justify-content: space-between; gap: 14px; }
.tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--sw); margin-right: 6px; }
.tip span.v { font-family: var(--font-num); font-weight: 600; }

@media (max-width: 1000px) {
  .dgrid { grid-template-columns: 1fr; padding: 12px 16px 32px; }
  .span2, .span3 { grid-column: auto; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { border-left: 0; border-top: 1px solid var(--rule-2); }
  .el { grid-template-columns: 1fr auto; } .el .stack { grid-column: 1 / -1; grid-row: 2; } .el .keys { grid-column: 1 / -1; }
  .dhead { padding: 16px 16px 4px; }
}
