:root{
  --bg0:#080214; --bg1:#0c0420; --bg2:#12062b;
  --card:rgba(18, 8, 43, .56);
  --border:rgba(200,120,255,.22);
  --text:#f3efff;
  --muted:rgba(233,224,255,.72);
  --glow:0 0 40px rgba(166,92,255,.22), 0 0 80px rgba(255,78,203,.12);
  --r:18px;

  --card2:rgba(12,4,32,.42);
  --border2:rgba(255,78,203,.16);
}
*{box-sizing:border-box}
body{
  margin:0; color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 50% 10%, rgba(166,92,255,.22), transparent 60%),
              radial-gradient(900px 500px at 50% 90%, rgba(255,78,203,.10), transparent 60%),
              linear-gradient(180deg, var(--bg0), var(--bg2));
  min-height:100vh;
}
.bg{
  position:fixed; inset:0; pointer-events:none; opacity:.55;
  background:
    radial-gradient(1200px 600px at 20% 20%, rgba(166,92,255,.16), transparent 60%),
    radial-gradient(900px 500px at 80% 70%, rgba(255,78,203,.10), transparent 60%);
}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  backdrop-filter: blur(14px);
  background: rgba(8,2,20,.58);
  border-bottom: 1px solid rgba(200,120,255,.12);
}
.brand{display:flex; gap:12px; align-items:center}
.logoBox{
  width:40px; height:40px; border-radius:12px;
  display:grid; place-items:center;
  background: rgba(18,8,43,.6);
  border:1px solid rgba(200,120,255,.22);
  box-shadow: var(--glow);
}
.logoBox img{width:26px; height:26px; object-fit:contain}
.brandName{
  font-weight:800;
  background: linear-gradient(90deg, #a65cff, #ff4ecb);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.brandSub{font-size:12px; color:var(--muted); margin-top:2px}
.right{display:flex; align-items:center; gap:10px}
.userchip{
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border-radius:999px;
  background: rgba(18,8,43,.40);
  border:1px solid rgba(200,120,255,.14);
}
.userchip img{width:28px;height:28px;border-radius:999px}
.u1{font-size:13px;font-weight:700}
.u2{font-size:12px;color:var(--muted); margin-top:2px}
.wrap{max-width:1100px; margin:26px auto; padding:0 18px}

.card{
  background: var(--card);
  border: 1px solid rgba(200,120,255,.18);
  border-radius: var(--r);
  padding:18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.card.glow{box-shadow: 0 12px 40px rgba(0,0,0,.35), var(--glow)}
.cardTop{display:flex; align-items:center; justify-content:space-between; gap:12px}
h1,h2{margin:0 0 10px 0}
.muted{color:var(--muted)}
.pill{
  font-size:12px; padding:6px 10px; border-radius:999px;
  border:1px solid rgba(200,120,255,.22);
  background: rgba(12,4,32,.35);
  color: var(--muted);
}
.pill.ok{border-color: rgba(120,255,200,.25); color: rgba(210,255,240,.9);}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:16px}
@media (max-width: 860px){ .grid2{grid-template-columns:1fr} }

.btnRow{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px; border-radius:14px;
  border:1px solid rgba(200,120,255,.22);
  text-decoration:none; color:var(--text);
  background: rgba(12,4,32,.40);
  cursor:pointer;
}
.btn:hover{filter:brightness(1.08)}
.btn.primary{
  background: linear-gradient(180deg, rgba(166,92,255,.35), rgba(255,78,203,.18));
  box-shadow: var(--glow);
}
.btn.ghost{background: rgba(12,4,32,.28)}
.btn.sm{padding:8px 10px; border-radius:12px; font-size:13px}
.hero{display:grid; place-items:center; min-height:54vh}
.heroCard{max-width:720px; width:100%}
.note{display:flex; align-items:center; gap:10px; margin-top:14px; color:var(--muted); font-size:13px}
.line{flex:1; height:1px; background: rgba(200,120,255,.22)}

.form{display:grid; gap:10px; margin-top:14px}
.lbl{font-size:12px; color:var(--muted)}
.in{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  background: rgba(12,4,32,.30);
  border:1px solid rgba(200,120,255,.16);
  color: var(--text);
  outline:none;
}
.in:focus{border-color: rgba(255,78,203,.30); box-shadow: 0 0 0 3px rgba(166,92,255,.12)}
.footer{
  opacity:.9;
  padding:18px;
  max-width:1100px;
  margin:24px auto;
  display:flex; justify-content:space-between; gap:14px;
  color: var(--muted);
}

/* =========================
   AAA APP LAYOUT (BOT PANEL)
   ========================= */
.appWrap{max-width:1400px; margin:22px auto; padding:0 18px;}
.appGrid{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:16px;
  align-items:start;
}
@media (max-width: 980px){
  .appGrid{grid-template-columns: 1fr;}
}

.sidebar{
  position: sticky;
  top: 78px;
  padding:16px;
  border:1px solid rgba(200,120,255,.18);
  background:
    radial-gradient(900px 380px at 50% 0%, rgba(166,92,255,.22), transparent 60%),
    linear-gradient(180deg, rgba(18,8,43,.70), rgba(12,4,32,.42));
}
.sideUser{
  display:flex; gap:12px; align-items:center;
  padding:10px;
  border-radius:16px;
  background: rgba(12,4,32,.35);
  border:1px solid rgba(200,120,255,.14);
}
.sideAvatar{
  width:44px; height:44px; border-radius:999px;
  border:1px solid rgba(255,78,203,.18);
  box-shadow: 0 0 0 4px rgba(166,92,255,.08);
  object-fit:cover;
}
.sideMeta{min-width:0}
.sideName{font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.sideRole{
  margin-top:2px;
  display:inline-flex;
  font-size:12px;
  color: rgba(230,220,255,.92);
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(200,120,255,.20);
  background: rgba(12,4,32,.28);
}
.sideDivider{
  margin:14px 4px;
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(200,120,255,.24), transparent);
}
.sideNav{display:flex; flex-direction:column; gap:8px;}
.sideSpacer{height:10px}

.navItem{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;
  color: var(--text);
  border:1px solid rgba(200,120,255,.14);
  background: rgba(12,4,32,.26);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease, background .12s ease;
}
.navItem:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
  border-color: rgba(255,78,203,.22);
  background: rgba(12,4,32,.32);
}
.navItem.active{
  background: linear-gradient(180deg, rgba(166,92,255,.30), rgba(255,78,203,.14));
  border-color: rgba(255,78,203,.26);
  box-shadow: 0 0 0 4px rgba(166,92,255,.08), var(--glow);
}
.navItem.disabled{
  opacity:.55;
  cursor:not-allowed;
}
.navItem.danger{
  border-color: rgba(255,120,120,.22);
  background: rgba(60,10,20,.22);
}
.navLabel{font-weight:700; font-size:13px;}
.navTag{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(200,120,255,.20);
  background: rgba(12,4,32,.22);
  color: rgba(233,224,255,.78);
}
.sideFooter{
  margin-top:14px;
  font-size:12px;
  text-align:center;
  opacity:.85;
}

.content{
  min-height: 520px;
}
.contentTop{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.contentTitle{
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
  background: linear-gradient(90deg, #a65cff, #ff4ecb);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.contentSub{font-size:12px; margin-top:4px;}
.statusPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(200,120,255,.22);
  background: rgba(12,4,32,.30);
  color: rgba(233,224,255,.82);
}
.statusPill.ok{
  border-color: rgba(120,255,200,.25);
  color: rgba(210,255,240,.9);
}

.dashGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
@media (max-width: 1120px){
  .dashGrid{grid-template-columns: 1fr;}
}

.kpiCard{
  padding:16px;
  border-radius: var(--r);
  border:1px solid rgba(200,120,255,.18);
  background:
    radial-gradient(700px 280px at 30% 0%, rgba(166,92,255,.16), transparent 60%),
    linear-gradient(180deg, rgba(18,8,43,.62), rgba(12,4,32,.36));
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
.kpiTop{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.kpiLabel{font-size:12px; font-weight:700;}
.kpiTag{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(200,120,255,.18);
  background: rgba(12,4,32,.20);
  color: rgba(233,224,255,.74);
}
.kpiTag.ok{border-color: rgba(120,255,200,.25); color: rgba(210,255,240,.9);}
.kpiValue{
  margin-top:10px;
  font-size:30px;
  font-weight:950;
  letter-spacing:.3px;
}
.kpiSub{font-size:12px; margin-top:4px;}

.dash2{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:14px;
  margin-top:14px;
}
@media (max-width: 1120px){
  .dash2{grid-template-columns:1fr;}
}
.dashCard{padding:16px;}

.tbl{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin-top:12px;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(200,120,255,.14);
  background: rgba(12,4,32,.22);
}
.tbl th, .tbl td{
  padding:10px 12px;
  font-size:13px;
  border-bottom:1px solid rgba(200,120,255,.10);
}
.tbl th{
  text-align:left;
  color: rgba(233,224,255,.86);
  background: rgba(18,8,43,.38);
}
.tbl tr:last-child td{border-bottom:none}

.feed{display:grid; gap:10px; margin-top:10px;}
.feedItem{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(200,120,255,.14);
  background: rgba(12,4,32,.22);
}
.dot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(200,120,255,.45);
  box-shadow: 0 0 14px rgba(166,92,255,.22);
}
.dot.ok{
  background: rgba(120,255,200,.55);
  box-shadow: 0 0 14px rgba(120,255,200,.20);
}
