:root {
  --bg: #050806;
  --bg-panel: #0a100c;
  --glass: rgba(10, 18, 12, 0.82);
  --glass-border: rgba(57, 255, 20, 0.16);
  --text: #f4fff7;
  --text-muted: #9cb8a4;
  --text-dim: #6d8574;
  --green: #39ff14;
  --green-2: #22c55e;
  --green-dark: #16a34a;
  --white: #ffffff;
  --bad: #ff4d6d;
  --warn: #fbbf24;
  --gradient: linear-gradient(135deg, #16a34a 0%, #39ff14 55%, #d1ffd6 100%);
  --glow: 0 0 42px rgba(57, 255, 20, 0.28);
  --radius: 20px;
  --radius-sm: 14px;
  --sidebar: 248px;
  --ease: 220ms cubic-bezier(.4,0,.2,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 55% 40% at 6% -10%, rgba(57,255,20,.18), transparent 58%),
    radial-gradient(ellipse 45% 34% at 96% 0%, rgba(34,197,94,.14), transparent 52%),
    radial-gradient(ellipse 36% 24% at 70% 100%, rgba(255,255,255,.04), transparent);
  pointer-events: none; z-index: 0;
}
a { color: var(--green); text-decoration: none; }
.display { font-family: "Space Grotesk", Inter, sans-serif; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
  border-radius: var(--radius);
  box-shadow: 0 10px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 12px; padding: .85rem 1.1rem;
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
}
.btn.full { width: 100%; }
.btn.gradient { background: var(--gradient); color: #041208; box-shadow: var(--glow); }
.btn.gradient:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text-muted); }
.btn.sm { padding: .5rem .8rem; font-size: .82rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.label { font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-dim); }
.muted { color: var(--text-dim); font-size: .86rem; }

input[type=text], input[type=email], input[type=password] {
  width: 100%; padding: .85rem 1rem; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(0,0,0,.35); color: var(--text);
  font: inherit;
}
input:focus { outline: 2px solid rgba(57,255,20,.35); }

/* Auth */
.auth-screen { min-height: 100dvh; display: grid; place-items: center; position: relative; z-index: 1; padding: 1.25rem; }
.auth-orb {
  position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none;
}
.auth-orb-a { width: 280px; height: 280px; top: -60px; left: -40px; background: rgba(57,255,20,.22); }
.auth-orb-b { width: 240px; height: 240px; bottom: 8%; right: -50px; background: rgba(255,255,255,.08); }
.auth-card { width: min(420px, 100%); padding: 1.7rem 1.45rem 1.5rem; position: relative; z-index: 1; }
.brand-mark {
  width: 64px; height: 64px; margin: 0 auto .85rem; display: grid; place-items: center;
  border-radius: 18px; background: #07140a; border: 1px solid var(--glass-border);
  box-shadow: var(--glow); color: var(--green); font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem;
}
.auth-card h1 { text-align: center; font-size: 1.45rem; margin-bottom: .25rem; }
.auth-card .tag { text-align: center; color: var(--text-muted); margin-bottom: 1.2rem; }
.auth-card label { display: block; margin: .85rem 0 .4rem; }
.err { background: rgba(255,77,109,.12); border: 1px solid rgba(255,77,109,.3); color: #ffc1cc; padding: .7rem .85rem; border-radius: 12px; margin-bottom: 1rem; font-size: .88rem; }

/* App */
.app { display: flex; min-height: 100dvh; position: relative; z-index: 1; }
.sidebar {
  width: var(--sidebar); padding: 1.1rem .9rem;
  border-right: 1px solid var(--glass-border);
  background: rgba(4,10,6,.94);
  display: flex; flex-direction: column; gap: .35rem;
  position: sticky; top: 0; height: 100dvh;
}
.brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; }
.brand strong { display: block; letter-spacing: .04em; }
.brand span { font-size: .72rem; color: var(--text-dim); }
.side-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .72rem .8rem; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-dim); font: inherit; cursor: pointer; text-align: left;
}
.side-link.active { color: #041208; background: var(--gradient); font-weight: 700; box-shadow: var(--glow); }
.side-link:hover:not(.active) { color: var(--text); background: rgba(57,255,20,.06); }
.content { flex: 1; padding: 1.4rem 1.6rem 2rem; max-width: 1100px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; margin-bottom: 1.1rem; }
.kpi { padding: 1rem 1.05rem; }
.kpi .v { font-size: 1.45rem; font-weight: 800; color: var(--white); margin-top: .2rem; }
.kpi .v.on { color: var(--green); }
.grid2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
.card { padding: 1.15rem 1.2rem; }
.card h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.chk { display: flex; gap: .55rem; align-items: center; margin-top: .85rem; color: var(--text-muted); font-size: .9rem; }
.houses { display: grid; gap: .7rem; }
.house {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(0,0,0,.25);
}
.house b { display: block; }
.console {
  margin-top: 1rem; background: #020403; border: 1px solid var(--glass-border);
  border-radius: 14px; padding: .9rem 1rem; max-height: 280px; overflow: auto;
  font: 12px/1.5 ui-monospace, monospace; color: #b8ffc0; white-space: pre-wrap;
}
.badge { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.badge.ok { background: rgba(57,255,20,.15); color: var(--green); }
.badge.off { background: rgba(255,255,255,.06); color: var(--text-dim); }
.warn { color: var(--warn); font-size: .88rem; }
.ok { color: var(--green); font-size: .88rem; }
.dns-box { margin-top: .8rem; padding: .75rem .85rem; border-radius: 12px; background: rgba(57,255,20,.06); border: 1px dashed var(--glass-border); font-size: .86rem; }
code { color: var(--green); }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { position: relative; height: auto; width: auto; flex-direction: row; flex-wrap: wrap; }
  .kpis, .grid2, .row { grid-template-columns: 1fr; }
}
