/* =========================================================
   BEC — Stylish Sidebar (glass + glow)  ·  sidebar-stylish.css
   Loads LAST. Pure CSS: no change to menu clicks or logic.
   ========================================================= */
html body.pd-v2 .bec-sidebar{
  --s-cyan:34,211,238; --s-blue:59,130,246; --s-violet:139,92,246; --s-pink:236,72,153;
  --s-text:#c3d0ee; --s-mute:#7385ad;
  background:
    radial-gradient(120% 38% at 0% 0%, rgba(var(--s-cyan),.20), transparent 62%),
    radial-gradient(110% 34% at 100% 100%, rgba(var(--s-violet),.24), transparent 64%),
    linear-gradient(190deg,#0d1a3c 0%,#0a1431 52%,#070e24 100%) !important;
  border-inline-end:0 !important;
  box-shadow:12px 0 44px rgba(2,8,28,.45) !important;
  isolation:isolate;
}
/* glowing gradient edge line */
html body.pd-v2 .bec-sidebar::after{
  content:"";position:absolute;inset-block:0;right:0;width:1px;pointer-events:none;
  background:linear-gradient(180deg,rgba(var(--s-cyan),.7),rgba(var(--s-violet),.25) 45%,rgba(var(--s-pink),.55));
  opacity:.75;
}

/* ---------- Brand ---------- */
html body.pd-v2 .bec-sidebar .bec-brand{
  height:92px!important;padding:0 18px!important;gap:13px!important;position:relative;
  background:linear-gradient(180deg,rgba(255,255,255,.06),transparent)!important;
  border-bottom:1px solid rgba(255,255,255,.07)!important;
}
html body.pd-v2 .bec-sidebar .bec-brand::after{
  content:"";position:absolute;inset-inline:18px;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(var(--s-cyan),.7),rgba(var(--s-pink),.6),transparent);
}
html body.pd-v2 .bec-sidebar .bec-logo{
  width:50px!important;height:50px!important;flex-basis:50px!important;border-radius:16px!important;padding:4px!important;
  background:#fff!important;
  box-shadow:0 0 0 2px rgba(var(--s-cyan),.85),0 0 0 5px rgba(var(--s-cyan),.16),0 8px 22px rgba(var(--s-cyan),.40)!important;
  transition:transform .35s cubic-bezier(.2,.9,.3,1.3);
}
html body.pd-v2 .bec-sidebar .bec-brand:hover .bec-logo{transform:rotate(-6deg) scale(1.06)}
html body.pd-v2 .bec-sidebar .pd-brand-text b{
  font-size:27px;letter-spacing:1.5px;color:transparent!important;text-shadow:none!important;
  background:linear-gradient(90deg,#fff 10%,#a5f3fc 55%,#c4b5fd);-webkit-background-clip:text;background-clip:text;
}
html body.pd-v2 .bec-sidebar .pd-brand-text span{
  font-size:11.5px;letter-spacing:.22em;text-transform:uppercase;color:var(--s-mute)!important;text-shadow:none!important;
}

/* ---------- Nav ---------- */
html body.pd-v2 .bec-sidebar .bec-nav{padding:8px 12px 18px!important;gap:4px!important}

html body .bec-sidebar .bm-group{
  padding:18px 10px 7px;font-size:10.5px;font-weight:800;letter-spacing:.14em;color:var(--s-mute);gap:9px;
}
html body .bec-sidebar .bm-group::before{
  content:"";width:6px;height:6px;border-radius:50%;order:2;flex:none;
  background:linear-gradient(135deg,rgb(var(--s-cyan)),rgb(var(--s-violet)));box-shadow:0 0 10px rgba(var(--s-cyan),.8);
}
html body .bec-sidebar .bm-group::after{background:linear-gradient(90deg,rgba(255,255,255,.12),transparent)!important;order:1}
html body .bec-sidebar .bm-group span{order:0}

/* per-item accent colour (taken from the onclick, so no JS needed) */
html body.pd-v2 .bec-sidebar .bec-nav-item{--c:99,140,246}
.bec-sidebar [onclick^="backToDashboard"]{--c:56,189,248}
.bec-sidebar [onclick^="openStudents"]{--c:59,130,246}
.bec-sidebar [onclick^="openStudentPerformance"]{--c:99,102,241}
.bec-sidebar [onclick^="openCourses"]{--c:168,85,247}
.bec-sidebar [onclick^="openClasses"]{--c:20,184,166}
.bec-sidebar [onclick^="openAttendance"]{--c:34,197,94}
.bec-sidebar [onclick^="openExams"]{--c:245,158,11}
.bec-sidebar [onclick^="openCertificates"]{--c:250,204,21}
.bec-sidebar [onclick^="openLibrary"]{--c:249,115,22}
.bec-sidebar [onclick^="openParents"]{--c:236,72,153}
.bec-sidebar [onclick^="openTeachers"]{--c:139,92,246}
.bec-sidebar [onclick^="openTeacherPerformance"]{--c:217,70,239}
.bec-sidebar [onclick^="openRelations"]{--c:244,63,94}
.bec-sidebar [onclick^="openFees"]{--c:16,185,129}
.bec-sidebar [onclick^="openFinance"]{--c:132,204,22}
.bec-sidebar [onclick^="openReports"]{--c:6,182,212}
.bec-sidebar [onclick^="openSettings"]{--c:148,163,184}

html body.pd-v2 .bec-sidebar .bec-nav-item{
  min-height:48px;padding:7px 10px!important;border-radius:15px!important;gap:12px;
  font-size:14.5px!important;font-weight:700;color:var(--s-text)!important;overflow:visible;
  background:transparent!important;
  transition:background .25s ease,color .25s ease,transform .25s cubic-bezier(.2,.9,.3,1.2),box-shadow .25s ease!important;
  animation:bsIn .5s cubic-bezier(.2,.9,.3,1) both;
}
html body.pd-v2 .bec-sidebar .bec-nav-item .bm-ic{
  flex:0 0 36px!important;width:36px!important;height:36px!important;padding:8px;border-radius:12px;
  color:rgb(var(--c))!important;
  background:linear-gradient(140deg,rgba(var(--c),.20),rgba(var(--c),.06))!important;
  box-shadow:inset 0 0 0 1px rgba(var(--c),.22)!important;
  transition:transform .3s cubic-bezier(.2,.9,.3,1.4),background .25s,color .25s,box-shadow .25s!important;
}
/* hover */
html body.pd-v2 .bec-sidebar .bec-nav-item:hover{
  background:linear-gradient(90deg,rgba(var(--c),.12),rgba(255,255,255,.03))!important;
  color:#fff!important;transform:translateX(-3px)!important;
}
html body.pd-v2.bec-english .bec-sidebar .bec-nav-item:hover{transform:translateX(3px)!important}
html body.pd-v2 .bec-sidebar .bec-nav-item:hover .bm-ic{
  transform:scale(1.1) rotate(-5deg);
  background:linear-gradient(140deg,rgba(var(--c),.38),rgba(var(--c),.14))!important;
  box-shadow:inset 0 0 0 1px rgba(var(--c),.5),0 6px 16px rgba(var(--c),.30)!important;color:#fff!important;
}
/* selected */
html body.pd-v2 .bec-sidebar .bec-nav-item.selected{
  color:#fff!important;transform:none!important;
  background:linear-gradient(90deg,rgba(var(--c),.30),rgba(var(--c),.06) 70%,transparent)!important;
  box-shadow:inset 0 0 0 1px rgba(var(--c),.38),0 10px 26px -10px rgba(var(--c),.65)!important;
}
html body.pd-v2 .bec-sidebar .bec-nav-item.selected .bm-ic{
  color:#fff!important;transform:none;
  background:linear-gradient(135deg,rgb(var(--c)),rgba(var(--c),.55))!important;
  box-shadow:0 8px 18px rgba(var(--c),.55),inset 0 1px 0 rgba(255,255,255,.35)!important;
}
html body.pd-v2 .bec-sidebar .bec-nav-item.selected:before{
  content:"";position:absolute;inset-block:20%;right:-12px;left:auto;width:4px;border-radius:4px 0 0 4px;
  background:linear-gradient(180deg,rgb(var(--c)),rgba(var(--c),.4));box-shadow:0 0 14px rgb(var(--c)),0 0 26px rgba(var(--c),.6);
}
/* little glowing dot on active item */
html body.pd-v2 .bec-sidebar .bec-nav-item.selected:after{
  content:"";flex:none;width:7px;height:7px;border-radius:50%;order:3;margin-inline-start:auto;
  background:rgb(var(--c));box-shadow:0 0 0 3px rgba(var(--c),.22),0 0 12px rgb(var(--c));animation:bsPulse 2.2s ease-in-out infinite;
}
html body.pd-v2 .bec-sidebar .bec-nav-item:focus-visible{outline:2px solid rgb(var(--c))!important;outline-offset:2px}

/* sub items */
html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem{
  width:calc(100% - 26px)!important;margin-inline-start:26px!important;min-height:42px;font-size:13.5px!important;
  border-inline-start:0!important;border-radius:13px!important;
}
html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem::before{
  content:"";position:absolute;inset-inline-start:-15px;top:-8px;height:calc(50% + 8px);width:12px;
  border-bottom:1.5px solid rgba(255,255,255,.18);border-inline-start:1.5px solid rgba(255,255,255,.18);
  border-end-start-radius:10px;border-radius:0 0 0 10px;pointer-events:none;background:none;box-shadow:none;
}
html body.pd-v2:not(.bec-english) .bec-sidebar .bec-nav-item.bec-nav-subitem::before{border-radius:0 0 10px 0;inset-inline-start:auto;right:-15px}
html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem.selected:before{inset-block:20%;right:-38px}
html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem .bm-ic{flex-basis:30px!important;width:30px!important;height:30px!important;padding:7px;border-radius:10px}

/* ---------- Footer card ---------- */
html body.pd-v2 .bec-sidebar .pd-sidefoot{
  margin:auto 12px 14px;padding:12px;gap:4px;border-radius:20px;border-top:0;
  background:linear-gradient(160deg,rgba(255,255,255,.09),rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.10);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  box-shadow:0 14px 30px -14px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.08);
}
html body.pd-v2 .bec-sidebar .pd-online{padding:6px 10px;font-size:13px;color:#e8f0ff;gap:10px}
html body.pd-v2 .bec-sidebar .pd-online i{position:relative}
html body.pd-v2 .bec-sidebar .pd-online i.on{animation:bsPulse 2s ease-in-out infinite}
html body.pd-v2 .bec-sidebar .pd-sidebtn{
  padding:9px 10px;border-radius:12px;font-size:13.5px;gap:12px;color:#cdd9f3!important;
  transition:background .2s,color .2s,transform .2s;
}
html body.pd-v2 .bec-sidebar .pd-sidebtn svg{width:20px;height:20px}
html body.pd-v2 .bec-sidebar .pd-sidebtn:hover{background:rgba(var(--s-blue),.18)!important;color:#fff!important}
html body.pd-v2 .bec-sidebar .pd-out{border-top:1px solid rgba(255,255,255,.08);border-radius:12px;margin-top:4px;padding-top:9px}
html body.pd-v2 .bec-sidebar .pd-out:hover{background:rgba(244,63,94,.20)!important;color:#fecdd3!important}
html body.pd-v2 .bec-sidebar .pd-ver{padding:2px 10px;font-size:11px;color:var(--s-mute);letter-spacing:.04em}

/* ---------- Scrollbar ---------- */
html body .bec-sidebar{scrollbar-width:thin;scrollbar-color:rgba(var(--s-cyan),.35) transparent}
html body .bec-sidebar::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(34,211,238,.45),rgba(139,92,246,.45))}

/* ---------- Animations ---------- */
@keyframes bsIn{from{opacity:0;transform:translateX(-14px)}to{opacity:1;transform:none}}
@keyframes bsPulse{0%,100%{opacity:1}50%{opacity:.45}}
.bec-sidebar .bec-nav>*:nth-child(1){animation-delay:.02s}.bec-sidebar .bec-nav>*:nth-child(2){animation-delay:.05s}
.bec-sidebar .bec-nav>*:nth-child(3){animation-delay:.08s}.bec-sidebar .bec-nav>*:nth-child(4){animation-delay:.11s}
.bec-sidebar .bec-nav>*:nth-child(5){animation-delay:.14s}.bec-sidebar .bec-nav>*:nth-child(6){animation-delay:.17s}
.bec-sidebar .bec-nav>*:nth-child(7){animation-delay:.20s}.bec-sidebar .bec-nav>*:nth-child(8){animation-delay:.23s}
.bec-sidebar .bec-nav>*:nth-child(n+9){animation-delay:.26s}
@media (prefers-reduced-motion:reduce){
  html body.pd-v2 .bec-sidebar *{animation:none!important;transition:none!important}
}

/* ---------- Phones / tablets ---------- */
@media(max-width:900px){
  html body.pd-v2 .bec-sidebar::after{display:none}
  html body.pd-v2 .bec-sidebar .bec-nav-item,html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem{
    min-height:46px;padding:6px 8px!important;gap:8px;border-radius:14px!important;
    background:rgba(255,255,255,.04)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)!important;
  }
  html body.pd-v2 .bec-sidebar .bec-nav-item .bm-ic,html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem .bm-ic{flex-basis:30px!important;width:30px!important;height:30px!important;padding:6px;border-radius:10px}
  html body.pd-v2 .bec-sidebar .bec-nav-item.bec-nav-subitem::before,
  html body.pd-v2 .bec-sidebar .bec-nav-item.selected:before,
  html body.pd-v2 .bec-sidebar .bec-nav-item.selected:after{display:none}
  html body.pd-v2 .bec-sidebar .bec-nav-item:hover{transform:none!important}
}
@media print{html body .bec-sidebar{display:none!important}}
