:root{
  --bg:#070914;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.60);

  --p1:#5ad7ff;
  --p2:#7b61ff;
  --good:#42e6a4;
  --warn:#ffd166;
  --bad:#ff5c7a;
  --info:#57a6ff;

  --r:18px;
  --shadow: 0 14px 60px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  overflow-x:hidden;
}

.bg{position:fixed; inset:0; pointer-events:none;}
.bg-grid{
  position:absolute; inset:0;
  background:
    linear-gradient(transparent 31px, rgba(255,255,255,.05) 32px),
    linear-gradient(90deg, transparent 31px, rgba(255,255,255,.05) 32px);
  background-size: 32px 32px;
  opacity:.25;
}
.bg-glow{
  position:absolute; width:700px; height:700px; filter: blur(55px);
  opacity:.35; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--p1), transparent 60%),
              radial-gradient(circle at 70% 70%, var(--p2), transparent 60%);
}
.bg-glow.a{ left:-220px; top:-220px;}
.bg-glow.b{ right:-250px; bottom:-240px; opacity:.30}

.hidden{display:none !important}

.center{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:22px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.auth{
  width:min(430px, 92vw);
  padding:18px;
}

.brand{
  display:flex; align-items:center; gap:12px;
  margin-bottom:14px;
}

.logo-img{
  width:46px;
  height:46px;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  display:grid;
  place-items:center;
}
.logo-img img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.brand-title{font-weight:900; letter-spacing:.6px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}

.h2{margin:8px 0 6px; font-size:22px}
.h3{font-size:18px; font-weight:800}
.muted{color:var(--muted)}
.tiny{font-size:12px}
.field{margin-top:12px}
label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}

.input, .select, textarea{
  width:100%;
  background: rgba(0,0,0,.26);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 12px 12px;
  outline:none;
}
textarea{resize:vertical; min-height:90px}
.input:focus, .select:focus, textarea:focus{
  border-color: rgba(90,215,255,.55);
  box-shadow: 0 0 0 4px rgba(90,215,255,.12);
}

.btn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  transition: transform .05s ease, filter .2s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px) }
.btn.primary{
  width:100%;
  margin-top:14px;
  font-weight:800;
  border:none;
  background: linear-gradient(90deg, rgba(90,215,255,.95), rgba(123,97,255,.95));
}
.btn.ghost{ background: rgba(255,255,255,.04) }
.btn.danger{ background: rgba(255,92,122,.12); border-color: rgba(255,92,122,.35) }

.msg{
  margin-top:12px;
  font-size:13px;
  color: var(--bad);
  min-height:18px;
}
.footnote{
  margin-top:12px;
  font-size:12px;
  color: rgba(255,255,255,.45);
}

.app{ min-height:100vh; }
.topbar{
  position:sticky; top:0;
  display:flex; align-items:center; gap:16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(5,7,18,.78);
  backdrop-filter: blur(10px);
  z-index:10;
}
.nav{ display:flex; gap:10px; margin-left:auto; margin-right:auto; }
.navlink{
  background: transparent;
  color: rgba(255,255,255,.82);
  border: 1px solid transparent;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
}
.navlink.active{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
.top-actions{ display:flex; gap:10px; }
.chip{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  cursor:pointer;
}
.chip.danger{ background: rgba(255,92,122,.12); border-color: rgba(255,92,122,.35) }

.content{
  padding: 18px;
  max-width: 1150px;
  margin: 0 auto;
}
.view{ display:block; }

.stats{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:12px;
  margin-bottom:12px;
}
.stat{ padding:14px }
.stat .label{ font-size:12px; color:var(--muted) }
.stat .value{ font-size:28px; font-weight:900; margin-top:6px }
.value.warn{color:var(--warn)}
.value.bad{color:var(--bad)}
.value.info{color:var(--info)}

.card-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding: 14px 14px 10px;
}
.row{display:flex; gap:10px; align-items:center}
.right{text-align:right}

.table-wrap{ overflow:auto; border-top:1px solid rgba(255,255,255,.08) }
.table{ width:100%; border-collapse:collapse; min-width: 860px; }
th, td{ padding: 12px 12px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align:top }
th{ font-size:12px; color:rgba(255,255,255,.70); text-transform:uppercase; letter-spacing:.6px; }
td b{ font-weight:900 }

.badge{
  display:inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.badge.good{ border-color: rgba(66,230,164,.35); background: rgba(66,230,164,.12) }
.badge.warn{ border-color: rgba(255,209,102,.35); background: rgba(255,209,102,.12) }
.badge.bad{ border-color: rgba(255,92,122,.35); background: rgba(255,92,122,.12) }
.badge.info{ border-color: rgba(87,166,255,.35); background: rgba(87,166,255,.12) }
.badge.neutral{ opacity:.85 }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.pad{ padding:14px }
.list{ margin-top:12px; display:flex; flex-direction:column; gap:10px }
.item{
  display:flex; justify-content:space-between; align-items:flex-start; gap:10px;
  padding:12px; border:1px solid rgba(255,255,255,.08);
  border-radius:14px; background: rgba(0,0,0,.20);
}
.item .meta{ font-size:12px; color:var(--muted); margin-top:4px }

.modal{ position:fixed; inset:0; display:grid; place-items:center; z-index:50; }
.backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.55); }
.modal-card{
  position:relative;
  width:min(720px, 92vw);
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  box-shadow: 0 18px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
}
.modal-head{
  display:flex; justify-content:space-between; align-items:flex-start;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.modal-title{ font-weight:900; font-size:16px }
.modal-body{ padding:14px }
.modal-foot{
  padding:14px;
  display:flex; justify-content:flex-end; gap:10px;
  border-top:1px solid rgba(255,255,255,.10);
}
.x{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  border-radius: 12px;
  padding: 6px 10px;
  cursor:pointer;
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.60);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  z-index: 70;
  max-width: 90vw;
}
.toast small{ display:block; color: var(--muted); margin-top:3px }

@media (max-width: 980px){
  .stats{ grid-template-columns: 1fr 1fr }
  .nav{ display:none }
  .grid2{ grid-template-columns: 1fr }
  .table{ min-width: 920px }
}
