/* unified sidebar layout overrides */
body { padding-left:240px !important; box-sizing:border-box; }
#sidebar {
  position:fixed; top:0; left:0; width:240px; min-width:240px; height:100vh;
  z-index:1000; overflow-y:auto;
  background:#1A1D2E; color:#fff;
  font-family:'Inter',sans-serif; font-size:13px;
  display:flex; flex-direction:column;
}
#sidebar .nav-children.collapsed { display:none; }
/* Some standalones (subscription.html) layouts assumed their own sidebar's
   width as a left margin on their main element. Strip those so our fixed
   sidebar's body padding is the only horizontal offset. */
body > main, body > .main, body > .container, body > #main-content {
  margin-left:0 !important; width:auto !important;
}


#sidebar .sidebar-userbar {
  display:flex; align-items:center; gap:10px;
  padding:12px 16px;
  border-top:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.18);
}
#sidebar .sidebar-user-avatar {
  width:32px; height:32px; border-radius:50%;
  background:linear-gradient(135deg,#5B6EFF,#5B6EFF99);
  color:#fff; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:12px; overflow:hidden;
}
#sidebar .sidebar-user-avatar img {
  width:100%; height:100%; border-radius:50%; object-fit:cover;
}
#sidebar .sidebar-user-details { flex:1; min-width:0; }
#sidebar .sidebar-user-name {
  color:#fff; font-size:12px; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#sidebar .sidebar-user-role {
  color:rgba(255,255,255,0.55); font-size:10px; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-transform:uppercase; letter-spacing:0.3px; margin-top:1px;
}
#sidebar .sidebar-user-signout {
  background:rgba(239,68,68,0.10); color:#EF4444;
  border:1px solid rgba(239,68,68,0.30); border-radius:6px;
  width:30px; height:30px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; padding:0; transition:all .15s; flex-shrink:0;
}
#sidebar .sidebar-user-signout:hover {
  background:#EF4444; color:#fff; border-color:#EF4444;
}
/* User info now lives in the sidebar — hide the legacy topbar badge */
#topbar-user-badge { display:none !important; }

#sidebar { width:240px;min-width:240px;background:#1A1D2E;display:flex;flex-direction:column;height:100vh;overflow-y:auto; }
.sidebar-logo { padding:20px 20px 14px;border-bottom:1px solid rgba(255,255,255,0.08); }
.sidebar-logo .brand { color:#fff;font-size:15px;font-weight:700;letter-spacing:.5px; }
.sidebar-logo .brand span { color:#5B6EFF; }
.sidebar-logo .sub { color:rgba(255,255,255,0.4);font-size:11px;margin-top:2px; }
.nav-section { padding:16px 12px 0;flex:1; }
.nav-label { color:rgba(255,255,255,0.3);font-size:10px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;padding:0 8px;margin-bottom:8px; }
.nav-item { display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;cursor:pointer;color:rgba(255,255,255,0.6);font-size:13px;font-weight:500;transition:all .15s;margin-bottom:2px; }
.nav-item:hover { background:rgba(255,255,255,0.07);color:#fff; }
.nav-item.active { background:rgba(91,110,255,0.18);color:#fff; }
.nav-item.active i { color:#5B6EFF; }
.nav-item i { width:16px;text-align:center;font-size:13px; }
.sidebar-footer { padding:16px 20px;border-top:1px solid rgba(255,255,255,0.08); }
.sidebar-footer .lbl { color:rgba(255,255,255,0.35);font-size:10px; }
.sidebar-footer .val { color:rgba(255,255,255,0.55);font-size:11px;margin-top:2px; }
.sidebar-footer .hint { color:rgba(255,255,255,0.25);font-size:10px;margin-top:4px;font-style:italic; }
/* Revenue submenu */
.nav-children { padding-left:18px; margin:-2px 0 4px; }
.nav-child { display:flex; align-items:center; gap:8px; padding:6px 12px;
             border-radius:6px; cursor:pointer; color:rgba(255,255,255,.5);
             font-size:12px; font-weight:500; transition:all .15s; margin-bottom:1px; }
.nav-child:hover { color:#fff; background:rgba(255,255,255,.06); }
.nav-child.active { color:#5B6EFF; background:rgba(91,110,255,.14); font-weight:600; }
.child-dot { width:5px; height:5px; border-radius:50%; background:currentColor;
             flex-shrink:0; display:inline-block; }