:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6b80;
  --accent: #2563eb;
  --accent-fill: #2563eb;
  --accent-soft: rgba(37, 99, 235, .10);
  --ok: #16a34a;
  --warn: #d97706;
  --crit: #dc2626;
  --info: #0284c7;
  --off: #64748b;
  --ok-soft: rgba(22, 163, 74, .12);
  --warn-soft: rgba(217, 119, 6, .13);
  --crit-soft: rgba(220, 38, 38, .12);
  --info-soft: rgba(2, 132, 199, .12);
  --off-soft: rgba(100, 116, 139, .14);
  --ok-text: #166534;
  --warn-text: #92400e;
  --crit-text: #b91c1c;
  --info-text: #0369a1;
  --off-text: #5b6b80;
  --ok-bar: #15803d;
  --warn-bar: #c2410c;
  --crit-fill: #dc2626;
  --border-input: #7d8aa0;
  --track: #e8edf4;
  --tag-l: 30%;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .05);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .10);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1e;
    --surface: #121a2f;
    --surface-2: #17203a;
    --border: #232e4d;
    --text: #e8ecf7;
    --muted: #94a3c0;
    --accent: #6b93ff;
    --accent-soft: rgba(107, 147, 255, .14);
    --ok: #34d17a;
    --warn: #f5a524;
    --crit: #ff6b6b;
    --info: #4cc3ff;
    --off: #8b9bb8;
    --ok-soft: rgba(52, 209, 122, .14);
    --warn-soft: rgba(245, 165, 36, .15);
    --crit-soft: rgba(255, 107, 107, .15);
    --info-soft: rgba(76, 195, 255, .14);
    --off-soft: rgba(139, 155, 184, .16);
    --ok-text: #34d17a;
    --warn-text: #f5a524;
    --crit-text: #ff6b6b;
    --info-text: #4cc3ff;
    --off-text: #8b9bb8;
    --ok-bar: #34d17a;
    --warn-bar: #f5a524;
    --border-input: #56688f;
    --track: #1f2a47;
    --tag-l: 76%;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 36px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1e;
  --surface: #121a2f;
  --surface-2: #17203a;
  --border: #232e4d;
  --text: #e8ecf7;
  --muted: #94a3c0;
  --accent: #6b93ff;
  --accent-soft: rgba(107, 147, 255, .14);
  --ok: #34d17a;
  --warn: #f5a524;
  --crit: #ff6b6b;
  --info: #4cc3ff;
  --off: #8b9bb8;
  --ok-soft: rgba(52, 209, 122, .14);
  --warn-soft: rgba(245, 165, 36, .15);
  --crit-soft: rgba(255, 107, 107, .15);
  --info-soft: rgba(76, 195, 255, .14);
  --off-soft: rgba(139, 155, 184, .16);
  --ok-text: #34d17a;
  --warn-text: #f5a524;
  --crit-text: #ff6b6b;
  --info-text: #4cc3ff;
  --off-text: #8b9bb8;
  --ok-bar: #34d17a;
  --warn-bar: #f5a524;
  --border-input: #56688f;
  --track: #1f2a47;
  --tag-l: 76%;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 36px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 0.875rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78125rem; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 10px max(24px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 1rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 0 1 340px;
  background: var(--surface); border: 1px solid var(--border-input); border-radius: 10px; padding: 0 12px; height: 38px;
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search .ic { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 550;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--border) 60%, var(--muted)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent-fill) 88%, #000); }
.btn.danger { color: var(--crit-text); }
.btn.danger.solid { background: var(--crit-fill); border-color: var(--crit-fill); color: #fff; }
.btn.danger.solid:hover { background: color-mix(in srgb, var(--crit-fill) 88%, #000); }
.btn.danger:hover { background: var(--crit-soft); border-color: var(--crit); }
.btn.block { width: 100%; }
.btn.small { height: 30px; padding: 0 10px; font-size: 0.8125rem; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: default; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--surface); border-color: var(--border); color: var(--text); text-decoration: none; }

.container { max-width: 1360px; margin: 0 auto; padding: 22px max(24px, env(safe-area-inset-right)) calc(60px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi {
  text-align: left; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s, transform .15s;
}
@media (hover: hover) { .kpi:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); } }
.kpi.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.78125rem; font-weight: 550; }
.kpi-ico { display: inline-flex; width: 28px; height: 28px; border-radius: 8px; align-items: center; justify-content: center; }
.kpi-val { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 0.78125rem; color: var(--muted); }
.tone-ok { color: var(--ok-text); background: var(--ok-soft); }
.tone-warn { color: var(--warn-text); background: var(--warn-soft); }
.tone-crit { color: var(--crit-text); background: var(--crit-soft); }
.tone-info { color: var(--info-text); background: var(--info-soft); }
.tone-off { color: var(--off-text); background: var(--off-soft); }
.tone-accent { color: var(--accent); background: var(--accent-soft); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 550; font-size: 0.8125rem;
}
.chip:hover { border-color: color-mix(in srgb, var(--border) 50%, var(--muted)); }
.chip.active { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.chip .cnt { font-variant-numeric: tabular-nums; opacity: .75; font-weight: 600; }
.select { display: inline-flex; align-items: center; gap: 8px; }
.select select {
  height: 34px; border-radius: 9px; border: 1px solid var(--border-input); background: var(--surface); padding: 0 10px;
}
.seg { display: inline-flex; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 2px; }
.seg button { width: 34px; height: 30px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.seg button.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- host cards ---------- */
.hosts.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; }
.hcard {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.hcard:hover { text-decoration: none; }
@media (hover: hover) { .hcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); } }
.hcard::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st, var(--ok)); }
.st-ok { --st: var(--ok); --st-text: var(--ok-text); } .st-warn { --st: var(--warn); --st-text: var(--warn-text); } .st-crit { --st: var(--crit); --st-text: var(--crit-text); }
.st-offline { --st: var(--off); --st-text: var(--off-text); } .st-new { --st: var(--info); --st-text: var(--info-text); }
.hc-head { display: flex; align-items: flex-start; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--st, var(--ok)); flex: none; margin-top: 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--st, var(--ok)) 20%, transparent); }
.st-crit .dot { animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--st) 6%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.hc-title { min-width: 0; flex: 1; }
.hc-name { font-size: 0.9375rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.78125rem; min-width: 0; white-space: nowrap; }
.hc-sub .os { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hc-sub .up { flex: none; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.pill .ic { width: 13px; height: 13px; vertical-align: -2px; }
button.pill, a.pill { border: 0; }
a.pill:hover, button.pill:hover { text-decoration: none; filter: brightness(.96); }

.metric { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; font-size: 0.8125rem; }
.metric .lbl { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.metric .val { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.bar { height: 7px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ok-bar); transition: width .5s ease; }
.bar > i.warn { background: var(--warn-bar); }
.bar > i.crit { background: var(--crit); }
.bar > i.info { background: var(--accent); }
.spark { width: 84px; height: 24px; display: block; }
.metric-cpu { grid-template-columns: 58px 1fr 84px auto; }
.hc-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; }
.hc-alert { font-size: 0.78125rem; color: var(--st-text, var(--st)); font-weight: 550; display: flex; gap: 6px; align-items: center; }
.hcard.off .bar > i { background: var(--off); }
.hcard.off .metric .val { color: var(--muted); }

/* list view */
.hosts.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 0.8125rem; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.row-link { cursor: pointer; }
.tbl tbody tr.row-link:hover td { background: var(--surface-2); }
.cellbar { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.cellbar .bar { flex: 1; min-width: 60px; }
.cellbar b { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.namecell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.namecell .dot { margin-top: 0; }

.empty {
  text-align: center; padding: 64px 20px; background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); color: var(--muted);
}
.empty h2 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.footnote { margin-top: 18px; font-size: 0.78125rem; text-align: right; }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.live.stale::before { background: var(--warn); }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 550; margin-bottom: 10px; }
.back:hover { color: var(--text); text-decoration: none; }
.dhead { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dhead h1 { font-size: 1.625rem; display: flex; align-items: center; gap: 12px; }
.dhead .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); margin-top: 6px; font-size: 0.8125rem; }
.dhead .meta span { display: inline-flex; align-items: center; gap: 6px; }
.status-pill { height: 28px; padding: 0 12px; font-size: 0.8125rem; }
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface));
  color: inherit; text-align: left; width: 100%;
}
button.alert-row:hover { background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.alert-row.sev-crit { --c: var(--crit-text); } .alert-row.sev-warn { --c: var(--warn-text); } .alert-row.sev-info { --c: var(--info-text); }
.alert-row .ic { color: var(--c); }
.alert-row b { font-weight: 650; }
.alert-row .go { margin-left: auto; color: var(--muted); font-size: 0.78125rem; white-space: nowrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; background: transparent;
  color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 0.71875rem; display: inline-flex; align-items: center; justify-content: center; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 0.9375rem; display: flex; align-items: center; gap: 8px; }
.card-head .big { font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.range { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; padding: 2px; background: var(--surface); }
.range button { border: 0; background: transparent; color: var(--muted); height: 28px; padding: 0 12px; border-radius: 8px; font-weight: 600; }
.range button.active { background: var(--accent-soft); color: var(--accent); }
.bar-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.chart .cross { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .tt {
  position: absolute; pointer-events: none; z-index: 3; min-width: 130px; padding: 8px 10px; font-size: 0.78125rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-hover);
  transform: translateX(-50%);
}
.chart .tt .tt-t { color: var(--muted); margin-bottom: 4px; font-size: 0.75rem; }
.chart .tt .tt-r { display: flex; align-items: center; gap: 8px; }
.chart .tt .sw { width: 9px; height: 9px; border-radius: 3px; }
.chart .tt .tt-r b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 200px; color: var(--muted); }

.legend { display: flex; gap: 14px; color: var(--muted); font-size: 0.78125rem; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 9px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

.disk-row { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.disk-row + .disk-row { margin-top: 10px; }
.disk-main { display: grid; grid-template-columns: 160px 1fr 280px 24px; gap: 14px; align-items: center; width: 100%; padding: 14px 16px; border: 0; background: transparent; text-align: left; }
.disk-main:hover { background: var(--surface-2); }
.disk-main .chev { color: var(--muted); transition: transform .2s; }
.disk-row.open .chev { transform: rotate(90deg); }
.disk-name { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.disk-name small { color: var(--muted); font-weight: 500; }
.disk-nums { text-align: right; font-variant-numeric: tabular-nums; }
.disk-detail { padding: 4px 16px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.forecast { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin: 12px 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.disk-th { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin: 12px 0 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.disk-th > div { flex: 1; min-width: 0; }
.disk-th .muted { font-size: 0.8125rem; margin-top: 2px; }
@media (max-width: 560px) { .disk-th { flex-wrap: wrap; } }

.svc-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.svc-tools .search { flex: 1 1 240px; max-width: 360px; height: 34px; }
.star { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.star:hover { background: var(--surface-2); color: var(--text); }
.star.on { color: var(--warn); }
.star.on svg { fill: currentColor; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tbl-wrap .tbl td, .tbl-wrap .tbl th { padding: 9px 14px; }
.sev-cell { display: inline-flex; align-items: center; gap: 6px; }

.danger-zone { border-color: color-mix(in srgb, var(--crit) 40%, var(--border)); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: 0.8125rem; }
.field input, .field textarea, .field select {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-input); background: var(--surface); width: 100%;
}
.field textarea { height: 96px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-error { background: var(--crit-soft); color: var(--crit-text); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-weight: 550; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 24, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(640px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-hover); padding: 24px; }
.modal h2 { font-size: 1.125rem; margin-bottom: 4px; }
.modal-close { position: absolute; right: 12px; top: 12px; }
.seg-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.seg-choice label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; }
.seg-choice input { accent-color: var(--accent); }
.seg-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.codebox { position: relative; margin: 8px 0 16px; }
.codebox pre {
  margin: 0; padding: 12px 44px 12px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; font: 0.78125rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.codebox .copy { position: absolute; right: 6px; top: 6px; }
.notice { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--text); font-size: 0.8125rem; margin-bottom: 12px; }
.notice .ic { color: var(--warn-text); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 550; z-index: 80; box-shadow: var(--shadow-hover); }
.toast[hidden] { display: none; }
.toast-error { background: var(--crit-fill); color: #fff; }
.toast-x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; margin: -6px -8px -6px 0; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.toast-x:hover { background: rgba(255, 255, 255, .16); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-hover); padding: 32px 28px; }
.login-logo { margin-bottom: 14px; }
.login-card h1 { font-size: 1.375rem; }
.login-card p { margin: 4px 0 22px; }

@media (max-width: 720px) {
  .btn.primary span { display: none; }
  .container { padding: 14px max(14px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .grid2 { grid-template-columns: 1fr; }
  .disk-main { grid-template-columns: 1fr 24px; }
  .disk-main .bar, .disk-main .disk-nums { grid-column: 1 / -1; text-align: left; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* list view: kompaktní, bez zalamování */
.hosts.list .tbl th, .hosts.list .tbl td { padding: 10px 10px; white-space: nowrap; }
.hosts.list .hc-foot { flex-wrap: nowrap; }
.hosts.list .cellbar { min-width: 112px; }
.hosts.list .cellbar .bar { min-width: 48px; }
.hosts.list .namecell a { white-space: nowrap; }


/* ---------- štítky ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent;
  background: hsl(var(--h) 70% 50% / .14); color: hsl(var(--h) 55% var(--tag-l));
}
button.tag { cursor: pointer; font-family: inherit; }
.tag-btn:hover { background: hsl(var(--h) 70% 50% / .24); }
.tag-btn.on { background: hsl(var(--h) 62% 30%); color: #fff; }
.tag-btn.on .cnt { color: #fff; opacity: .85; }
.tag.small { height: 20px; padding: 0 8px; font-size: 0.71875rem; }
.tag .cnt { font-variant-numeric: tabular-nums; opacity: .7; }
.tag-x { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: -4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .7; }
.tag-x:hover { opacity: 1; background: hsl(var(--h) 70% 50% / .25); }
.tag-x .ic { width: 12px; height: 12px; vertical-align: 0; }

.tagbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.tagbar[hidden] { display: none; }
.tagbar-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 0.8125rem; margin-right: 2px; }
.tagbar .tag { height: 28px; padding: 0 12px; font-size: 0.8125rem; }

.hc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.row-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: nowrap; }
.namecell > div { display: flex; flex-direction: column; align-items: flex-start; }

.tagedit-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 6px 8px;
  border: 1px solid var(--border-input); border-radius: 10px; background: var(--surface); cursor: text;
}
.tagedit-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tagedit-box .tag { height: 26px; }
.field .tagedit-input, .tagedit-input { flex: 1; min-width: 110px; height: 28px; padding: 0 4px; border: 0; outline: 0; background: transparent; box-shadow: none; }
.tagedit-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.78125rem; }
.dhead .tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.dhead .tags a.tag { text-decoration: none; }.field .tagedit-input, .field .tagedit-input:focus { border: 0; border-radius: 0; box-shadow: none; height: 28px; background: transparent; }

/* ---------- historie událostí ---------- */
.evlist { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; }
.ev + .ev { border-top: 1px solid var(--border); }
.ev-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c-soft); color: var(--c); }
.ev-ic .ic { width: 16px; height: 16px; vertical-align: 0; }
.sev-crit { --c: var(--crit-text); --c-soft: var(--crit-soft); }
.sev-warn { --c: var(--warn-text); --c-soft: var(--warn-soft); }
.sev-ok { --c: var(--ok-text); --c-soft: var(--ok-soft); }
.sev-info { --c: var(--info-text); --c-soft: var(--info-soft); }
.ev-body { flex: 1; min-width: 0; }
.ev-title { font-weight: 600; word-break: break-word; }
.ev-host { color: inherit; }
a.ev-host:hover { color: var(--accent); }
.ev-sep { margin: 0 6px; color: var(--muted); font-weight: 400; }
.ev-detail { color: var(--muted); font-size: 0.8125rem; margin-top: 1px; }
.ev-time { flex: none; color: var(--muted); font-size: 0.78125rem; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }
.ev-day { color: var(--muted); font-size: 0.8125rem; font-weight: 600; padding: 14px 4px 4px; }
.ev-day:first-child { padding-top: 2px; }
.ev-empty { margin: 8px 4px; }
.recent { margin-top: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 16px; }
.nav-btn { height: 38px; }

@media (max-width: 720px) {
  .ev { gap: 10px; }
}
a.btn { color: var(--text); }
a.btn.primary { color: #fff; }
a.btn:hover { text-decoration: none; }

/* ---------- notifikace ---------- */
.section-title { font-size: 1rem; margin: 28px 0 12px; }
.channels { display: flex; flex-direction: column; gap: 12px; }
.channel { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.channel.off .ch-ic { color: var(--off-text); background: var(--off-soft); }
.ch-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 12px; }
.ch-ic .ic { width: 20px; height: 20px; vertical-align: 0; }
.ch-main { flex: 1; min-width: 0; }
.ch-name { font-weight: 650; font-size: 0.9375rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-dest { color: var(--text); margin-top: 3px; word-break: break-word; }
.ch-rules { font-size: 0.8125rem; margin-top: 2px; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.log-err { color: var(--muted); font-size: 0.75rem; margin-top: 3px; max-width: 520px; word-break: break-word; }
.modal.wide { width: min(720px, 100%); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field small { font-size: 0.75rem; }
.form-sep { border-top: 1px solid var(--border); margin: 16px 0 6px; }
.form-h { font-size: 0.875rem; margin: 10px 0; }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.type-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; }
.type-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.type-tile .ic { width: 22px; height: 22px; color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

@media (max-width: 720px) {
  .channel { flex-direction: column; align-items: stretch; }
  .ch-actions { justify-content: flex-start; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- agenti ---------- */
.linklike { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 0.75rem; cursor: pointer; text-decoration: underline; }
select[data-host], select[data-global] { height: 34px; border-radius: 9px; border: 1px solid var(--border-input); background: var(--surface); padding: 0 10px; min-width: 150px; }

/* ---------- hromadná údržba (popup z horní lišty) ---------- */
.mt-tools { margin-bottom: 8px; }
.mt-tools input[type=search] { flex: 1; min-width: 180px; height: 36px; padding: 0 12px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--surface); color: var(--text); }
.mt-tools input[type=search]:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mt-list { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 2px 12px; }
.mt-host { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mt-host:last-child { border-bottom: 0; }
.mt-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mt-name .row-tags { margin-top: 0; flex-wrap: wrap; }
.mt-empty { margin: 10px 0; }

/* ---------- horní lišta: navigace a menu účtu ---------- */
.topnav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar .topbar-actions { margin-left: 0; }
.nav-btn.active { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--text); }
.menu-btn:hover { border-color: var(--border); background: var(--surface); }
.menu-btn .menu-ic { display: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.875rem; }
.avatar.big { width: 40px; height: 40px; font-size: 1rem; }
.menu-panel { position: absolute; top: calc(100% + 6px); right: max(16px, env(safe-area-inset-right)); width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow: auto; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-hover); z-index: 30; }
.menu-panel[hidden] { display: none; }
.menu-nav { display: none; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-weight: 550; text-align: left; }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item .ic { color: var(--muted); }
.menu-item.active { background: var(--accent-soft); color: var(--accent); }
.menu-item.active .ic { color: var(--accent); }
.menu-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.menu-user .muted { font-size: 0.8125rem; }
.menu-sec { padding: 4px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.menu-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.theme-seg { display: flex; width: 100%; }
.seg.theme-seg button { flex: 1; width: auto; height: 40px; gap: 5px; padding: 0 4px; font-size: 0.78125rem; font-weight: 600; }
.theme-seg .ic { width: 15px; height: 15px; }

/* pruh „data nejsou aktuální“ (M.setStale) – visí pod lepivou lištou */
.stale-bar { position: absolute; left: 0; right: 0; top: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: var(--text); font-size: 0.8125rem; text-align: center; }
.stale-bar[hidden] { display: none; }
.stale-bar .ic { color: var(--warn-text); }

body.modal-open { overflow: hidden; }
.dialog-actions { justify-content: flex-end; margin-top: 18px; }
.dash { color: var(--muted); }

/* ---------- přehled ---------- */
.filter-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -6px 0 14px; color: var(--muted); font-size: 0.8125rem; }
.filter-info .linklike { font-size: inherit; }
.kpi[aria-pressed="true"] .kpi-top { color: var(--accent); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.th-sort:hover { color: var(--text); }
th[aria-sort] .th-sort { color: var(--text); }
.th-sort .arr { font-size: 0.75em; }
.hc-note { margin-top: -4px; color: var(--muted); font-size: 0.78125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.plan { background: var(--off-soft); color: var(--off-text); }
.row-link, .hcard, .kpi, .btn, .chip, .tag-btn, .menu-item, .tab, .disk-main, .alert-row { -webkit-tap-highlight-color: transparent; }
.hcard:active { background: var(--surface-2); }
.tbl tbody tr.row-link:active td { background: var(--surface-2); }

/* ---------- detail ---------- */
.chart-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--muted); font-size: 0.78125rem; }
.chart-sum b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.tabs.fade-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px); mask-image: linear-gradient(to right, transparent, #000 36px); }
.tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.mw-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mw-row:first-child { padding-top: 0; }
.mw-row:last-child { border-bottom: 0; }
.mw-row .btn { margin-left: auto; flex: none; }
.mw-when { font-weight: 600; font-variant-numeric: tabular-nums; }
.mw-note { color: var(--muted); font-size: 0.8125rem; }
.readonly-note { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 14px; border-radius: 10px; background: var(--info-soft); font-size: 0.8125rem; }
.readonly-note .ic { color: var(--info-text); }

/* ---------- střední šířky: lišta se nevejde s popisky ---------- */
@media (max-width: 1180px) { .brand-name { display: none; } }
@media (max-width: 980px) and (min-width: 721px) { .topnav .nav-btn span { display: none; } .topnav .nav-btn { padding: 0 11px; } }

/* ---------- dotykové displeje a mobil: plochy min. 44 px (Apple HIG), pole 16 px (Safari pak nezoomuje) ---------- */
@media (pointer: coarse), (max-width: 720px) {
  .btn, .nav-btn, .icon-btn { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .btn.small { min-height: 40px; }
  .chip { height: 40px; }
  .select select, select[data-host], select[data-global], .field input, .field select { min-height: 44px; }
  .seg button { height: 40px; min-width: 44px; }
  .range button { height: 38px; min-width: 44px; }
  .star { width: 44px; height: 44px; }
  .tag-btn { min-height: 32px; padding: 0 12px; }
  .tag-x { width: 28px; height: 28px; margin-right: -9px; }
  a.pill, button.pill { min-height: 30px; }
  .tab { min-height: 44px; }
  .check input { width: 20px; height: 20px; margin-top: 0; }
  .check { align-items: center; min-height: 36px; }
  .linklike { padding: 8px 0; }
  input, select, textarea { font-size: max(16px, 1rem); }
}
/* iPhone/iPad: základ písma podle systémové velikosti textu (Dynamic Type) */
@media (pointer: coarse) {
  @supports (font: -apple-system-body) {
    html { font: -apple-system-body; }
  }
}

/* ---------- mobil ≤720 px ---------- */
@media (max-width: 720px) {
  /* lišta v jednom řádku: logo, hledání, (+), ☰ – navigace je v menu */
  .topbar { gap: 8px; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); }
  .topnav { display: none; }
  .search { flex: 1 1 auto; height: 44px; min-width: 0; }
  .topbar-actions { margin-left: auto; gap: 6px; }
  #btn-add { width: 44px; padding: 0; }
  .menu-btn { width: 44px; height: 44px; border-radius: 12px; }
  .menu-btn .avatar { display: none; }
  .menu-btn .menu-ic { display: block; width: 22px; height: 22px; }
  .menu-nav { display: block; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
  .menu-panel { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); width: auto; }
  .stale-bar { justify-content: flex-start; text-align: left; }

  /* souhrn: 6 dlaždic ve 3 sloupcích, bez podtitulku */
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
  .kpi { padding: 10px; gap: 0; }
  .kpi-top { font-size: 0.75rem; }
  .kpi-ico { width: 22px; height: 22px; border-radius: 6px; }
  .kpi-ico .ic { width: 15px; height: 15px; }
  .kpi-val { font-size: 1.375rem; }
  .kpi-sub { display: none; }
  .toolbar { margin-bottom: 12px; }
  .toolbar-right { width: 100%; justify-content: space-between; }

  .dhead h1 { font-size: 1.375rem; flex-wrap: wrap; gap: 8px 10px; }
  .back { min-height: 36px; margin-bottom: 4px; }
  .col-mode { display: none; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters .select { flex-direction: column; align-items: stretch; gap: 4px; }
  .filters .select select { width: 100%; }
  .filters .ev-tags { grid-column: 1 / -1; }

  /* okna jako spodní panel (iOS sheet) */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; border-bottom: 0; padding: 26px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .modal::before { content: ""; display: block; width: 40px; height: 5px; margin: -14px auto 12px; border-radius: 3px; background: var(--border); }
  .modal-close { top: 8px; right: 8px; }
  .dialog-actions .btn { flex: 1; }

  /* tabulky jako karty: .tbl-stack, buňky s data-label */
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr { display: block; width: 100%; }
  .tbl-stack tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .tbl-stack tr:last-child { border-bottom: 0; }
  .tbl-stack td, .tbl-wrap .tbl-stack td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; white-space: normal; text-align: right; }
  .tbl-stack td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 0.8125rem; text-align: left; }
  .tbl-stack td.stack-head { justify-content: flex-start; text-align: left; font-weight: 600; padding-bottom: 6px; }
  .tbl-stack td:empty { display: none; }
}

/* ---------- drobnosti ---------- */
.toolbar .filter-info { margin: 0; }
.ev-tags { margin: -4px 0 16px; }
.star:disabled { cursor: default; opacity: 1; }
.only-mobile { display: none; }
@media (max-width: 720px) {
  .only-mobile { display: inline; }
  .tbl-stack td.hide-mobile, .hide-mobile { display: none; }
}
/* mobil: v dlaždici souhrnu není místo na ikonu – stav nese barva čísla */
@media (max-width: 720px) {
  .kpi-ico { display: none; }
  .kpi[data-tone="crit"] .kpi-val { color: var(--crit-text); }
  .kpi[data-tone="warn"] .kpi-val { color: var(--warn-text); }
  .kpi[data-tone="info"] .kpi-val { color: var(--info-text); }
  .kpi[data-tone="off"] .kpi-val { color: var(--off-text); }
  .kpi-top > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 720px) {
  .svc-tools .search { height: 44px; flex-basis: 100%; max-width: none; }
  .tbl-wrap .tbl td, .tbl-wrap .tbl th { padding: 9px 8px; }
  .star { width: 40px; }
}
@media (max-width: 720px) {
  .tbl-wrap .tbl.tbl-stack td { padding: 4px 0; }
  .tbl-wrap .tbl.tbl-stack td.stack-head { padding-bottom: 6px; }
}
@media (max-width: 720px) {
  .tbl-stack td { justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
  .tbl-stack td[data-label]::before { margin-right: auto; padding-right: 8px; }
}
@media (max-width: 720px) {
  .disk-main .disk-name { grid-column: 1; grid-row: 1; }
  .disk-main .chev { grid-column: 2; grid-row: 1; }
}
.modal:focus { outline: none; }
