:root{
  --bg0:#070A12;
  --bg1:#0B1220;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --stroke:rgba(255,255,255,.12);
  --text:#EAF2FF;
  --muted:rgba(234,242,255,.72);
  --accent:#7C5CFF;
  --accent2:#12D6DF;
  --danger:#FF4D6D;
  --ok:#19F7A2;
  --warn:#FFCB3D;
}

html,body{height:100%;}
body.ipi-body{
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(900px 600px at 92% 0%, rgba(18,214,223,.14), transparent 55%),
    radial-gradient(900px 600px at 60% 120%, rgba(25,247,162,.12), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  overflow-x:hidden;
}

.bg-grid{
  position:fixed; inset:0; pointer-events:none; opacity:.18;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: translateZ(0);
}

.bg-glow{position:fixed; width:520px; height:520px; filter: blur(48px); opacity:.55; pointer-events:none;}
.bg-glow-1{left:-120px; top:120px; background: radial-gradient(circle, rgba(124,92,255,.55), transparent 60%);}
.bg-glow-2{right:-160px; top:80px; background: radial-gradient(circle, rgba(18,214,223,.45), transparent 62%);}

.ipi-topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: rgba(9, 12, 22, .55);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.ipi-topbar .container-fluid{padding-top:10px; padding-bottom:10px;}

.brand-badge{
  display:flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 35px rgba(0,0,0,.35);
}
.brand-dot{
  width:10px; height:10px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,.2));
  box-shadow: 0 0 0 5px rgba(124,92,255,.16), 0 0 25px rgba(124,92,255,.38);
}
.brand-name{font-weight:900; letter-spacing:.6px;}
.brand-sub{font-weight:600; font-size:.85rem; opacity:.8;}

.btn-ghost{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  border-radius: 12px;
  padding:8px 12px;
}
.btn-ghost:hover{background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); color:var(--text);}

.user-pill{
  display:flex; align-items:center; gap:8px;
  padding:8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}

.ipi-main{padding-top:16px;}
.ipi-content{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  min-height: 240px;
}

.ipi-sidebar{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  position: sticky;
  top: 86px;
}

.sidebar-title{
  font-size:.78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(234,242,255,.55);
  margin: 8px 8px 10px;
}

.sidebar-split{
  height:1px;
  background: rgba(255,255,255,.10);
  margin: 12px 8px;
}

.nav-item{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  margin: 4px 0;
  border-radius: 14px;
  color: rgba(234,242,255,.85);
  text-decoration:none;
  border: 1px solid transparent;
  background: transparent;
  transition: all .18s ease;
}
.nav-item i{opacity:.9;}
.nav-item:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  transform: translateY(-1px);
  color: rgba(234,242,255,.98);
}
.nav-item.active{
  background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(18,214,223,.08));
  border-color: rgba(124,92,255,.22);
  box-shadow: 0 10px 30px rgba(124,92,255,.10);
}

.badge-soft{
  background: rgba(124,92,255,.16);
  color: rgba(234,242,255,.92);
  border: 1px solid rgba(124,92,255,.25);
  border-radius: 999px;
}

.card-neo{
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
  overflow:hidden;
}

.card-neo .card-header{
  background: rgba(0,0,0,.10);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.kpi{
  display:flex; align-items:center; gap:12px;
  padding: 14px;
}
.kpi .ico{
  width:42px; height:42px; border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.kpi .val{font-weight:900; font-size:1.35rem; line-height:1;}
.kpi .lbl{font-size:.86rem; color: rgba(234,242,255,.65);}

.status-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  font-size:.82rem;
}
.dot{
  width:9px; height:9px; border-radius:50%;
  background: rgba(255,255,255,.25);
  box-shadow: 0 0 0 5px rgba(255,255,255,.06);
}
.dot.ok{background: var(--ok); box-shadow: 0 0 0 5px rgba(25,247,162,.14), 0 0 22px rgba(25,247,162,.20);}
.dot.warn{background: var(--warn); box-shadow: 0 0 0 5px rgba(255,203,61,.14), 0 0 22px rgba(255,203,61,.18);}
.dot.bad{background: var(--danger); box-shadow: 0 0 0 5px rgba(255,77,109,.14), 0 0 22px rgba(255,77,109,.18);}

.table-tech{
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,.03);
  --bs-table-color: rgba(234,242,255,.86);
  border-color: rgba(255,255,255,.10);
}
.table-tech th{
  color: rgba(234,242,255,.70);
  font-weight: 700;
  font-size:.85rem;
  letter-spacing:.03em;
}

