:root{
  --bg:#041121;
  --panel:#071b31;
  --panel2:#09233f;
  --line:rgba(96,165,250,.28);
  --line2:rgba(96,165,250,.48);
  --text:#f8fbff;
  --muted:#a9c7ec;
  --blue:#2563eb;
  --cyan:#38bdf8;
  --green:#34d399;
  --red:#fb7185;
  --yellow:#fbbf24;
  --shadow:0 24px 70px rgba(0,0,0,.28);
}
*{box-sizing:border-box}
body{
  margin:0;
  background:
    radial-gradient(circle at 20% -10%,rgba(56,189,248,.16),transparent 35%),
    radial-gradient(circle at 90% 10%,rgba(37,99,235,.18),transparent 32%),
    var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
a{color:inherit}
.app-shell{display:grid;grid-template-columns:292px 1fr;min-height:100vh}
.sidebar{
  border-right:1px solid var(--line);
  background:rgba(2,12,27,.72);
  backdrop-filter:blur(18px);
  padding:22px;
  position:sticky;
  top:0;
  height:100vh;
}
.brand{display:flex;gap:14px;align-items:center;padding-bottom:22px;border-bottom:1px solid var(--line)}
.brand-mark{
  width:54px;height:54px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#1d4ed8,#38bdf8);
  font-weight:950;font-size:22px;
  box-shadow:0 18px 38px rgba(37,99,235,.25);
}
.brand strong{display:block;font-weight:950}
.brand span,.sidebar-user span{color:var(--muted);font-size:13px}
.nav{display:flex;flex-direction:column;gap:9px;margin-top:28px}
.nav a{
  text-decoration:none;
  padding:14px 16px;
  border-radius:15px;
  color:#dbeafe;
  font-weight:850;
  border:1px solid transparent;
}
.nav a:hover,.nav a.active{
  background:linear-gradient(135deg,rgba(37,99,235,.68),rgba(30,64,175,.72));
  border-color:rgba(96,165,250,.55);
}
.sidebar-user{
  position:absolute;left:22px;right:22px;bottom:22px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  background:rgba(7,27,49,.72);
}
.sidebar-user .avatar{
  float:left;margin-right:10px;
  width:42px;height:42px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background:#1d4ed8;font-weight:950;
}
.sidebar-user a{
  clear:both;
  display:block;
  margin-top:14px;
  text-decoration:none;
  text-align:center;
  border:1px solid var(--line2);
  border-radius:13px;
  padding:10px;
  font-weight:900;
}
.main{padding:30px;overflow:hidden}
.page-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  margin-bottom:24px;
}
.page-head small{
  color:#67e8f9;
  letter-spacing:.2em;
  font-weight:950;
}
.page-head h1{
  font-size:44px;
  line-height:1;
  margin:10px 0 8px;
  font-weight:950;
  text-shadow:0 2px 0 rgba(0,0,0,.24);
}
.page-head p{margin:0;color:#9cc9ff;font-weight:750}
.head-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:15px;
  border:1px solid var(--line2);
  background:#071d35;
  color:#fff;
  text-decoration:none;
  font-weight:950;
  cursor:pointer;
}
.btn.primary{background:linear-gradient(135deg,#2563eb,#38bdf8);border-color:#60a5fa}
.btn.white{background:#fff;color:#071526;border-color:#fff}
.btn.danger{border-color:rgba(251,113,133,.65);color:#fecdd3}
.grid{display:grid;gap:18px}
.grid.kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid.two{grid-template-columns:1.2fr .8fr}
.card{
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(9,35,63,.84),rgba(5,18,34,.76));
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card.pad{padding:22px}
.card-head{
  padding:20px 22px;
  border-bottom:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:center;gap:12px;
}
.card-head h2{margin:0;font-size:22px}
.card-head p{margin:5px 0 0;color:var(--muted);font-weight:700}
.kpi{
  padding:20px;
  border-radius:22px;
  border:1px solid var(--line);
  background:rgba(2,12,27,.45);
}
.kpi small{
  display:block;
  color:#9cc9ff;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:950;
  font-size:12px;
  margin-bottom:9px;
}
.kpi strong{font-size:32px;line-height:1;font-weight:950}
.kpi.ok strong{color:var(--green)}
.kpi.down strong{color:var(--red)}
.kpi.warn strong{color:var(--yellow)}
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse}
.table th,.table td{
  text-align:left;
  padding:16px 18px;
  border-bottom:1px solid rgba(96,165,250,.17);
  vertical-align:middle;
}
.table th{
  color:#b8d6fb;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.04em;
}
.table td{font-weight:800}
.badge{
  display:inline-flex;align-items:center;gap:7px;
  padding:7px 11px;
  border-radius:999px;
  font-weight:950;
  font-size:12px;
  border:1px solid var(--line2);
}
.badge:before{
  content:"";
  width:7px;height:7px;border-radius:999px;background:currentColor;
}
.badge.ok{color:var(--green);background:rgba(52,211,153,.12);border-color:rgba(52,211,153,.42)}
.badge.down{color:var(--red);background:rgba(251,113,133,.12);border-color:rgba(251,113,133,.42)}
.badge.warn{color:var(--yellow);background:rgba(251,191,36,.12);border-color:rgba(251,191,36,.42)}
.badge.unknown{color:#93c5fd;background:rgba(147,197,253,.12)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.field span{
  display:block;
  margin-bottom:8px;
  color:#b8d6fb;
  text-transform:uppercase;
  font-size:12px;
  font-weight:950;
}
.input,select,textarea{
  width:100%;
  border:1px solid var(--line2);
  border-radius:15px;
  background:#041426;
  color:#fff;
  padding:14px 16px;
  font-weight:850;
  outline:none;
}
textarea{min-height:110px}
.help{color:var(--muted);font-size:13px;font-weight:700}
.actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px;border-top:1px solid var(--line);padding-top:20px}
.status-dot{
  width:14px;height:14px;border-radius:999px;
  background:#64748b;
  box-shadow:0 0 0 6px rgba(100,116,139,.12);
}
.status-dot.ok{background:var(--green);box-shadow:0 0 0 6px rgba(52,211,153,.14)}
.status-dot.down{background:var(--red);box-shadow:0 0 0 6px rgba(251,113,133,.14)}
.status-dot.warn{background:var(--yellow);box-shadow:0 0 0 6px rgba(251,191,36,.14)}
.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.login-card{
  width:100%;
  max-width:460px;
  border:1px solid var(--line);
  border-radius:28px;
  background:linear-gradient(180deg,rgba(9,35,63,.92),rgba(5,18,34,.92));
  box-shadow:var(--shadow);
  padding:30px;
}
.login-card h1{font-size:34px;margin:14px 0 8px}
.login-card p{color:var(--muted);font-weight:700;margin-bottom:24px}
@media(max-width:1050px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto}
  .sidebar-user{position:static;margin-top:24px}
  .grid.kpis,.grid.two,.form-grid{grid-template-columns:1fr}
  .page-head{flex-direction:column}
}
