/* MeshWatch 제품군과 같은 색을 쓴다. 나란히 띄워 놓았을 때 한 집안으로 보여야 한다. */
:root {
  --bg: #12161c; --panel: #171d25; --line: #232c38; --text: #dfe6ee;
  --dim: #8b98a8; --accent: #4da3ff;
  --ok: #3ecf8e; --bad: #ef5f5f; --warn: #e8b339; --crit: #ff7a7a;
  --sev-critical: var(--crit); --sev-error: #f0874a; --sev-warning: var(--warn); --sev-info: var(--accent);
  --st-reporting: var(--ok); --st-connected: var(--accent); --st-waiting: var(--dim);
  --srv-silent: #b48cff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 13px; }
a { color: var(--accent); }

button { font: inherit; border-radius: 6px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--line); background: #1e2733; color: var(--text); }
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #04121f; font-weight: 600; }
button.ghost { background: transparent; }
button.small { padding: 4px 9px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
a.button { font: inherit; border-radius: 6px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--line); background: #1e2733; color: var(--text); display: inline-block; text-decoration: none; }
a.button:hover { border-color: var(--accent); }
a.button.small { padding: 4px 9px; font-size: 12px; }
input, select, textarea { font: inherit; background: #0e1319; border: 1px solid var(--line);
  color: var(--text); border-radius: 6px; padding: 7px 9px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label { display: block; color: var(--dim); font-size: 11px; margin: 0 0 4px;
  text-transform: uppercase; letter-spacing: .07em; }

/* ── 로그인 ── */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .card { width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.gate h1 { font-size: 16px; letter-spacing: .14em; margin: 0 0 4px; }
.gate h1 span { color: var(--accent); }
.gate .sub { color: var(--dim); margin: 0 0 20px; font-size: 12px; }
.gate .field { margin-bottom: 14px; }
.gate button { width: 100%; margin-top: 6px; }
.gate .card.wide { max-width: 560px; }
.gate-eula { margin-bottom: 14px; }
.gate-eula .eula-text { margin: 0; max-height: 220px; overflow: auto; padding: 10px 12px; background: #0e1319;
  border: 1px solid var(--line); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.gate-eula .eula-text:focus { outline: none; border-color: var(--accent); }
.gate-eula label.check { align-items: flex-start; line-height: 1.4; }
.gate-eula label.check input[type="checkbox"] { margin-top: 2px; }
.gate-eula .eula-note { font-size: 12px; line-height: 1.5; }
.gate-help { margin-top: 14px; font-size: 12px; line-height: 1.6; opacity: .75; text-align: left; }
.gate-help code { display: block; margin: 4px 0 8px; padding: 4px 7px; border-radius: 4px; background: rgba(127,127,127,.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.5; user-select: all;
  white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── 뼈대 ── */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand h1 { font-size: 15px; letter-spacing: .14em; margin: 0; font-weight: 700; white-space: nowrap; }
.brand h1 span { color: var(--accent); }
.brand .ver { color: var(--dim); font-size: 11px; }
.brand .fp { background: none; border: 1px dashed var(--line); color: var(--dim); font-size: 10.5px; padding: 1px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.brand .fp:hover { color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; }
.topbar-right button { white-space: nowrap; flex-shrink: 0; }
.topbar-right .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.role { border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 11px; white-space: nowrap; flex-shrink: 0; }

.banner { padding: 9px 16px; font-size: 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.banner.warn { background: #2b2415; color: var(--warn); }
.banner.bad { background: #2b1717; color: var(--bad); }
.banner.info { background: #16232b; color: var(--accent); }

nav.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line);
  background: var(--panel); overflow-x: auto; }
nav.tabs button { border: none; background: none; border-radius: 0; color: var(--dim);
  padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
nav.tabs button:hover { color: var(--text); border-color: var(--line); }
nav.tabs button.active { color: var(--text); border-color: var(--accent); }

main { padding: 16px; flex: 1; }
section > h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); margin: 0 0 10px; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.row > div { min-width: 130px; }
.row.between { justify-content: space-between; align-items: center; margin-bottom: 8px; }
.row.between h2, .panel-sec h2, .panel h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); margin: 0 0 10px; font-weight: 600; }
.hint { color: var(--dim); font-size: 11px; margin: 8px 0 0; }
.hint.error { color: var(--bad); }
.hint.ok { color: var(--ok); }
.hint.lead { margin: 4px 0 12px; line-height: 1.55; max-width: 900px; }
.hint.center { text-align: center; }
.hint.foot { margin-top: 18px; }
.inline-error { margin: 6px 0 0; line-height: 1.45; }
form.row > .inline-error, td > .inline-error { flex-basis: 100%; }
.field-hint { margin: 4px 0 0; font-size: 11px; line-height: 1.4; }
.row > div > .field-hint { max-width: 220px; }
.empty { color: var(--dim); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.empty.small { padding: 14px; font-size: 12px; }
.dim { color: var(--dim); }
.mono, code.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mono-sm { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
tr.dim td { color: var(--dim); }
label.check { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; cursor: pointer;
  text-transform: none; letter-spacing: normal; font-size: 13px; color: var(--text); }
label.check input[type="checkbox"] { width: auto; margin: 0; padding: 0; accent-color: var(--accent); }
button.linkish { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }

/* ── 타일·칩 ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.tile .n { font-size: 26px; font-weight: 600; line-height: 1.1; }
.tile .k { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; }
.tiles.sev { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.tiles.sev .tile { border-top: 3px solid var(--line); }
.tiles.sev .tile .k { text-transform: capitalize; letter-spacing: .03em; font-size: 12px; }
.tiles.sev .tile .delta { margin-top: 6px; display: block; }
.tile.critical { border-top-color: var(--sev-critical); } .tile.critical.on .n { color: var(--sev-critical); }
.tile.error { border-top-color: var(--sev-error); } .tile.error.on .n { color: var(--sev-error); }
.tile.warning { border-top-color: var(--sev-warning); } .tile.warning.on .n { color: var(--sev-warning); }
.tile.info { border-top-color: var(--sev-info); } .tile.info.on .n { color: var(--sev-info); }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.chip .k { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.chip .v { font-size: 22px; font-weight: 600; line-height: 1.2; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.chip .sub { color: var(--dim); font-size: 11px; margin-top: 3px; }
.chip.bad .v { color: var(--bad); } .chip.crit .v { color: var(--crit); }
.chip.warn .v { color: var(--warn); } .chip.ok .v { color: var(--ok); }
.chip.link { cursor: pointer; }
.chip.link:hover, .chip.link:focus-visible { border-color: var(--accent); outline: none; }
.chip.link.crit { border-color: #5a2b2b; } .chip.link.warn { border-color: #4a3c1c; }
.chip.link .v { color: var(--text); }
.seg { font-size: 12px; font-weight: 400; white-space: nowrap; }
.seg b { font-size: 20px; font-weight: 600; }
.seg.reporting b { color: var(--st-reporting); } .seg.connected b { color: var(--st-connected); } .seg.waiting b { color: var(--st-waiting); }
.seg.srv.ok b { color: var(--ok); } .seg.srv.warning b { color: var(--warn); }
.seg.srv.critical b { color: var(--crit); } .seg.srv.silent b { color: var(--srv-silent); }
.seg.srv.unlicensed b, .seg.srv.waiting b { color: var(--dim); }
.delta { display: inline-block; font-size: 11px; color: var(--dim); font-weight: 400; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--warn); } .delta.down { color: var(--ok); }

/* ── 표 ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 12px; background: var(--panel); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #1a212b; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.when { color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; text-align: right; }
button.small.danger { color: #f0b429; border-color: rgba(240,180,41,.45); }
button.small.danger:hover { color: #ffcf5c; border-color: #f0b429; }

.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 11px; border: 1px solid var(--line); white-space: nowrap; }
.pill.critical { color: var(--crit); border-color: #5a2b2b; background: #2a1414; }
.pill.error { color: var(--bad); border-color: #4d2626; }
.pill.warning { color: var(--warn); border-color: #4a3c1c; }
.pill.info { color: var(--dim); }
.pill.reporting { color: var(--st-reporting); border-color: #23503c; }
.pill.connected { color: var(--st-connected); border-color: #24425f; background: #14212e; }
.pill.waiting { color: var(--st-waiting); border-style: dashed; }
.pill.revoked { color: var(--bad); }
.pill.source { color: var(--dim); }
.pill.srv.ok { color: var(--ok); border-color: #23503c; }
.pill.srv.warning { color: var(--warn); border-color: #4a3c1c; }
.pill.srv.critical { color: var(--crit); border-color: #5a2b2b; background: #2a1414; }
.pill.srv.silent { color: var(--srv-silent); border-color: #45346a; background: #1e1830; }
.pill.srv.unlicensed, .pill.srv.waiting { color: var(--dim); border-style: dashed; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── 토큰 상자 ── */
.token-box { background: #0e1319; border: 1px solid var(--accent); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.token-box code { display: block; font-size: 12px; word-break: break-all; margin: 8px 0; color: var(--ok);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.token-box strong { color: var(--warn); }
.token-box .token-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.install-cmds { margin-top: 10px; }
.install-cmds code { color: var(--text); background: #121820; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px;
  word-break: break-all; user-select: all; }
.install-cmds .hint { margin-top: 6px; }
.install-head { font-size: 13px; margin: 16px 0 4px; color: var(--text); }
.token-box .wizard-value { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 6px; }
.token-box .wizard-value code { margin: 0; color: var(--text); background: #121820; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 8px; word-break: break-all; user-select: all; }
.wizard-label { color: var(--dim); font-size: 12px; }
.token-box strong.plain { color: var(--text); }
@media (max-width: 560px) {
  .token-box .wizard-value { grid-template-columns: minmax(0, 1fr) auto; }
  .token-box .wizard-value .wizard-label { grid-column: 1 / -1; }
}
.fp-line { margin-top: 8px; }
.fp-line code { color: var(--warn); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.panel > form { margin-top: 12px; }
.panel .field { margin-top: 10px; }
.panel .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.panel-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; min-width: 0; }
.panel-sec .table-wrap { border: none; border-radius: 0; }
.panel-sec .hint { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.grid2 > .panel-sec { margin-bottom: 14px; }
.toplist { list-style: none; margin: 0; padding: 0; }
.toplist li { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 8px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--line); }
.toplist li:last-child { border-bottom: none; }
.toplist .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist .name .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.toplist .dot.critical { background: var(--sev-critical); } .toplist .dot.error { background: var(--sev-error); }
.toplist .dot.warning { background: var(--sev-warning); } .toplist .dot.info { background: var(--sev-info); }
.toplist .count { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.toplist .meter { display: block; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; width: 90px; }
.toplist .meter i { display: block; height: 100%; background: var(--accent); }

/* 24시간 히스토그램 */
.histo-wrap { position: relative; }
svg.histo { display: block; width: 100%; height: 120px; overflow: visible; }
svg.histo .grid { stroke: var(--line); stroke-width: .5; vector-effect: non-scaling-stroke; }
svg.histo .bar.critical { fill: var(--sev-critical); } svg.histo .bar.error { fill: var(--sev-error); }
svg.histo .bar.warning { fill: var(--sev-warning); } svg.histo .bar.info { fill: var(--sev-info); }
svg.histo .bar.none { fill: var(--line); }
.histo-labels { display: flex; margin-top: 4px; }
.histo-labels span { flex: 1; min-width: 0; font-size: 10.5px; color: var(--dim); text-align: center; visibility: hidden; font-variant-numeric: tabular-nums; }
.histo-labels span.h3 { visibility: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 11.5px; color: var(--dim); text-transform: capitalize; }
.legend .hint { margin: 0; text-transform: none; }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .sw.critical { background: var(--sev-critical); } .legend .sw.error { background: var(--sev-error); }
.legend .sw.warning { background: var(--sev-warning); } .legend .sw.info { background: var(--sev-info); }
.histo-wrap .hint.center { position: absolute; left: 0; right: 0; top: 44px; margin: 0; font-size: 12px; }

/* ── Servers ── */
.state-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; }
.licence-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 12.5px; }
.licence-line.warn { color: var(--warn); border-color: #4a3c1c; }
.licence-line.bad { color: var(--bad); border-color: #4d2626; background: #2b1717; }
.licence-state { margin: 0 0 10px; font-weight: 600; }
.licence-state.ok { color: var(--ok); } .licence-state.warn { color: var(--warn); }
.licence-state.bad { color: var(--bad); } .licence-state.muted { color: var(--dim); font-weight: 400; }
table.servers td { vertical-align: middle; }
.server-row { cursor: pointer; }
.server-row:hover td, .server-row:focus-visible td { background: #1a212b; outline: none; }
.server-row .chev { display: inline-block; width: 16px; color: var(--dim); font-size: 15px; line-height: 1; }
.server-row.unlicensed td { color: var(--dim); }
.server-row.unlicensed .mbar i { background: var(--dim) !important; }
.srv-name { font-weight: 600; white-space: nowrap; }
.server-row .issues { margin-top: 3px; white-space: normal; max-width: 190px; line-height: 1.35; }
.meter-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter-cell .mbar { display: inline-block; width: 48px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter-cell .mbar i { display: block; height: 100%; background: var(--accent); }
.meter-cell.warn .mbar i { background: var(--warn); } .meter-cell.warn .mval { color: var(--warn); }
.meter-cell.crit .mbar i { background: var(--crit); } .meter-cell.crit .mval { color: var(--crit); }
.disk-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.disk-cell .mount { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.servers-empty { text-align: left; max-width: 640px; line-height: 1.7; }
.servers-empty .empty-title { color: var(--text); font-weight: 600; margin: 0 0 6px; }
.servers-empty ol { margin: 0 0 8px; padding-left: 20px; }
.servers-empty code.addr { display: block; margin: 2px 0; }
.servers-empty code { color: var(--ok); word-break: break-all; }

/* 서버 상세 */
.detail-head { gap: 8px; flex-wrap: wrap; }
.range-buttons { display: flex; gap: 4px; }
.range-buttons button[aria-pressed="true"] { cursor: default; }
.srv-title { margin-bottom: 10px; }
.srv-title .dev { font-weight: 600; font-size: 15px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.charts .chart-card { margin-bottom: 0; }
.chart-plot { position: relative; padding-left: 34px; }
.chart-y { position: absolute; left: 0; top: 0; bottom: 0; width: 30px; }
.chart-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
svg.chart { display: block; width: 100%; height: 150px; overflow: visible; touch-action: pan-y; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
svg.chart .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
svg.chart .thr { stroke-width: 1; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
svg.chart .thr.warn { stroke: var(--warn); } svg.chart .thr.crit { stroke: var(--crit); }
svg.chart .ln { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg.chart .ln.c1 { stroke: var(--accent); } svg.chart .ln.c2 { stroke: #f0874a; stroke-width: 1.2; }
svg.chart .ln.c3 { stroke: #3ecf8e; }
svg.chart .area { stroke: none; opacity: .14; } svg.chart .area.c1 { fill: var(--accent); } svg.chart .area.c3 { fill: #3ecf8e; }
svg.chart .cursor { stroke: var(--dim); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-empty { position: absolute; left: 34px; right: 0; top: 58px; text-align: center; color: var(--dim); font-size: 12px; }
.chart-x { position: relative; height: 16px; margin: 4px 0 0 34px; }
.chart-x span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-x span.first { transform: none; } .chart-x span.last { transform: translateX(-100%); }
.chart-x.sparse span.odd { display: none; }
.chart-legend { text-transform: none; }
.legend .ln-sw { height: 3px; border-radius: 2px; vertical-align: 2px; width: 14px; }
.legend .ln-sw.c1 { background: var(--accent); } .legend .ln-sw.c2 { background: #f0874a; } .legend .ln-sw.c3 { background: #3ecf8e; }
.legend .thr-sw { height: 0; width: 14px; border-top: 2px dashed; border-radius: 0; vertical-align: 3px; background: none; }
.legend .thr-sw.warn { border-color: var(--warn); } .legend .thr-sw.crit { border-color: var(--crit); }
.chart-readout { min-height: 16px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.danger-zone { border-color: #4a3c1c; }
.danger-zone .inline-error { margin-top: 8px; }
table.srv-alerts td.summary { min-width: 240px; }
.th-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; align-items: end; }
.th-grid .th-actions, .th-grid > .inline-error { grid-column: 1 / -1; }
.status-line { font-size: 12px; color: var(--dim); margin-top: 8px; line-height: 1.5; }
.status-line b { color: var(--text); font-weight: 600; }

@media (max-width: 640px) {
  main { padding: 12px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip .v { font-size: 19px; } .seg b { font-size: 17px; }
  .histo-labels span.h3 { visibility: hidden; }
  .histo-labels span.h6 { visibility: visible; }
  .toplist li { grid-template-columns: minmax(0, 1fr) 30px; }
  .toplist li > .meter { display: none; }
  .hint.lead { font-size: 11.5px; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  table.servers .col-os, table.servers .col-agent { display: none; }
  .chart-x span.odd { display: none; }
  table.srv-alerts .col-kind, table.srv-alerts .col-from { display: none; }
  table.srv-alerts td.summary { min-width: 160px; }
  table.servers td, table.servers th { padding: 8px 8px; }
  .meter-cell .mbar { width: 32px; }
  .th-grid { grid-template-columns: minmax(0, 1fr); }
  .licence-line { font-size: 12px; }
  .brand .fp { display: none; }
}
@media (max-width: 480px) {
  .topbar { padding: 8px 10px; gap: 6px 10px; flex-wrap: wrap; }
  .brand .ver { display: none; }
  .brand h1 { font-size: 13px; letter-spacing: .08em; }
  .topbar-right { gap: 6px; margin-left: auto; }
  .topbar-right button.small { padding: 4px 7px; }
  .topbar-right .who { max-width: 90px; }
}
