:root {
  --bg: #080e1a;
  --card: #121c2e;
  --ink: #edf2fa;
  --ink2: #cad5e6;
  --muted: #97a6bd;
  --faint: #72829b;
  --line: #1e2b43;
  --line2: #2b3b59;
  --green: #3dffa8;
  --orange: #ffb020;
  --red: #ff5d6c;
  --radius: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100%;
}

:focus-visible {
  outline: 2px solid #f2f6fc;
  outline-offset: 2px;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.mast h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 16px;
  padding: 0;
  list-style: none;
}

.sum {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 13px;
}

.sum .k {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sum .k::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--faint));
  flex: 0 0 8px;
}

.sum b {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}

.sum.st-ok { --dot: var(--green); }
.sum.st-attention { --dot: var(--orange); }
.sum.st-down { --dot: var(--red); }

.sum.st-attention.has-issues { border-color: rgba(255, 176, 32, 0.55); }
.sum.st-down.has-issues { border-color: rgba(255, 93, 108, 0.6); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 0 4px;
}

.card h2 {
  margin: 0 16px 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--line);
}

th.status-col,
td.status-cell {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.45;
}

tbody tr:last-child td { border-bottom: 0; }

.name {
  color: var(--ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.desc {
  color: var(--ink2);
  overflow-wrap: anywhere;
}

tr.is-attention { background: rgba(255, 176, 32, 0.06); }
tr.is-alarm { background: rgba(255, 93, 108, 0.07); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: #0f1829;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 7px;
}

.status.is-ok {
  color: var(--green);
  border-color: rgba(61, 255, 168, 0.35);
  background: rgba(61, 255, 168, 0.08);
}

.status.is-attention {
  color: var(--orange);
  border-color: rgba(255, 176, 32, 0.45);
  background: rgba(255, 176, 32, 0.08);
}

.status.is-alarm {
  color: var(--red);
  border-color: rgba(255, 93, 108, 0.5);
  background: rgba(255, 93, 108, 0.1);
}

.charts {
  margin: 18px 2px 0;
  font-size: 13.5px;
}

.charts a {
  color: var(--ink2);
  text-underline-offset: 3px;
}

.charts a:hover { color: var(--ink); }

@media (max-width: 680px) {
  .page { width: min(100% - 24px, 920px); padding-top: 24px; }

  .summary { grid-template-columns: 1fr; }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  table, tbody, tr, td { display: block; width: auto; }

  td { border-bottom: 0; padding: 2px 16px; }

  td.name { padding-top: 12px; }

  td.status-cell {
    text-align: left;
    white-space: normal;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  tbody tr:last-child td.status-cell { border-bottom: 0; }
}
