/* BEC — د زده‌کوونکو د ثبت نوې صفحه */
.stu-newbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:16px 18px;margin:8px 0 16px;border-radius:18px;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;box-shadow:0 10px 26px rgba(37,99,235,.25)}
.stu-newbar h2{margin:0;color:#fff}.stu-newbar p{margin:4px 0 0;opacity:.9;font-size:13px}
.stu-new-btn{border:0;border-radius:14px;padding:13px 22px;font-size:16px;font-weight:800;font-family:inherit;color:#0f5132!important;background:#fff!important;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,.18);transition:transform .15s,box-shadow .15s;text-shadow:none!important}
.stu-new-btn:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(0,0,0,.25)}

.srg{--g1:#0f766e;--g2:#2563eb;--ink:#12302a;--mut:#64748b;--line:#e2e8f0;--soft:#f6f9fb;--ring:rgba(37,99,235,.16);color:var(--ink)}
.srg *{box-sizing:border-box}
.srg-top{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
/* ===== dashboard ===== */
.srg-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:14px}
.srg-kpi{position:relative;overflow:hidden;border-radius:18px;padding:14px 16px;color:#fff;display:flex;flex-direction:column;gap:2px;box-shadow:0 8px 20px rgba(20,40,90,.16);transition:transform .18s}
.srg-kpi:hover{transform:translateY(-3px)}
.srg-kpi:after{content:"";position:absolute;inset-inline-end:-22px;top:-22px;width:90px;height:90px;border-radius:50%;background:rgba(255,255,255,.14)}
.srg-kpi i{font-style:normal;font-size:20px;width:36px;height:36px;border-radius:12px;background:rgba(255,255,255,.22);display:grid;place-items:center;margin-bottom:6px}
.srg-kpi b{font-size:28px;line-height:1.1;font-weight:800}.srg-kpi small{opacity:.95;font-size:12.5px}
.k1{background:linear-gradient(135deg,#2563eb,#60a5fa)}.k2{background:linear-gradient(135deg,#15803d,#4ade80)}.k3{background:linear-gradient(135deg,#7c3aed,#a78bfa)}
.k4{background:linear-gradient(135deg,#ea580c,#fb923c)}.k5{background:linear-gradient(135deg,#0891b2,#22d3ee)}.k6{background:linear-gradient(135deg,#475569,#94a3b8)}
.srg-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:12px;margin-bottom:18px}
.srg-box{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:0 4px 14px rgba(20,40,90,.06);min-width:0}
.srg-box h4{margin:0 0 12px;color:var(--ink);font-size:14px}.srg-warn{color:#c2410c;font-weight:700}
.srg-trend{display:flex;align-items:flex-end;gap:8px;height:150px}
.srg-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:3px;min-width:0}
.srg-col span{width:70%;border-radius:8px 8px 0 0;background:linear-gradient(180deg,#2563eb,#38bdf8);min-height:3px}.srg-col em{font-style:normal;font-size:12px;font-weight:800;color:#1e3a8a}.srg-col small{font-size:10px;color:var(--mut);white-space:nowrap}
.srg-hbar{display:grid;grid-template-columns:minmax(70px,110px) 1fr auto;gap:8px;align-items:center;margin:7px 0;font-size:12.5px}
.srg-hbar>div{height:9px;background:#e9eef3;border-radius:99px;overflow:hidden}.srg-hbar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#16a34a,#4ade80)}.srg-hbar i.lo{background:linear-gradient(90deg,#ea580c,#fbbf24)}
.srg-gender{display:flex;height:36px;border-radius:12px;overflow:hidden;font-weight:800;color:#fff}.srg-gender div{display:flex;align-items:center;justify-content:center;min-width:36px}.srg-gender .m{background:#2563eb}.srg-gender .f{background:#db2777}
.srg-rec{display:flex;align-items:center;gap:10px;padding:7px 0;border-bottom:1px dashed var(--line)}.srg-rec:last-child{border:0}.srg-rec div{display:flex;flex-direction:column;min-width:0}.srg-rec small{color:var(--mut);font-size:11.5px}
.srg-ava{position:relative;flex:none;width:38px;height:38px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,#0f766e,#2563eb);display:grid;place-items:center}.srg-ava i{font-style:normal;color:#fff;font-weight:800}.srg-ava img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
/* ===== hero ===== */
.srg-hero{position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;padding:22px 24px;margin-bottom:14px;border-radius:22px;background:radial-gradient(circle at 85% 0%,rgba(255,255,255,.22),transparent 45%),linear-gradient(135deg,var(--g1),var(--g2));color:#fff;box-shadow:0 14px 30px rgba(15,118,110,.28)}
.srg-hero h2{margin:2px 0;color:#fff;font-size:24px}.srg-hero p{margin:4px 0 0;opacity:.93;font-size:13px;color:#fff}.srg-hero small{opacity:.85;letter-spacing:.6px;color:#fff}
.srg-prog{min-width:240px;display:flex;flex-direction:column;gap:7px}.srg-next{font-weight:800;background:rgba(255,255,255,.2);padding:5px 14px;border-radius:99px;align-self:flex-start;backdrop-filter:blur(6px)}
.srg-bar{height:10px;background:rgba(255,255,255,.28);border-radius:99px;overflow:hidden}.srg-bar i{display:block;height:100%;width:0;background:#fde68a;border-radius:99px;transition:width .3s}.srg-bar i.ok{background:#86efac}
/* ===== tabs ===== */
.srg-tabs{position:sticky;top:0;z-index:6;display:flex;gap:8px;overflow-x:auto;padding:8px;margin-bottom:14px;border-radius:16px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border:1px solid var(--line);box-shadow:0 6px 18px rgba(20,40,90,.08);scrollbar-width:none}
.srg-tabs::-webkit-scrollbar{display:none}
.srg-tabs a{flex:1;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 14px;border-radius:12px;color:var(--mut);text-decoration:none;font-weight:700;font-size:13.5px;transition:.15s}
.srg-tabs a i{font-style:normal}.srg-tabs a:hover{background:var(--soft)}
.srg-tabs a.on{color:#fff;background:linear-gradient(135deg,var(--g1),var(--g2));box-shadow:0 6px 14px rgba(37,99,235,.28)}
/* ===== layout ===== */
.srg-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.srg-main{min-width:0;display:grid;gap:16px}
.srg-side{position:sticky;top:76px;display:grid;gap:16px;min-width:0}
.srg-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:0 6px 20px rgba(20,40,90,.06);scroll-margin-top:84px;min-width:0}
.srg-card h3{margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid var(--line);color:var(--ink);font-size:16px;display:flex;align-items:center;gap:10px}
.srg-ico{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:12px;background:linear-gradient(135deg,#d1fae5,#dbeafe);font-size:17px}
.srg-step{margin-inline-start:auto;order:3;width:24px;height:24px;border-radius:50%;background:var(--soft);color:var(--mut);font-size:12px;display:grid;place-items:center;border:1px solid var(--line)}
.srg-card h3 .bi{order:2}.srg-side .srg-step{display:none}
.srg .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.srg .form-group{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0}.srg .form-group.wide-field{grid-column:1/-1}
.srg .form-group label{font-weight:700;font-size:13px;color:#334155;display:block}
.srg-req{color:#dc2626;font-style:normal;font-weight:800}
.srg-ctl{position:relative}
.srg-ctl>i{position:absolute;inset-inline-start:12px;top:50%;transform:translateY(-50%);font-style:normal;font-size:15px;pointer-events:none;opacity:.85}
.srg-ctl:has(textarea)>i{top:18px;transform:none}
.srg input[type=text],.srg input[type=date],.srg input[type=number],.srg input:not([type]),.srg select,.srg textarea{width:100%;height:46px;padding:0 14px;padding-inline-start:38px;border:1.5px solid #d6dee6;border-radius:14px;background:#f8fafc;color:var(--ink);font:inherit;font-size:14px;transition:border-color .15s,box-shadow .15s,background .15s}
.srg textarea{height:auto;min-height:90px;padding:12px 14px;padding-inline-start:38px;resize:vertical}
.srg input:hover,.srg select:hover,.srg textarea:hover{border-color:#b6c4d2}
.srg input:focus,.srg select:focus,.srg textarea:focus{outline:0;border-color:var(--g2);box-shadow:0 0 0 4px var(--ring);background:#fff}
.srg input[dir=ltr]{text-align:start}
/* photo */
.srg .photo-upload-group{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.srg .student-photo-preview-wrap{position:relative;width:140px;height:140px;border-radius:50%;padding:4px;background:linear-gradient(135deg,var(--g1),var(--g2));box-shadow:0 10px 24px rgba(37,99,235,.25)}
.srg .student-photo-preview{width:100%;height:100%;border-radius:50%;object-fit:cover;background:#fff}
.srg .student-photo-placeholder{position:absolute;inset:4px;border-radius:50%;background:#eef4f8;display:grid;place-items:center;font-size:56px}
.srg-btn-soft{display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;border-radius:12px;background:#eff6ff;color:#1d4ed8;font-weight:700;cursor:pointer;border:1.5px dashed #93c5fd;transition:.15s;width:100%}
.srg-btn-soft:hover{background:#dbeafe}
.srg small{color:var(--mut);font-size:11.5px}
/* switches */
.srg-switch{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:14px;background:var(--soft);border:1px solid var(--line);cursor:pointer;margin-bottom:10px;font-weight:700}
.srg-switch input{position:absolute;opacity:0;pointer-events:none}
.srg-sw{flex:none;position:relative;width:42px;height:24px;border-radius:99px;background:#cbd5e1;transition:.2s}
.srg-sw:after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.3);transition:.2s}
.srg-switch input:checked+.srg-sw{background:#16a34a}.srg-switch input:checked+.srg-sw:after{inset-inline-start:21px}
.srg-switch input:focus-visible+.srg-sw{box-shadow:0 0 0 4px var(--ring)}
.srg-inactive{display:grid;gap:10px;margin-bottom:10px;padding:12px;border-radius:14px;background:#fff7ed;border:1px solid #fed7aa}
.srg-hint{display:block}
/* checklist */
.srg-check ul{list-style:none;margin:0;padding:0;display:grid;gap:7px}
.srg-check li{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--mut)}
.srg-check li:before{content:"";width:18px;height:18px;border-radius:50%;border:2px solid #cbd5e1;flex:none}
.srg-check li.ok{color:var(--ink)}.srg-check li.ok:before{content:"✓";border-color:#16a34a;background:#16a34a;color:#fff;font-size:11px;display:grid;place-items:center;font-weight:800}
.srg-check li.req:before{border-color:#f87171}.srg-check li em{color:#dc2626;font-style:normal}
/* docs */
.srg-drop{display:flex;flex-direction:column;align-items:center;gap:4px;padding:22px;border:2px dashed #b6c4d2;border-radius:16px;background:#f8fafc;text-align:center;cursor:pointer;transition:.15s}
.srg-drop i{font-style:normal;font-size:28px}.srg-drop b{color:var(--ink)}
.srg-drop:hover,.srg-drop.over{border-color:var(--g2);background:#eff6ff}
/* actions */
.srg-actions{position:sticky;bottom:10px;z-index:7;margin-top:16px;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.95);backdrop-filter:blur(10px);border:1px solid var(--line);box-shadow:0 10px 30px rgba(20,40,90,.18);display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.srg-actions .save-btn{width:auto;margin:0;padding:12px 28px;font-size:15px;border-radius:14px}
.srg-actions .message{flex:1;min-width:180px;margin:0}
@media(max-width:980px){.srg-layout{grid-template-columns:minmax(0,1fr)}.srg-side{position:static;order:-1;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.srg-check{display:none}}
@media(max-width:640px){.srg .form-grid{grid-template-columns:minmax(0,1fr)}.srg-hero{padding:16px}.srg-hero h2{font-size:20px}.srg-actions .save-btn{flex:1}.srg-tabs a{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){.srg *{transition:none!important}}

/* د رول محدودیتونه (Viewer): ثبت تڼۍ او فورمه نه ښکاري */
body.bec-role-viewer #stuNewBtn,
body.bec-role-viewer #studentRegisterSection #saveButton,
body.bec-role-viewer #studentRegisterSection .delete-btn{display:none!important}
body.bec-role-editor #studentRegisterSection .delete-btn{display:none!important}

/* ===== fixes: بېرنۍ سټایلونه نه شي پرېوتلی ===== */
.srg .srg-hero,.srg .srg-hero h2,.srg .srg-hero p,.srg .srg-hero small,.srg .srg-hero .bi{color:#fff!important}
.srg .srg-hero h2{text-shadow:0 2px 10px rgba(0,0,0,.2)}
.srg .srg-hero small{opacity:.9}
.srg .srg-next{color:#fff!important}
.srg .srg-kpi,.srg .srg-kpi b,.srg .srg-kpi small,.srg .srg-kpi i{color:#fff!important}
.srg .srg-ctl input,.srg .srg-ctl select,.srg .srg-ctl textarea{padding-inline-start:40px!important;padding-inline-end:12px!important;color:#12302a!important;background-color:#f8fafc!important;height:46px!important}
.srg .srg-ctl textarea{height:auto!important;min-height:90px!important}
.srg .srg-ctl select{text-overflow:ellipsis}
.srg .srg-ctl input:focus,.srg .srg-ctl select:focus,.srg .srg-ctl textarea:focus{background-color:#fff!important}
.srg .srg-drop small,.srg .srg-drop b{display:block}
.srg .srg-box h4,.srg .srg-card h3{color:#12302a!important}
.srg .srg-tabs a{color:#64748b!important}.srg .srg-tabs a.on{color:#fff!important}
.srg .srg-switch,.srg .srg-switch b{color:#12302a!important}
.srg .srg-btn-soft{color:#1d4ed8!important}
.srg .srg-reset{margin:0}

/* ډشبورډ د «د زده‌کوونکو مدیریت» پاڼې په سر کې */
.srg-dash{margin:0 0 16px}

/* ===== څو ټولګي په ثبت فورم کې ===== */
.mc-box .mc-hint{color:#64748b;font-weight:400;font-size:12px}
.mc-box .mc-row{cursor:pointer}.mc-box .mc-row.on{background:#eef7f1;border-color:#9fcdb0}
.mc-box .mc-row input[type=number]:disabled{background:#eef1f0;opacity:.6}
.mc-total{margin-top:10px;padding:10px 14px;border-radius:12px;background:linear-gradient(135deg,#ecfdf5,#eff6ff);border:1px solid #cfe6da;color:#12302a;font-size:14px}
.mc-total b{color:#0f766e;font-size:16px}
