:root{color-scheme:dark;--bg:#101517;--surface:#161d20;--surface-deep:#12181a;--stroke:#2a363b;--text:#f0f4ee;--muted:#9daeb2;--green:#9bea9f;--teal:#78cec6;--violet:#c0a9ef;--orange:#f6c278;--error:#f5a199;--mono:"Cascadia Mono",Consolas,monospace}
*,*::before,*::after{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:1rem/1.5 "Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif}a{color:inherit;text-decoration:none}
.shell{width:min(1320px,calc(100% - 64px));margin-inline:auto}.bar{border-bottom:1px solid var(--stroke);background:#131a1c}.bar-inner{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:inline-flex;align-items:center;gap:12px;font-weight:650;font-size:1.02rem}.brand-icon{display:flex;align-items:end;gap:3px;height:25px;width:25px;padding:5px;background:#253b32;border-radius:6px}.brand-icon i{width:3px;background:var(--green);height:7px;border-radius:1px}.brand-icon i:nth-child(2){height:15px}.brand-icon i:nth-child(3){height:10px}
.refresh-state,.pill{display:inline-flex;align-items:center;gap:7px;font-size:.875rem;padding:4px 10px;white-space:nowrap;border-radius:999px;border:1px solid var(--stroke);color:var(--muted)}
.refresh-state::before,.pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.online{color:var(--green);border-color:#354e3d;background:#23322b}.stale,.warning{color:var(--orange);border-color:#584833;background:#322b21}.offline{color:var(--error);border-color:#503637;background:#342426}
.page-heading{display:flex;align-items:end;justify-content:space-between;gap:22px;margin:46px 0 36px}.page-heading h1{font-size:clamp(2rem,4.4vw,3rem);font-weight:720;letter-spacing:-.055em;margin:0 0 5px}.page-heading p{margin:0;color:var(--muted);font-size:.95rem}.refresh{display:flex;gap:12px;align-items:center}.refresh time{color:var(--text);font-family:var(--mono);margin-left:6px}
button{font:inherit;font-size:.875rem;cursor:pointer;color:var(--text);border:1px solid var(--stroke);background:var(--surface);padding:7px 13px;border-radius:7px}button:hover{background:#253136}button:focus-visible,a:focus-visible{outline:2px solid var(--green);outline-offset:3px}button:disabled{opacity:.55;cursor:wait}.ranges{display:flex;gap:2px;background:var(--surface-deep);padding:3px;border:1px solid var(--stroke);border-radius:8px}.ranges button{border-color:transparent;background:transparent;color:var(--muted);padding:4px 11px}.ranges button[aria-pressed=true]{background:#2b393e;color:var(--text)}
.notice{border:1px solid #584833;background:#322b21;color:var(--orange);padding:12px 16px;border-radius:8px;margin-bottom:24px}.section-heading{display:flex;align-items:center;justify-content:space-between;min-height:41px;margin-bottom:12px}.section-heading h2{font-size:1.25rem;margin:0;font-weight:650}section+section{margin-top:30px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.card{background:var(--surface);border:1px solid var(--stroke);border-radius:13px;overflow:hidden;padding:20px 22px 17px;min-width:0}.card-top{display:flex;align-items:start;justify-content:space-between;gap:12px}.card-title{display:flex;align-items:center;gap:11px}.card-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid #3c5251;border-radius:8px;background:#263635;color:var(--teal);font:700 .88rem var(--mono)}.ups .card-icon{border-color:#4d4134;background:#342c23;color:var(--orange)}h3{font-size:1.06rem;font-weight:650;margin:0}.subtle{color:var(--muted);font-size:.875rem;margin:3px 0 0}.mono{font-family:var(--mono)}.pill{margin-top:1px}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0 16px}.metric{background:var(--surface-deep);border:1px solid #253036;border-radius:8px;padding:10px 11px;min-width:0}.metric-label{color:var(--muted);font-size:.875rem}.metric-value{font:650 clamp(1.14rem,2.2vw,1.63rem)/1.3 var(--mono);letter-spacing:-.065em;margin-top:4px;white-space:nowrap}.metric-value small{font:500 .69rem var(--mono);color:var(--muted);margin-left:3px;letter-spacing:0}.m-cpu{color:var(--green)}.m-memory,.m-rx{color:var(--teal)}.m-tx{color:var(--violet)}
progress{height:5px;width:100%;margin-top:8px;border:0;appearance:none;display:block;border-radius:4px;overflow:hidden;color:var(--teal);background:#2b393d}progress[hidden]{display:none}progress::-webkit-progress-bar{background:#2b393d}progress::-webkit-progress-value{background:var(--teal)}progress::-moz-progress-bar{background:var(--teal)}
.plots{display:grid;grid-template-columns:1fr 1fr;gap:15px}.chart-legend{font-size:.78rem;color:var(--muted);margin:0 0 2px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}.chart-legend span{white-space:nowrap}.chart-legend i{display:inline-block;width:8px;height:3px;background:currentColor;margin-right:3px;vertical-align:middle}.plot{width:100%;height:82px;display:block}
.details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;margin:13px 0 0;padding-top:11px;border-top:1px solid var(--stroke)}.details div{min-width:0}.details dt{color:var(--muted);font-size:.83rem}.details dd{margin:3px 0 0;font-size:.89rem;overflow-wrap:anywhere}.card-foot{margin:12px 0 0;color:var(--muted);font-size:.8rem}.ups .metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.ups .details{grid-template-columns:repeat(3,minmax(0,1fr))}.ups .metric-value{white-space:normal}.ups .ups-alert{margin:11px 0 0;padding:8px 10px;font-size:.84rem;color:var(--orange);background:#322b21;border-radius:6px}.ups .ups-alert[hidden]{display:none}
footer{margin:30px 0;color:var(--muted);font-size:.82rem}
#servers{align-items:start}.hardware-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.hardware-heading h3{margin:0}.hardware-heading .subtle{font-size:.78rem}.hardware-note{font-size:.83rem;color:var(--orange);margin:7px 0;overflow-wrap:anywhere}.thermal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0 13px}.thermal-cell{min-width:0;background:var(--surface-deep);border:1px solid #253036;border-radius:7px;padding:8px 9px}.thermal-cell dt{font-size:.82rem;color:var(--muted)}.thermal-cell dd{margin:3px 0 0}.thermal-number{font:600 1.12rem var(--mono);white-space:nowrap}.raid-heading{border-top:1px solid var(--stroke);padding-top:9px}.raid-row{display:flex;justify-content:space-between;align-items:start;gap:9px;margin-top:7px;font-size:.875rem}.raid-row>span:last-child{white-space:nowrap}.volume-row{padding-top:7px;border-top:1px solid #253036}.raid-meta{font-size:.78rem;color:var(--muted);margin:1px 0 0;overflow-wrap:anywhere}.health-ok{color:var(--green)}.health-warning{color:var(--orange)}.health-critical{color:var(--error)}.health-unknown{color:var(--muted)}
@media(max-width:1090px){.shell{width:calc(100% - 42px)}.card{padding-inline:15px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.refresh{flex-wrap:wrap;justify-content:end}}
@media(max-width:730px){.shell{width:calc(100% - 28px)}.grid{grid-template-columns:1fr}.page-heading{margin:28px 0 22px;align-items:start;flex-direction:column;gap:14px}.refresh{justify-content:start}.card{padding-inline:14px}.metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.metric{padding:8px 6px}.details{gap:6px 10px}}
@media(max-width:390px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.grid{gap:12px}.plots{gap:8px}.ups .details{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media (min-width: 1050px) {
  main.shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto max-content max-content auto auto;
    grid-template-areas:
      "overview overview"
      "notice notice"
      "servers-heading servers-heading"
      "edge origin"
      "ups-heading hardware-heading"
      "ups-cards hardware-card"
      "footer footer";
    column-gap: 16px;
    align-items: start;
  }
  main.shell > section, #servers { display: contents; }
  .page-heading { grid-area: overview; }
  #notice { grid-area: notice; }
  [aria-labelledby="servers-title"] > .section-heading { grid-area: servers-heading; }
  #edge { grid-area: edge; }
  #origin { grid-area: origin; }
  #edge, #origin { align-self: stretch; }
  [aria-labelledby="ups-title"] > .section-heading,
  [aria-labelledby="hardware-title"] > .section-heading { margin-top: 15px; }
  [aria-labelledby="ups-title"] > .section-heading { grid-area: ups-heading; }
  [aria-labelledby="hardware-title"] > .section-heading { grid-area: hardware-heading; }
  #power { grid-area: ups-cards; gap: 12px; align-self: stretch; }
  #hardware-card { grid-area: hardware-card; align-self: stretch; }
  #power .ups { padding-inline: clamp(10px, 1.2vw, 16px); }
  #power .card-top { flex-wrap: wrap; gap: 6px; }
  #power .metrics { gap: 6px; }
  #power .metric { padding-inline: 6px; }
  #power .metric-value { font-size: 1.12rem; overflow-wrap: anywhere; }
  #power .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main.shell > footer { grid-area: footer; }
}

@media (max-width: 1049px) {
  #servers { grid-template-columns: minmax(0, 1fr); }
}

#hardware-card { display: flex; flex-direction: column; }
#hardware-card .thermal-grid { margin-top: 0; }
#hardware-raid { display: flex; flex: 1; flex-direction: column; }
#hardware-raid .volume-row { flex: 1; align-items: center; }