.form-control, .form-select{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: var(--text) !important;
  border-radius: 14px !important;
}
.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .25rem rgba(124,92,255,.16) !important;
  border-color: rgba(124,92,255,.35) !important;
}
.form-text{color: rgba(234,242,255,.55) !important;}

.btn-primary{
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(18,214,223,1)) !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 35px rgba(124,92,255,.24);
}
.btn-primary:hover{filter: brightness(1.05);}
.btn-outline-light{
  border-color: rgba(255,255,255,.18) !important;
  border-radius: 14px !important;
  color: rgba(234,242,255,.92) !important;
}
.btn-outline-light:hover{
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.25) !important;
}

.code-pill{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(234,242,255,.90);
}

.ipi-footer{
  opacity:.9;
  padding: 14px 2px 22px;
}

.muted{color: rgba(234,242,255,.70) !important;}
.text-muted{color: rgba(234,242,255,.70) !important;}
.hint{color: rgba(234,242,255,.55) !important;}

.toast-container{z-index: 2000;}

.skeleton{
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
}
.skeleton:after{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer{
  100%{transform: translateX(100%);}
}


.brand-logo{
  height: 22px;
  width: auto;
  opacity: .95;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.45));
}


.incident-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(234,242,255,.92);
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
}
.incident-ok{
  border-color: rgba(25,247,162,.25);
  background: rgba(25,247,162,.10);
}
.incident-warning{
  border-color: rgba(255,203,61,.25);
  background: rgba(255,203,61,.10);
}
.incident-critical{
  border-color: rgba(255,77,109,.30);
  background: rgba(255,77,109,.12);
  animation: incidentPulse 1.6s infinite;
}
@keyframes incidentPulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,77,109,.22), 0 12px 35px rgba(0,0,0,.25); }
  70%{ box-shadow: 0 0 0 12px rgba(255,77,109,0), 0 12px 35px rgba(0,0,0,.25); }
  100%{ box-shadow: 0 0 0 0 rgba(255,77,109,0), 0 12px 35px rgba(0,0,0,.25); }
}


.neo-alert{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,77,109,.10);
  color: rgba(234,242,255,.94);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.healthbar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
}
.healthbar-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width .6s ease;
}
.hb-ok{ background: rgba(25,247,162,.65); }
.hb-warn{ background: rgba(255,203,61,.72); }
.hb-bad{ background: rgba(255,77,109,.72); }

.logviewer{
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  padding: 6px;
}
.log-line{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .78rem;
  line-height: 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.log-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 82px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .68rem;
  letter-spacing: .10em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(234,242,255,.88);
  flex: 0 0 auto;
}
.log-text{ flex: 1 1 auto; opacity: .95; }
.log-critical{ border-color: rgba(255,77,109,.25); background: rgba(255,77,109,.08); }
.log-critical .log-tag{ border-color: rgba(255,77,109,.35); background: rgba(255,77,109,.12); }
.log-warning{ border-color: rgba(255,203,61,.22); background: rgba(255,203,61,.08); }
.log-warning .log-tag{ border-color: rgba(255,203,61,.32); background: rgba(255,203,61,.12); }
.log-info{ border-color: rgba(25,247,162,.18); background: rgba(25,247,162,.06); }
.log-info .log-tag{ border-color: rgba(25,247,162,.26); background: rgba(25,247,162,.10); }

.log-snippet{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
