/* BEC security UI */
.bec-login-card form,.bec-login-card .bec-sec-form{margin:0}
.bec-login-link{display:block;margin:14px auto 0;background:none;border:0;color:#176b49;cursor:pointer;font-size:13px;text-decoration:underline}
.bec-login-card small.hint{display:block;color:#6c7d73;font-size:12px;line-height:1.7;margin-top:8px}
.bec-reckey{direction:ltr;text-align:center;font:700 20px/1.6 monospace;letter-spacing:2px;background:#eef5ef;border:2px dashed #26805a;border-radius:12px;padding:14px;margin:14px 0;user-select:all;word-break:break-all}
.bec-ack{display:flex!important;align-items:center;gap:8px;font-weight:600!important}
.bec-ack input{width:auto!important;height:auto!important}
.bec-sec-btn-top{border:0;border-radius:9px;background:#e4f1ea;color:#176b49;padding:8px 12px;cursor:pointer;font-weight:700;margin-inline:6px}
.bec-sec-overlay{position:fixed;inset:0;z-index:100000;background:rgba(10,30,22,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.bec-sec-box{position:relative;width:min(100%,620px);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;padding:22px 24px;box-shadow:0 20px 60px rgba(0,0,0,.35);font-family:Arial,'Noto Naskh Arabic',sans-serif;color:#17352a}
.bec-sec-box h2{margin:0 0 14px;font-size:21px}
.bec-sec-x{position:absolute;top:12px;left:14px;border:0;background:#eef2ef;border-radius:8px;width:32px;height:32px;cursor:pointer}
.bec-sec-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.bec-sec-tabs button{border:1px solid #d7e5dc;background:#f6faf7;border-radius:9px;padding:7px 12px;cursor:pointer;font-weight:700;color:#244c39}
.bec-sec-tabs button.on{background:#176b49;color:#fff;border-color:#176b49}
.bec-sec-pane label{display:block;font-weight:700;font-size:14px;margin:12px 0 6px}
.bec-sec-pane input,.bec-sec-pane select{display:block;width:100%;height:42px;margin-top:6px;border:1px solid #dce7df;border-radius:10px;padding:0 11px;background:#f9fcfa;font-size:14px}
.bec-sec-pane small,.bec-sec-pane p{display:block;color:#5d6f64;font-size:12.5px;line-height:1.8;margin:8px 0}
.bec-sec-btn{margin:12px 6px 0 0;border:0;border-radius:10px;background:#176b49;color:#fff;padding:10px 16px;font-weight:800;cursor:pointer}
.bec-sec-btn.alt{background:#e4f1ea;color:#176b49}
.bec-sec-msg{margin-top:10px;font-size:13px;line-height:1.7}
.bec-sec-reckey{direction:ltr;font:700 18px monospace;margin-top:8px;user-select:all}
.bec-sec-log{max-height:320px;overflow:auto;border:1px solid #e3ece6;border-radius:10px}
.bec-sec-log table{width:100%;border-collapse:collapse;font-size:12.5px}.bec-sec-log td{padding:6px 9px;border-bottom:1px solid #eef3ef}

/* ===== Facebook-style login / signup + accounts ===== */
.bec-login-screen{background:#f0f2f5!important;overflow:auto;align-items:flex-start!important}
.bec-login-decoration{display:none}
.bec-fb-wrap{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:56px;width:min(100%,980px);margin:auto;padding:24px 0}
.bec-login-hero{flex:1;text-align:right;max-width:430px}
.bec-login-hero img{width:92px;height:92px;object-fit:contain;border-radius:22px;background:#fff;padding:8px;box-shadow:0 4px 14px rgba(0,0,0,.08)}
.bec-login-hero .bec-login-kicker{text-align:right;margin-top:14px}
.bec-login-hero h2{font-size:32px;line-height:1.5;color:#153d2c;margin:8px 0}
.bec-login-hero p{font-size:17px;line-height:1.9;color:#4a5b52;margin:0}
.bec-login-card{width:min(100%,420px)!important;border:0!important;box-shadow:0 2px 6px rgba(0,0,0,.1),0 8px 24px rgba(0,0,0,.1)!important;border-radius:14px!important;padding:22px 22px 16px!important}
.bec-login-card h1{font-size:23px!important;margin:4px 0}.bec-login-subtitle{margin-bottom:16px!important;font-size:13px!important}
.bec-login-card select{width:100%;height:46px;border:1px solid #dce7df;border-radius:10px;background:#f9fcfa;padding:0 10px;font-size:14px}
#becFormLogin input{margin-bottom:12px}#becFormLogin .bec-password-wrap input{margin-bottom:0}
.bec-login-submit{margin-top:14px!important}
.bec-green{background:linear-gradient(100deg,#2a9d3c,#36b24a)!important;box-shadow:none!important}
.bec-sep{border:0;border-top:1px solid #dadde1;margin:18px 0 4px}
.bec-photo-pick{text-align:center;margin-bottom:6px}
.bec-photo-circle{display:flex!important;align-items:center;justify-content:center;width:92px;height:92px;margin:0 auto 4px!important;border-radius:50%;background:#e4e6eb;border:2px dashed #9aa6a0;cursor:pointer;font-size:30px;overflow:hidden}
.bec-photo-circle img{width:100%;height:100%;object-fit:cover}
.bec-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;vertical-align:middle;margin-inline:6px}
.bec-avatar.ph{display:inline-flex;align-items:center;justify-content:center;background:#e4e6eb}
.bec-ulist{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.bec-urow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px;border:1px solid #e3ece6;border-radius:12px}
.bec-urow .bec-avatar{width:40px;height:40px;margin:0}.bec-uinfo{flex:1;min-width:130px}.bec-uinfo b,.bec-uinfo small{display:block}
.bec-urow select{width:auto!important;height:34px!important;margin:0!important}
.bec-urow button{border:0;border-radius:8px;padding:6px 10px;cursor:pointer;background:#e4f1ea;color:#176b49;font-weight:700}
.bec-urow button[data-a="del"]{background:#fce8e6;color:#9d302a}
.bec-st{font-size:12px;font-weight:800;padding:3px 9px;border-radius:99px}.bec-st.active{background:#dff3e5;color:#176b35}.bec-st.pending{background:#fff3cd;color:#8a6500}.bec-st.disabled{background:#fce8e6;color:#9d302a}
@media(max-width:820px){.bec-fb-wrap{flex-direction:column;gap:16px}.bec-login-hero{text-align:center}.bec-login-hero .bec-login-kicker{text-align:center}.bec-login-hero h2{font-size:22px}.bec-login-hero p{display:none}.bec-login-hero img{width:64px;height:64px}}

/* ===== role-based UI ===== */
body.bec-role-editor :is([onclick^="delete"],[onclick^="libDelete"],.delete-btn,.par-danger,.tch-danger){display:none!important}
body.bec-role-viewer :is([onclick^="save"],[onclick^="delete"],[onclick^="edit"],[onclick^="libSave"],[onclick^="libDelete"],[onclick^="libEdit"],[onclick^="libReturn"],[onclick^="setAll"],.delete-btn,.edit-btn,.par-danger,.tch-danger){display:none!important}
body.bec-role-viewer::after{content:"👁 یوازې لیدل (Viewer)";position:fixed;bottom:12px;left:12px;z-index:9000;background:#176b49;color:#fff;padding:6px 14px;border-radius:99px;font:700 12px Arial,sans-serif;opacity:.9;pointer-events:none}

/* ===== user card, role badge, welcome, meter ===== */
.bec-rolebadge{display:inline-block;font-size:11px;font-weight:800;padding:2px 9px;border-radius:99px;font-style:normal;margin-inline-start:6px;white-space:nowrap}
.bec-rolebadge.r-admin{background:#fde8e6;color:#b3261e}.bec-rolebadge.r-editor{background:#fff1cc;color:#8a5a00}.bec-rolebadge.r-viewer{background:#dff3e5;color:#176b35}
.bec-ucard{display:flex;align-items:center;gap:10px}.bec-ucard .bec-avatar{width:44px;height:44px;margin:0;flex:0 0 44px}
.bec-ucard.big .bec-avatar{width:64px;height:64px;flex-basis:64px;font-size:26px}.bec-ucard .bec-avatar.ph{font-weight:800;color:#fff;background:#26805a}
.bec-uc-t{display:flex;flex-direction:column;gap:3px;text-align:start}.bec-uc-t small{color:#6f84a3;word-break:break-all}
.bec-welcome{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 18px;padding:14px 18px;border-radius:16px;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.07);border:1px solid #e3ece6}
.bec-wtxt{font-weight:700;color:#244c39;font-size:15px;line-height:1.8}
.pd-uav{overflow:hidden}.pd-uav img{width:100%;height:100%;object-fit:cover}.pd-uav{font-weight:800}
.pd-uname{display:flex;align-items:center;gap:4px}
.pd-usermenu .pd-logged .bec-ucard{padding:4px 0}
.bec-meter{height:6px;background:#e4e6eb;border-radius:99px;margin-top:6px;overflow:hidden}.bec-meter i{display:block;height:100%;width:0;transition:.25s}
@media(max-width:820px){.pd-uname span{display:none}.pd-uname{display:flex!important}.pd-uname .bec-rolebadge{margin:0}}

/* settings page (inline panel) */
.bec-sec-inline .bec-sec-box{position:static;width:100%;max-width:900px;max-height:none;box-shadow:none;border:1px solid #e3ece6;margin:0 auto}
.bec-sec-inline .bec-sec-x{display:none}

/* student photo next to student selectors */
.bec-stu-card{display:flex;align-items:center;gap:12px;margin-top:8px;padding:8px 12px;border:1px solid #d7e5dc;border-radius:12px;background:#f6faf7}
.bec-stu-photo{width:64px;height:64px;border-radius:50%;object-fit:cover;object-position:center 12%;flex:0 0 64px;cursor:zoom-in;background:#e4e6eb;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.bec-stu-photo.ph{display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:800;color:#fff;background:#26805a;cursor:default}
.bec-stu-info{display:flex;flex-direction:column;gap:2px;min-width:0}.bec-stu-info b{font-size:15px;color:#153d2c}.bec-stu-info small{color:#5d6f64;font-size:12.5px}
.bec-stu-off{align-self:flex-start;background:#fce8e6;color:#9d302a;font-size:11px;font-weight:800;padding:2px 9px;border-radius:99px}.bec-stu-nophoto{color:#a06a00!important}
.bec-lightbox{position:fixed;inset:0;z-index:100001;background:rgba(0,0,0,.8);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#fff;font-weight:700;cursor:zoom-out}
.bec-lightbox img{max-width:min(90vw,520px);max-height:75vh;border-radius:16px;object-fit:contain;background:#fff}

/* ===== Post-login loader (advanced) ===== */
.bld{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:20px;overflow:hidden;color:#fff;isolation:isolate;font-family:Arial,"Noto Naskh Arabic",sans-serif;
  background:radial-gradient(60% 50% at 85% 8%,rgba(52,211,153,.28),transparent 60%),radial-gradient(50% 45% at 8% 92%,rgba(251,191,36,.14),transparent 60%),radial-gradient(45% 40% at 18% 14%,rgba(45,212,191,.2),transparent 60%),linear-gradient(160deg,#03120d 0%,#06261b 48%,#0b3d2b 100%);animation:bldIn .5s ease both}
.bld.bld-out{animation:bldOut .65s ease forwards}
@keyframes bldIn{from{opacity:0}to{opacity:1}}
@keyframes bldOut{to{opacity:0;transform:scale(1.03);filter:blur(4px)}}
.bld-grid{position:absolute;inset:0;z-index:-2;background-image:linear-gradient(rgba(52,211,153,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(52,211,153,.07) 1px,transparent 1px);background-size:44px 44px;-webkit-mask-image:radial-gradient(circle at 50% 45%,#000 5%,transparent 70%);mask-image:radial-gradient(circle at 50% 45%,#000 5%,transparent 70%);animation:bldGrid 8s linear infinite}
@keyframes bldGrid{to{background-position:44px 44px}}
.bld-glow{position:absolute;z-index:-1;border-radius:50%;filter:blur(70px);opacity:.45;animation:bldDrift 9s ease-in-out infinite alternate}
.bld-glow.g1{width:44vmax;height:44vmax;left:-14vmax;top:-14vmax;background:#10b981}
.bld-glow.g2{width:36vmax;height:36vmax;right:-12vmax;bottom:-12vmax;background:#fbbf24;opacity:.18;animation-delay:-3s}
@keyframes bldDrift{to{transform:translate(5vmax,-3vmax) scale(1.18)}}
.bld-parts i{position:absolute;bottom:-12px;width:6px;height:6px;border-radius:50%;background:#6ee7b7;box-shadow:0 0 10px #34d399;opacity:0;animation:bldRise linear infinite}
@keyframes bldRise{0%{transform:translateY(0);opacity:0}15%{opacity:.9}100%{transform:translateY(-105vh);opacity:0}}

.bld-card{position:relative;width:min(94vw,460px);padding:30px 26px 24px;text-align:center;border-radius:28px;
  background:linear-gradient(160deg,rgba(255,255,255,.10),rgba(255,255,255,.04));border:1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);box-shadow:0 30px 80px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.18);animation:bldCard .7s cubic-bezier(.2,.8,.2,1) both}
@keyframes bldCard{from{opacity:0;transform:translateY(24px) scale(.96)}to{opacity:1;transform:none}}
.bld-orb{position:relative;width:150px;height:150px;margin:0 auto 18px}
.bld-orb svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.bld-orb .trk{fill:none;stroke:rgba(255,255,255,.12);stroke-width:6}
.bld-orb .arc{fill:none;stroke:url(#bldGrad);stroke-width:6;stroke-linecap:round;stroke-dasharray:408;stroke-dashoffset:408;filter:drop-shadow(0 0 6px rgba(52,211,153,.9))}
.bld-orb .sweep{position:absolute;inset:-8px;border-radius:50%;border:2px dashed rgba(110,231,183,.35);animation:bldSpin 14s linear infinite}
.bld-orb .sweep.s2{inset:-18px;border-style:dotted;border-color:rgba(251,191,36,.3);animation-duration:22s;animation-direction:reverse}
@keyframes bldSpin{to{transform:rotate(360deg)}}
.bld-logo{position:absolute;inset:20px;display:grid;place-items:center;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.12),0 10px 30px rgba(0,0,0,.35);animation:bldPulse 2.4s ease-in-out infinite}
.bld-logo img{width:78%;height:78%;object-fit:contain;border-radius:50%}
@keyframes bldPulse{50%{transform:scale(1.05)}}
.bld-kicker{font-size:11px;letter-spacing:3px;font-weight:800;color:#6ee7b7;direction:ltr}
.bld-title{margin:6px 0 2px;font-size:clamp(22px,6vw,28px);font-weight:900;background:linear-gradient(90deg,#fff,#a7f3d0,#fde68a);-webkit-background-clip:text;background-clip:text;color:transparent}
.bld-sub{margin:0 0 20px;font-size:14px;color:rgba(255,255,255,.72)}
.bld-hello{display:inline-flex;align-items:center;gap:8px;margin:0 0 18px;padding:6px 14px;border-radius:999px;background:rgba(16,185,129,.18);border:1px solid rgba(110,231,183,.35);font-size:13px;font-weight:700;color:#d1fae5}
.bld-hello:empty{display:none}
.bld-pct{font-size:42px;font-weight:900;line-height:1;direction:ltr;letter-spacing:-1px;text-shadow:0 0 24px rgba(52,211,153,.7)}
.bld-pct small{font-size:20px;opacity:.7;margin-inline-start:2px}
.bld-bar{position:relative;direction:ltr;height:10px;margin:14px 0 18px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.bld-fill{height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#10b981,#34d399,#fbbf24);box-shadow:0 0 16px rgba(52,211,153,.8);position:relative;overflow:hidden}
.bld-fill::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%);transform:translateX(-100%);animation:bldShine 1.5s ease-in-out infinite}
@keyframes bldShine{to{transform:translateX(100%)}}
.bld-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;text-align:start}
.bld-list li{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid transparent;font-size:14px;color:rgba(255,255,255,.5);transition:all .4s ease}
.bld-list li .ic{flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;border:2px solid rgba(255,255,255,.25);font-size:12px;font-weight:900;transition:all .35s ease}
.bld-list li.act{color:#fff;background:rgba(16,185,129,.14);border-color:rgba(110,231,183,.35)}
.bld-list li.act .ic{border-color:#34d399;border-top-color:transparent;animation:bldSpin .8s linear infinite}
.bld-list li.done{color:rgba(255,255,255,.88)}
.bld-list li.done .ic{background:#10b981;border-color:#10b981;color:#fff;box-shadow:0 0 12px rgba(16,185,129,.7)}
.bld-list li.done .ic::before{content:"\2713"}
.bld-foot{margin-top:18px;font-size:11px;letter-spacing:2px;color:rgba(255,255,255,.4);direction:ltr}
@media (max-width:420px){.bld-card{padding:24px 16px 18px}.bld-orb{width:124px;height:124px}.bld-pct{font-size:36px}}
@media (prefers-reduced-motion:reduce){.bld *,.bld{animation-duration:.01s!important;animation-iteration-count:1!important}.bld-orb .sweep{animation:none!important}}

/* ---- Photo student picker ---- */
.bpk-native{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;border:0!important}
.bpk{position:relative;width:100%}
.bpk-btn{width:100%;display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid #c8d6cd;border-radius:10px;background:#fff;color:#153d2c;font:inherit;text-align:start;cursor:pointer;min-height:54px}
.bpk-btn:disabled{opacity:.6;cursor:not-allowed}.bpk-btn.open{border-color:#176b49;box-shadow:0 0 0 3px #176b4933}
.bpk-t{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.bpk-t b{font-size:15px;color:#153d2c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bpk-t small{font-size:12px;color:#5a6b61;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bpk-muted{color:#6b7a71!important;font-size:14px}.bpk-arrow{color:#176b49;font-size:14px}
.bpk-av{width:40px;height:40px;flex:0 0 40px;border-radius:50%;object-fit:cover;object-position:center 12%;border:2px solid #fff;box-shadow:0 1px 4px #0003;background:#e4e6eb}
.bpk-ph{display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;background:#176b49;font-size:18px}
.bpk-ph0{width:40px;height:40px;flex:0 0 40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#edf4ef;font-size:20px}
.bpk-pop{position:absolute;z-index:1000;inset-inline:0;top:calc(100% + 4px);background:#fff;border:1px solid #c8d6cd;border-radius:12px;box-shadow:0 12px 32px #0003;padding:8px}
.bpk-search{width:100%;padding:9px 11px;border:1px solid #c8d6cd;border-radius:8px;font:inherit;background:#fff!important;color:#153d2c!important;margin-bottom:6px}
.bpk-list{max-height:min(380px,55vh);overflow:auto}
.bpk-item{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:9px;cursor:pointer;color:#153d2c}
.bpk-item:hover{background:#eaf4ed}.bpk-item.sel{background:#d9efe1}
.bpk-tag{align-self:flex-start;font-size:11px;font-weight:800;padding:1px 8px;border-radius:99px;margin-top:2px}
.bpk-tag.free{background:#e0f2e7;color:#176b49}.bpk-tag.off{background:#fce8e6;color:#9d302a}
.bpk-empty{padding:14px;text-align:center;color:#6b7a71}
.bec-stu-card{display:none!important}
/* force readable colours inside the photo picker (neon theme overrides) */
.bpk .bpk-btn,.bpk .bpk-pop{background:#fff!important;color:#153d2c!important}
.bpk .bpk-t b,.bpk .bpk-item{color:#153d2c!important}
.bpk .bpk-t small{color:#4d5f55!important}
.bpk .bpk-t.bpk-muted,.bpk .bpk-muted{color:#6b7a71!important}
.bpk .bpk-item:hover{background:#eaf4ed!important}.bpk .bpk-item.sel{background:#d9efe1!important}
.bpk .bpk-search{background:#fff!important;color:#153d2c!important;border:1px solid #c8d6cd!important}
.bpk .bpk-tag.free{background:#e0f2e7!important;color:#176b49!important}.bpk .bpk-tag.off{background:#fce8e6!important;color:#9d302a!important}
.bpk .bpk-arrow{color:#176b49!important}
.bpk .bpk-t b,.bpk .bpk-t small{display:block}
