:root {
  --bg: #f6f7f4; --surface: #fff; --border: #ecedea; --border-2: #e1e3de;
  --text: #0d0e0c; --muted: #6b7280; --muted-2: #9aa0a0;
  --green: #34c759; --green-soft: #e3f7ea; --amber: #e5a13a; --amber-soft: #fbf1de;
  --red: #e5484d; --red-soft: #fbe3e3;
  --radius: 18px; --shadow-sm: 0 1px 2px rgba(20,24,20,.04), 0 2px 8px rgba(20,24,20,.05);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #cfe6d9; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.wrap { max-width: 760px; margin: 0 auto; padding: 40px 22px 60px; }
.head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text); }
.brand__logo { display: inline-flex; color: var(--text); }
.head__sep { color: var(--muted-2); font-weight: 400; }
.head__title { font-family: var(--font); font-weight: 500; color: var(--muted); font-size: 15px; }
.updated { color: var(--muted-2); font-size: 13px; }

.banner { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 18px; }
.banner__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--muted-2); flex: 0 0 14px; }
.banner__text { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.banner.is-ok { background: var(--green-soft); border-color: #cbeed7; }
.banner.is-ok .banner__dot { background: var(--green); box-shadow: 0 0 0 4px rgba(52,199,89,.18); }
.banner.is-degraded { background: var(--amber-soft); border-color: #f0dcb8; }
.banner.is-degraded .banner__dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(229,161,58,.18); }
.banner.is-down { background: var(--red-soft); border-color: #f3c9c9; }
.banner.is-down .banner__dot { background: var(--red); box-shadow: 0 0 0 4px rgba(229,72,77,.18); }

.components { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.comp { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.comp__name { font-size: 13px; color: var(--muted); font-weight: 600; }
.comp__state { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.comp__state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); }
.comp.ok .comp__state::before { background: var(--green); }
.comp.ok .comp__state { color: #2f7a56; }
.comp.bad .comp__state::before { background: var(--red); }
.comp.bad .comp__state { color: #b3261e; }
.comp.warn .comp__state::before { background: var(--amber); }
.comp.warn .comp__state { color: #a15c00; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 16px 18px; }
.stat__label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat__value { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -1px; margin-top: 4px; }

.workers h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.workers__list { display: flex; flex-direction: column; gap: 10px; }
.worker { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 13px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.worker__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); flex: 0 0 10px; }
.worker.alive .worker__dot { background: var(--green); box-shadow: 0 0 0 3px rgba(52,199,89,.18); }
.worker__id { font-weight: 600; font-size: 14px; }
.worker__meta { color: var(--muted); font-size: 13px; }
.worker__badge { margin-left: auto; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.worker__badge.ok { color: #2f7a56; background: var(--green-soft); border: 1px solid #cbeed7; }
.worker__badge.rl { color: #a15c00; background: var(--amber-soft); border: 1px solid #f0dcb8; }
.worker__badge.down { color: #b3261e; background: var(--red-soft); border: 1px solid #f3c9c9; }
.muted { color: var(--muted-2); font-size: 14px; }

.foot { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; color: var(--muted-2); font-size: 13px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

@media (max-width: 560px) {
  .components, .stats { grid-template-columns: 1fr; }
  .worker__badge { margin-left: 0; }
}
