:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --border: #e6e9f0;
  --text: #1a2540;
  --text-muted: #63708c;
  --text-subtle: #93a0b8;
  --brand: #0e2430;
  --ok: #1f9d64;
  --ok-bg: #e7f6ee;
  --info: #2f6bd4;
  --info-bg: #e8f0fd;
  --warn: #c9971a;
  --warn-bg: #fbf3dc;
  --orange: #d97423;
  --orange-bg: #fbeadb;
  --bad: #d64545;
  --bad-bg: #fbe6e6;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 24px 20px 48px; flex: 1; }

.head {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { height: 32px; width: auto; display: block; }
.brand__logo--dark { display: none; }
.brand__sep { color: var(--text-subtle); }
.brand__page { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.head__meta { font-size: 12.5px; color: var(--text-subtle); }
.head__err { color: var(--bad); }

.banner {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 14px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 24px;
}
.banner__dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.banner h1 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.banner p { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.banner.t-ok { border-color: var(--ok); }
.banner.t-ok .banner__dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.banner.t-info { border-color: var(--info); }
.banner.t-info .banner__dot { background: var(--info); box-shadow: 0 0 0 4px var(--info-bg); }
.banner.t-warn { border-color: var(--warn); }
.banner.t-warn .banner__dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.banner.t-orange { border-color: var(--orange); }
.banner.t-orange .banner__dot { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-bg); }
.banner.t-bad { border-color: var(--bad); }
.banner.t-bad .banner__dot { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }

.block { margin-bottom: 30px; }
.block__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-subtle);
  font-weight: 700;
  margin: 0 0 12px;
}
.grupo { margin-bottom: 14px; }
.grupo__label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin: 0 0 6px; }
.comps {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.comp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.comp:last-child { border-bottom: 0; }
.comp__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comp__name { font-size: 14.5px; font-weight: 600; }
.comp__desc { font-size: 12.5px; color: var(--text-subtle); }
.comp__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.comp__dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.comp__ms { font-weight: 500; font-size: 12px; color: var(--text-subtle); }
.t-ok { color: var(--ok); }
.t-info { color: var(--info); }
.t-warn { color: var(--warn); }
.t-orange { color: var(--orange); }
.t-bad { color: var(--bad); }

.inc {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 16px 18px;
  margin-bottom: 12px;
  border-left: 3px solid var(--orange);
}
.inc--mnt { border-left-color: var(--info); }
.inc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.inc__head h3 { font-size: 15.5px; margin: 0; }
.inc__desc { font-size: 13px; color: var(--text-muted); margin: 0 0 8px; }
.inc__win { font-size: 12.5px; color: var(--text-subtle); margin: 0; }
.badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.t-ok { background: var(--ok-bg); }
.badge.t-info { background: var(--info-bg); }
.badge.t-warn { background: var(--warn-bg); }
.badge.t-orange { background: var(--orange-bg); }
.badge.t-bad { background: var(--bad-bg); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
}
.timeline__st { font-weight: 700; color: var(--text); }
.timeline__msg { color: var(--text-muted); }
.timeline li time { font-size: 11.5px; color: var(--text-subtle); white-space: nowrap; }
.timeline--sm li { grid-template-columns: 110px 1fr auto; font-size: 12.5px; }

.hist { border-bottom: 1px solid var(--border); padding: 14px 2px; }
.hist:last-child { border-bottom: 0; }
.hist__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hist__head h3 { font-size: 14.5px; margin: 0; }
.hist__date { font-size: 12px; color: var(--text-subtle); white-space: nowrap; }
.hist__resolved { margin: 6px 0 10px; }

.empty, .skeleton {
  color: var(--text-subtle);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
}

.foot {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 560px) {
  .timeline li, .timeline--sm li { grid-template-columns: 1fr; gap: 2px; }
  .timeline li time { grid-row: 1; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1220;
    --card: #131c30;
    --border: #23304c;
    --text: #e9eefb;
    --text-muted: #9db0cc;
    --text-subtle: #6b7ea0;
    --brand: #cdd9ef;
    --ok-bg: #10331f;
    --info-bg: #10233f;
    --warn-bg: #332a10;
    --orange-bg: #33220f;
    --bad-bg: #331515;
  }
  .brand__logo--light { display: none; }
  .brand__logo--dark { display: block; }
}
