:root{
  --bg:#090c14;
  --bg-soft:#0f1322;
  --panel:#111625;
  --panel-2:#151b2e;
  --line:rgba(255,255,255,.07);
  --text:#f2f5ff;
  --muted:#99a4c3;
  --brand:#6d7cff;
  --brand-2:#8b5cf6;
  --green:#22c55e;
  --red:#fb7185;
  --yellow:#fbbf24;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,Arial,Helvetica,sans-serif;
  background:linear-gradient(180deg,#080b13,#0a0e18);
  color:var(--text);
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
.topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(8,11,19,.92);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
}
.container{width:min(1320px,calc(100% - 28px));margin:0 auto}
.topbar-inner{min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.brand{display:flex;align-items:center;gap:12px;font-weight:800}
.brand img{height:54px;width:auto}
.nav{display:flex;gap:18px;flex-wrap:wrap}
.nav a{color:var(--muted);font-weight:700}
.nav a:hover{color:var(--text)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:42px;padding:0 16px;border-radius:13px;
  border:1px solid var(--line);background:rgba(255,255,255,.03);font-weight:800;color:var(--text)
}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand-2));border:none}
.hero{padding:56px 0 34px}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:22px;align-items:center}
.badge{display:inline-flex;padding:8px 14px;border-radius:999px;background:rgba(255,255,255,.04);border:1px solid var(--line);font-weight:800}
.hero h1{font-size:clamp(40px,5vw,62px);line-height:1.04;margin:18px 0}
.lead{color:var(--muted);line-height:1.7;font-size:18px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.section{padding:34px 0}
.kicker{font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:#92a7ff;font-weight:800}
.cards-4,.cards-3,.grid-2,.grid-3{display:grid;gap:18px}
.cards-4{grid-template-columns:repeat(4,1fr)}
.cards-3,.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.card,.panel,.module-card,.action-card,.doc-card,.stat,.mini-panel{
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius:18px;
  padding:20px;
}
.card h3,.module-card h3,.doc-card h3,.panel h3{margin:0 0 10px}
.card p,.module-card p,.doc-card p,.panel p,.muted{margin:0;color:var(--muted);line-height:1.7}
.list{display:grid;gap:10px;margin-top:14px}
.row{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.03)}
.dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(135deg,var(--brand),#7ee7ff);margin-top:7px;flex:0 0 10px}
.footer{border-top:1px solid var(--line);padding:24px 0 36px;color:var(--muted)}

/* App */
.app-shell{display:grid;grid-template-columns:290px 1fr;min-height:100vh}
.sidebar{
  background:linear-gradient(180deg,#0c101c,#0b1019);
  border-right:1px solid var(--line);
  padding:18px;
  position:sticky;top:0;height:100vh;overflow:auto
}
.sidebar .brand{margin-bottom:16px}
.server-box{
  padding:14px;border-radius:18px;border:1px solid var(--line);
  background:rgba(255,255,255,.03);margin-bottom:16px
}
.server-chip{display:flex;gap:12px;align-items:center}
.server-avatar{
  width:46px;height:46px;border-radius:15px;
  display:grid;place-items:center;font-weight:900;
  background:linear-gradient(135deg,rgba(109,124,255,.3),rgba(139,92,246,.22))
}
.side-section{margin:20px 0 10px;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#7f8cb0;font-weight:800}
.sidebar-link{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:12px 14px;border-radius:14px;color:#dfe6ff;font-weight:800
}
.sidebar-link:hover,.sidebar-link.active{background:rgba(109,124,255,.11)}
.small-badge{
  display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;
  background:rgba(255,255,255,.06);color:#d5ddff
}
.main-content{padding:24px}
.breadcrumbs{color:var(--muted);font-size:14px;margin-bottom:10px}
.toolbar{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px
}
.toolbar h1{margin:8px 0 0;font-size:34px}
.toolbar-actions{display:flex;gap:12px;flex-wrap:wrap}
.metric-row{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:18px 0 26px}
.stat strong{display:block;font-size:28px;margin-top:8px}
.modules-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.module-card{
  min-height:138px;display:flex;flex-direction:column;justify-content:space-between;
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02))
}
.module-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.module-title{display:flex;gap:12px;align-items:flex-start}
.module-icon{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;
  background:rgba(255,255,255,.05);font-size:18px
}
.module-title h3{margin:0;font-size:18px}
.module-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.pill{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:34px;padding:0 12px;border-radius:999px;border:1px solid var(--line);
  color:#dde4ff;font-weight:800;background:rgba(255,255,255,.03);font-size:13px
}
.pill.danger{background:rgba(251,113,133,.1);color:#ffe4e6}
.pill.success{background:rgba(34,197,94,.1);color:#dcfce7}
.label-premium,.label-beta{
  display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800
}
.label-premium{background:rgba(251,191,36,.12);color:#fde68a}
.label-beta{background:rgba(251,113,133,.14);color:#fecdd3}
.module-sub{margin-top:6px;font-size:14px;color:var(--muted)}

.module-layout{display:grid;grid-template-columns:1fr 340px;gap:18px}
.tabs{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0 20px}
.tab{padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.03);font-weight:800;color:#dce4ff}
.tab.active{background:rgba(109,124,255,.14)}
.preview-table{width:100%;border-collapse:collapse;margin-top:14px}
.preview-table td,.preview-table th{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;color:var(--muted)}
.preview-table th{color:#eef2ff}
.action-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}
.action-card h3{margin-bottom:8px}
.form-row{display:grid;gap:12px;margin-top:14px}
.input, .select, .textarea{
  width:100%;border-radius:12px;border:1px solid var(--line);
  background:rgba(255,255,255,.03);color:var(--text);padding:12px 14px;outline:none
}
.textarea{min-height:130px;resize:vertical}
.status{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}
.status.green{background:rgba(34,197,94,.12);color:#dcfce7}
.status.yellow{background:rgba(251,191,36,.12);color:#fef3c7}
.status.red{background:rgba(251,113,133,.12);color:#ffe4e6}
.code{
  padding:14px 16px;border:1px solid var(--line);border-radius:14px;
  background:#090d17;color:#dce4ff;white-space:pre-wrap;font-family:ui-monospace,monospace
}
@media(max-width:1200px){
  .modules-grid{grid-template-columns:repeat(2,1fr)}
  .module-layout{grid-template-columns:1fr}
  .cards-4,.metric-row,.cards-3,.grid-3,.grid-2{grid-template-columns:1fr}
}
@media(max-width:980px){
  .hero-grid,.app-shell{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto;border-right:none;border-bottom:1px solid var(--line)}
}
@media(max-width:720px){
  .nav{display:none}
  .modules-grid{grid-template-columns:1fr}
  .main-content{padding:18px}
}
