:root {
  --bg: #0b0b16;
  --bg2: #0e0e1a;
  --card: #16162a;
  --card-hover: #1c1c34;
  --border: #262640;
  --text: #ecedf6;
  --muted: #9a9ab5;
  --faint: #6b6b85;
  --primary: #652cf2;
  --accent: #33d9d5;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #1a1140 0%, var(--bg) 55%) fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px; border-bottom: 1px solid var(--border);
  background: rgba(14,14,26,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.3px; display: flex; gap: 8px; align-items: center; }
.brand .hog { font-size: 22px; }
.brand .accent { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  color: var(--muted); padding: 7px 13px; border-radius: 9px; font-size: 14px; font-weight: 500;
}
.nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--card); color: #fff; }
.spacer { flex: 1; }
.who { color: var(--faint); font-size: 13px; }
.who a { color: var(--muted); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px; }

/* ---- hero verdict ---- */
.hero {
  display: flex; align-items: center; gap: 22px;
  padding: 26px 28px; border-radius: 18px; margin-bottom: 26px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero.ok { background: linear-gradient(120deg, rgba(34,197,94,.14), rgba(22,22,42,.6)); }
.hero.warn { background: linear-gradient(120deg, rgba(245,158,11,.16), rgba(22,22,42,.6)); }
.hero.critical { background: linear-gradient(120deg, rgba(239,68,68,.18), rgba(22,22,42,.6)); }
.hero .dot { width: 54px; height: 54px; border-radius: 50%; flex: none; position: relative; }
.hero.ok .dot { background: var(--ok); box-shadow: 0 0 0 6px rgba(34,197,94,.15); }
.hero.warn .dot { background: var(--warn); box-shadow: 0 0 0 6px rgba(245,158,11,.15); }
.hero.critical .dot { background: var(--err); box-shadow: 0 0 0 6px rgba(239,68,68,.15); }
.hero .pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(239,68,68,.5)} 70%{box-shadow:0 0 0 16px rgba(239,68,68,0)} 100%{box-shadow:0 0 0 0 rgba(239,68,68,0)} }
.hero h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.hero .sub { color: var(--muted); margin-top: 3px; font-size: 14px; }
.hero .counts { margin-left: auto; display: flex; gap: 26px; text-align: center; }
.hero .counts .n { font-size: 26px; font-weight: 700; }
.hero .counts .l { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .6px; }

/* ---- group + cards ---- */
.group { margin-bottom: 26px; }
.group h2 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: .8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; transition: .15s; position: relative; overflow: hidden;
}
.card:hover { background: var(--card-hover); transform: translateY(-2px); }
.card .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.card.ok .stripe { background: var(--ok); }
.card.down .stripe { background: var(--err); }
.card.warn .stripe { background: var(--warn); }
.card.unknown .stripe { background: var(--faint); }
.card .row1 { display: flex; align-items: center; gap: 9px; }
.card .name { font-weight: 650; font-size: 15px; color: #fff; }
.card .url { color: var(--faint); font-size: 12px; margin-top: 1px; word-break: break-all; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-dot.ok { background: var(--ok); }
.status-dot.down { background: var(--err); }
.status-dot.warn { background: var(--warn); }
.status-dot.unknown { background: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.chip {
  font-size: 11.5px; padding: 3px 9px; border-radius: 20px; font-weight: 600;
  background: #20203a; color: var(--muted); border: 1px solid var(--border);
}
.chip.good { color: var(--ok); border-color: rgba(34,197,94,.3); }
.chip.bad { color: var(--err); border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.chip.warn { color: var(--warn); border-color: rgba(245,158,11,.3); }

/* ---- incidents banner / list ---- */
.inc-banner { border-radius: var(--radius); border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.07); padding: 14px 18px; margin-bottom: 22px; }
.inc-banner h3 { margin: 0 0 8px; font-size: 14px; color: var(--err); }
.inc-row { display: flex; gap: 10px; align-items: center; padding: 6px 0;
  border-top: 1px solid var(--border); font-size: 14px; }
.inc-row:first-of-type { border-top: none; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.badge.critical { background: rgba(239,68,68,.2); color: #ff9b9b; }
.badge.warn { background: rgba(245,158,11,.2); color: #ffd28a; }
.badge.resolved { background: rgba(34,197,94,.2); color: #9be8b5; }

/* ---- generic ---- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px; }
.panel h2, .panel h3 { margin-top: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(255,255,255,.02); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.kpi .n { font-size: 26px; font-weight: 700; color: #fff; }
.kpi .l { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.chart { width: 100%; height: 320px; }
.muted { color: var(--muted); }
.btn { background: var(--primary); color: #fff; border: none; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; cursor: pointer; font-size: 14px; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn.danger { background: transparent; border: 1px solid rgba(239,68,68,.4); color: #ff9b9b; padding: 5px 11px; font-size: 12px; }
input, select { background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 9px; font-size: 14px; width: 100%; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.back { color: var(--muted); font-size: 14px; }

/* ---- login ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 36px; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.login-card .hog { font-size: 40px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; }
.login-card p { color: var(--muted); font-size: 14px; margin-top: 0; }
.notice { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #9be8b5;
  padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 14px 0; }
.notice.err { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #ff9b9b; }

@media (max-width: 640px) {
  .hero { flex-wrap: wrap; }
  .hero .counts { margin-left: 0; width: 100%; justify-content: space-between; }
  .wrap { padding: 16px; }
}
