:root{
  --bg0:#060606;
  --bg1:#0b0b0b;

  --panel:#111111;
  --panel2:#141414;
  --card:#0f0f0f;

  --border:rgba(255,255,255,.10);
  --border2:rgba(255,255,255,.16);

  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --muted2:rgba(255,255,255,.46);

  --primary:#e6e6e6;
  --primary2:#bdbdbd;

  --good:#2dd4bf;
  --warn:#fbbf24;
  --bad:#fb7185;

  --shadow:0 18px 40px rgba(0,0,0,.55);
  --radius:18px;
  --radius2:14px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, 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: linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1200px;margin:0 auto;padding:22px}

.app{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
}

.sidebar{
  border-right:1px solid var(--border);
  padding:20px 18px;
  position:sticky;
  top:0;
  height:100vh;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 35%);
}

.main{
  padding:22px;
  min-width:0;
}

@media (max-width: 980px){
  .app{grid-template-columns:1fr}
  .sidebar{
    position:relative;
    height:auto;
    border-right:none;
    border-bottom:1px solid var(--border);
  }
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.logo{
  width:42px; height:42px; border-radius:14px;
  background: rgba(255,255,255,.06);
  padding:2px;
  box-shadow:0 10px 25px rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.16);
  display:flex;
  align-items:center;
  justify-content:center;
}

.logo img{
  width:100%;
  height:100%;
  border-radius:12px;
  object-fit: contain;
  background: transparent;
}

.brand h1{font-size:15px;margin:0;letter-spacing:.6px}
.brand p{margin:2px 0 0 0;color:var(--muted);font-size:12px}

.nav{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}
.nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;
  border-radius:14px;
  color:var(--text);
  border:1px solid transparent;
}
.nav a .ic{
  width:18px;height:18px;opacity:.9;flex:none;
}
.nav a:hover{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.10);
  text-decoration:none;
}
.nav a.active{
  background: rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.18);
}

.side-footer{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.title h2{margin:0;font-size:20px;letter-spacing:.2px}
.title p{margin:6px 0 0 0;color:var(--muted);font-size:13px}
.actions{display:flex;gap:10px;flex-wrap:wrap}

.card{
  background: rgba(255,255,255,.03);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  min-width:0;
}

.card.soft{
  background: rgba(255,255,255,.02);
  box-shadow:none;
}

.grid{
  display:grid;
  gap:14px;
}
.grid.cols-2{grid-template-columns:1fr 1fr}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.grid.cols-4{grid-template-columns:repeat(4,1fr)}
@media (max-width: 980px){
  .grid.cols-4{grid-template-columns:repeat(2,1fr)}
  .grid.cols-3{grid-template-columns:repeat(2,1fr)}
}
@media (max-width: 640px){
  .grid.cols-4,.grid.cols-3,.grid.cols-2{grid-template-columns:1fr}
}

.stat{
  padding:14px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.stat .k{font-size:12px;color:var(--muted);margin:0}
.stat .v{font-size:24px;margin:6px 0 0 0}
.stat .hint{font-size:12px;color:var(--muted2);margin:6px 0 0 0}

.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  color:var(--text);
  background:rgba(255,255,255,.03);
}
.badge.good{border-color:rgba(45,212,191,.35);background:rgba(45,212,191,.10)}
.badge.warn{border-color:rgba(251,191,36,.35);background:rgba(251,191,36,.10)}
.badge.bad{border-color:rgba(251,113,133,.35);background:rgba(251,113,133,.10)}
.badge.neutral{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.06)}

.btn{
  display:inline-flex;
  width:100px;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border2);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.btn-label{white-space:nowrap;}
.btn:hover{background:rgba(255,255,255,.06)}
.btn.primary{
  border-color:rgba(255,255,255,.26);
  background: rgba(255,255,255,.12);
  box-shadow:0 14px 30px rgba(0,0,0,.28);
}
.btn.ghost{
  background:transparent;
  border-color:rgba(255,255,255,.14);
}
.btn.danger{
  border-color:rgba(251,113,133,.55);
  background:rgba(251,113,133,.12);
}
.btn.small{padding:8px 10px;border-radius:12px;font-size:12px}
.btn:disabled{opacity:.55;cursor:not-allowed}

.field{display:flex;flex-direction:column;gap:8px}
.label{
  font-size:12px;color:var(--muted);
  display:flex;justify-content:space-between;gap:10px;
}
.label span.small{color:var(--muted2);font-weight:500}
.input, .select, .textarea{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}
.input:focus, .select:focus, .textarea:focus{
  border-color:rgba(255,255,255,.32);
  box-shadow:0 0 0 4px rgba(255,255,255,.10);
}
.textarea{min-height:96px;resize:vertical}
.help{font-size:12px;color:var(--muted2);margin:0}

.filters{
  display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;
}
.filters .field{min-width:190px;flex:1}
@media (max-width:640px){
  .filters .field{min-width:unset}
}

.table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:auto;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
}
table{
  width:100%;
  border-collapse:collapse;
  min-width:860px;
}
th,td{
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  font-size:13px;
  vertical-align:top
}
th{
  position:sticky;
  top:0;
  background:rgba(10,10,10,.92);
  backdrop-filter: blur(10px);
  color:rgba(255,255,255,.82);
  font-size:12px;
  letter-spacing:.3px;
  text-transform:uppercase
}
tr:hover td{background:rgba(255,255,255,.03)}

.cell-muted{color:var(--muted)}
.cell-actions{display:flex;gap:8px;flex-wrap:wrap}
.chk{width:18px;height:18px}

.segment{
  display:flex;gap:8px;flex-wrap:wrap;
}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
  font-size:12px;color:var(--muted);
}
.pill strong{color:var(--text);font-weight:700}

.section-title{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:14px;margin:0 0 10px 0;
}
.section-title h3{margin:0;font-size:15px}
.section-title p{margin:0;color:var(--muted);font-size:12px}

.auth{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:22px;
}
.auth-card{
  width:min(560px, 100%);
  padding:18px;
  border-radius:24px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  box-shadow:var(--shadow);
}
.auth-head{
  display:flex;align-items:center;gap:12px;margin-bottom:12px;
}
.auth-head h2{margin:0;font-size:18px}
.auth-head p{margin:4px 0 0 0;color:var(--muted);font-size:13px}

.hr{height:1px;background:rgba(255,255,255,.10);margin:14px 0}
.right{margin-left:auto}
.m0{margin:0}
.mb8{margin-bottom:8px}
.mb12{margin-bottom:12px}
.mb16{margin-bottom:16px}
.mt8{margin-top:8px}
.mt12{margin-top:12px}
.note{
  font-size:12px;color:var(--muted);
  padding:10px 12px;border-radius:14px;
  border:1px dashed rgba(255,255,255,.18);
  background:rgba(255,255,255,.02);
}