:root{
  --bg:#050607;
  --panel:#0c0e10;
  --panel2:#0f1215;
  --line:rgba(255,255,255,.06);
  --text:#e7e7e7;
  --muted:#9aa0a6;
  --gold:#f2c94c;
  --gold2:#d39e00;
  --green:#14c38e;
  --red:#ff4d4d;
  --shadow:0 16px 48px rgba(0,0,0,.55);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(242,201,76,.12), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(20,195,142,.10), transparent 60%),
    var(--bg);
}

/* Layout */
.shell{display:flex; min-height:100vh}
.sidebar{
  width:280px; padding:18px 14px;
  border-right:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 25%), var(--panel);
}
.brand{display:flex; align-items:center; gap:12px; padding:10px 10px 18px}
.brand .logo{
  width:42px; height:42px; border-radius:14px;
  background:linear-gradient(135deg, rgba(242,201,76,.35), rgba(242,201,76,.08));
  border:1px solid rgba(242,201,76,.25);
  box-shadow:var(--shadow);
  display:grid; place-items:center;
  position:relative;
}
.brand .logo:after{content:""; position:absolute; inset:-1px; border-radius:14px; border:1px solid rgba(255,255,255,.08)}
.brand h1{margin:0; font-size:14px; letter-spacing:.08em; font-weight:800}
.brand small{color:var(--muted)}

.usercard{
  margin:0 8px 16px;
  padding:12px 12px;
  border-radius:18px;
  background:linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border:1px solid var(--line);
}
.usercard .role{display:inline-flex; align-items:center; gap:8px; font-size:12px; color:var(--muted)}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(242,201,76,.28);
  background:rgba(242,201,76,.08);
  color:var(--gold);
  font-weight:700; font-size:12px;
}

.nav{padding:6px}
.nav a{
  display:flex; align-items:center; gap:10px;
  padding:11px 12px;
  border-radius:14px;
  color:var(--muted);
  text-decoration:none;
  transition:transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  border:1px solid transparent;
}
.nav a:hover{transform:translateX(2px); color:var(--text); background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.06)}
.nav a.active{
  color:#0b0c0d;
  background:linear-gradient(90deg, var(--gold2), var(--gold));
  border-color:rgba(242,201,76,.45);
  box-shadow:0 12px 28px rgba(242,201,76,.18);
}
.nav .section{margin:14px 10px 8px; font-size:11px; letter-spacing:.12em; color:rgba(255,255,255,.35)}

.main{flex:1; padding:26px 26px 40px}
.topbar{display:flex; justify-content:space-between; align-items:center; margin-bottom:18px}
.status{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px; border-radius:999px;
  border:1px solid rgba(20,195,142,.22);
  background:rgba(20,195,142,.08);
  color:rgba(20,195,142,1);
  font-weight:800; letter-spacing:.06em; font-size:12px;
}
.dot{width:8px; height:8px; border-radius:99px; background:var(--green); box-shadow:0 0 0 6px rgba(20,195,142,.12)}

.h1{font-size:34px; margin:8px 0 6px; font-weight:900}
.h1 .gold{color:var(--gold)}
.sub{color:var(--muted); margin:0 0 18px}

.grid{display:grid; grid-template-columns:repeat(12, 1fr); gap:16px}
.card{
  grid-column:span 12;
  border-radius:22px;
  background:linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  overflow:hidden;
  animation:pop .28s ease both;
}
@keyframes pop{from{transform:translateY(10px); opacity:0}to{transform:translateY(0); opacity:1}}
.card .hd{padding:16px 18px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between}
.card .hd h2{margin:0; font-size:14px; letter-spacing:.08em; text-transform:uppercase; color:rgba(242,201,76,.9)}
.card .bd{padding:18px}

.kpi{display:flex; gap:14px; flex-wrap:wrap}
.kpi .box{flex:1; min-width:220px; padding:14px 14px; border-radius:18px; border:1px solid var(--line); background:rgba(0,0,0,.22)}
.kpi .box .n{font-size:28px; font-weight:900}
.kpi .box .l{color:var(--muted)}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover{transform:translateY(-1px); background:rgba(255,255,255,.05)}
.btn.gold{background:linear-gradient(90deg, var(--gold2), var(--gold)); border-color:rgba(242,201,76,.45); color:#0b0c0d; font-weight:900}
.btn.danger{border-color:rgba(255,77,77,.35); background:rgba(255,77,77,.10)}

.input, .select, .textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
  transition:border-color .16s ease, transform .16s ease;
}
.input:focus,.select:focus,.textarea:focus{border-color:rgba(242,201,76,.45)}
.textarea{min-height:120px; resize:vertical}
.row{display:grid; grid-template-columns:repeat(12,1fr); gap:12px}
.col-6{grid-column:span 6}
.col-12{grid-column:span 12}

.tabs{display:flex; gap:10px; margin:10px 0 12px}
.tab{
  flex:1;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:rgba(255,255,255,.65);
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, background .16s ease;
  text-align:center;
  user-select:none;
}
.tab:hover{transform:translateY(-1px)}
.tab.active{border-color:rgba(242,201,76,.45); background:rgba(242,201,76,.10); color:var(--gold); font-weight:900}

.badge{display:inline-flex; align-items:center; gap:8px; padding:7px 10px; border-radius:999px; font-weight:900; letter-spacing:.06em; font-size:11px; border:1px solid rgba(255,255,255,.10)}
.badge.ok{color:rgba(20,195,142,1); background:rgba(20,195,142,.10); border-color:rgba(20,195,142,.25)}
.badge.warn{color:var(--gold); background:rgba(242,201,76,.10); border-color:rgba(242,201,76,.28)}
.badge.bad{color:rgba(255,77,77,1); background:rgba(255,77,77,.10); border-color:rgba(255,77,77,.28)}

.table{width:100%; border-collapse:separate; border-spacing:0 10px}
.table th{color:rgba(255,255,255,.45); font-size:11px; text-transform:uppercase; letter-spacing:.10em; text-align:left; padding:0 10px}
.table td{padding:14px 10px; background:rgba(0,0,0,.22); border-top:1px solid rgba(255,255,255,.06); border-bottom:1px solid rgba(255,255,255,.06)}
.table tr td:first-child{border-left:1px solid rgba(255,255,255,.06); border-radius:14px 0 0 14px}
.table tr td:last-child{border-right:1px solid rgba(255,255,255,.06); border-radius:0 14px 14px 0}

@media (max-width:980px){
  .sidebar{display:none}
  .main{padding:18px}
  .col-6{grid-column:span 12}
}
