:root{
  --bg:#0b1220;
  --panel:#0f1a2e;
  --panel2:#0c1628;
  --text:#e7eefc;
  --muted:#9bb0d1;
  --line:rgba(255,255,255,.08);
  --good:#2dd4bf;
  --warn:#fbbf24;
  --bad:#fb7185;
  --accent:#60a5fa;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius:18px;
  --radius2:14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background: radial-gradient(1200px 800px at 15% 5%, rgba(96,165,250,.25), transparent 60%),
              radial-gradient(900px 700px at 80% 20%, rgba(45,212,191,.18), transparent 55%),
              radial-gradient(800px 600px at 60% 85%, rgba(251,113,133,.14), transparent 55%),
              var(--bg);
}

a{color:inherit}

.app{
  height:100%;
  display:grid;
  grid-template-columns: 320px 1fr;
}

.sidebar{
  padding:24px;
  border-right:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 30%),
              rgba(15,26,46,.55);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12,22,40,.55);
  box-shadow: var(--shadow);
}
.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:800;
  background: linear-gradient(135deg, rgba(96,165,250,.8), rgba(45,212,191,.75));
  color:#0b1220;
}
.brand-title{font-size:16px;font-weight:800;letter-spacing:.2px}
.brand-sub{font-size:12px;color:var(--muted)}

.nav{margin-top:18px;display:flex;flex-direction:column;gap:8px}
.nav-item{
  text-decoration:none;
  padding:12px 14px;
  border-radius: 14px;
  border:1px solid transparent;
  color:var(--muted);
  background: rgba(12,22,40,.20);
}
.nav-item:hover{border-color:var(--line);color:var(--text)}
.nav-item.active{color:var(--text);border-color:rgba(96,165,250,.45);background: rgba(96,165,250,.12)}

.sidebar-footer{
  position:absolute;
  left:24px;
  right:24px;
  bottom:24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pill{
  padding:8px 10px;
  font-size:12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(12,22,40,.55);
  color:var(--muted);
}
.small{font-size:12px;color:var(--muted)}

.main{padding:26px}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.topbar h1{margin:0;font-size:26px}
.muted{color:var(--muted);font-size:13px}

.btn{
  cursor:pointer;
  border:1px solid rgba(96,165,250,.45);
  background: rgba(96,165,250,.15);
  color:var(--text);
  padding:10px 14px;
  border-radius: 12px;
  font-weight:700;
}
.btn:hover{background: rgba(96,165,250,.22)}

.btn-secondary{
  cursor:pointer;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 14px;
  border-radius: 12px;
  font-weight:700;
}
.btn-secondary:hover{background: rgba(255,255,255,.06)}

.input{
  border:1px solid var(--line);
  background: rgba(12,22,40,.45);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  min-width:260px;
}

.content{margin-top:20px}
.view.hidden{display:none}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}

.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15,26,46,.55);
  box-shadow: var(--shadow);
  padding:16px;
}
.card-title{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em}
.card-value{font-size:30px;margin-top:8px;font-weight:900}
.card-hint{margin-top:6px;font-size:12px;color:var(--muted)}

.panel{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15,26,46,.55);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panel.small-panel{margin-top:0}
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background: rgba(12,22,40,.35);
}
.panel-title{font-weight:900}
.panel-actions{display:flex;gap:10px;align-items:center}

.table{display:flex;flex-direction:column}
.row{
  display:grid;
  grid-template-columns: 1.2fr .6fr .6fr auto;
  gap:10px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  align-items:center;
}
.row.header{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.10em}
.row:last-child{border-bottom:none}
.row.clickable{cursor:pointer}
.row.clickable:hover{background: rgba(255,255,255,.03)}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--line);
  color:var(--muted);
}
.badge.good{border-color:rgba(45,212,191,.35);color:rgba(45,212,191,.95)}
.badge.warn{border-color:rgba(251,191,36,.35);color:rgba(251,191,36,.95)}
.badge.bad{border-color:rgba(251,113,133,.35);color:rgba(251,113,133,.95)}

.details-grid{
  padding:16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
.details-card{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: rgba(12,22,40,.35);
  padding:12px;
}
.details-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.10em}
.details-value{margin-top:8px;font-weight:800}
.details-badge{margin-top:8px;display:inline-flex}

.split{
  padding:16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.code{
  margin:0;
  padding:14px 16px;
  overflow:auto;
  max-height:420px;
  font-size:12px;
  border-top:1px solid var(--line);
  background: rgba(8,14,24,.55);
}

.fixes{padding:12px}
.fix{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding:12px;
  background: rgba(12,22,40,.35);
  margin-bottom:10px;
}
.fix-title{font-weight:900}
.fix-desc{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.35}
.fix-actions{margin-top:10px;display:flex;gap:10px;align-items:center}

.settings{padding:16px;display:flex;flex-direction:column;gap:12px}
.setting{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius: var(--radius2);padding:12px;background: rgba(12,22,40,.35)}
.setting-title{font-weight:900}

.toast{
  position:fixed;
  bottom:22px;
  right:22px;
  padding:12px 14px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(15,26,46,.85);
  box-shadow: var(--shadow);
  color:var(--text);
  display:none;
  max-width:520px;
}
.toast.show{display:block}

@media (max-width: 980px){
  .app{grid-template-columns:1fr}
  .sidebar{position:relative}
  .sidebar-footer{position:relative;left:auto;right:auto;bottom:auto;margin-top:16px}
  .grid{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
}
