:root{
  --primary:#1888a8;
  --primary-dark:#106b86;
  --secondary:#24bd7d;
  --secondary-dark:#15945e;
  --mint:#eaf8f3;
  --blue-soft:#eaf5fa;
  --ink:#172b35;
  --muted:#6c7c84;
  --line:#d8e5e8;
  --surface:#ffffff;
  --bg:#f5f9fa;
  --danger:#d9535f;
  --warning:#d89921;
  --shadow:0 16px 42px rgba(21,70,84,.10);
  --radius:20px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:linear-gradient(180deg,#f8fbfc 0,#f3f8f9 100%);color:var(--ink);font-family:"Cairo",Tahoma,Arial,sans-serif;min-height:100vh}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{text-decoration:none;color:inherit}
.hidden{display:none!important}
.muted{color:var(--muted)}
.app-shell{min-height:100vh}
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:20px;padding:12px clamp(16px,4vw,56px);background:rgba(255,255,255,.92);backdrop-filter:blur(18px);border-bottom:1px solid rgba(216,229,232,.9)}
.brand{display:flex;align-items:center;gap:10px;min-width:170px}
.brand-mark{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(145deg,var(--secondary),var(--primary));box-shadow:0 8px 22px rgba(24,136,168,.25)}
.brand-mark img{width:39px;height:39px}
.brand strong{display:block;font-size:23px;line-height:1}.brand small{display:block;color:var(--muted);font-size:14px;margin-top:5px;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.main-nav{display:flex;align-items:center;gap:5px;flex:1;justify-content:center}
.main-nav button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;color:#51646d;border-radius:13px;padding:10px 12px;transition:.2s;white-space:nowrap;font-weight:600}
.main-nav button:hover,.main-nav button.active{background:var(--mint);color:var(--secondary-dark)}
.main-nav button.active:after{content:"";position:absolute;right:20%;left:20%;bottom:-13px;height:3px;border-radius:2px;background:linear-gradient(90deg,var(--secondary),var(--primary))}
.main-nav .nav-icon{display:block;width:25px;height:25px;flex:0 0 25px;object-fit:contain;object-position:center;filter:drop-shadow(0 2px 3px rgba(21,70,84,.10))}
.notification-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:999px;background:var(--danger);color:#fff;font-size:13px;margin-right:4px}
.user-menu{min-width:155px;text-align:left;display:flex;align-items:center;justify-content:flex-end;gap:8px;color:var(--muted);font-size:15px}
.mobile-nav-toggle{display:none;border:0;background:var(--mint);border-radius:10px;padding:8px 11px;font-size:22px}
.page-wrap{width:min(1500px,calc(100% - 32px));margin:24px auto 80px}
.view{display:none}.view.active{display:block;animation:fade .25s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.hero{display:flex;align-items:center;justify-content:space-between;gap:28px;color:#fff;padding:28px 34px;border-radius:26px;background:linear-gradient(118deg,#24bd7d 0%,#1aa68f 44%,#1888a8 100%);box-shadow:0 18px 45px rgba(24,136,168,.20);position:relative;overflow:hidden;margin-bottom:22px}
.hero:before,.hero:after{content:"";position:absolute;border:1px solid rgba(255,255,255,.18);border-radius:50%}.hero:before{width:240px;height:240px;left:-90px;top:-130px}.hero:after{width:160px;height:160px;left:80px;bottom:-120px}
.hero>div{position:relative;z-index:1}.hero h1{margin:3px 0 6px;font-size:clamp(25px,3vw,36px)}.hero p{margin:0;color:rgba(255,255,255,.85)}.eyebrow{font-size:15px;font-weight:700;background:rgba(255,255,255,.17);padding:5px 10px;border-radius:999px}
.hero-stat{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.26);padding:14px 20px;border-radius:18px;min-width:170px;text-align:center}.hero-stat span,.hero-stat small{display:block;font-size:14px;color:rgba(255,255,255,.8)}.hero-stat strong{display:block;font-size:37px}.hero-actions{display:flex;gap:10px}
.layout-grid{display:grid;gap:22px}.layout-grid.two-thirds{grid-template-columns:minmax(0,2fr) minmax(330px,1fr)}
.panel{background:var(--surface);border:1px solid rgba(216,229,232,.85);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}.panel.soft{background:linear-gradient(180deg,#f7fcfb,#f2f8fa)}.panel.narrow{max-width:850px;margin:auto}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:18px}.panel-head h2{margin:0 0 4px;font-size:23px}.panel-head p{margin:0;color:var(--muted);font-size:16px}.step-badge{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:var(--mint);color:var(--secondary-dark);font-weight:800}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid label,.field{display:flex;flex-direction:column;gap:7px;font-size:16px;font-weight:600}.span-2{grid-column:1/-1}
input,select,textarea{width:100%;border:1px solid var(--line);background:#fff;border-radius:13px;padding:11px 13px;color:var(--ink);outline:none;transition:.2s}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(24,136,168,.10)}
.field-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.field-hint{color:var(--muted);font-weight:400;min-height:18px}
.switch-label{flex-direction:row!important;align-items:center;gap:8px!important;font-weight:500!important}.switch-label input{display:none}.switch{width:40px;height:22px;background:#cfdadd;border-radius:999px;position:relative;transition:.2s}.switch:after{content:"";position:absolute;width:16px;height:16px;right:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.2);transition:.2s}.switch-label input:checked+.switch{background:var(--secondary)}.switch-label input:checked+.switch:after{transform:translateX(-18px)}
.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;max-height:240px;overflow:auto;border:1px dashed var(--line);padding:10px;border-radius:14px}.check-item{display:flex;align-items:center;gap:9px;padding:9px 10px;background:#fff;border:1px solid var(--line);border-radius:11px;font-weight:500}.check-item input{width:18px;height:18px;accent-color:var(--secondary)}
.signature-box{position:relative;border:1px dashed #9fc7d0;background:linear-gradient(180deg,#fff,#f7fbfc);border-radius:15px;overflow:hidden}.signature-box canvas{display:block;width:100%;height:160px;touch-action:none}.signature-box span{position:absolute;left:14px;bottom:10px;color:#a0aeb4;font-size:14px;pointer-events:none}
.form-actions{display:flex;justify-content:flex-end;gap:10px}.btn{border:0;border-radius:12px;padding:10px 15px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.2s}.btn:hover{transform:translateY(-1px)}.btn.primary{background:linear-gradient(135deg,var(--secondary),#1bab8c);color:#fff;box-shadow:0 8px 20px rgba(36,189,125,.23)}.btn.secondary{background:linear-gradient(135deg,var(--primary),#2b9fbd);color:#fff}.btn.light{background:#fff;color:var(--primary-dark)}.btn.ghost{background:#edf5f7;color:#47606a}.btn.danger{background:#fff0f1;color:var(--danger)}.btn.warning{background:#fff7e7;color:#a96d07}.btn.small{padding:7px 10px;font-size:15px}.btn.large{padding:13px 23px}.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
.stack-list{display:flex;flex-direction:column;gap:10px;max-height:740px;overflow:auto}.empty-state{min-height:180px;display:grid!important;place-items:center;text-align:center;color:var(--muted)}.empty-state span{font-size:35px}.empty-state p{margin-top:-55px}
.report-mini{background:#fff;border:1px solid var(--line);border-radius:15px;padding:13px}.report-mini-head{display:flex;justify-content:space-between;gap:10px}.report-mini h4{margin:0 0 5px;font-size:17px}.report-mini p{margin:0;color:var(--muted);font-size:14px}.report-mini .students{margin:10px 0;font-size:15px}.report-mini-actions{display:flex;justify-content:flex-end;gap:7px}
.status{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:999px;font-size:13px;font-weight:700}.status.draft{background:#edf0f2;color:#62717a}.status.sent{background:#e9f6fb;color:#167896}.status.processing{background:#fff4dc;color:#a56c08}.status.processed{background:#e7f8ef;color:#14824f}
.tabs{display:flex;gap:8px;margin:0 0 18px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:6px;overflow:auto}.tabs button,.segmented button{border:0;background:transparent;padding:9px 14px;border-radius:10px;color:var(--muted);font-weight:700;white-space:nowrap}.tabs button.active,.segmented button.active{background:var(--mint);color:var(--secondary-dark)}.subview{display:none}.subview.active{display:block}
.structure-tree{display:flex;flex-direction:column;gap:12px}.stage-card{border:1px solid var(--line);border-radius:16px;overflow:hidden}.stage-head,.grade-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.stage-head{padding:13px 15px;background:linear-gradient(90deg,var(--mint),#f3fbf9)}.stage-head h3{margin:0;font-size:19px}.grade-card{margin:10px;border:1px solid #e3ecee;border-radius:13px}.grade-head{padding:10px 12px}.grade-head h4{margin:0;font-size:17px}.gender-blocks{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 10px 10px}.gender-box{background:#f8fbfc;border-radius:12px;padding:10px}.gender-box h5{margin:0 0 8px;display:flex;justify-content:space-between}.class-chip{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid var(--line);border-radius:10px;padding:7px 9px;margin-top:6px;font-size:15px}.inline-actions{display:flex;gap:5px}.icon-btn{border:0;width:28px;height:28px;border-radius:8px;background:#edf5f7;color:#49636e;display:grid;place-items:center}.icon-btn.danger{background:#fff0f1;color:var(--danger)}
.feature-list{padding-right:20px;color:var(--muted);font-size:16px}.feature-list li{margin:9px 0}.feature-list code{direction:ltr;display:inline-block;background:#e9f1f3;padding:2px 6px;border-radius:6px}
.filter-bar{display:grid;gap:12px;margin-bottom:15px}.filter-bar.three{grid-template-columns:repeat(3,1fr)}.filter-bar.four{grid-template-columns:repeat(4,1fr)}.filter-bar.five{grid-template-columns:repeat(5,1fr)}.filter-bar label{font-size:15px;font-weight:700}.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:15px 0}.toolbar .muted{margin-right:auto;font-size:15px}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}table{width:100%;border-collapse:collapse;min-width:740px}th,td{text-align:right;padding:11px 12px;border-bottom:1px solid #e5edef;font-size:15px;vertical-align:top}th{background:#f1f7f8;color:#50646d;font-weight:800}tbody tr:hover{background:#fbfdfd}.empty-cell{text-align:center;color:var(--muted);padding:30px}.table-actions{display:flex;gap:6px}
.segmented{display:flex;background:#f0f5f6;border-radius:12px;padding:4px;overflow:auto}.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:14px}.vice-card{border:1px solid var(--line);border-radius:17px;padding:16px;background:#fff}.vice-card-top{display:flex;justify-content:space-between;gap:12px}.vice-card h3{margin:0 0 4px;font-size:18px}.vice-card p{margin:0;color:var(--muted);font-size:14px}.vice-card .behavior{margin:13px 0;padding:10px;background:var(--blue-soft);border-radius:11px;font-size:15px}.student-pill-row{display:flex;flex-wrap:wrap;gap:6px}.student-pill{background:var(--mint);padding:5px 9px;border-radius:999px;font-size:14px}.vice-card-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:13px}
.catalog-list{display:flex;flex-direction:column;gap:13px}.catalog-card{border:1px solid var(--line);border-radius:17px;overflow:hidden}.catalog-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:linear-gradient(90deg,#f0fbf7,#f1f8fb)}.catalog-title{display:flex;align-items:center;gap:12px}.degree-badge{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(145deg,var(--secondary),var(--primary));color:#fff;font-weight:800}.catalog-title h3{margin:0;font-size:18px}.catalog-title p{margin:4px 0 0;color:var(--muted);font-size:14px}.catalog-body{padding:15px}.behavior-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px dashed #e2ebed;font-size:15px}.behavior-row:last-child{border-bottom:0}.behavior-row span:first-child{display:flex;gap:8px}.behavior-row b{color:var(--primary);min-width:22px}.procedure-preview{margin-top:12px;background:#f8fbfc;border-radius:12px;padding:11px;font-size:14px;color:var(--muted)}
.kpi-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:13px;margin-bottom:20px}.kpi-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:17px;box-shadow:var(--shadow)}.kpi-card span{color:var(--muted);font-size:14px}.kpi-card strong{display:block;font-size:32px;margin-top:4px;color:var(--primary-dark)}.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.bar-chart{display:flex;flex-direction:column;gap:12px}.bar-row{display:grid;grid-template-columns:minmax(100px,170px) 1fr 40px;align-items:center;gap:10px;font-size:14px}.bar-track{height:11px;background:#e8f0f2;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,var(--secondary),var(--primary));border-radius:999px;min-width:3px}.rank-list{display:flex;flex-direction:column;gap:9px}.rank-item{display:grid;grid-template-columns:30px 1fr 45px;gap:9px;align-items:center;padding:9px;background:#f8fbfc;border-radius:11px;font-size:14px}.rank-item b{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:var(--mint);color:var(--secondary-dark)}.status-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.status-card{padding:14px;border-radius:13px;background:#f7fafb}.status-card strong{display:block;font-size:27px}.status-card span{font-size:14px;color:var(--muted)}
.overlay{position:fixed;inset:0;z-index:100;background:rgba(12,36,46,.58);backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px}.busy-card{width:min(350px,90vw);background:#fff;border-radius:22px;padding:28px;text-align:center;box-shadow:0 28px 80px rgba(0,0,0,.25)}.busy-card strong,.busy-card small{display:block}.busy-card small{color:var(--muted);margin-top:6px}.spinner{width:50px;height:50px;border-radius:50%;border:5px solid #dfecef;border-top-color:var(--secondary);margin:0 auto 15px;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.modal{position:relative;width:min(650px,95vw);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 30px 90px rgba(0,0,0,.3);padding:24px}.modal.wide{width:min(1000px,96vw)}.modal-close{position:absolute;left:14px;top:12px;width:34px;height:34px;border:0;border-radius:10px;background:#eef4f5;font-size:25px;color:#5a6c74}.modal h2{margin:0 0 5px}.modal .modal-sub{margin:0 0 18px;color:var(--muted);font-size:15px}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.modal-section{border:1px solid var(--line);border-radius:14px;padding:13px;margin-top:12px}.modal-section h4{margin:0 0 8px}.action-check{display:flex;align-items:flex-start;gap:8px;padding:7px;border-bottom:1px dashed #e4ecee;font-size:15px}.action-check:last-child{border:0}.action-check input{width:18px;height:18px;accent-color:var(--secondary);margin-top:2px}.student-process{border:1px solid var(--line);border-radius:15px;padding:13px;margin-top:12px}.student-process-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.occurrence{background:#fff4dc;color:#a56c08;border-radius:999px;padding:4px 9px;font-size:13px;font-weight:700}
.toast-zone{position:fixed;left:18px;bottom:18px;z-index:160;display:flex;flex-direction:column;gap:9px}.toast{min-width:280px;max-width:420px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:15px;padding:12px 14px;display:flex;align-items:flex-start;gap:10px;animation:slideIn .25s ease}.toast.success{border-right:4px solid var(--secondary)}.toast.error{border-right:4px solid var(--danger)}.toast strong{display:block;font-size:15px}.toast span{display:block;color:var(--muted);font-size:14px}@keyframes slideIn{from{transform:translateX(-20px);opacity:0}to{transform:none;opacity:1}}
.install-banner{position:fixed;left:18px;right:18px;bottom:18px;z-index:80;max-width:650px;margin:auto;display:flex;align-items:center;gap:13px;background:rgba(246,242,237,.94);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.8);box-shadow:0 18px 55px rgba(0,0,0,.22);border-radius:25px;padding:13px 18px 13px 48px;cursor:pointer}.install-banner img{width:58px;height:58px;border-radius:16px;box-shadow:0 6px 15px rgba(0,0,0,.12)}.install-banner div{flex:1}.install-banner strong{display:block;font-size:20px}.install-banner span{display:block;color:#666;font-size:15px}.install-close{position:absolute;left:12px;top:12px;border:0;background:rgba(255,255,255,.7);width:28px;height:28px;border-radius:9px;font-size:23px}.install-arrow{font-size:23px!important;color:var(--primary)!important}
.os-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.os-card{border:1px solid var(--line);border-radius:18px;padding:18px;text-align:center;background:#f8fbfc;cursor:pointer}.os-card:hover{border-color:var(--primary)}

.os-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    padding: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    border-radius: 20px;
    background: #fff;

    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.os-logo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    border-radius: 14px;
}


.ios-steps{counter-reset:steps;padding:0;list-style:none}.ios-steps li{counter-increment:steps;display:flex;gap:10px;margin:12px 0}.ios-steps li:before{content:counter(steps);width:28px;height:28px;border-radius:9px;background:var(--mint);color:var(--secondary-dark);display:grid;place-items:center;font-weight:800;flex:0 0 auto}

.date-input-wrap{position:relative;display:flex;align-items:center}.date-input-wrap input{padding-left:48px;cursor:pointer;background:#fff}.date-input-wrap input:disabled{cursor:not-allowed;background:#f1f5f6}.date-open-btn{position:absolute;left:6px;width:38px;height:36px;border:0;border-radius:10px;background:var(--blue-soft);color:var(--primary-dark);display:grid;place-items:center}
.phone-cell{direction:ltr;text-align:right;white-space:nowrap}.btn.whatsapp{background:#e5f8ec;color:#087d3e;border:1px solid #bde8ce}.btn.whatsapp:hover{background:#d8f4e3}
.vice-filters{grid-template-columns:repeat(6,minmax(150px,1fr));align-items:end}.filter-action{display:flex;align-items:flex-end}.filter-action .btn{width:100%;min-height:45px}.vice-table-wrap{max-height:68vh}.vice-table{min-width:1450px}.vice-table thead th{position:sticky;top:0;z-index:2}.vice-table td{vertical-align:middle}.behavior-cell{min-width:250px;max-width:360px}.cell-sub{display:block;color:var(--muted);font-size:13px;margin-top:5px}.table-actions.vertical{flex-direction:column;align-items:stretch;margin-top:8px}.communication-state{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;margin-bottom:8px;white-space:nowrap}.communication-state.done{color:#178450}.communication-state.pending{color:#b43c49}.track-dot{display:inline-block;width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 3px rgba(0,0,0,.04)}.track-dot.no{background:#dc4d58}.track-dot.yes{background:#24ad6b}.legend-dot{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:14px}
.date-overlay{z-index:140}.date-picker-card{width:min(520px,94vw);background:#fff;border-radius:22px;padding:24px;box-shadow:0 30px 90px rgba(0,0,0,.3)}.date-picker-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.date-picker-head h2{margin:0 0 4px}.date-picker-head p{margin:0;color:var(--muted);font-size:15px}.modal-close.static{position:static;flex:0 0 auto}.date-selects{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:22px}.date-selects label{display:flex;flex-direction:column;gap:7px;font-size:15px;font-weight:700}.date-selects select{text-align:center;font-size:21px;font-weight:700}
.report-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:15px;background:#f8fbfc}.process-date-label{display:flex;flex-direction:column;gap:7px;font-size:16px;font-weight:700;max-width:340px;margin:15px 0}.student-phone{display:block;color:var(--primary-dark);font-size:13px;margin-top:5px}.student-contact-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px dashed var(--line)}
@media(max-width:1150px){.vice-filters{grid-template-columns:repeat(3,1fr)}.main-nav button span{display:none}.main-nav button{padding:10px 9px}.kpi-grid{grid-template-columns:repeat(3,1fr)}.filter-bar.five{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.vice-filters{grid-template-columns:1fr 1fr}.report-summary{grid-template-columns:1fr}.topbar{flex-wrap:wrap}.mobile-nav-toggle{display:block;margin-right:auto}.main-nav{display:none;order:3;width:100%;flex-wrap:wrap;justify-content:flex-start}.main-nav.open{display:flex}.main-nav button.active:after{display:none}.user-menu{display:none}.layout-grid.two-thirds,.dashboard-grid{grid-template-columns:1fr}.filter-bar.four,.filter-bar.five{grid-template-columns:1fr 1fr}.gender-blocks{grid-template-columns:1fr}}
@media(max-width:600px){.vice-filters,.date-selects{grid-template-columns:1fr}.vice-table-wrap{max-height:none}.page-wrap{width:min(100% - 18px,1500px);margin-top:12px}.hero{padding:22px;align-items:flex-start}.hero-stat,.hero-actions{display:none}.form-grid,.filter-bar.three,.filter-bar.four,.filter-bar.five{grid-template-columns:1fr}.span-2{grid-column:auto}.panel{padding:16px;border-radius:16px}.kpi-grid{grid-template-columns:1fr 1fr}.report-grid{grid-template-columns:1fr}.os-grid{grid-template-columns:1fr}.install-banner{left:9px;right:9px;bottom:9px}.brand small{max-width:100px}.toast-zone{left:9px;right:9px}.toast{min-width:0;max-width:none}.bar-row{grid-template-columns:90px 1fr 30px}}

/* تحسين وضوح الخط لأن الاستخدام الأساسي من الجوال. */
body{font-size:18px;line-height:1.7}
.main-nav button,.btn,.tabs button,.segmented button{font-size:17px}
input,select,textarea{font-size:17px}
.form-grid label,.field,.filter-bar label{font-size:17px}
th,td{font-size:16px;line-height:1.65}
.report-mini p,.vice-card p,.catalog-title p,.cell-sub,.student-phone{font-size:15px}
.report-mini .students,.vice-card .behavior,.behavior-row,.action-check,.report-summary{font-size:16px}
.catalog-title h3,.vice-card h3{font-size:19px}
.procedure-preview{font-size:16px}
.communication-state,.legend-dot{font-size:15px}

/* صندوق تفعيل إشعارات الوكيلة: ظاهر دائمًا على الجوال والكمبيوتر. */
.notification-control{display:flex;align-items:center;gap:14px;margin:-8px 0 20px;padding:15px 17px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.notification-control-icon{width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center;border-radius:15px;background:var(--blue-soft);font-size:26px}
.notification-control-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.notification-control-copy strong{font-size:19px;color:var(--primary-dark)}
.notification-control-copy span{font-size:16px;color:var(--muted)}
.notification-enable-btn{white-space:nowrap}
.notification-enabled{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-radius:999px;background:#e7f8ef;color:#14824f;font-size:16px;font-weight:800;white-space:nowrap}
.notification-enabled i{width:11px;height:11px;border-radius:50%;background:#24ad6b;box-shadow:0 0 0 4px rgba(36,173,107,.12)}
.notification-control.has-warning{border-color:#ead49f;background:#fffdf7}
.notification-control.has-warning .notification-enabled{background:#fff4dc;color:#986407}
.notification-control.has-warning .notification-enabled i{background:#d89921;box-shadow:0 0 0 4px rgba(216,153,33,.13)}

/* عرض تسلسل إجراءات كل مادة داخل صفحة المخالفات. */
.procedure-preview{padding:13px 14px}
.procedure-preview-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.procedure-toggle{margin-right:auto;white-space:nowrap}
.procedure-details{margin-top:13px;padding-top:13px;border-top:1px dashed var(--line);color:var(--ink)}
.procedure-rule{padding:11px 13px;margin-bottom:10px;border-radius:12px;background:#eef8fb;color:var(--primary-dark);line-height:1.8}
.procedure-step{padding:12px 14px;margin-top:10px;border:1px solid #e0eaed;border-radius:13px;background:#fff}
.procedure-step h4{margin:0 0 8px;color:var(--secondary-dark);font-size:18px}
.procedure-step ol{margin:0;padding-right:22px}
.procedure-step li{margin:7px 0;line-height:1.8}

@media(max-width:600px){
  body{font-size:19px}
  input,select,textarea{font-size:19px}
  .main-nav button,.btn,.tabs button,.segmented button{font-size:18px}
  .panel-head p,.hero p,.notification-control-copy span{font-size:17px}
  th,td,.behavior-row,.action-check,.report-summary{font-size:17px}
  .notification-control{align-items:flex-start;flex-wrap:wrap;padding:14px;margin-bottom:16px}
  .notification-control-copy{flex:1 1 calc(100% - 65px)}
  .notification-enable-btn,.notification-enabled{width:100%;white-space:normal}
  .catalog-card-head{align-items:flex-start;flex-direction:column}
  .catalog-card-head>.inline-actions{width:100%;justify-content:flex-end}
  .procedure-preview-summary{align-items:stretch}
  .procedure-toggle{width:100%;margin:0}
  .procedure-step{padding:11px}
}

/* =========================================================
   الشعار واسم المدرسة وزر إعادة إظهار التثبيت
   ========================================================= */

.brand-area {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    flex: 0 1 390px;
}

.brand {
    min-width: 0;
    flex: 1 1 auto;
}

.brand-copy {
    display: block;
    min-width: 0;
}

/*
 * إظهار اسم المدرسة كاملًا بدل القص وإضافة النقاط.
 */
.brand small {
    display: block;

    width: auto;
    max-width: 270px;

    margin-top: 5px;

    color: var(--muted);
    font-size:14px;
    line-height: 1.45;

    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

/* زر التثبيت بجوار شعار الموقع */
.install-reopen-btn {
    position: relative;

    width: 66px;
    min-width: 66px;
    height: 43px;
    
    gap: 6px;
    
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px 7px;

    border: 1px solid var(--line);
    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--mint)
        );

    box-shadow:
        0 6px 18px
        rgba(21, 70, 84, .10);

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.install-reopen-btn:hover {
    border-color: var(--primary);

    transform: translateY(-1px);

    box-shadow:
        0 9px 24px
        rgba(24, 136, 168, .16);
}

.install-reopen-btn:focus-visible {
    outline: 3px solid
        rgba(24, 136, 168, .22);

    outline-offset: 2px;
}

.install-reopen-btn img {
    display: block;

    width: 27px;
    height: 27px;

    border-radius: 8px;
    object-fit: cover;

    background: #fff;
}

.install-reopen-btn img + img {
    margin-right: 0px;
}

/* صور Android وiPhone داخل نافذة الاختيار */
.os-logo {
    overflow: hidden;
    padding: 5px;
}

.os-logo img {
    display: block;

    width: 100%;
    height: 100%;

    border-radius: 15px;
    object-fit: contain;
}

/* =========================================================
   شريط التثبيت العائم
   ========================================================= */

.install-banner {
    width: min(
        680px,
        calc(100vw - 36px)
    );

    left: 18px;
    right: 18px;
    bottom: 18px;

    margin-inline: auto;
}

.install-banner > div {
    min-width: 0;
}

.install-banner strong {
    line-height: 1.35;
}

.install-banner span {
    line-height: 1.6;
    white-space: normal;
}

/*
 * إخفاء زر التثبيت عند فتح الموقع
 * من الاختصار المثبت.
 */
@media (display-mode: standalone) {
    .install-reopen-btn {
        display: none !important;
    }
}

/* =========================================================
   الجوال والأجهزة المتوسطة
   ========================================================= */

@media (max-width: 900px) {
    .topbar {
        gap: 10px;
    }

    .brand-area {
        min-width: 0;
        max-width: calc(100% - 58px);
        flex: 1 1 auto;
    }

    .brand {
        min-width: 0;
    }

    .brand small {
        width: 100%;
        max-width: none;

        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 10px 12px;
        gap: 7px;
    }

    .brand-area {
        gap: 7px;
        max-width: calc(100% - 53px);
    }

    .brand {
        gap: 8px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        min-width: 44px;

        border-radius: 13px;
    }

    .brand-mark img {
        width: 38px;
        height: 38px;
    }

    .brand strong {
        font-size:21px;
    }

    .brand small {
        max-width: none;

        margin-top: 3px;

        font-size:13px;
        line-height: 1.4;

        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }

    .install-reopen-btn {
        width: 55px;
        min-width: 55px;
        height: 39px;
        
        gap: 6px;
        
        padding: 4px 5px;

        border-radius: 12px;
    }

    .install-reopen-btn img {
        width: 23px;
        height: 23px;

        border-radius: 7px;
    }

    .install-reopen-btn img + img {
        margin-right: 0px;
    }

    .mobile-nav-toggle {
        min-width: 44px;
        height: 44px;
        padding: 7px 10px;
    }

    .install-banner {
        width: auto;

        left: 8px;
        right: 8px;
        bottom: 8px;

        gap: 9px;

        padding:
            10px
            12px
            10px
            43px;

        border-radius: 20px;
    }

    .install-banner > img {
        width: 48px;
        height: 48px;

        border-radius: 14px;
    }

    .install-banner strong {
        font-size:18px;
    }

    .install-banner span {
        font-size:14px;
        line-height: 1.5;
    }

    .install-close {
        left: 9px;
        top: 9px;

        width: 27px;
        height: 27px;
    }
}

/* توقيع المعلمة المحفوظ والبيانات التجريبية */
.signature-status{display:block;margin-top:7px;padding:8px 11px;border-radius:10px;background:#f1f6f7;color:var(--muted);font-size:14px;font-weight:500;line-height:1.7}
.signature-status.saved-signature{background:#e8f8ef;color:#14784c;border:1px solid #ccebd9}
.signature-status.new-signature{background:#eaf5fa;color:#176f89;border:1px solid #cfe5ee}
.signature-status.needs-signature{background:#fff7e7;color:#94610b;border:1px solid #f1dfb7}
.admin-action-panel{position:relative;overflow:hidden;padding:30px}
.admin-action-panel:before{content:"";position:absolute;width:210px;height:210px;border-radius:50%;left:-90px;top:-110px;background:rgba(24,136,168,.06);pointer-events:none}
.admin-action-panel .panel-head,.admin-action-panel>*{position:relative;z-index:1}
.admin-action-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;margin-bottom:16px;background:linear-gradient(145deg,var(--mint),var(--blue-soft));font-size:31px;box-shadow:0 10px 24px rgba(21,70,84,.08)}
.compact-list{margin:8px 0 20px}
.admin-action-result{margin:18px 0;padding:15px;border:1px solid #cfe8dc;border-radius:14px;background:#eefaf4}
.admin-action-result strong,.admin-action-result span,.admin-action-result small{display:block}
.admin-action-result strong{color:#14784c;margin-bottom:4px}
.admin-action-result span{font-size:16px;color:#315b4a}
.admin-action-result small{margin-top:12px;color:var(--muted)}
.demo-teacher-names{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.demo-teacher-names button{border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--primary-dark);padding:6px 10px;font-size:14px;font-weight:700}
.demo-teacher-names button:hover{border-color:var(--primary);background:var(--blue-soft)}
.demo-teacher-accounts{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:9px;margin-top:9px}
.demo-teacher-account{border:1px solid var(--line);border-radius:13px;background:#fff;padding:10px 12px;min-width:0}
.demo-teacher-account strong,.demo-teacher-account span,.demo-teacher-account code{display:block}
.demo-teacher-account strong{font-size:13px;color:var(--ink)}
.demo-teacher-account span{font-size:11px;color:var(--muted);margin-top:2px}
.demo-teacher-account code{direction:ltr;text-align:right;font:800 13px monospace;color:var(--primary-dark);margin-top:6px}
.reset-panel{border-color:#f0cfd3;background:linear-gradient(180deg,#fff,#fff8f8)}
.reset-preserved-note{margin:8px 0 22px;padding:13px 15px;border-radius:13px;background:#fff3dc;border:1px solid #f2d9a5;color:#825807;font-size:15px;line-height:1.8}

@media(max-width:700px){
  .admin-action-panel{padding:22px 17px}
  .demo-teacher-names button{width:100%;justify-content:center}
}


/* =========================================================
   شاشة البداية الاحترافية — التصميم 5: بطاقة زجاجية ودائرة رصد
   ========================================================= */
body.splash-active{overflow:hidden}
.app-shell{transition:opacity .48s ease,visibility .48s ease}
body.splash-active .app-shell{opacity:0;visibility:hidden}
.splash-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;min-height:100dvh;padding:22px;overflow:hidden;font-family:"Cairo",Tahoma,Arial,sans-serif;background:#f7fbfb}
.splash-screen.hidden{display:none!important}
.splash-screen.is-leaving{opacity:0;visibility:hidden;pointer-events:none;transition:.4s}
.splash-content{position:relative;z-index:2;width:min(560px,94vw);display:flex;flex-direction:column;align-items:center;text-align:center;direction:rtl;padding:22px 18px 28px;border-radius:36px;background:rgba(255,255,255,.78);box-shadow:0 22px 65px rgba(35,80,90,.12);backdrop-filter:blur(12px)}
.splash-logo-wrap{width:clamp(115px,28vw,175px);margin-bottom:10px}
.splash-logo{display:block;width:100%;filter:drop-shadow(0 14px 18px rgba(31,85,94,.14))}
.splash-rصد{width:clamp(112px,29vw,150px);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;font-size:clamp(34px,9vw,50px);font-weight:900;line-height:1;color:#376f7c;background:#fff;border:3px solid #70b89b;box-shadow:0 0 0 10px #e8f5ef,0 13px 30px rgba(45,110,105,.15)}
.splash-services{width:100%;margin-top:18px;display:flex;flex-wrap:wrap;justify-content:center;gap:9px}
.splash-service{padding:8px 16px;border-radius:14px;font-weight:800;font-size:clamp(19px,5vw,27px)}
.splash-service.violation{background:#eef6fa;color:#426f88}
.splash-service.positive{background:#edf8f0;color:#3f865c}
.splash-service.absence{background:#f2f5f6;color:#607783}
.splash-benefits{display:flex;gap:8px;align-items:center;justify-content:center;margin-top:20px;font-size:clamp(14px,3.8vw,20px);font-weight:800;white-space:nowrap}
.splash-benefits span:nth-of-type(1){color:#1888a8}
.splash-benefits span:nth-of-type(2){color:#15945e}
.splash-benefits span:nth-of-type(3){color:#7c68b6}
.splash-benefits i{font-style:normal;color:#aab7bc}
.splash-closing{margin-top:7px;color:#326c86;font-size:clamp(23px,6vw,34px);font-weight:900}
.splash-deco{position:absolute;pointer-events:none}
.splash-deco-a{inset:0;background:linear-gradient(115deg,transparent 47%,rgba(94,175,147,.08) 48%,transparent 49%)}
@media(max-width:380px){.splash-screen{padding:14px}.splash-content{width:96vw;padding:18px 12px 22px}.splash-benefits{font-size:13px;gap:5px}.splash-logo-wrap{width:105px}.splash-rصد{width:105px;font-size:34px}.splash-services{margin-top:12px}.splash-service{padding:7px 11px}}
@media(prefers-reduced-motion:reduce){.splash-screen *{animation:none!important}.splash-screen,.app-shell{transition:opacity .2s linear,visibility .2s linear!important}}

/* أيقونات أقسام القائمة الرئيسية: صور WebP بدل الرموز التعبيرية. */
@media(max-width:1150px){
  .main-nav .nav-icon{width:23px;height:23px;flex-basis:23px}
}
@media(max-width:900px){
  .main-nav button{gap:9px}
  .main-nav .nav-icon{width:27px;height:27px;flex-basis:27px}
}
@media(max-width:600px){
  .main-nav .nav-icon{width:29px;height:29px;flex-basis:29px}
}

/* ===== تحديث 0.6.0: السجلات والدرجات ونوع المدرسة والبيانات الوهمية ===== */
.report-mini{padding:0;overflow:hidden}
.report-mini-status-head{display:flex;align-items:center;justify-content:flex-start;min-height:48px;padding:10px 14px;border-bottom:1px solid var(--line);background:#f5f8f9}
.report-mini-status-head .status{font-size:16px;padding:6px 13px}
.report-mini-draft .report-mini-status-head{background:#f0f3f5}
.report-mini-sent .report-mini-status-head{background:#edf8fc}
.report-mini-processing .report-mini-status-head{background:#fff7e7}
.report-mini-processed .report-mini-status-head{background:#edf9f2}
.report-mini-body{padding:15px}
.report-mini-body .report-mini-head{align-items:flex-start}

.degree-pill{display:inline-flex;align-items:center;width:max-content;margin-top:8px;padding:5px 11px;border-radius:999px;font-size:15px;font-weight:800;line-height:1.3;border:1px solid transparent}
.degree-rank-1{background:#eaf8f3;color:#13794a;border-color:#c7ead9}
.degree-rank-2{background:#eaf5fa;color:#126f8c;border-color:#cbe5ee}
.degree-rank-3{background:#fff5da;color:#946309;border-color:#f2dc9d}
.degree-rank-4{background:#fff0e8;color:#ad521f;border-color:#f3cdb8}
.degree-rank-5{background:#fff0f2;color:#b33849;border-color:#f0c8ce}

.about-developer-nav{gap:8px!important}
.developer-nav-mark{width:27px;height:27px;flex:0 0 27px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(145deg,var(--primary),var(--secondary));color:#fff;font-size:12px;font-weight:800;letter-spacing:.3px;box-shadow:0 6px 14px rgba(24,136,168,.18)}
.developer-card{text-align:center;padding:12px 8px 4px}
.developer-emblem{width:92px;height:92px;margin:0 auto 18px;border-radius:28px;display:grid;place-items:center;background:linear-gradient(145deg,var(--secondary),var(--primary));box-shadow:0 18px 45px rgba(24,136,168,.24);position:relative}
.developer-emblem:before{content:"";position:absolute;inset:7px;border:1px solid rgba(255,255,255,.5);border-radius:22px}
.developer-emblem span{position:relative;color:#fff;font-size:31px;font-weight:800;letter-spacing:1px}
.developer-eyebrow{display:inline-flex;padding:5px 11px;border-radius:999px;background:var(--mint);color:var(--secondary-dark);font-size:14px;font-weight:800}
.developer-card h2{margin:10px 0 5px;font-size:30px}
.developer-link{display:inline-block;color:var(--primary-dark);font-weight:800;font-size:19px;text-decoration:underline;text-decoration-color:rgba(24,136,168,.35);text-underline-offset:5px}
.developer-card p{max-width:480px;margin:17px auto;color:var(--muted);font-size:16px;line-height:1.9}
.developer-url{direction:ltr;unicode-bidi:isolate;display:inline-flex;padding:8px 13px;border:1px solid var(--line);border-radius:11px;background:#f8fbfc;color:var(--primary);font-size:15px;font-weight:700}

.demo-config-section{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fbfdfd}
.demo-config-section h3{margin:0 0 13px;font-size:19px}
.demo-stage-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.demo-stage-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff;transition:.2s}
.demo-stage-card.is-selected{border-color:var(--secondary);box-shadow:0 0 0 3px rgba(36,189,125,.10)}
.demo-stage-heading{display:flex;align-items:center;gap:9px;font-weight:800}
.demo-stage-heading input,.demo-choice input,.demo-grade-options input{width:19px;height:19px;accent-color:var(--secondary);flex:0 0 auto}
.demo-grade-dropdown{margin-top:11px;border-top:1px dashed var(--line);padding-top:9px}
.demo-grade-dropdown summary{cursor:pointer;color:var(--primary-dark);font-weight:700;font-size:15px}
.demo-grade-options{display:grid;gap:7px;margin-top:10px}
.demo-grade-options label,.demo-choice{display:flex;align-items:center;gap:8px;padding:8px 9px;border-radius:10px;background:#f7fafb;font-size:15px;font-weight:600}
.demo-choice-row{display:flex;gap:12px;flex-wrap:wrap}
.demo-choice{min-width:145px;border:1px solid var(--line);background:#fff}
.demo-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.demo-config-grid label{display:flex;flex-direction:column;gap:7px;font-size:16px;font-weight:700}
.demo-impact-note{margin-top:15px;padding:12px 14px;border-radius:13px;background:#eef7fb;color:#316677;font-size:15px;line-height:1.8}

.gender-restricted{opacity:.72;background:#f4f5f6}
.gender-lock{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;background:#e5e8ea;color:#6f7b80;font-size:13px;font-weight:700}

@media(max-width:1150px){
  .about-developer-nav .developer-nav-mark{display:grid!important}
}
@media(max-width:900px){
  .demo-stage-grid{grid-template-columns:1fr}
  .about-developer-nav{width:100%;justify-content:flex-start!important}
}
@media(max-width:600px){
  .demo-config-grid{grid-template-columns:1fr}
  .demo-choice{width:100%}
  .report-mini-status-head{min-height:52px}
  .degree-pill{font-size:16px}
}


/* ===== تحديث 0.6.1: إصلاح تناسق رأس الموقع وبطاقات سجلات المعلم/المعلمة ===== */

/*
 * بعد تكبير الخط، كانت مساحة القائمة الرئيسية تمنع منطقة الشعار من الاحتفاظ
 * بعرض كافٍ، ومع overflow-wrap:anywhere كان اسم المدرسة ينقسم حرفًا حرفًا.
 * نثبت عرضًا منطقيًا للهوية ونمنع كسر الكلمات داخل الاسم.
 */
@media (min-width: 901px) {
  .topbar{
    flex-wrap:nowrap;
    gap:14px;
  }

  .brand-area{
    flex:0 0 clamp(300px,20vw,380px);
    min-width:300px;
  }

  .brand{
    flex:1 1 auto;
    min-width:0;
  }

  .brand-copy{
    min-width:150px;
    max-width:230px;
  }

  .brand small{
    max-width:230px;
    white-space:normal;
    overflow:hidden;
    overflow-wrap:normal;
    word-break:normal;
    text-overflow:clip;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    line-clamp:2;
  }

  .main-nav{
    min-width:0;
    gap:3px;
  }

  .main-nav button{
    flex:0 0 auto;
    padding-inline:10px;
  }

  .user-menu{
    flex:0 0 auto;
    min-width:145px;
    white-space:nowrap;
  }
}

/* عند العرض المتوسط نخفي نصوص القائمة أبكر قليلًا حتى تبقى الهوية متوازنة. */
@media (min-width: 901px) and (max-width: 1280px) {
  .main-nav button > span:not(.developer-nav-mark){display:none}
  .main-nav button{padding-inline:8px}
  .brand-area{flex-basis:300px;min-width:300px}
  .brand-copy{max-width:165px}
  .brand small{max-width:165px}
}

/* ===== تحديث 0.12.28: ثبات بطاقات «سجلاتي» في المخالفات والإيجابيات ===== */
/*
 * stack-list حاوية Flex ذات ارتفاع أقصى. منع الانكماش يجب أن يعتمد على معرف
 * الحاوية نفسها، لا على class ديناميكي قد يتغير أثناء إعادة التحميل من JavaScript.
 * بذلك تبقى بطاقات المخالفات والسلوك المتميز بارتفاعها الطبيعي مهما زاد عددها.
 */
#teacherReports.stack-list .report-mini,
#teacherPositiveReports.stack-list .report-mini{
  flex:0 0 auto;
}

#teacherReports .report-mini-body,
#teacherPositiveReports .report-mini-body{
  display:block;
  height:auto;
  min-height:0;
  overflow:visible;
}

#teacherReports .report-mini-status-head,
#teacherReports .report-mini-head,
#teacherPositiveReports .positive-report-head,
#teacherReports .students,
#teacherPositiveReports .students,
#teacherReports .report-mini-actions,
#teacherPositiveReports .report-mini-actions{
  flex-shrink:0;
}

#teacherPositiveReports .positive-report-head{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  background:#f4fbf8;
}

#teacherPositiveReports .report-mini-actions{
  margin-top:12px;
  padding-top:11px;
  border-top:1px dashed #dce8e4;
}

/* تحسين القراءة في الجوال: لا نضع تمريرًا داخليًا طويلًا داخل لوحة سجلاتي. */
@media (max-width: 600px) {
  #teacherReports.stack-list,
  #teacherPositiveReports.stack-list{
    max-height:none;
    overflow:visible;
  }

  #teacherReports .report-mini,
  #teacherPositiveReports .report-mini{
    overflow:hidden;
  }

  #teacherReports .report-mini-status-head{
    min-height:46px;
    padding:8px 12px;
  }

  #teacherReports .report-mini-status-head .status{
    font-size:15px;
    padding:5px 10px;
  }

  #teacherReports .report-mini-body,
  #teacherPositiveReports .report-mini-body{
    padding:13px;
  }
}


/* ===== تحديث 0.6.2: منع تداخل عناصر رأس الموقع ===== */
/*
 * في الشاشات العريضة نحجز مساحة فعلية لمنطقة الحساب وزر الخروج، ونمنع
 * النص من الرسم خارج حدوده باتجاه القائمة الرئيسية.
 */
@media (min-width: 1681px) {
  .topbar{
    column-gap:16px;
  }

  .brand-area{
    position:relative;
    z-index:2;
    flex-shrink:0;
  }

  .main-nav{
    position:relative;
    z-index:1;
    min-width:0;
  }

  .user-menu{
    position:relative;
    z-index:2;
    flex:0 0 max-content;
    width:max-content;
    min-width:max-content;
    max-width:none;
  }

  #sessionLabel{
    display:block;
    flex:0 0 auto;
    white-space:nowrap;
  }
}

/*
 * بين 901 و1680px لا نحاول ضغط الهوية والحساب والقائمة في سطر واحد.
 * تبقى الهوية والحساب في الصف الأول، والقائمة تأخذ صفًا مستقلاً بعرض كامل.
 * هذا يحافظ على أسماء الأقسام والأيقونات ويمنع أي تراكب مهما طال اسم المدرسة
 * أو اسم الحساب.
 */
@media (min-width: 901px) and (max-width: 1680px) {
  .topbar{
    flex-wrap:wrap;
    align-items:center;
    column-gap:14px;
    row-gap:8px;
    padding-top:10px;
    padding-bottom:8px;
  }

  .brand-area{
    order:1;
    flex:1 1 420px;
    width:auto;
    min-width:300px;
    max-width:none;
    position:relative;
    z-index:2;
  }

  .brand-copy{
    max-width:260px;
  }

  .brand small{
    max-width:260px;
  }

  .user-menu{
    order:2;
    display:flex;
    flex:0 0 auto;
    width:auto;
    min-width:max-content;
    max-width:none;
    position:relative;
    z-index:2;
    white-space:nowrap;
  }

  #sessionLabel{
    display:block;
    flex:0 0 auto;
    white-space:nowrap;
  }

  .main-nav{
    order:3;
    flex:0 0 100%;
    width:100%;
    min-width:0;
    justify-content:center;
    gap:4px;
    padding-top:5px;
    border-top:1px solid rgba(216,229,232,.72);
    position:relative;
    z-index:1;
  }

  /* إلغاء قواعد الاختصار القديمة لأن القائمة أصبحت في صف مستقل كامل. */
  .main-nav button > span:not(.developer-nav-mark){
    display:inline!important;
  }

  .main-nav button{
    padding:8px 9px;
    gap:6px;
  }

  .main-nav .nav-icon{
    width:23px;
    height:23px;
    flex-basis:23px;
  }

  .about-developer-nav .developer-nav-mark{
    display:grid!important;
    width:25px;
    height:25px;
    flex-basis:25px;
  }

  .main-nav button.active:after{
    bottom:-8px;
  }
}

/* قرب حد التحول للجوال نقلل الفراغات فقط مع إبقاء النصوص ظاهرة. */
@media (min-width: 901px) and (max-width: 1120px) {
  .topbar{
    padding-inline:16px;
  }

  .brand-area{
    min-width:270px;
  }

  .brand-copy,
  .brand small{
    max-width:190px;
  }

  .main-nav{
    justify-content:space-between;
    gap:1px;
  }

  .main-nav button{
    padding-inline:6px;
    font-size:15px;
  }

  .main-nav .nav-icon{
    width:21px;
    height:21px;
    flex-basis:21px;
  }

  .developer-nav-mark{
    width:23px;
    height:23px;
    flex-basis:23px;
  }
}

/* ===== تحديث 0.7.0: الوكلاء، حماية سجلات المعلم، الإرجاع والنموذج الجديد ===== */

/* تكبير أيقونة الموقع في رأس الصفحة مع بقاء النسب متوازنة. */
.brand-mark{
  width:58px;
  height:58px;
  border-radius:18px;
  flex:0 0 58px;
}
.brand-mark img{
  width:52px;
  height:52px;
  object-fit:contain;
}
.brand{min-width:205px}

/* أيقونة القفل بجوار اسم المعلم/المعلمة. */
.teacher-name-label-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
}
.teacher-access-lock{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border:1px solid #d7e5e8;
  border-radius:50%;
  background:#f3f8f9;
  color:#526a74;
  display:grid;
  place-items:center;
  padding:0;
  line-height:1;
  transition:.2s ease;
}
.teacher-access-lock:hover{border-color:var(--primary);transform:translateY(-1px)}
.teacher-access-lock.is-protected{background:#fff5dd;border-color:#efcc78;color:#9c6b10}
.teacher-access-lock.is-unlocked{background:#e9f8f0;border-color:#9ad7b9;color:#177c50}
.teacher-access-dialog{text-align:center}.teacher-access-dialog .form-grid{text-align:right}
.teacher-access-dialog-icon{width:64px;height:64px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--mint),var(--blue-soft));font-size:30px}
.teacher-access-attempts{padding:9px 12px;border-radius:11px;background:#f4f8f9;color:var(--muted);font-size:13px;text-align:center}
.teacher-access-attempts.is-error{background:#fff0f1;color:var(--danger)}

.vice-role-hint{display:block;min-height:20px;margin-top:2px;color:var(--primary-dark)}

/* إدارة الوكلاء/الوكيلات. */
.vice-admin-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:13px}
.vice-admin-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:16px;padding:15px;background:#fff}
.vice-admin-copy{min-width:0}.vice-admin-copy>strong{display:block;font-size:17px}.vice-admin-copy>span{display:block;color:var(--muted);font-size:13px;margin-top:4px}
.vice-stage-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.vice-stage-chips i{font-style:normal;font-size:11px;font-weight:700;background:var(--mint);color:var(--secondary-dark);border-radius:999px;padding:4px 8px}
.vice-stage-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}.vice-stage-picker label{display:flex;flex-direction:row!important;align-items:center;gap:8px!important;padding:10px;border:1px solid var(--line);border-radius:12px;background:#f8fbfc}.vice-stage-picker input{width:18px;height:18px;accent-color:var(--secondary)}

.security-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
.teacher-password-list{display:flex;flex-direction:column;gap:9px}
.teacher-password-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:13px;padding:11px 12px;background:#f9fcfc}.teacher-password-item strong,.teacher-password-item span{display:block}.teacher-password-item span{font-size:11px;color:var(--muted);margin-top:3px}

/* حالة الإرجاع. */
.status.returned{background:#fff0f1;color:#b04451}
.report-mini-returned .report-mini-status-head{background:#fff5f5}
.returned-note{display:flex;flex-direction:column;gap:4px;margin:10px 0;padding:10px 12px;border:1px solid #f0c9ce;border-right:4px solid var(--danger);border-radius:12px;background:#fff7f8;color:#6f3b42;font-size:12px}.returned-note strong{color:#a43f4c}.modal-return-note{margin-bottom:14px}
.returned-table-note{color:#ad4652!important;font-weight:600}
.assigned-vice-line{color:var(--primary-dark)!important}
.vice-row-returned{background:#fffafa}

.btn.teacher-form{background:#eef6fb;color:#247ca0;border:1px solid #cde3ed}.btn.teacher-form:hover{background:#e1f0f7}
.teacher-print-long{white-space:normal;text-align:center;line-height:1.5}
.process-modal-actions{flex-wrap:wrap}

/* مرونة فلاتر الوكيل بعد إضافة فلتر الاسم. */
.vice-filters{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important}

/* على أجهزة الكمبيوتر لا نعرض أي عناصر تثبيت موجهة للجوال. */
@media (hover:hover) and (pointer:fine){
  .install-reopen-btn,
  .install-banner{display:none!important}
}

@media (max-width:900px){
  .brand-mark{width:52px;height:52px;flex-basis:52px;border-radius:16px}
  .brand-mark img{width:47px;height:47px}
  .security-grid{grid-template-columns:1fr}
  .vice-admin-list{grid-template-columns:1fr}
  .vice-admin-card{align-items:flex-start;flex-direction:column}
}

/* ===== 0.7.2: إعادة تنظيم صندوق مخالفات الوكيل/الوكيلة ===== */
.vice-filter-priority{
  padding:10px 12px;
  border:1px solid rgba(36,189,125,.32);
  border-radius:16px;
  background:linear-gradient(135deg,#eefaf5,#eef8fb);
  box-shadow:0 7px 18px rgba(36,189,125,.08);
}
.vice-filter-priority > span{
  color:var(--secondary-dark);
  font-weight:800;
}
.vice-filter-priority select{
  border-color:rgba(36,189,125,.62);
  background:#fff;
  box-shadow:0 0 0 3px rgba(36,189,125,.06);
}
.vice-table{
  min-width:1780px;
}
.vice-table th,
.vice-table td{
  padding-inline:10px;
}
.vice-table .vice-name-cell{
  min-width:170px;
}
.vice-table .behavior-cell{
  min-width:290px;
  max-width:390px;
}
.vice-table .degree-column{
  width:105px;
  min-width:105px;
  text-align:center;
}
.vice-table .degree-column .degree-pill{
  margin:0 auto;
  white-space:nowrap;
  font-size:14px;
  padding:5px 9px;
}
.status-action-cell,
.communication-action-cell{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.communication-action-cell .communication-state{
  margin-bottom:0;
}
.row-action-menu{
  position:relative;
  flex:0 0 auto;
}
.row-action-menu > summary{
  width:36px;
  height:32px;
  display:grid;
  place-items:center;
  border:1px solid #dce7ea;
  border-radius:10px;
  background:#f4f8f9;
  color:#50666f;
  font-size:20px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.row-action-menu > summary::-webkit-details-marker{display:none}
.row-action-menu[open] > summary{
  border-color:#a9ced7;
  background:#eaf5f7;
  color:var(--primary-dark);
}
.row-action-menu-panel{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:35;
  display:flex;
  flex-direction:column;
  gap:6px;
  width:max-content;
  min-width:155px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  box-shadow:0 14px 35px rgba(23,43,53,.16);
}
.action-menu-btn{
  width:100%;
  border:0;
  border-radius:9px;
  padding:8px 11px;
  background:#edf4f6;
  color:#35505b;
  font-weight:700;
  text-align:right;
  white-space:nowrap;
}
.action-menu-btn:hover{background:#e2eef1}
.action-menu-btn.primary{background:#e9f8f1;color:#167b4d}
.action-menu-btn.teacher{background:#f0f3fb;color:#485f9c}
.action-menu-btn.whatsapp{background:#e9f8ef;color:#16824e}
.action-menu-note{
  display:block;
  padding:7px 9px;
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
}
.vice-row-returned .status-action-cell .status.returned{
  background:#fff0f1;
  color:#b34c58;
}

@media(max-width:900px){
  .vice-filter-priority{padding:9px 10px}
}

/* ===== 0.8.0: تحسينات سهولة الاستخدام، حجم النصوص، وصندوق الوكيل ===== */

/* يتحكم الزران أعلى الصفحة في تكبير/تصغير الواجهة مع حفظ الاختيار محليًا. */
html{
  --slok-page-zoom:1;
}
body{
  zoom:var(--slok-page-zoom,1);
}

.text-size-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  flex:0 0 auto;
  padding:4px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f7fafb;
  white-space:nowrap;
}
.text-size-controls button{
  min-width:32px;
  height:31px;
  padding:0 7px;
  border:0;
  border-radius:9px;
  background:#eaf3f5;
  color:#405d68;
  font-weight:800;
  line-height:1;
}
.text-size-controls button:hover:not(:disabled){
  background:var(--mint);
  color:var(--secondary-dark);
}
.text-size-controls button:disabled{opacity:.4;cursor:not-allowed}
.text-size-controls span{
  min-width:42px;
  text-align:center;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.teacher-access-logout{
  border:0;
  border-radius:999px;
  padding:5px 9px;
  background:#edf5f7;
  color:#4a6470;
  font-size:11px;
  font-weight:700;
  line-height:1.35;
  white-space:nowrap;
}
.teacher-access-logout:hover{background:#e1eef1;color:var(--primary-dark)}

/* نمنح صندوق المخالفات مساحة رأسية كافية حتى لا تُقص القوائم المنسدلة عند وجود سجل واحد. */
.vice-table-wrap{
  min-height:500px;
  overflow:auto;
  padding-bottom:150px;
}
.vice-table tbody tr:last-child td{
  border-bottom:1px solid #e5edef;
}

/* قوائم النقاط الثلاث أصغر وأكثر كثافة. */
.row-action-menu > summary{
  width:31px;
  height:28px;
  border-radius:8px;
  font-size:17px;
}
.row-action-menu-panel{
  top:calc(100% + 4px);
  gap:4px;
  min-width:126px;
  padding:6px;
  border-radius:11px;
}
.action-menu-btn{
  border-radius:7px;
  padding:5px 8px;
  font-size:11px;
  font-weight:700;
  line-height:1.35;
}
.action-menu-note{
  padding:5px 7px;
  font-size:10px;
  line-height:1.4;
}
.status-action-cell,
.communication-action-cell{gap:6px}
.status-action-cell .status,
.communication-action-cell .communication-state{
  font-size:11px;
}

@media(max-width:1680px) and (min-width:901px){
  .text-size-controls{order:2}
}

@media(max-width:900px){
  .text-size-controls{
    margin-inline-start:auto;
    padding:3px;
  }
  .text-size-controls span{display:none}
  .text-size-controls button{min-width:30px;height:29px}
  .vice-table-wrap{
    min-height:380px;
    padding-bottom:125px;
  }
}

/* القسم الثابت حسب نوع المدرسة */
select.fixed-gender-select:disabled{
  opacity:1;
  color:var(--ink);
  background:#f3f7f8;
  border-color:#cfdde1;
  cursor:default;
  font-weight:700;
}

/* ملاحظات المعلم الاختيارية أسفل الاسم والتوقيع */
.teacher-guidance-note{
  display:block;
  margin-top:6px;
  padding:6px 9px;
  border-radius:9px;
  background:#fff4f4;
  color:#bd6a70;
  font-size:11px;
  font-weight:500;
  line-height:1.65;
}

/* ترتيب أوضح لسجل المعلم: السلوك ثم اسم الطالب ثم بيانات الموقع والتاريخ والوكيل */
.teacher-record-summary{width:100%}
.teacher-record-summary h4{margin:0 0 10px}
.teacher-record-summary p{margin:5px 0;color:var(--muted);font-size:12px;line-height:1.65}
.report-student-name{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin:7px 0 9px;
  color:#50646d;
  font-size:12px;
}
.report-student-name strong{
  color:var(--ink);
  font-size:15px;
  font-weight:800;
}
.report-vice-line strong{color:var(--primary-dark)}

/* زر إضافة الفصل/الشعبة نصي بدل زر + الصغير */
.add-class-btn{
  padding:6px 10px!important;
  min-width:auto!important;
  width:auto!important;
  height:auto!important;
  white-space:nowrap;
}

/* نافذة استيراد الطلاب: ملف أو نسخ ولصق */
.student-import-section{
  margin-top:12px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f9fbfc;
}
.student-import-section h3{margin:0 0 10px;font-size:16px}
.student-file-picker{display:flex;flex-direction:column;gap:8px;font-weight:700}
.student-file-picker input{background:#fff}
.import-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:12px 0;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.import-divider:before,.import-divider:after{content:"";height:1px;background:var(--line);flex:1}
.paste-import-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.paste-import-grid label{display:flex;flex-direction:column;gap:7px;font-weight:700}
.paste-import-grid textarea{min-height:220px;line-height:1.8;white-space:pre;resize:vertical}
.paste-import-grid textarea[dir="ltr"]{text-align:left}
.compact-actions{margin-top:10px}
.demo-actions{flex-wrap:wrap}

@media(max-width:700px){
  .paste-import-grid{grid-template-columns:1fr}
  .paste-import-grid textarea{min-height:160px}
  .teacher-guidance-note{font-size:10px}
}

/* ===== 0.10.1: كثافة جدول الوكيل وإغلاق قوائم الإجراءات ===== */
.vice-table-wrap{
  min-height:0;
  max-height:480px;
  overflow:auto;
  padding-bottom:105px;
}
.vice-table thead th{
  height:42px;
  padding-top:6px;
  padding-bottom:6px;
  line-height:1.25;
  font-size:13px;
  vertical-align:middle;
}
.vice-table tbody td{
  padding-top:8px;
  padding-bottom:8px;
  line-height:1.45;
}

@media(max-width:600px){
  .vice-table-wrap{
    max-height:480px;
    padding-bottom:105px;
  }
}

/* ===== 0.11.0: بوابة الدخول وحسابات المدارس والمعلمين ===== */
.role-hidden{display:none!important}
body.access-gate-open{overflow:hidden}
.access-gate{
  position:fixed;inset:0;z-index:12500;display:grid;place-items:center;padding:22px;
  background:linear-gradient(145deg,rgba(12,48,55,.78),rgba(32,75,72,.62));
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)
}
.access-gate.hidden{display:none!important}
.access-gate-card{
  width:min(720px,100%);max-height:calc(100vh - 44px);overflow:auto;background:rgba(255,255,255,.98);
  border:1px solid rgba(255,255,255,.75);border-radius:32px;padding:30px;box-shadow:0 28px 80px rgba(10,37,43,.28)
}
.access-gate-brand{display:flex;align-items:center;gap:16px;margin-bottom:24px}
.access-gate-brand img{width:78px;height:78px;object-fit:contain;border-radius:22px;box-shadow:0 12px 28px rgba(26,104,102,.15)}
.access-gate-brand span{font-size:13px;color:var(--primary);font-weight:800}.access-gate-brand h1{margin:2px 0 3px;font-size:32px}.access-gate-brand p{margin:0;color:var(--muted)}
.access-tabs{display:grid;grid-template-columns:1fr 1fr;background:#eef5f5;padding:5px;border-radius:16px;margin-bottom:22px;gap:5px}
.access-tabs button{border:0;background:transparent;border-radius:12px;padding:13px 16px;font:inherit;font-weight:800;color:var(--muted);cursor:pointer}
.access-tabs button.active{background:#fff;color:var(--primary-dark);box-shadow:0 5px 16px rgba(25,67,73,.09)}
.access-pane{display:none}.access-pane.active{display:block;animation:accessPaneIn .22s ease}
@keyframes accessPaneIn{from{opacity:.25;transform:translateY(5px)}to{opacity:1;transform:none}}
.access-pane-head{text-align:right;margin-bottom:18px}.access-pane-head h2{margin:0 0 4px;font-size:23px}.access-pane-head p{margin:0;color:var(--muted)}
.access-form{display:grid;gap:14px}.access-form label{display:grid;gap:7px;font-weight:700}.access-form input{direction:ltr;text-align:center;letter-spacing:1.5px;font-size:18px;font-weight:700}
.access-form button{margin-top:4px}.access-gate-footer{text-align:center;color:var(--muted);font-size:12px;margin-top:18px}

.welcome-card{border:1px solid #d7e8e8;border-radius:22px;padding:20px 22px;margin-bottom:18px;background:linear-gradient(135deg,#f8fdfc,#eef8f6);box-shadow:0 10px 30px rgba(24,82,80,.06)}
.welcome-card.hidden{display:none!important}.welcome-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.welcome-eyebrow{display:block;color:var(--primary);font-size:12px;font-weight:800;margin-bottom:2px}.welcome-card h2{margin:0;font-size:24px}.welcome-card-head p{margin:4px 0 0;color:var(--muted)}
.welcome-count{min-width:120px;text-align:center;background:#fff;border:1px solid #dce9e9;border-radius:16px;padding:10px 14px}.welcome-count strong{display:block;font-size:24px;color:var(--primary-dark)}.welcome-count span{font-size:11px;color:var(--muted)}
.welcome-status-counts{display:flex;gap:8px;flex-wrap:wrap}.welcome-status-counts span{min-width:92px;background:#fff;border:1px solid #dce9e9;border-radius:14px;padding:8px 10px;text-align:center;font-size:10px;color:var(--muted)}.welcome-status-counts b{display:block;font-size:19px;color:var(--primary-dark)}
.welcome-summary-list{display:grid;gap:8px}.welcome-summary-list article{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(180px,1.6fr) auto;align-items:center;gap:12px;background:#fff;border:1px solid #e2eded;border-radius:14px;padding:10px 12px}.welcome-summary-list article strong,.welcome-summary-list article span{display:block}.welcome-summary-list article>div>span{font-size:11px;color:var(--muted);margin-top:2px}.welcome-summary-list article p{margin:0;font-size:12px}.welcome-meta{display:flex;gap:8px;align-items:center;justify-content:flex-end;font-size:11px;color:var(--muted)}
.welcome-status{padding:4px 8px;border-radius:999px;font-weight:800}.welcome-status.status-processed{background:#e6f8ee;color:#177c50}.welcome-status.status-returned{background:#fff0f1;color:#b63d4b}.welcome-status.status-sent,.welcome-status.status-processing{background:#fff6df;color:#956614}.welcome-empty{text-align:center;color:var(--muted);padding:14px;background:#fff;border-radius:14px}

.teacher-accounts-panel .panel-head-actions{display:flex;gap:8px;flex-wrap:wrap}.teacher-account-list{display:grid;gap:9px}.teacher-account-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:#fbfdfd}.teacher-account-copy{min-width:0}.teacher-account-copy strong,.teacher-account-copy span,.teacher-account-copy code{display:block}.teacher-account-copy span{font-size:11px;color:var(--muted);margin:2px 0}.teacher-account-copy code{direction:ltr;text-align:right;font-family:monospace;font-size:13px;color:var(--primary-dark);font-weight:800}.teacher-registration-link{margin-bottom:12px;padding:12px;border:1px dashed #b8d7d5;border-radius:14px;background:#f4fbfa}.copy-input{display:flex;gap:8px;align-items:center}.copy-input input{direction:ltr;text-align:left;min-width:0}.teacher-code-builder{display:flex;direction:ltr;align-items:center;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#fff}.teacher-code-builder span{padding:11px 12px;background:#eef6f6;font-family:monospace;font-weight:800;color:var(--primary-dark);white-space:nowrap}.teacher-code-builder input{border:0!important;border-radius:0!important;box-shadow:none!important;text-align:center;direction:ltr;font-weight:800;letter-spacing:2px}
#teacherName[readonly],#schoolCodeDisplay[readonly]{background:#f2f7f7;color:#28434a;font-weight:700;cursor:default}

@media (max-width:700px){
  .access-gate{padding:12px}.access-gate-card{border-radius:24px;padding:20px;max-height:calc(100vh - 24px)}.access-gate-brand img{width:62px;height:62px}.access-gate-brand h1{font-size:26px}
  .welcome-card-head{display:block}.welcome-count,.welcome-status-counts{margin-top:12px}.welcome-summary-list article{grid-template-columns:1fr}.welcome-meta{justify-content:flex-start}.teacher-account-item{align-items:flex-start;flex-direction:column}.teacher-account-item .table-actions{width:100%;justify-content:flex-end}.copy-input{align-items:stretch}.copy-input .btn{flex:0 0 auto}
}


/* ===== 0.11.1: تحسين واجهة المعلم على الجوال وملخص الحالة وقائمة السلوك ===== */

/* ملخص المعلم: الاكتفاء بكروت الحالات مع خط أوضح وزر تحديث واحد. */
.teacher-welcome .teacher-welcome-head{
  align-items:center;
  margin-bottom:0;
}
.teacher-welcome .teacher-welcome-copy{
  min-width:min(420px,100%);
  flex:1 1 420px;
}
.teacher-welcome .teacher-welcome-copy p{
  font-size:17px;
  line-height:1.85;
}
.teacher-welcome .teacher-welcome-toolbar{
  display:flex;
  align-items:stretch;
  gap:10px;
  flex:0 1 auto;
  flex-wrap:wrap;
}
.teacher-welcome .welcome-status-counts{
  display:grid;
  grid-template-columns:repeat(3,minmax(118px,1fr));
  gap:10px;
  flex:1 1 auto;
}
.teacher-welcome .welcome-status-counts span{
  min-width:118px;
  padding:12px 13px;
  border-radius:16px;
  font-size:15px;
  line-height:1.55;
  font-weight:700;
}
.teacher-welcome .welcome-status-counts b{
  margin-bottom:3px;
  font-size:29px;
  line-height:1.15;
  font-weight:800;
}
.teacher-summary-refresh{
  min-width:76px;
  align-self:stretch;
  font-size:15px;
}

/* السلوكيات مرتبة أبجديًا من JavaScript، مع تباين صفوف القائمة حيث يسمح المتصفح. */
#tBehavior option.behavior-option-shaded{background:#f0f2f3;color:var(--ink)}
#tBehavior option.behavior-option-plain{background:#fff;color:var(--ink)}

/* في الجوال يبقى زر تسجيل الخروج ظاهرًا، وتظهر نصوص عناصر القائمة مع الأيقونات. */
@media (max-width:900px){
  .topbar{
    gap:8px;
    padding-inline:12px;
  }
  .brand-area{
    order:1;
    flex:1 1 230px;
    min-width:0;
  }
  .text-size-controls{
    order:2;
    margin:0;
    flex:0 0 auto;
  }
  .mobile-nav-toggle{
    order:3;
    margin:0;
    flex:0 0 auto;
  }
  .user-menu{
    order:4;
    display:flex;
    min-width:auto;
    width:auto;
    flex:0 0 auto;
    margin:0;
  }
  #sessionLabel{display:none!important}
  #logoutBtn{
    display:inline-flex;
    min-height:36px;
    padding:7px 11px;
    white-space:nowrap;
  }
  #logoutBtn.hidden{display:none!important}
  .main-nav{
    order:5;
    flex:0 0 100%;
    width:100%;
    gap:7px;
    padding-top:7px;
    border-top:1px solid rgba(216,229,232,.78);
  }
  .main-nav.open{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .main-nav button{
    width:100%;
    justify-content:flex-start;
    padding:10px 12px;
    gap:9px;
  }
  .main-nav button > span:not(.developer-nav-mark){display:inline!important}
  .about-developer-nav{justify-content:flex-start!important}
}

@media (max-width:600px){
  .teacher-welcome{padding:18px 16px}
  .teacher-welcome .teacher-welcome-head{display:block}
  .teacher-welcome .teacher-welcome-copy p{font-size:16px}
  .teacher-welcome .teacher-welcome-toolbar{
    margin-top:14px;
    display:grid;
    grid-template-columns:1fr auto;
    align-items:stretch;
  }
  .teacher-welcome .welcome-status-counts{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    margin-top:0;
  }
  .teacher-welcome .welcome-status-counts span{
    min-width:0;
    padding:10px 7px;
    font-size:13px;
  }
  .teacher-welcome .welcome-status-counts b{font-size:27px}
  .teacher-summary-refresh{
    min-width:68px;
    padding-inline:9px;
    font-size:14px;
  }
  .brand-area{
    flex-basis:205px;
  }
}

@media (max-width:460px){
  .topbar{gap:6px}
  .brand-area{flex:1 1 100%;order:1}
  .text-size-controls{order:2}
  .mobile-nav-toggle{order:3}
  .user-menu{order:4}
  .main-nav{order:5}
  .teacher-welcome .teacher-welcome-toolbar{
    grid-template-columns:1fr;
  }
  .teacher-summary-refresh{width:100%;min-height:40px}
}

/* ===== 0.11.2: تحسينات الوكيل والدخول والإدارة ===== */

/* ارتفاع ثابت لمنطقة مخالفات الوكيل: البقية بالتمرير. */
.vice-table-wrap{
  min-height:0!important;
  max-height:325px!important;
  overflow:auto!important;
  padding-bottom:0!important;
}

/* إلغاء كرت التمييز حول فلتر الوكيل/الوكيلة، مع إبراز الاسم والقائمة فقط. */
.vice-filter-priority{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.vice-filter-priority > span{
  color:#ffca77!important;
  font-weight:800!important;
}
.vice-filter-priority select{
  background:#ffca77!important;
  color:#000!important;
  border-color:#ffca77!important;
  box-shadow:none!important;
  font-weight:700;
}
.vice-filter-priority select option{
  background:#ffca77;
  color:#000;
}

/* كود الدخول الجديد: كود مدرسة مثل MKT145، ومع المعلم يضاف الجزء الأخير بعد الشرطة. */
.login-code-builder{
  display:flex;
  align-items:stretch;
  justify-content:center;
  width:100%;
  direction:ltr;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  min-height:52px;
}
.login-code-builder:focus-within{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(21,148,94,.09);
}
.login-code-builder .login-code-fixed,
.login-code-builder .login-code-separator{
  display:grid;
  place-items:center;
  padding:0 12px;
  background:#eef6f4;
  color:var(--primary-dark);
  font-size:20px;
  font-weight:800;
  font-family:monospace;
  white-space:nowrap;
}
.login-code-builder .login-code-separator{
  padding-inline:7px;
  background:#f7faf9;
}
.login-code-builder input{
  min-width:0;
  flex:1 1 95px;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:10px 8px!important;
  text-align:center!important;
  direction:ltr!important;
  font-size:21px!important;
  font-weight:800!important;
  letter-spacing:3px!important;
  background:#fff!important;
}
.school-login-code input{max-width:220px}
.teacher-login-code input:first-of-type{max-width:180px}
.teacher-login-code input:last-of-type{max-width:115px}

/* الإشعارات أصبحت جزءًا من الإدارة بين العنوان والتبويبات. */
.admin-notification-control{
  margin:0 0 18px!important;
}

/* رسالة الترحيب المختصرة بجوار شعار سلوك. */
.brand small{
  max-width:220px;
}

@media(max-width:600px){
  .vice-table-wrap{
    max-height:325px!important;
    padding-bottom:0!important;
  }
  .login-code-builder .login-code-fixed,
  .login-code-builder .login-code-separator{font-size:18px;padding-inline:9px}
  .login-code-builder input{font-size:19px!important;letter-spacing:2px!important}
  .brand small{max-width:145px}
}

/* 0.11.3 — نموذج السلوك الموحّد والسلوك المتميز */
.teacher-auto-hidden{display:none!important}
.teacher-signature-common{margin-bottom:2px}
.teacher-behavior-tabs-wrap{margin-top:2px}
.teacher-behavior-tabs{width:100%;justify-content:center;background:#f2f7f8;border:1px solid var(--line);padding:5px}
.teacher-behavior-tabs button{flex:1;min-height:44px;font-size:13px}
.teacher-behavior-tabs button.active{background:#eaf8f3;color:#15945e;box-shadow:0 4px 12px rgba(21,148,94,.08)}
.behavior-mode-fields{width:100%}
.nested-form-grid{width:100%}
.positive-form-grid{align-items:start}
#tPositivePoints[readonly]{background:#f4f8f9;color:#15945e;font-weight:800;cursor:default}
.positive-evidence-picker{display:flex!important;align-items:center;justify-content:center;gap:10px;min-height:92px;padding:16px;border:1px dashed #9fc7d0;border-radius:15px;background:linear-gradient(180deg,#fff,#f7fbfc);cursor:pointer;text-align:center}
.positive-evidence-picker:hover{border-color:var(--secondary);background:#f1fbf7}
.positive-evidence-picker .positive-evidence-icon{font-size:27px}
.positive-evidence-picker strong{font-size:13px;color:var(--ink)}
.positive-evidence-picker small{display:block;color:var(--muted);font-size:11px;font-weight:500}
.teacher-record-tabs{margin:-4px 0 14px}
.teacher-record-tabs button{flex:1;text-align:center}
.positive-report-mini{border-right:4px solid #24bd7d;background:linear-gradient(180deg,#fff,#fbfffd)}
.positive-report-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.positive-record-label{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;background:#eaf8f3;color:#15945e;font-size:10px;font-weight:800}
.positive-points-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#edf7fb;color:#1888a8;font-size:11px;font-weight:800}
.positive-description{margin-top:9px;padding:9px 10px;border-radius:11px;background:#f7fafb;color:#465c65;font-size:11px;line-height:1.8}
.positive-evidence-state{margin-top:8px!important;color:#15945e!important;font-weight:700}

@media(max-width:700px){
  .teacher-behavior-tabs button{font-size:12px;padding:9px 8px}
  .positive-evidence-picker{min-height:84px;flex-wrap:wrap}
  .positive-report-head{align-items:flex-start;flex-direction:column}
}

/* 0.11.4 — صفحة الإدارة الخاصة بالسلوك المتميز */
.positive-admin-hero{margin-bottom:18px}
.positive-admin-panel{overflow:hidden}
.positive-admin-filters{
  grid-template-columns:repeat(6,minmax(135px,1fr));
  align-items:end;
}
.positive-admin-filters label{display:flex;flex-direction:column;gap:7px}
.required-mark{color:var(--danger);font-weight:900}
.positive-admin-toolbar{margin-top:3px}
.positive-admin-content{display:flex;flex-direction:column;gap:18px;min-height:220px}
.positive-stage-group{border:1px solid var(--line);border-radius:18px;background:#f8fbfc;overflow:hidden}
.positive-stage-group>h2{margin:0;padding:13px 16px;background:linear-gradient(90deg,#eaf8f3,#edf7fb);color:var(--secondary-dark);font-size:18px}
.positive-grade-group{padding:14px}
.positive-grade-group>h3{margin:0 0 11px;padding-bottom:8px;border-bottom:1px dashed #d7e4e7;color:var(--primary-dark);font-size:16px}
.positive-class-group{margin-top:13px;padding:13px;border:1px solid #e1ebed;border-radius:15px;background:#fff}
.positive-class-group>h4{margin:0 0 11px;font-size:14px;color:var(--ink)}
.positive-summary-table,.positive-works-table{min-width:760px}
.positive-summary-table th,.positive-works-table th{background:#f0f8f5;color:#47606a}
.positive-summary-table td,.positive-works-table td{vertical-align:middle}
.positive-total-points{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:5px 10px;border-radius:999px;background:#eaf8f3;color:#15945e;font-size:14px;font-weight:900}
.positive-student-work-group{margin-top:12px;border:1px solid #e1ebed;border-radius:13px;overflow:hidden;background:#fff}
.positive-student-work-group:first-of-type{margin-top:0}
.positive-student-work-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px;background:linear-gradient(90deg,#edf8f4,#f4fafb);border-bottom:1px solid #e1ebed}
.positive-student-work-head strong{font-size:14px;color:var(--ink)}
.positive-student-work-head span{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:4px 10px;border-radius:999px;background:#fff;color:var(--secondary-dark);font-size:11px;font-weight:800;border:1px solid #d8e9e2}
.positive-student-work-group .table-wrap{border:0;border-radius:0}
.positive-works-table td:nth-child(1),.positive-works-table td:nth-child(4){min-width:210px;line-height:1.8}
.positive-work-evidence-btn{min-width:86px;white-space:nowrap}
.positive-work-evidence-btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none!important}

@media(max-width:1150px){
  .positive-admin-filters{grid-template-columns:repeat(3,minmax(160px,1fr))}
}
@media(max-width:700px){
  .positive-admin-filters{grid-template-columns:1fr 1fr}
  .positive-admin-toolbar .btn{flex:1}
  .positive-stage-group>h2{font-size:16px}
  .positive-grade-group{padding:10px}
  .positive-class-group{padding:10px}
}
@media(max-width:470px){
  .positive-admin-filters{grid-template-columns:1fr}
}

/* ===== لوحة إحصائيات المخالفات 0.12.0 ===== */
.statistics-hero{margin-bottom:16px}
.statistics-hero-actions{align-items:center}
.statistics-filter-panel{padding:18px 20px;margin-bottom:18px}
.statistics-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:12px;align-items:end}
.statistics-filter-grid label,.statistics-custom-period label,.statistics-inline-filter label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:800;color:var(--ink)}
.statistics-filter-grid select,.statistics-custom-period input,.statistics-inline-filter select{min-height:45px;background:#fff}
.statistics-custom-period{display:grid;grid-template-columns:repeat(2,minmax(190px,1fr));gap:12px;margin-top:12px;max-width:520px;margin-right:auto}
.statistics-filter-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px dashed var(--line)}
.statistics-active-filters{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-height:30px}
.stats-filter-chip{display:inline-flex;align-items:center;max-width:320px;padding:5px 10px;border-radius:999px;background:var(--mint);color:var(--secondary-dark);font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stats-filter-chip.muted-chip{background:#eef4f6;color:#526972}.stats-filter-chip.cross-chip{background:#e9f3ff;color:#236ca1;border:1px solid #cfe1ef}
.statistics-filter-actions{display:flex;gap:8px;flex-wrap:wrap}
.statistics-section{margin-bottom:18px}.statistics-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.statistics-section-head h2{margin:0;font-size:20px}.statistics-section-head p{margin:4px 0 0;color:var(--muted);font-size:12px}
.stats-print-choice{display:inline-flex;align-items:center;gap:7px;flex-direction:row!important;font-size:11px!important;color:var(--muted)!important;font-weight:700!important;white-space:nowrap;cursor:pointer}.stats-print-choice input{width:17px;height:17px;accent-color:var(--secondary);padding:0}
.statistics-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:11px}
.statistics-kpi-card{min-height:128px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:15px 16px;box-shadow:0 10px 28px rgba(21,70,84,.065);display:flex;flex-direction:column;gap:5px;justify-content:center}
.statistics-kpi-card>span{font-size:13px;color:#5c6e76;font-weight:700}.statistics-kpi-card>strong{font-size:32px;line-height:1.2;color:var(--primary-dark)}.statistics-kpi-card small{font-size:12px;font-weight:700;line-height:1.6}.statistics-kpi-card em{font-size:11.5px;color:var(--muted);font-style:normal}.stats-change.good,.good{color:#16834f!important}.stats-change.bad,.bad{color:#c2474f!important}.stats-change.neutral,.neutral{color:#7b8990!important}
.statistics-no-data{margin-bottom:18px;text-align:center;color:var(--muted);font-weight:800;padding:30px}.statistics-empty-hidden{display:none!important}
.statistics-grid{display:grid;gap:18px;margin-bottom:18px}.statistics-grid.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.statistics-panel{min-width:0}.statistics-wide{margin-bottom:18px}.statistics-panel-head{align-items:center}.statistics-panel-head .stats-print-choice{margin-right:auto}
.statistics-chart{min-height:260px}.stats-chart-legend{display:flex;justify-content:flex-start;gap:18px;margin:0 0 6px;font-size:13px;color:var(--muted)}.stats-chart-legend span{display:flex;align-items:center;gap:6px}.legend-line{display:inline-block;width:26px;height:3px;border-radius:3px}.legend-line.current{background:var(--primary)}.legend-line.previous{background:#9aaab0;border-top:1px dashed #fff}
.stats-line-svg{display:block;width:100%;height:auto;min-height:250px;overflow:visible}.stats-grid-line{stroke:#e6eef0;stroke-width:1}.stats-axis-text{fill:#77888f;font-size:12px;font-family:Cairo,Tahoma,Arial,sans-serif}.stats-series{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.stats-series.current{stroke:var(--primary)}.stats-series.previous{stroke:#9aaab0;stroke-dasharray:8 6;stroke-width:2}.stats-point{cursor:help;outline:none;stroke:#fff;stroke-width:2}.stats-point.current{fill:var(--primary)}.stats-point.previous{fill:#9aaab0}.stats-point:focus{stroke:#172b35;stroke-width:3}
.stats-donut-layout{display:grid;grid-template-columns:minmax(170px,220px) 1fr;gap:16px;align-items:center}.stats-donut-svg{width:100%;max-width:210px;margin:auto;overflow:visible}.stats-donut-segment{cursor:pointer;transition:.2s}.stats-donut-segment:hover,.stats-donut-segment:focus{stroke-width:34;outline:none}.stats-donut-caption{font:600 13px Cairo;fill:#7b8990}.stats-donut-total{font:800 25px Cairo;fill:#173d48}.stats-donut-legend{display:flex;flex-direction:column;gap:6px;max-height:300px;overflow:auto;padding-left:4px}.stats-donut-legend-row{display:grid;grid-template-columns:10px minmax(0,1fr) 44px 52px;gap:7px;align-items:center;width:100%;border:0;border-radius:9px;background:#f8fbfc;padding:7px 9px;text-align:right;color:var(--ink)}.stats-donut-legend-row:hover{background:var(--mint)}.stats-donut-legend-row i{width:9px;height:9px;border-radius:50%}.stats-donut-legend-row span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stats-donut-legend-row b{font-size:13px;text-align:center}.stats-donut-legend-row em{font-style:normal;color:var(--muted);font-size:11.5px;text-align:left}
.statistics-ranked-bars{display:flex;flex-direction:column;gap:8px}.stats-rank-bar{display:grid;grid-template-columns:32px minmax(0,1fr);gap:9px;width:100%;border:0;background:#f8fbfc;border-radius:12px;padding:10px;text-align:right;color:var(--ink)}.stats-rank-bar:hover{background:var(--mint)}.stats-rank-number{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e7f7f0;color:var(--secondary-dark);font-size:13px;font-weight:800}.stats-rank-content{min-width:0}.stats-rank-content strong{display:block;font-size:13.5px;line-height:1.55}.stats-rank-content small{display:block;color:var(--muted);font-size:11.5px;margin-top:3px;line-height:1.5}.stats-rank-content small em{font-style:normal;font-weight:700}.stats-rank-content>i,.stats-location-row>i{display:block;height:6px;background:#e4edef;border-radius:999px;overflow:hidden;margin-top:6px}.stats-rank-content>i u,.stats-location-row>i u{display:block;height:100%;background:linear-gradient(90deg,var(--secondary),var(--primary));border-radius:999px;text-decoration:none}
.statistics-dimension-tabs{margin:0 0 12px}.statistics-location-bars{max-height:none;overflow:visible;padding-left:4px}.stats-location-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,34%) 52px;gap:10px;align-items:center;width:100%;border:0;background:#f8fbfc;border-radius:11px;padding:10px 11px;text-align:right;color:var(--ink)}.stats-location-row:hover{background:var(--mint)}.stats-location-row span{min-width:0}.stats-location-row strong{display:block;font-size:13px}.stats-location-row small{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}.stats-location-row>i{margin:0}.stats-location-row>b{text-align:left;color:var(--primary-dark);font-size:13px}
.statistics-inline-filter{display:flex;justify-content:flex-end;margin:-6px 0 10px}.statistics-inline-filter label{min-width:170px}
.statistics-heatmap-wrap{overflow-x:auto;overflow-y:visible;max-height:none;border:1px solid #e5edef;border-radius:12px}.statistics-heatmap{border-collapse:separate;border-spacing:2px;min-width:max-content;width:100%;background:#fff}.statistics-heatmap th,.statistics-heatmap td{border:0;padding:8px 9px;font-size:12px;text-align:center;vertical-align:middle}.statistics-heatmap thead th{position:sticky;top:0;z-index:3;background:#eef5f7;color:#50646d;min-width:76px}.statistics-heatmap .heatmap-behavior{position:sticky;right:0;z-index:2;width:210px;min-width:210px;max-width:210px;background:#f7fafb;text-align:right;white-space:normal}.statistics-heatmap .heatmap-behavior button{border:0;background:transparent;text-align:right;font-size:12.5px;font-weight:700;line-height:1.55;color:var(--ink);width:100%;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.statistics-heatmap td{background:rgba(24,136,168,var(--heat-alpha));min-width:68px;height:38px}.statistics-heatmap td b{font-size:12.5px;color:#173d48}
.statistics-table-wrap{max-height:470px}.statistics-table{min-width:760px}.statistics-table td,.statistics-table th{font-size:13px;line-height:1.65}.statistics-table td strong{font-size:13.5px}.stats-pattern{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11.5px;font-weight:700}.stats-pattern.same{background:#fff1df;color:#9a6203}.stats-pattern.multiple{background:#eef0ff;color:#5d60b8}.stats-pattern.single{background:#edf5f7;color:#607078}
.statistics-teacher-rank{max-height:470px;overflow:auto}.statistics-teacher-rank .rank-item{grid-template-columns:32px minmax(0,1fr) 58px;font-size:13px;padding:10px}.statistics-teacher-rank strong{text-align:left;color:var(--primary-dark);font-size:13px}
.statistics-status-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.statistics-status-grid article{background:#f7fafb;border:1px solid #e5edef;border-radius:13px;padding:14px}.statistics-status-grid article.highlight{background:var(--mint);border-color:#cde9de}.statistics-status-grid strong{display:block;font-size:26px;color:var(--primary-dark)}.statistics-status-grid span{font-size:12.5px;color:var(--muted)}
.statistics-alert-list{display:flex;flex-direction:column;gap:9px}.statistics-alert{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;padding:12px 13px;border-radius:11px;background:#f8fbfc;font-size:13.5px;line-height:1.8}.statistics-alert i{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;font-style:normal;font-weight:900}.statistics-alert.warning i{background:#fff0df;color:#b16c00}.statistics-alert.positive i{background:#e8f8ef;color:#16834f}.statistics-alert.info i{background:#eaf5fa;color:#187b98}
.statistics-tooltip{position:fixed;z-index:190;max-width:310px;background:#173d48;color:#fff;padding:9px 11px;border-radius:9px;font-size:12px;box-shadow:0 8px 24px rgba(0,0,0,.2);pointer-events:none}

@media (max-width:1250px){
  .statistics-filter-grid{grid-template-columns:repeat(3,minmax(160px,1fr))}
  .statistics-kpi-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}
}
@media (max-width:820px){
  .statistics-filter-grid{grid-template-columns:1fr 1fr}.statistics-custom-period{grid-template-columns:1fr 1fr;max-width:none;margin-right:0}.statistics-filter-footer{align-items:flex-start;flex-direction:column}.statistics-grid.two{grid-template-columns:1fr}.statistics-kpi-grid{grid-template-columns:1fr 1fr}.statistics-kpi-card{min-height:118px;padding:13px}.statistics-kpi-card>span{font-size:12.5px}.statistics-kpi-card>strong{font-size:27px}.statistics-kpi-card small{font-size:11.5px}.statistics-section-head,.statistics-panel-head{align-items:flex-start;flex-direction:column}.stats-print-choice{align-self:flex-end}.stats-donut-layout{grid-template-columns:1fr}.stats-donut-legend{max-height:260px}.statistics-heatmap .heatmap-behavior{width:170px;min-width:170px;max-width:170px}.stats-location-row{grid-template-columns:minmax(0,1fr) 90px 48px}.statistics-status-grid{grid-template-columns:1fr 1fr}.statistics-alert{font-size:13px}.statistics-table td,.statistics-table th{font-size:12.5px}
}
@media (max-width:520px){
  .statistics-filter-panel{padding:14px}.statistics-filter-grid,.statistics-custom-period{grid-template-columns:1fr}.statistics-kpi-grid{grid-template-columns:1fr 1fr;gap:8px}.statistics-kpi-card{min-height:112px;padding:11px}.statistics-kpi-card>span{font-size:12px}.statistics-kpi-card>strong{font-size:25px}.statistics-kpi-card small{font-size:11px}.statistics-filter-actions{width:100%}.statistics-filter-actions .btn{flex:1}.statistics-hero-actions{width:100%}.statistics-hero-actions .btn{width:100%}.stats-chart-legend{flex-wrap:wrap;font-size:12px}.stats-line-svg{min-width:650px}.statistics-line-chart{overflow-x:auto}.statistics-status-grid{grid-template-columns:1fr 1fr}.stats-location-row{grid-template-columns:minmax(0,1fr) 62px}.stats-location-row>b{display:none}.statistics-heatmap .heatmap-behavior{width:150px;min-width:150px;max-width:150px}.statistics-heatmap th,.statistics-heatmap td{font-size:11px;padding:7px}.statistics-heatmap .heatmap-behavior button{font-size:11.5px}.statistics-table td,.statistics-table th{font-size:12px}.statistics-alert{font-size:12.5px}.stats-print-choice{font-size:11px!important}
  .demo-teacher-accounts{grid-template-columns:1fr}
}


/* ===== 0.12.4: محرر دليل المخالفات ===== */
.material-number-field{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.material-number-field>span{padding:10px 12px;background:#f3f7f8;font-weight:800;white-space:nowrap}.material-number-field input{border:0!important;border-radius:0!important;box-shadow:none!important;min-width:0}.catalog-behaviors-editor{display:grid;gap:10px}.catalog-behavior-inputs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.catalog-behavior-input{display:grid!important;grid-template-columns:34px 1fr;align-items:center;gap:8px!important}.catalog-behavior-input>span{width:34px;height:34px;border-radius:10px;background:#eef5f5;display:grid;place-items:center;font-weight:800;color:var(--secondary-dark)}.catalog-behavior-input input{min-width:0}.vice-edit-panel{border:1px solid #dce8e8;border-radius:14px;padding:12px;background:#f8fbfc;margin:12px 0}.vice-edit-panel h3{margin:0 0 10px;font-size:17px}.vice-edit-actions{display:flex;justify-content:flex-start;margin-top:10px}.vice-edit-dirty{color:#a66b10;font-size:12px;font-weight:700;margin-top:7px}.action-required-note{margin:8px 0 0;color:#a04a43;font-size:12px;font-weight:700}
@media(max-width:700px){.catalog-behavior-inputs{grid-template-columns:1fr}}


/* ===== 0.12.6: تحسينات الهوية، الدخول، الإشعارات وطباعة السلوك المتميز ===== */
/* أيقونة سلوك في رأس الموقع: 90×90 على الكمبيوتر و70×70 على الجوال. */
.brand-mark{width:90px!important;height:90px!important;border-radius:24px!important;flex:0 0 90px!important}
.brand-mark img{width:90px!important;height:90px!important;object-fit:contain!important}

/* شاشة الانتظار والتنبيهات يجب أن تعلو بوابة الدخول حتى يظهر التحقق والخطأ بوضوح. */
.overlay{z-index:13000!important}
.toast-zone{z-index:13020!important}
.access-login-error{padding:10px 12px;border-radius:12px;background:#fff0f1;border:1px solid #f0c7cc;color:#b43c49;font-weight:700;font-size:14px;text-align:right}
.access-login-error.hidden{display:none!important}

/* تفعيل الإشعارات لا يظهر داخل الإدارة على الكمبيوتر؛ يبقى متاحًا على الجوال. */
@media (min-width:901px){.admin-notification-control{display:none!important}}

/* اختيار عدد أعمدة طباعة السلوك المتميز. */
.positive-print-columns{display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap;padding:5px 7px;border:1px solid var(--line);border-radius:12px;background:#f8fbfc}
.positive-print-columns>span{font-size:13px;font-weight:800;color:var(--muted);margin-inline:3px}
.positive-print-columns label{position:relative;cursor:pointer}
.positive-print-columns input{position:absolute;opacity:0;pointer-events:none}
.positive-print-columns b{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 11px;border-radius:9px;background:#fff;border:1px solid #d9e5e7;color:#526870;font-size:13px}
.positive-print-columns input:checked+b{background:#15945e;color:#fff;border-color:#15945e;box-shadow:0 5px 14px rgba(21,148,94,.18)}
.field-optional{font-size:.78em;color:var(--muted);font-weight:600}

@media (max-width:900px){
  .brand-mark{width:70px!important;height:70px!important;border-radius:20px!important;flex-basis:70px!important}
  .brand-mark img{width:70px!important;height:70px!important}
  .positive-print-columns{width:100%;justify-content:flex-start}
}

/* 0.12.9 — الدعم الفني */
.support-hero{margin-bottom:18px}
.support-layout{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(0,1.45fr);gap:18px;align-items:start}
.support-new-panel,.support-conversations-panel{min-width:0}
.support-role-badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;background:#eaf8f3;color:#15945e;font-weight:800;font-size:13px;white-space:nowrap}
.support-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.support-form label{display:flex;flex-direction:column;gap:7px;font-weight:700}
.support-form .support-message-field{grid-column:1/-1}
.support-form textarea,.support-reply-form textarea{resize:vertical;min-height:110px}
.support-form-actions{grid-column:1/-1;margin-top:0}
.support-ticket-list{display:flex;flex-direction:column;gap:11px}
.support-ticket{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 7px 18px rgba(31,76,87,.04)}
.support-ticket>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 16px;cursor:pointer;background:linear-gradient(90deg,#fbfdfd,#f5faf9)}
.support-ticket>summary::-webkit-details-marker{display:none}
.support-ticket>summary:after{content:'⌄';font-size:18px;color:#6b7f87;transition:transform .18s ease}
.support-ticket[open]>summary:after{transform:rotate(180deg)}
.support-ticket-summary-main{min-width:0;display:grid;gap:3px;flex:1}
.support-ticket-summary-main strong{font-size:15px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.support-ticket-summary-main span{font-size:11px;color:var(--muted)}
.support-ticket-summary-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-start}
.support-ticket-summary-meta time{font-size:11px;color:#7a8990;white-space:nowrap}
.support-ticket-status{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:800}
.support-ticket-status.waiting{background:#fff3dd;color:#99630c}
.support-ticket-status.answered{background:#e8f7ee;color:#1a7d4b}
.support-thread{padding:14px 16px;border-top:1px solid #e5eeee;background:#fbfdfd}
.support-thread-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px;font-size:10.5px;color:#7a8990}
.support-owner-last{color:#16804d;font-weight:700}
.support-messages{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.support-message{width:min(86%,720px);padding:11px 13px;border-radius:14px;background:#fff;border:1px solid #e0e9eb}
.support-message.user{align-self:flex-start;border-bottom-left-radius:5px}
.support-message.owner{align-self:flex-end;background:#eaf8f3;border-color:#cfeadd;border-bottom-right-radius:5px}
.support-message-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.support-message-head strong{font-size:11px;color:#304d56}
.support-message-head time{font-size:9.5px;color:#849299;white-space:nowrap}
.support-message p{margin:0;color:#344f58;line-height:1.9;font-size:12px;overflow-wrap:anywhere}
.support-reply-form{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;padding-top:12px;border-top:1px dashed #dbe6e8}
.support-reply-form label{display:grid;gap:6px;font-weight:700}
.support-reply-form textarea{min-height:78px}
@media(max-width:1050px){.support-layout{grid-template-columns:1fr}}
@media(max-width:700px){
  .support-form{grid-template-columns:1fr}
  .support-form .support-message-field,.support-form-actions{grid-column:auto}
  .support-ticket>summary{align-items:flex-start;padding:12px}
  .support-ticket-summary-meta{justify-content:flex-start}
  .support-message{width:94%}
  .support-reply-form{grid-template-columns:1fr}
  .support-reply-form .btn{width:100%}
}

/* ===== 0.12.10: تثبيت التطبيق، Splash، الدعم ودليل المخالفات ===== */
/* تمييز عبارتي السلوك المتميز والمخالفات السلوكية في الشاشة الافتتاحية. */
.splash-kicker{
  display:flex!important;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  white-space:normal!important;
}
.splash-kicker-prefix,.splash-kicker-join{color:#5a6971;font-weight:600}
.splash-kicker-highlight{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:3px 12px 4px;
  border-radius:999px;
  font-weight:800;
  letter-spacing:-.35px;
  box-shadow:0 7px 18px rgba(39,85,91,.08);
}
.splash-kicker-highlight.positive{
  color:#147a50;
  background:linear-gradient(135deg,#e7f7ee,#f5fbf7);
  border:1px solid #c9ead8;
}
.splash-kicker-highlight.violation{
  color:#326c86;
  background:linear-gradient(135deg,#edf7fb,#f8fbfc);
  border:1px solid #d3e8ef;
}

/* شريط تثبيت سلوك بتصميم أقرب لإعلان تثبيت تطبيق. */
.install-banner{
  overflow:hidden;
  gap:14px!important;
  padding:14px 18px 14px 52px!important;
  background:linear-gradient(118deg,rgba(255,255,255,.98),rgba(238,249,245,.97))!important;
  border:1px solid rgba(95,181,140,.28)!important;
  box-shadow:0 22px 62px rgba(24,63,69,.2)!important;
}
.install-banner:before{
  content:'';
  position:absolute;
  inset-inline-start:-65px;
  top:-82px;
  width:170px;
  height:170px;
  border-radius:50%;
  border:1px solid rgba(95,181,140,.2);
  pointer-events:none;
}
.install-banner>img{
  width:64px!important;
  height:64px!important;
  flex:0 0 64px;
  border-radius:18px!important;
  border:1px solid rgba(61,151,126,.18);
}
.install-banner-copy{display:grid!important;gap:2px!important;min-width:0;flex:1}
.install-banner-badge{
  display:inline-flex!important;
  width:max-content;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  background:#e6f6ed;
  color:#19805a!important;
  font-size:10px!important;
  font-weight:800;
  line-height:1.5!important;
}
.install-banner-copy strong{font-size:21px!important;color:#173840;line-height:1.45!important}
.install-banner-copy>span{font-size:13px!important;color:#6b7b81!important}
.install-banner-cta{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-height:40px;
  padding:8px 14px;
  border-radius:12px;
  background:linear-gradient(135deg,#62b98f,#4cae83);
  color:#fff!important;
  font-size:13px!important;
  font-weight:800;
  box-shadow:0 8px 18px rgba(68,163,121,.2);
}
.install-close{z-index:3;cursor:pointer}

/* تكبير محادثات الدعم قليلًا وإضافة ردود سريعة. */
.support-ticket-summary-main strong{font-size:17px!important}
.support-ticket-summary-main span{font-size:13px!important}
.support-ticket-summary-meta time{font-size:13px!important}
.support-ticket-status{font-size:12px!important}
.support-thread-meta{font-size:12.5px!important}
.support-message-head strong{font-size:13px!important}
.support-message-head time{font-size:11.5px!important}
.support-message p{font-size:14px!important}
.support-reply-form label{font-size:15px}
.support-quick-replies{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:2px 0 4px;
}
.support-quick-reply{
  border:1px solid #cfe4dc;
  background:#f1faf6;
  color:#267452;
  border-radius:999px;
  padding:6px 10px;
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.16s ease;
}
.support-quick-reply:hover{background:#e2f5eb;border-color:#9fd2b9;transform:translateY(-1px)}

/* إظهار "المادة 6" كاملة بدل رقم المادة وحده في بطاقة الدليل. */
.degree-badge.catalog-material-number{
  width:auto!important;
  min-width:76px;
  height:44px;
  padding:0 12px;
  border-radius:14px;
  white-space:nowrap;
  font-size:13px;
}

@media(max-width:600px){
  .splash-kicker{justify-content:center;gap:6px;text-align:center}
  .splash-kicker-highlight{min-height:36px;padding:3px 10px}
  .install-banner{
    align-items:center;
    padding:11px 12px 11px 43px!important;
    gap:9px!important;
  }
  .install-banner>img{width:54px!important;height:54px!important;flex-basis:54px;border-radius:16px!important}
  .install-banner-copy strong{font-size:17px!important}
  .install-banner-copy>span{font-size:11.5px!important}
  .install-banner-badge{font-size:9px!important}
  .install-banner-cta{min-height:35px;padding:6px 9px;font-size:11px!important;border-radius:10px}
  .support-quick-replies{gap:6px}
  .support-quick-reply{font-size:11px;padding:6px 8px}
}


/* 0.12.11 — ترتيب عبارة الرصد في Splash على ثلاثة أسطر مع إبقاء تمييز العبارتين. */
.splash-kicker.splash-kicker-stacked{
  display:flex!important;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:4px;
  white-space:normal!important;
}
.splash-kicker-stacked .splash-kicker-prefix{
  display:block;
  padding-inline:4px;
  font-size:.92em;
}
.splash-kicker-last-line{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
@media(max-width:600px){
  .splash-kicker.splash-kicker-stacked{align-items:center;text-align:center;gap:3px}
  .splash-kicker-last-line{justify-content:center;gap:6px}
}


/* ===== 0.12.13: ترتيب الإدارة، طي المراحل، الدعم والدليل ===== */
#admin-structure .panel-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.stage-title-row{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.stage-toggle-btn{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border:1px solid #cfe1df;
  border-radius:9px;
  background:#fff;
  color:var(--secondary-dark);
  cursor:pointer;
  flex:0 0 auto;
}
.stage-toggle-btn span{
  display:block;
  font-size:20px;
  line-height:1;
  transition:transform .18s ease;
}
.stage-toggle-btn[aria-expanded="true"] span{transform:rotate(180deg)}
.stage-card.collapsed .stage-head{
  border-radius:15px;
}
.stage-body{
  animation:slokStageOpen .16s ease-out;
}
@keyframes slokStageOpen{
  from{opacity:.55;transform:translateY(-3px)}
  to{opacity:1;transform:none}
}

/* عند وجود صف مخالفة واحد نترك مساحة كافية لقائمة النقاط الثلاث. */
.vice-table-wrap.single-row{
  min-height:210px!important;
}

/* أزرار حذف/إرسال رد الدعم داخل العمود نفسه. */
.support-reply-actions{
  display:flex;
  flex-direction:column;
  gap:7px;
  align-items:stretch;
}
.support-reply-actions .btn{
  white-space:nowrap;
}
.support-ticket-actions{
  display:flex;
  justify-content:flex-start;
  gap:8px;
}

/* زر استعادة دليل المخالفات بجوار إضافة المادة. */
#view-catalog .hero-actions{
  gap:8px;
  flex-wrap:wrap;
}

@media(max-width:700px){
  #admin-structure .panel-head-actions{width:100%}
  #admin-structure .panel-head-actions .btn{flex:1}
  .stage-head{align-items:flex-start}
  .stage-title-row{align-items:flex-start}
  .vice-table-wrap.single-row{min-height:230px!important}
}


/* ===== 0.12.14: فلتر الوكيل والدعم المصور ===== */
.vice-filter-priority > span{color:#000!important}
.vice-filter-priority select{border:1px solid #000!important}
.vice-table-wrap.single-row{min-height:315px!important}
.support-image-field{display:grid;gap:8px}
.support-image-field input[type=file]{background:#fff;border:1px dashed #b9ccd2;border-radius:12px;padding:11px;width:100%}
.support-message-meta{display:inline-flex;align-items:center;gap:8px}
.support-message-delete{border:0;background:transparent;color:#b34b55;font:inherit;font-size:12px;font-weight:800;cursor:pointer;padding:2px 5px;border-radius:6px}
.support-message-delete:hover{background:#fff0f1}
.support-image-thumb{display:block;border:0;background:transparent;padding:0;margin-top:10px;cursor:zoom-in;width:min(180px,100%)}
.support-image-thumb img{display:block;width:100%;max-height:130px;object-fit:cover;border-radius:12px;border:1px solid #d8e5e8;box-shadow:0 5px 14px rgba(31,76,87,.08)}
.support-image-modal{display:flex;align-items:center;justify-content:center;min-height:250px}
.support-image-modal img{max-width:100%;max-height:78vh;object-fit:contain;border-radius:14px}


/* ===== 0.12.15: استعادة «عن المطور» ===== */
.about-developer-nav{gap:8px!important}
.developer-nav-mark{width:27px;height:27px;flex:0 0 27px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(145deg,var(--primary),var(--secondary));color:#fff;font-size:12px;font-weight:800;letter-spacing:.3px;box-shadow:0 6px 14px rgba(24,136,168,.18)}
.developer-card{text-align:center;padding:12px 8px 4px}
.developer-emblem{width:92px;height:92px;margin:0 auto 18px;border-radius:28px;display:grid;place-items:center;background:linear-gradient(145deg,var(--secondary),var(--primary));box-shadow:0 18px 45px rgba(24,136,168,.24);position:relative}
.developer-emblem:before{content:"";position:absolute;inset:7px;border:1px solid rgba(255,255,255,.5);border-radius:22px}
.developer-emblem span{position:relative;color:#fff;font-size:31px;font-weight:800;letter-spacing:1px}
.developer-eyebrow{display:inline-flex;padding:5px 11px;border-radius:999px;background:var(--mint);color:var(--secondary-dark);font-size:14px;font-weight:800}
.developer-card h2{margin:10px 0 5px;font-size:30px}
.developer-link{display:inline-block;color:var(--primary-dark);font-weight:800;font-size:19px;text-decoration:underline;text-decoration-color:rgba(24,136,168,.35);text-underline-offset:5px}
.developer-card p{max-width:480px;margin:17px auto;color:var(--muted);font-size:16px;line-height:1.9}
.developer-url{direction:ltr;unicode-bidi:isolate;display:inline-flex;padding:8px 13px;border:1px solid var(--line);border-radius:11px;background:#f8fbfc;color:var(--primary);font-size:15px;font-weight:700}
@media(max-width:900px){.about-developer-nav{width:100%;justify-content:flex-start!important}}

/* 0.12.16 — الاشتراك والدعم الفني */
.subscription-expired-dialog{text-align:center;padding:4px 2px 2px}.subscription-expired-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 12px;border-radius:18px;background:#fff5dc;font-size:29px}.subscription-expired-dialog h2{margin:0 0 12px;font-size:24px}.subscription-expired-dialog p{margin:8px auto;line-height:1.9;color:var(--muted);max-width:520px}.subscription-contact-card{display:grid;gap:4px;margin:18px auto 4px;padding:13px 15px;max-width:430px;border:1px solid #d7e8e2;border-radius:14px;background:#f2faf6}.subscription-contact-card strong{color:#247b5a}.subscription-contact-card span{font-weight:800;color:var(--ink)}.subscription-expired-actions{justify-content:center}.subscription-expired-actions .btn{text-decoration:none}
.support-ticket-status.new{background:#fff3dd;color:#99630c}.support-ticket-status.in-progress{background:#e7f2ff;color:#236da8}.support-ticket-status.closed{background:#e8f7ee;color:#1a7d4b}.support-closed-note{color:#1a7d4b;font-weight:800}.support-closed-box{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px;padding:12px 14px;border:1px solid #cae7d6;border-radius:13px;background:#edf9f2}.support-closed-box strong{color:#1a7d4b}.support-closed-box span{color:#667c84;font-size:13px}
@media(max-width:640px){.subscription-expired-dialog h2{font-size:21px}.subscription-expired-actions{display:grid;grid-template-columns:1fr}.subscription-expired-actions .btn{width:100%}.support-closed-box{align-items:stretch;flex-direction:column}.support-closed-box .btn{width:100%}}

/* ===== 0.12.20: قوائم الجوال بالكروت بدل قائمة الهمبرغر ===== */
.mobile-card-home,
.mobile-admin-card-grid,
.mobile-admin-section-back{
  display:none;
}

@media (max-width:900px){
  /* في الجوال لا نستخدم قائمة الهمبرغر إطلاقًا. */
  .mobile-nav-toggle{
    display:none!important;
  }
  .main-nav,
  .main-nav.open{
    display:none!important;
  }

  .topbar{
    flex-wrap:wrap;
  }
  .brand{
    cursor:pointer;
  }

  .mobile-card-home:not(.hidden){
    display:block;
    width:100%;
    animation:fade .22s ease;
  }
  .mobile-card-home-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:2px 0 16px;
    padding:16px 18px;
    border:1px solid var(--line);
    border-radius:20px;
    background:linear-gradient(135deg,#f5fbf9,#eef7fa);
    box-shadow:0 10px 26px rgba(21,70,84,.07);
  }
  .mobile-card-home-head h1{
    margin:7px 0 0;
    font-size:23px;
    line-height:1.3;
  }
  .mobile-role-cards:not(.hidden){
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  .mobile-nav-card{
    position:relative;
    min-width:0;
    min-height:142px;
    padding:16px 10px 14px;
    border:1px solid #d6e5e8;
    border-radius:21px;
    background:linear-gradient(180deg,#fff,#f7fbfc);
    color:var(--ink);
    box-shadow:0 11px 28px rgba(21,70,84,.09);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:11px;
    text-align:center;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  .mobile-nav-card:active{
    transform:scale(.985);
    border-color:#9ec8d2;
    box-shadow:0 6px 16px rgba(21,70,84,.10);
  }
  .mobile-nav-card > img,
  .mobile-card-icon-wrap > img{
    display:block;
    width:68px;
    height:68px;
    object-fit:contain;
    filter:drop-shadow(0 6px 10px rgba(21,70,84,.10));
  }
  .mobile-card-icon-wrap{
    position:relative;
    display:inline-grid;
    place-items:center;
  }
  .mobile-vice-badge{
    position:absolute;
    top:-5px;
    left:-7px;
    min-width:23px;
    height:23px;
    font-size:11px;
    border:2px solid #fff;
  }
  .mobile-nav-card strong{
    display:block;
    width:100%;
    font-size:15px;
    line-height:1.55;
    font-weight:800;
    overflow-wrap:anywhere;
  }
  .mobile-card-developer-mark{
    width:68px;
    height:68px;
    display:grid;
    place-items:center;
    border-radius:21px;
    background:linear-gradient(145deg,var(--secondary),var(--primary));
    color:#fff;
    font-size:24px;
    font-weight:800;
    letter-spacing:1px;
    box-shadow:0 10px 24px rgba(24,136,168,.22);
  }

  /* قائمة أقسام الإدارة الداخلية تظهر بدل التبويبات الأفقية. */
  #adminTabs{
    display:none!important;
  }
  #view-admin.mobile-admin-hub-open > *:not(#mobileAdminCards){
    display:none!important;
  }
  #view-admin.mobile-admin-hub-open #mobileAdminCards{
    display:grid;
  }
  .mobile-admin-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    width:100%;
    animation:fade .22s ease;
  }
  .mobile-admin-card{
    min-width:0;
    min-height:132px;
    padding:14px 10px;
    border:1px solid #d6e5e8;
    border-radius:20px;
    background:linear-gradient(180deg,#fff,#f7fbfc);
    color:var(--ink);
    box-shadow:0 10px 25px rgba(21,70,84,.08);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    text-align:center;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  .mobile-admin-card:active{
    transform:scale(.985);
    border-color:#9ec8d2;
  }
  .mobile-admin-card > span{
    display:grid;
    place-items:center;
    width:58px;
    height:58px;
    border-radius:18px;
    background:linear-gradient(145deg,var(--mint),var(--blue-soft));
    font-size:31px;
    line-height:1;
  }
  .mobile-admin-card strong{
    font-size:14px;
    line-height:1.55;
    font-weight:800;
    overflow-wrap:anywhere;
  }
  .mobile-admin-section-back:not(.hidden){
    display:flex;
    justify-content:flex-start;
    margin:0 0 12px;
  }
  .mobile-admin-section-back .btn{
    min-height:42px;
  }
}

@media (max-width:430px){
  .mobile-role-cards:not(.hidden),
  .mobile-admin-card-grid{
    gap:9px;
  }
  .mobile-nav-card{
    min-height:128px;
    padding-inline:8px;
  }
  .mobile-nav-card > img,
  .mobile-card-icon-wrap > img,
  .mobile-card-developer-mark{
    width:60px;
    height:60px;
  }
  .mobile-nav-card strong{
    font-size:13.5px;
  }
  .mobile-admin-card{
    min-height:120px;
    padding-inline:8px;
  }
  .mobile-admin-card > span{
    width:52px;
    height:52px;
    font-size:27px;
  }
  .mobile-admin-card strong{
    font-size:12.5px;
  }
}


/* ===== 0.12.21: تبسيط كروت الإدارة في الجوال وتكبير أيقونات الكمبيوتر ===== */
@media (max-width:900px){
  /* كروت أقسام الإدارة: نص فقط بدون رموز تعبيرية. */
  .mobile-admin-card{
    gap:0;
  }
  .mobile-admin-card > span{
    display:none!important;
  }
  .mobile-admin-card strong{
    font-size:13px!important;
  }
}

@media (min-width:901px){
  /* أيقونات القائمة الرئيسية في الكمبيوتر. */
  .main-nav .nav-icon{
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
  }
  .about-developer-nav .developer-nav-mark{
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
    font-size:14px!important;
    border-radius:12px;
  }
}

/* =========================================================
   0.12.23 — طلبات إضافة/نقل الطلاب من المعلم إلى الوكيل
   ========================================================= */
.teacher-student-label-row{align-items:center;gap:12px}
.teacher-student-label-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.student-management-request-btn{white-space:nowrap}

.student-request-modal h2,.student-request-admin-modal h2{margin-bottom:4px}
.student-request-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.student-request-choice{border:1px solid var(--line);background:linear-gradient(180deg,#fff,#f7fbfc);border-radius:18px;padding:22px 18px;text-align:center;color:var(--ink);font-family:inherit;transition:.2s;min-height:175px}
.student-request-choice:hover{border-color:var(--primary);box-shadow:0 10px 28px rgba(24,136,168,.12);transform:translateY(-2px)}
.student-request-choice-mark{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 12px;border-radius:16px;background:var(--mint);color:var(--secondary-dark);font-size:30px;font-weight:800}
.student-request-choice-mark.move{background:var(--blue-soft);color:var(--primary-dark)}
.student-request-choice strong{display:block;font-size:16px}
.student-request-choice small{display:block;margin-top:8px;color:var(--muted);line-height:1.8;font-size:12px}
.student-request-form{margin-top:16px}

.vice-student-requests-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;padding:18px 22px;border-color:#b9ded1;background:linear-gradient(110deg,#f3fbf7,#f5fafc)}
.vice-student-requests-copy{display:flex;align-items:center;gap:13px}
.vice-student-requests-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--mint);color:var(--secondary-dark);font-size:28px;font-weight:800;flex:0 0 auto}
.vice-student-requests-copy strong{display:block;font-size:16px}
.vice-student-requests-copy small{display:block;color:var(--muted);margin-top:3px;font-size:12px}
.request-count-badge{display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:999px;background:#fff;color:var(--secondary-dark);font-size:11px;font-weight:800}

.student-request-admin-list{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.student-request-admin-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:15px;padding:13px 14px;background:#fff}
.student-request-admin-row.is-review{background:#fffaf0;border-color:#ead6a6}
.student-request-admin-main{min-width:0}
.student-request-admin-main strong,.student-request-admin-main span,.student-request-admin-main small{display:block}
.student-request-admin-main strong{font-size:14px}
.student-request-admin-main span{font-size:13px;margin-top:2px;color:var(--primary-dark);font-weight:700}
.student-request-admin-main small{margin-top:3px;color:var(--muted);font-size:11px}
.student-request-admin-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.student-request-status{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800}
.student-request-status.new{background:#e9f6fb;color:#167896}
.student-request-status.review{background:#fff4dc;color:#9f6809}

.student-request-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:16px}
.student-request-detail-grid>div{border:1px solid var(--line);border-radius:13px;background:#f8fbfc;padding:12px 13px}
.student-request-detail-grid span{display:block;color:var(--muted);font-size:11px}
.student-request-detail-grid strong{display:block;margin-top:5px;font-size:13px;line-height:1.8}
.student-request-detail-grid .span-2{grid-column:1/-1}
.student-request-decision-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:18px}

@media(max-width:700px){
  .teacher-student-label-row{align-items:flex-start;flex-direction:column}
  .teacher-student-label-actions{width:100%;justify-content:space-between}
  .student-management-request-btn{font-size:11px;padding:7px 9px}
  .student-request-choice-grid{grid-template-columns:1fr}
  .student-request-choice{min-height:135px;padding:17px 14px}
  .vice-student-requests-panel{align-items:stretch;flex-direction:column;padding:16px}
  .vice-student-requests-panel .btn{width:100%}
  .student-request-admin-row{align-items:flex-start;flex-direction:column}
  .student-request-admin-actions{width:100%;justify-content:space-between}
  .student-request-detail-grid{grid-template-columns:1fr}
  .student-request-detail-grid .span-2{grid-column:auto}
  .student-request-decision-actions{display:grid;grid-template-columns:1fr 1fr}
}

/* 0.12.29 — إدارة أعذار الغياب */
.excuses-hero{margin-bottom:18px}
.excuses-hero-actions{align-items:center}
.excuses-search-tabs{margin-bottom:16px}
.excuses-search-tabs button{min-width:150px}
.excuses-filter-panel{margin-bottom:16px}
.excuse-fixed-grid{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) auto;gap:12px;align-items:end}
.excuse-fixed-grid label,.excuse-date-selects label{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:14px}
.excuse-date-range-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:15px}
.excuse-date-range-grid fieldset{border:1px solid var(--line);border-radius:15px;padding:12px 14px;min-width:0}
.excuse-date-range-grid legend{padding:0 7px;font-weight:800;color:var(--ink)}
.excuse-date-selects{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.excuses-advanced-filters{grid-template-columns:repeat(5,minmax(145px,1fr));align-items:end}
.excuses-apply-btn{min-height:46px}
.excuses-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(145px,1fr));gap:12px;margin:0 0 18px}
.excuse-summary-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px 18px;box-shadow:var(--shadow);min-height:116px;display:flex;flex-direction:column;justify-content:center}
.excuse-summary-card.featured{background:linear-gradient(180deg,#f7fffb,#fff);border-color:#cde8da}
.excuse-summary-card span{color:var(--muted);font-size:13px}
.excuse-summary-card strong{display:block;font-size:28px;color:#2d718c;line-height:1.25;margin:5px 0}
.excuse-summary-card small{color:#718187;font-size:11px}
.excuse-summary-card.featured small{color:#2c8b5e}
.excuses-results-panel{overflow:hidden}
.excuses-results-head{align-items:center}
.excuses-table{min-width:980px}
.excuses-table td{vertical-align:middle}
.excuses-table .date-value{direction:ltr;unicode-bidi:isolate;display:inline-block;white-space:nowrap}
.excuse-type-badge{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:5px 10px;border-radius:999px;background:#fff4dc;color:#94630a;font-size:12px;font-weight:800}
.excuse-type-badge.official{background:#e8f4f9;color:#246d8b}
.excuse-attachment-icon{width:40px;height:40px;border:0;border-radius:11px;background:#e9f4f8;color:#276d89;display:grid;place-items:center;margin:auto;transition:.18s}
.excuse-attachment-icon:hover{transform:translateY(-1px);background:#dceff6}
.excuse-attachment-icon svg{width:22px;height:22px;fill:currentColor}
.excuse-image-modal{display:grid;gap:14px;place-items:center;max-width:min(980px,92vw)}
.excuse-image-modal img{display:block;max-width:100%;max-height:72vh;object-fit:contain;border-radius:14px;border:1px solid var(--line);background:#f6f9fa}

@media(max-width:1180px){
  .excuses-summary-grid{grid-template-columns:repeat(3,1fr)}
  .excuses-advanced-filters{grid-template-columns:repeat(3,minmax(145px,1fr))}
}
@media(max-width:760px){
  .excuses-hero{align-items:flex-start;flex-direction:column}
  .excuses-hero-actions{width:100%}.excuses-hero-actions .btn{width:100%}
  .excuse-fixed-grid{grid-template-columns:repeat(3,1fr)}
  .excuse-fixed-grid .btn{grid-column:1/-1}
  .excuse-date-range-grid{grid-template-columns:1fr}
  .excuses-advanced-filters{grid-template-columns:1fr 1fr}
  .excuses-apply-btn{grid-column:1/-1}
  .excuses-summary-grid{grid-template-columns:1fr 1fr;gap:9px}
  .excuse-summary-card{min-height:100px;padding:13px}
  .excuse-summary-card strong{font-size:24px}
}
@media(max-width:480px){
  .excuse-fixed-grid{grid-template-columns:1fr 1fr 1fr;gap:7px}
  .excuse-date-selects{gap:5px}
  .excuses-advanced-filters{grid-template-columns:1fr}
  .excuses-summary-grid{grid-template-columns:1fr 1fr}
  .excuses-search-tabs button{min-width:125px}
}

/* 0.12.29 — طلبات السلوك المتميز المرسلة من الطلاب */
.positive-requests-hero{margin-bottom:18px}
.positive-requests-panel{overflow:hidden}
.positive-requests-table{min-width:900px}
.positive-requests-table td{vertical-align:middle}
.positive-request-points{display:inline-block;margin-top:4px;color:var(--secondary-dark);font-size:11px;font-weight:800}
.positive-request-modal{display:grid;gap:15px}
.positive-request-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.positive-request-modal-head h2{margin:5px 0 0;font-size:22px}
.positive-request-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}
.positive-request-detail-grid>div{border:1px solid var(--line);border-radius:13px;background:#f8fbfc;padding:11px 12px}
.positive-request-detail-grid span{display:block;color:var(--muted);font-size:11px}
.positive-request-detail-grid strong{display:block;margin-top:4px;font-size:13px}
.positive-request-work{border:1px solid #cfe5dc;border-radius:15px;background:#f4fbf8;padding:14px}
.positive-request-work>span{display:block;color:var(--muted);font-size:11px;font-weight:700}
.positive-request-work>strong{display:block;margin-top:5px;color:var(--secondary-dark);font-size:15px;line-height:1.8}
.positive-request-work p{margin:9px 0 0;line-height:1.9;white-space:pre-wrap;font-size:13px}
.positive-request-image{display:grid;gap:8px}
.positive-request-image>span{font-size:12px;font-weight:800;color:var(--muted)}
.positive-request-image img{display:block;width:100%;max-height:390px;object-fit:contain;border:1px solid var(--line);border-radius:14px;background:#f7fafb}
.positive-request-no-image{padding:12px 14px;border:1px dashed var(--line);border-radius:13px;color:var(--muted);text-align:center;font-size:12px}
.positive-request-approval{display:grid;gap:12px;padding-top:13px;border-top:1px solid var(--line)}
.positive-request-approval h3{margin:0;font-size:16px}
.positive-request-approval label{display:flex;flex-direction:column;gap:7px;font-weight:700}
.positive-request-signature canvas{height:150px}
.positive-request-actions{justify-content:flex-start;flex-wrap:wrap}

@media(max-width:760px){
  .positive-requests-hero{align-items:flex-start;flex-direction:column}
  .positive-requests-hero .hero-actions{width:100%}
  .positive-requests-hero .hero-actions .btn{width:100%}
  .positive-request-detail-grid{grid-template-columns:1fr 1fr}
  .positive-request-actions{display:grid;grid-template-columns:1fr 1fr}
  .positive-request-actions .btn:last-child{grid-column:1/-1}
}
@media(max-width:480px){
  .positive-request-detail-grid{grid-template-columns:1fr}
  .positive-request-modal-head{flex-direction:column}
}
.positive-request-teacher-confirm{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:600px){.positive-request-teacher-confirm{grid-template-columns:1fr}}

/* 0.12.30 — فصل صلاحيات الإضافات عن صلاحيات الأدوار */
.feature-hidden{display:none!important}
.positive-requests-badge{margin-inline-start:2px}
@media(min-width:901px){
  .main-nav [data-route="positive-requests"]{position:relative}
  .main-nav [data-route="positive-requests"] .positive-requests-badge{position:absolute;top:-3px;inset-inline-start:2px;border:2px solid #fff;min-width:23px;height:23px;font-size:11px}
}
.mobile-positive-requests-badge{position:absolute;top:-5px;left:-7px;min-width:23px;height:23px;font-size:11px;border:2px solid #fff}
.positive-admin-hero-actions{flex-direction:column;align-items:stretch;min-width:260px}
.positive-admin-hero-actions .btn{width:100%}

/* أزرار الروابط العامة يجب أن تبقى ظاهرة على الجوال بالطول أيضًا. */
@media(max-width:600px){
  .excuses-hero .excuses-hero-actions,
  .positive-admin-hero .positive-admin-hero-actions,
  .positive-requests-hero .hero-actions{display:flex!important}
  .excuses-hero .excuses-hero-actions,
  .positive-admin-hero .positive-admin-hero-actions{width:100%;flex-direction:column}
  .excuses-hero .excuses-hero-actions .btn,
  .positive-admin-hero .positive-admin-hero-actions .btn{width:100%}
}

/* ===== 0.12.31: تحسينات التنقل والجوال وسجلات السلوك المتميز ===== */
@media (min-width:901px){
  .topbar{min-width:0}
  .main-nav{
    min-width:0;
    overflow-x:auto;
    overflow-y:hidden;
    flex-wrap:nowrap;
    justify-content:flex-start;
    scrollbar-width:thin;
    scrollbar-color:#a8c8cf transparent;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
  }
  .main-nav button{flex:0 0 auto}
  .main-nav::-webkit-scrollbar{height:6px}
  .main-nav::-webkit-scrollbar-track{background:transparent}
  .main-nav::-webkit-scrollbar-thumb{background:#a8c8cf;border-radius:999px}
}

@media(max-width:900px){
  .mobile-card-home-head h1{margin:0;font-size:23px;line-height:1.3}
}

/* رابط الطلاب في صفحة السلوك المتميز يتصرف على الجوال مثل رابط الأعذار. */
@media(max-width:760px){
  .positive-admin-hero{align-items:flex-start;flex-direction:column}
  .positive-admin-hero .positive-admin-hero-actions{width:100%;min-width:0;display:flex!important;flex-direction:column;align-items:stretch}
  .positive-admin-hero .positive-admin-hero-actions .btn{width:100%}
}

.positive-evidence-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.positive-evidence-state{margin:0!important}
.positive-evidence-thumb{width:58px;height:46px;padding:0;border:1px solid #cfe0e4;border-radius:10px;background:#f7fafb;overflow:hidden;cursor:zoom-in;box-shadow:0 4px 12px rgba(21,70,84,.08)}
.positive-evidence-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.positive-evidence-thumb:hover{transform:translateY(-1px);border-color:#8fc2cd}
.positive-evidence-modal{display:grid;gap:14px;place-items:center}
.positive-evidence-modal h2{justify-self:start;width:100%;margin:0}
.positive-evidence-modal img{display:block;max-width:100%;max-height:76vh;object-fit:contain;border-radius:14px;border:1px solid var(--line);background:#f7fafb}


/* ===== 0.12.32: تحسين تمركز القائمة والجوال ===== */
.mobile-logo-return-hint{display:none}

@media (min-width:901px){
  /* عندما تتسع القوائم نوسّطها، وعند تجاوز العرض يعود safe إلى البداية مع بقاء التمرير. */
  .main-nav{
    justify-content:center;
    justify-content:safe center;
  }
}

@media (max-width:900px){
  .mobile-logo-return-hint{
    order:6;
    display:flex;
    flex:0 0 100%;
    width:100%;
    align-items:center;
    justify-content:center;
    margin-top:2px;
    padding:8px 12px 4px;
    border-top:1px solid rgba(216,229,232,.78);
    color:#237f6a;
    font-size:14px;
    line-height:1.5;
    font-weight:800;
    text-align:center;
  }
  .mobile-logo-return-hint::before{
    content:"";
    width:7px;
    height:7px;
    margin-inline-end:8px;
    border-radius:50%;
    background:var(--secondary);
    box-shadow:0 0 0 5px rgba(36,189,125,.10);
  }

  /* تكبير نص كروت أقسام الإدارة لسهولة القراءة على الجوال/الأجهزة اللوحية. */
  .mobile-admin-card strong{
    font-size:17px!important;
    line-height:1.65;
  }
}

@media (max-width:430px){
  .mobile-admin-card strong{font-size:15.5px!important}
  .mobile-logo-return-hint{font-size:13.5px}
}

/* ===== 0.12.33: ملف الطالب وتجميع الاستعراض ===== */
.student-profile-launch{display:flex;justify-content:flex-start;margin-top:-2px}
.student-profile-btn{min-width:150px;background:linear-gradient(135deg,#eef8f4,#edf5f8);color:#285b66;border:1px solid #d4e4e7}
.student-profile-btn:not(:disabled):hover{background:linear-gradient(135deg,#e6f6ef,#e6f2f6);border-color:#b7d5da}
.student-profile-btn:disabled{opacity:.5}
.action-menu-btn.profile{background:#edf8f4!important;color:#247757!important;border-color:#cfe8da!important;font-weight:800}

.student-profile-shell{display:grid;gap:16px}
.student-profile-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid #d8e7e9;border-radius:18px;background:linear-gradient(135deg,#f8fcfb,#eef8f7)}
.student-profile-head span{display:block;color:#16865f;font-size:13px;font-weight:800;margin-bottom:3px}
.student-profile-head h2{margin:0!important;font-size:28px;color:#173d48}
.student-profile-head p{margin:5px 0 0;color:#6b7d84;font-size:14px}
.student-profile-head-mark{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:#fff;border:1px solid #d9e6e8;font-size:28px;box-shadow:0 8px 20px rgba(21,70,84,.08)}
.student-profile-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.student-profile-kpis article{min-width:0;padding:13px 14px;border:1px solid #dce8ea;border-radius:15px;background:#fff}
.student-profile-kpis article.positive{background:#f0faf5;border-color:#d5ecdf}
.student-profile-kpis article.absence{background:#f1f8fb;border-color:#d7e8ef}
.student-profile-kpis span,.student-profile-kpis small{display:block;color:#718188;font-size:11.5px}
.student-profile-kpis strong{display:block;margin:3px 0;font-size:25px;color:#146d87;line-height:1.25}
.student-profile-kpis strong.date{font-size:17px;white-space:nowrap}
.student-profile-kpis article.positive strong{color:#16845a}.student-profile-kpis article.absence strong{color:#287b9b}
.student-profile-overview-grid{display:grid;grid-template-columns:1.35fr .85fr;gap:12px}
.student-profile-overview-card{border:1px solid #dce8ea;border-radius:16px;padding:14px 16px;background:#fff}
.student-profile-overview-card.emphasis{background:linear-gradient(135deg,#fff,#f4faf7);border-right:4px solid #5caf83}
.student-profile-overview-card h3,.student-profile-section-title h3{margin:0 0 8px;font-size:15px;color:#48636c}
.student-profile-last-main{display:grid;gap:4px}.student-profile-last-main strong{font-size:17px;line-height:1.8;color:#173d48}.student-profile-last-main span{font-size:13px;color:#73838a}
.student-profile-last-meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:9px;color:#5f747c;font-size:12px}.student-profile-last-meta b{color:#16845a}
.student-profile-repeat-title{display:block;font-size:16px;line-height:1.8}.student-profile-repeat-count{display:inline-block;margin-top:7px;padding:4px 9px;border-radius:999px;background:#fff3dc;color:#98670b;font-size:12px;font-weight:800}
.student-profile-empty-note{color:#7a8a90;font-size:13px;line-height:1.8}
.student-profile-teachers{border:1px solid #dce8ea;border-radius:16px;padding:14px;background:#fbfdfd}
.student-profile-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.student-profile-section-title h3{margin:0}.student-profile-section-title span{font-size:11.5px;color:#7b8a90}
.student-profile-teacher-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
.student-profile-teacher-chip{display:grid;gap:2px;padding:9px 11px;border:1px solid #e0eaec;border-radius:12px;background:#fff}.student-profile-teacher-chip strong{font-size:13px}.student-profile-teacher-chip span{font-size:11.5px;color:#627780}.student-profile-teacher-chip small{font-size:10.5px;color:#16845a;font-weight:700}
.student-profile-tabs{display:flex;gap:7px;padding:5px;border:1px solid #dce8ea;border-radius:14px;background:#f4f8f9;overflow:auto}
.student-profile-tabs button{border:0;border-radius:10px;background:transparent;padding:9px 13px;color:#687a82;font:700 12.5px Cairo;white-space:nowrap}.student-profile-tabs button.active{background:#fff;color:#176f65;box-shadow:0 4px 14px rgba(21,70,84,.08)}.student-profile-tabs b{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-inline-start:5px;border-radius:999px;background:#eaf6f1;color:#16845a;font-size:10px}
.student-profile-pane{display:none}.student-profile-pane.active{display:block}
.student-profile-table{min-width:760px}.student-profile-table th,.student-profile-table td{font-size:12px;padding:9px 10px;vertical-align:top}.student-profile-table th{background:#f0f6f7}.student-profile-table td:nth-child(2){max-width:290px}

.browse-report-table .browse-student-cell{vertical-align:top;background:#f7fbf9;min-width:150px;border-inline-start:3px solid #8fc4a7}
.browse-student-cell strong{display:block;font-size:14px;line-height:1.7}.browse-student-cell small{display:block;margin-top:5px;color:#73848a;font-size:11px;font-weight:700}
.browse-student-group-start td{border-top:2px solid #a6cbb5}

@media(max-width:900px){
  .student-profile-launch{justify-content:stretch}.student-profile-btn{width:100%}
  .student-profile-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .student-profile-overview-grid{grid-template-columns:1fr}
  .student-profile-head{padding:14px}.student-profile-head h2{font-size:23px}.student-profile-head-mark{width:48px;height:48px;font-size:23px}
  .student-profile-section-title{align-items:flex-start;flex-direction:column}
}
@media(max-width:520px){
  .student-profile-kpis{grid-template-columns:1fr 1fr;gap:7px}.student-profile-kpis article{padding:10px}.student-profile-kpis strong{font-size:21px}.student-profile-kpis strong.date{font-size:14px}
  .student-profile-head-mark{display:none}.student-profile-head h2{font-size:21px}.student-profile-head p{font-size:12px}
}

/* ===== 0.12.34: تحسين ملف الطالب والمصطلحات والتجاوب ===== */
.student-profile-shell{
  --student-profile-title-size:17px;
  --student-profile-content-size:16px;
  gap:14px;
}
.student-profile-head span{
  font-size:var(--student-profile-title-size);
  font-weight:700;
}
.student-profile-head h2{font-size:24px;font-weight:700}
.student-profile-head p{font-size:var(--student-profile-content-size);font-weight:400}
.student-profile-kpis span{
  display:block;
  font-size:var(--student-profile-title-size);
  font-weight:700;
  line-height:1.6;
  color:#5f737b;
}
.student-profile-kpis small,
.student-profile-kpis strong{
  font-size:var(--student-profile-content-size);
  font-weight:400;
  line-height:1.7;
}
.student-profile-kpis strong.date{font-size:var(--student-profile-content-size);font-weight:400}
.student-profile-kpis .student-profile-service-unavailable{
  margin-top:8px;
  color:#8a7777!important;
  font-size:var(--student-profile-content-size)!important;
  font-weight:400!important;
  line-height:1.65;
}
.student-profile-overview-card h3,
.student-profile-section-title h3{
  font-size:var(--student-profile-title-size);
  font-weight:700;
  line-height:1.6;
}
.student-profile-last-main strong,
.student-profile-last-main span,
.student-profile-last-meta,
.student-profile-repeat-title,
.student-profile-repeat-count,
.student-profile-empty-note,
.student-profile-section-title span,
.student-profile-teacher-chip strong,
.student-profile-teacher-chip span,
.student-profile-teacher-chip small{
  font-size:var(--student-profile-content-size);
  font-weight:400;
  line-height:1.75;
}
.student-profile-last-meta b{font-weight:400}
.student-profile-repeat-count{font-weight:400}
.student-profile-tabs button{
  font-size:var(--student-profile-title-size);
  font-weight:700;
}
.student-profile-table th{
  font-size:var(--student-profile-title-size);
  font-weight:700;
}
.student-profile-table td{
  font-size:var(--student-profile-content-size);
  font-weight:400;
  line-height:1.7;
}
.student-profile-modal{overflow-x:hidden}
.student-profile-modal #modalContent{min-width:0}
.student-profile-modal .student-profile-shell{min-width:0}
.student-profile-modal .table-wrap{max-width:100%;overflow:auto}
.student-profile-shell.teacher-summary-only .student-profile-teachers{margin-bottom:2px}

@media(max-width:700px){
  .student-profile-modal{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 40px);
    padding:12px;
    border-radius:18px;
    overflow-x:hidden;
  }
  .student-profile-modal .modal-close{left:9px;top:9px;z-index:3}
  .student-profile-shell{
    --student-profile-title-size:15px;
    --student-profile-content-size:14px;
    gap:10px;
  }
  .student-profile-head{
    padding:12px;
    padding-left:46px;
    border-radius:15px;
    align-items:flex-start;
  }
  .student-profile-head h2{font-size:20px;line-height:1.55}
  .student-profile-head p{font-size:14px;line-height:1.7}
  .student-profile-head-mark{display:none}
  .student-profile-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  .student-profile-kpis article{padding:10px;min-height:104px}
  .student-profile-kpis article:nth-child(5){grid-column:1/-1;min-height:auto}
  .student-profile-kpis strong,
  .student-profile-kpis strong.date,
  .student-profile-kpis small{font-size:14px}
  .student-profile-overview-grid{grid-template-columns:1fr;gap:8px}
  .student-profile-overview-card{padding:11px 12px;border-radius:14px}
  .student-profile-teachers{padding:11px;border-radius:14px}
  .student-profile-section-title{gap:3px;margin-bottom:8px}
  .student-profile-teacher-list{grid-template-columns:1fr;gap:7px}
  .student-profile-teacher-chip{padding:8px 10px}
  .student-profile-tabs{gap:5px;padding:4px}
  .student-profile-tabs button{padding:8px 10px}
  .student-profile-table{min-width:720px}
}

@media(max-width:380px){
  .student-profile-kpis{grid-template-columns:1fr}
  .student-profile-kpis article:nth-child(5){grid-column:auto}
  .student-profile-kpis article{min-height:auto}
}


/* ===== 0.12.35: ترتيب بطاقات ملف الطالب للمعلم والوكيل ===== */
.student-profile-kpis{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.student-profile-kpis .student-profile-kpi{
  min-width:0;
  min-height:106px;
  padding:13px 15px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-radius:15px;
}
.student-profile-kpis .student-profile-kpi>span{
  margin:0 0 5px;
  font-size:var(--student-profile-title-size);
  font-weight:700;
  line-height:1.55;
}
.student-profile-kpis .student-profile-kpi>strong:not(.student-profile-service-unavailable),
.student-profile-kpis .student-profile-kpi .student-profile-kpi-number{
  margin:0;
  font-size:34px!important;
  font-weight:700!important;
  line-height:1.2;
  color:#146d87;
}
.student-profile-kpis .student-profile-kpi.positive>strong:not(.student-profile-service-unavailable){color:#16845a}
.student-profile-kpis .student-profile-kpi.absence>strong:not(.student-profile-service-unavailable){color:#287b9b}
.student-profile-kpis .student-profile-kpi>small{
  margin-top:4px;
  font-size:var(--student-profile-content-size);
  font-weight:400;
  line-height:1.55;
}
.student-profile-kpis .student-profile-service-unavailable{
  margin:5px 0 0!important;
  font-size:var(--student-profile-content-size)!important;
  font-weight:400!important;
  line-height:1.55!important;
}

/* بطاقة الاسم تبقى سطرًا كاملًا في بداية الملف. */
.student-profile-head{width:100%}

@media(max-width:700px){
  .student-profile-modal{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    margin:8px;
    padding:10px;
    border-radius:17px;
  }
  .student-profile-modal #modalContent{width:100%;max-width:100%;overflow-x:hidden}
  .student-profile-shell{width:100%;max-width:100%;gap:9px}
  .student-profile-head{padding:11px 11px 11px 44px;border-radius:14px}
  .student-profile-head h2{font-size:19px;line-height:1.5}
  .student-profile-head p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
  .student-profile-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px;
  }
  .student-profile-kpis .student-profile-kpi,
  .student-profile-kpis article{
    grid-column:auto!important;
    min-height:91px!important;
    padding:9px 10px!important;
  }
  .student-profile-kpis .student-profile-kpi>span{
    font-size:15px!important;
    font-weight:700!important;
    line-height:1.45;
  }
  .student-profile-kpis .student-profile-kpi>strong:not(.student-profile-service-unavailable),
  .student-profile-kpis .student-profile-kpi .student-profile-kpi-number{
    font-size:29px!important;
    font-weight:700!important;
    line-height:1.15;
  }
  .student-profile-kpis .student-profile-kpi>small,
  .student-profile-kpis .student-profile-service-unavailable{
    font-size:14px!important;
    font-weight:400!important;
    line-height:1.45!important;
  }
  .student-profile-overview-grid{grid-template-columns:1fr!important;gap:7px}
  .student-profile-overview-card,
  .student-profile-teachers{padding:10px 11px;border-radius:13px}
  .student-profile-overview-card h3,
  .student-profile-section-title h3{font-size:15px!important;font-weight:700!important}
  .student-profile-last-main strong,
  .student-profile-last-main span,
  .student-profile-last-meta,
  .student-profile-repeat-title,
  .student-profile-repeat-count,
  .student-profile-empty-note,
  .student-profile-section-title span,
  .student-profile-teacher-chip strong,
  .student-profile-teacher-chip span,
  .student-profile-teacher-chip small{font-size:14px!important;font-weight:400!important}
}

@media(max-width:380px){
  .student-profile-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .student-profile-kpis .student-profile-kpi,
  .student-profile-kpis article{min-height:88px!important;padding:8px!important}
  .student-profile-kpis .student-profile-kpi>span{font-size:14px!important}
  .student-profile-kpis .student-profile-kpi>strong:not(.student-profile-service-unavailable),
  .student-profile-kpis .student-profile-kpi .student-profile-kpi-number{font-size:27px!important}
}


/* ===== 0.12.36: ملف الطالب لدى الوكيل على الجوال ===== */
@media(max-width:700px){
  /* نفس شبكة بطاقات الملخص المستخدمة لدى المعلم، بدون اختلاف بسبب وجود التفاصيل. */
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi{
    grid-column:auto!important;
    min-width:0!important;
    width:auto!important;
    min-height:91px!important;
    padding:9px 10px!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi>span{
    font-size:15px!important;
    font-weight:700!important;
    line-height:1.45!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi>strong:not(.student-profile-service-unavailable),
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi .student-profile-kpi-number{
    font-size:29px!important;
    font-weight:700!important;
    line-height:1.15!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi>small,
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-service-unavailable{
    font-size:14px!important;
    font-weight:400!important;
    line-height:1.45!important;
  }

  /* تفاصيل الوكيل تبقى بعرضها الطبيعي، لكن الحاوية نفسها قابلة للسحب أفقيًا. */
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-tabs{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:pan-x pan-y;
    scrollbar-width:thin;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-tabs button{
    flex:0 0 auto!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-pane{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-pane .table-wrap{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:pan-x pan-y;
    scrollbar-width:thin;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-table{
    width:760px!important;
    min-width:760px!important;
    max-width:none!important;
    table-layout:auto!important;
  }
}

@media(max-width:380px){
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi{
    min-height:88px!important;
    padding:8px!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi>span{
    font-size:14px!important;
  }
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi>strong:not(.student-profile-service-unavailable),
  .student-profile-modal .student-profile-shell:not(.teacher-summary-only) .student-profile-kpis .student-profile-kpi .student-profile-kpi-number{
    font-size:27px!important;
  }
}

/* ===== 0.12.37: رسائل الدعم الفني ===== */
.support-announcement-dialog{padding:6px 2px 2px;text-align:right}
.support-announcement-kicker{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;background:var(--mint);color:var(--secondary-dark);font-size:13px;font-weight:800;margin-bottom:12px}
.support-announcement-dialog h2{font-size:24px;line-height:1.55;margin:0 0 12px;color:var(--ink);padding-left:42px}
.support-announcement-message{font-size:16px;font-weight:400;line-height:2;color:#405860;background:#f7fbfb;border:1px solid #e0ebed;border-radius:15px;padding:15px 16px;overflow-wrap:anywhere}
.support-announcement-link-wrap{display:flex;justify-content:flex-start;margin-top:13px}
.support-announcement-link{max-width:100%;text-decoration:none}
.support-announcement-actions{border-top:1px solid #e5edef;padding-top:15px;margin-top:17px}
.support-announcement-actions .btn{min-width:135px}
@media(max-width:600px){
  .support-announcement-dialog{padding-top:2px}
  .support-announcement-kicker{font-size:12px}
  .support-announcement-dialog h2{font-size:20px;padding-left:36px;line-height:1.6}
  .support-announcement-message{font-size:15px;line-height:1.95;padding:13px}
  .support-announcement-link-wrap .btn{width:100%}
  .support-announcement-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .support-announcement-actions .btn{min-width:0;width:100%;padding:11px 8px;font-size:14px}
  .modal:has(.support-announcement-dialog){width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:18px 15px;border-radius:18px}
}

/* ===== 0.12.37: التحكم في استقبال أعمال السلوك المتميز ===== */
.positive-intake-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 13px;border-radius:14px;background:#fff;border:1px solid rgba(255,255,255,.72);cursor:pointer;color:#176f59;box-shadow:0 8px 22px rgba(12,80,61,.10);transition:.2s}
.positive-intake-copy{display:grid;gap:2px;text-align:right;min-width:0}.positive-intake-copy strong{font-size:14px;color:inherit}.positive-intake-copy small{font-size:11px;color:#19865f;line-height:1.55;font-weight:700}
.positive-intake-toggle input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}.positive-intake-switch{position:relative;flex:0 0 48px;width:48px;height:27px;border-radius:999px;background:#d6e8e1;box-shadow:inset 0 0 0 1px rgba(23,111,89,.16);transition:.2s}.positive-intake-switch:after{content:"";position:absolute;top:4px;right:4px;width:19px;height:19px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(0,0,0,.18);transition:.2s}.positive-intake-toggle input:checked+.positive-intake-switch{background:#176f59}.positive-intake-toggle input:checked+.positive-intake-switch:after{transform:translateX(-21px)}.positive-intake-toggle.is-closed{background:#c43b3b;border-color:#c43b3b;color:#fff;box-shadow:0 8px 22px rgba(122,28,28,.18)}.positive-intake-toggle.is-closed .positive-intake-copy small{color:#fff}.positive-intake-toggle.is-closed .positive-intake-switch{background:rgba(255,255,255,.34);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}.positive-intake-toggle input:disabled+.positive-intake-switch{opacity:.55}
@media(max-width:700px){.positive-intake-toggle{padding:12px}.positive-intake-copy strong{font-size:14px}.positive-intake-copy small{font-size:12px}.positive-intake-switch{flex-basis:50px;width:50px;height:28px}}


/* ===== 0.12.39: اعتماد السلوك + طلبات الطلاب + تنظيم القائمة العلوية ===== */
/* شاشة الانتظار يجب أن تعلو نافذة اعتماد طلب السلوك المتميز. */
#busyOverlay{z-index:13150!important}
#modalOverlay{z-index:13000!important}

/* قائمة طلبات إضافة/نقل الطلاب تبقى ظاهرة في صفحة الوكيل حتى عند عدم وجود طلبات. */
.vice-student-requests-panel{display:flex!important}

/* على الكمبيوتر: إذا لم تتسع القائمة في صف واحد، تُوزّع تلقائيًا على صفين أو أكثر
   وتبقى العناصر في كل صف في المنتصف بدل إخراجها خارج الشاشة أو إظهار شريط تمرير أفقي. */
@media (min-width:901px){
  .topbar{align-items:center}
  .main-nav{
    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    align-content:center!important;
    row-gap:4px!important;
    scrollbar-width:none!important;
  }
  .main-nav::-webkit-scrollbar{display:none!important}
  .main-nav button{flex:0 0 auto}
  .main-nav button.active:after{bottom:-3px}
}

/* ===== 0.12.44: ثبات مسارات السجلات + إضافة مخالفة من حساب الإدارة ===== */
.vice-quick-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-bottom:18px;
  align-items:stretch;
}
.vice-quick-actions>.panel{margin-bottom:0!important;height:100%}
.vice-add-violation-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 22px;
  border-color:#b9ded1;
  background:linear-gradient(110deg,#f7fbf8,#f5fafc);
}
.vice-add-violation-icon{
  background:#fff4dc;
  color:#a56c08;
}
.admin-violation-dialog .field-hint{display:block;margin-top:3px;color:var(--muted);font-size:12px;font-weight:500}
.admin-violation-dialog textarea{resize:vertical;min-height:86px}
.admin-violation-actions{margin-top:4px}

@media(max-width:900px){
  .vice-quick-actions{grid-template-columns:1fr}
  .vice-add-violation-panel{align-items:stretch;flex-direction:column;padding:16px}
  .vice-add-violation-panel .btn{width:100%}
}


/* ===== 0.12.45: اختيار عدة طلاب عند إضافة مخالفة من حساب الإدارة ===== */
.av-student-field{min-width:0}
.av-student-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.av-student-heading strong{font-size:16px;color:var(--ink)}
.av-student-heading span{font-size:13px;color:var(--secondary-dark);font-weight:700}
.av-student-controls{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-bottom:10px}
.av-student-controls input[type="search"]{flex:1 1 220px;min-width:0}
.av-student-list{max-height:260px;overflow-y:auto;align-content:start;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.av-student-list .check-item{cursor:pointer;line-height:1.6}
.av-student-list .check-item:has(input:checked){border-color:var(--secondary);background:var(--mint)}
.av-student-list .check-item input{flex:0 0 18px}
.av-students-empty{grid-column:1/-1;padding:12px;margin:0;color:var(--muted);text-align:center}
@media(max-width:600px){
  .av-student-list{grid-template-columns:1fr;max-height:240px}
  .av-student-controls input[type="search"]{flex-basis:100%}
  .av-student-controls button{flex:1 1 auto}
}
