/* Hesas v3.24.2 — meetings, teacher ordering, and teacher-form alignment */
.setup-row-options{
  display:grid!important;
  grid-template-columns:minmax(190px,1.2fr) minmax(190px,1fr) minmax(210px,1.15fr)!important;
  gap:12px!important;
  align-items:end!important;
  width:100%;
}
.setup-row-options>.field,.setup-row-options>.check{min-width:0;margin:0!important;box-sizing:border-box}
.setup-row-options>.field select{width:100%;min-height:44px}
.setup-row-options>.check{
  min-height:44px;padding:10px 12px;border:1px solid #dbe3ee;border-radius:12px;
  background:#f8fafc;display:flex!important;align-items:center!important;gap:9px!important;
  line-height:1.45;
}
.setup-row-options>.check input{flex:0 0 auto}
.hesas-enhancement-trigger{white-space:nowrap;border:1px solid #cbd5e1!important;background:#fff!important;color:#1e293b!important}
.hesas-enhancement-trigger:hover{background:#f8fafc!important;border-color:#94a3b8!important}
.hesas-enhancement-trigger.meeting-trigger{box-shadow:inset 3px 0 0 #7c3aed}
.hesas-enhancement-trigger.order-trigger{box-shadow:inset 3px 0 0 #0f766e}
.hesas-enhancement-trigger.relief-trigger{box-shadow:inset 3px 0 0 #0284c7}
.hesas-enhancement-trigger.seventh-trigger{box-shadow:inset 3px 0 0 #db2777}
.hesas-context-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

.hesas-overlay{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.5);display:flex;align-items:center;justify-content:center;padding:22px;direction:rtl}
.hesas-modal{width:min(1040px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 24px 70px rgba(15,23,42,.28);border:1px solid #e2e8f0}
.hesas-modal.hesas-order-modal{width:min(760px,96vw)}
.hesas-modal-head{position:sticky;top:0;z-index:4;background:#fff;border-bottom:1px solid #e2e8f0;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.hesas-modal-head h2{margin:0;font-size:1.22rem;color:#0f172a}
.hesas-modal-head p{margin:4px 0 0;color:#64748b;font-size:.87rem}
.hesas-close{width:40px;height:40px;border-radius:10px;border:1px solid #e2e8f0;background:#fff;font-size:1.35rem;cursor:pointer}
.hesas-modal-body{padding:18px 20px 22px}
.hesas-meeting-layout{display:grid;grid-template-columns:minmax(320px,.88fr) minmax(390px,1.12fr);gap:18px;align-items:start}
.hesas-card{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:16px}
.hesas-card h3{margin:0 0 12px;font-size:1rem;color:#0f172a}
.hesas-field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px;font-size:.86rem;color:#334155;font-weight:650}
.hesas-field select,.hesas-field input{width:100%;min-height:43px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:8px 10px;font:inherit;color:#0f172a;box-sizing:border-box}
.hesas-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hesas-check{display:flex;align-items:center;gap:8px;font-size:.88rem;color:#334155;margin:4px 0 14px}
.hesas-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:12px}
.hesas-actions button,.hesas-row-actions button,.hesas-order-actions button{min-height:39px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:7px 12px;cursor:pointer;font-weight:700;color:#334155}
.hesas-actions .primary,.hesas-order-actions .primary{background:#0f766e;color:#fff;border-color:#0f766e}
.hesas-actions .secondary{background:#f8fafc}
.hesas-list{display:flex;flex-direction:column;gap:10px}
.hesas-meeting-item{border:1px solid #e2e8f0;border-radius:14px;padding:12px 13px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;background:#fff}
.hesas-meeting-dot{width:11px;height:42px;border-radius:8px}
.hesas-meeting-item.department .hesas-meeting-dot{background:#7c3aed}
.hesas-meeting-item.heads_admin .hesas-meeting-dot{background:#d97706}
.hesas-meeting-item.supervisors_admin .hesas-meeting-dot{background:#0f766e}
.hesas-meeting-main b{display:block;color:#0f172a;margin-bottom:3px}
.hesas-meeting-main small{display:block;color:#64748b;line-height:1.6}
.hesas-conflict-note{color:#b91c1c!important;font-weight:700}
.hesas-inactive-note{color:#64748b!important;font-weight:700}
.hesas-row-actions{display:flex;gap:6px}
.hesas-row-actions .danger{color:#b91c1c;border-color:#fecaca;background:#fff7f7}
.hesas-empty{padding:24px 12px;text-align:center;color:#64748b;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc}
.hesas-help{font-size:.82rem;line-height:1.7;color:#64748b;background:#f8fafc;border-radius:10px;padding:9px 11px;margin-top:8px}
.hesas-toast{position:fixed;z-index:100001;bottom:24px;right:24px;max-width:min(440px,calc(100vw - 48px));padding:12px 15px;border-radius:12px;background:#0f172a;color:#fff;box-shadow:0 12px 35px rgba(15,23,42,.28);direction:rtl;font-weight:650}
.hesas-toast.error{background:#991b1b}
.hesas-toast.warn{background:#92400e}

.hesas-order-controls{display:grid;grid-template-columns:minmax(200px,1fr) auto;gap:10px;align-items:end;margin-bottom:14px}
.hesas-order-list{display:flex;flex-direction:column;gap:8px}
.hesas-order-row{display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;border:1px solid #e2e8f0;border-radius:12px;padding:9px 10px;background:#fff}
.hesas-order-number{width:34px;height:34px;border-radius:9px;background:#f1f5f9;display:grid;place-items:center;font-weight:800;color:#475569}
.hesas-order-name b{display:block;color:#0f172a}.hesas-order-name small{color:#64748b}
.hesas-order-buttons{display:flex;gap:5px}.hesas-order-buttons button{width:35px;height:35px;padding:0;border:1px solid #cbd5e1;background:#fff;border-radius:9px;cursor:pointer;font-weight:800}.hesas-order-buttons button:disabled{opacity:.35;cursor:not-allowed}
.hesas-head-badge{display:inline-block;padding:2px 7px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:.72rem;font-weight:800;margin-inline-start:6px}
.hesas-order-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}

/* Teacher reliefs, long leave and master-table notes. */
.hesas-modal.hesas-relief-modal{width:min(1180px,97vw)}
.hesas-relief-layout{display:grid;grid-template-columns:minmax(420px,1.05fr) minmax(350px,.95fr);gap:18px;align-items:start}
.hesas-relief-assignments{display:flex;flex-direction:column;gap:9px;max-height:340px;overflow:auto;padding:4px}
.hesas-relief-assignment{display:grid;grid-template-columns:minmax(210px,1fr) minmax(190px,.8fr);align-items:center;gap:10px;border:1px solid #dbeafe;border-radius:12px;padding:10px;background:#f8fbff}
.hesas-relief-assignment .hesas-check{margin:0;align-items:flex-start}.hesas-relief-assignment .hesas-check span{display:flex;flex-direction:column;gap:2px}.hesas-relief-assignment small,.hesas-relief-item small,.hesas-return-row small{display:block;color:#64748b;font-weight:500}
.hesas-relief-assignment .hesas-field{margin:0}
.hesas-relief-item{border:1px solid #e2e8f0;border-radius:13px;padding:12px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff}
.hesas-relief-item>div{display:flex;flex-direction:column;align-items:flex-start;gap:5px}.hesas-relief-item button.danger{border:1px solid #fecaca;background:#fff7f7;color:#b91c1c;border-radius:9px;padding:8px 10px;font-weight:750;cursor:pointer;white-space:nowrap}
.hesas-relief-type{display:inline-flex;border-radius:999px;padding:3px 8px;background:#e0f2fe;color:#075985;font-size:.75rem;font-weight:800}
.hesas-relief-type.maternity{background:#fce7f3;color:#9d174d}.hesas-relief-type.sabbatical{background:#e0e7ff;color:#3730a3}.hesas-relief-type.medical_board{background:#fee2e2;color:#991b1b}.hesas-relief-type.childbirth{background:#fce7f3;color:#9d174d}.hesas-relief-type.long_leave,.hesas-relief-type.long_absence{background:#fef3c7;color:#92400e}.hesas-relief-type.reduced_start,.hesas-relief-type.reduced_end{background:#ecfccb;color:#3f6212}
.hesas-relief-note{display:inline-block;margin:2px 3px;padding:2px 6px;border-radius:7px;background:#e0f2fe;color:#075985;font-size:.67rem;font-weight:850;line-height:1.35;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.hesas-relief-note.maternity{background:#fce7f3;color:#9d174d}.hesas-relief-note.sabbatical{background:#e0e7ff;color:#3730a3}.hesas-relief-note.medical_board{background:#fee2e2;color:#991b1b}.hesas-relief-note.childbirth{background:#fce7f3;color:#9d174d}.hesas-relief-note.long_leave,.hesas-relief-note.long_absence{background:#fef3c7;color:#92400e}.hesas-relief-note.reduced_start,.hesas-relief-note.reduced_end{background:#ecfccb;color:#3f6212}
.hesas-cancel-card{max-width:880px;margin:auto}.hesas-return-list{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:13px 0;max-height:480px;overflow:auto}.hesas-return-row{display:flex;align-items:flex-start;gap:9px;border:1px solid #e2e8f0;border-radius:11px;padding:10px;background:#fff;cursor:pointer}.hesas-return-row b{display:block;color:#0f172a}

/* Dedicated seventh-period panel and live counters. */
.hesas-seventh-section{display:grid!important;grid-template-columns:minmax(230px,1fr) auto auto;gap:18px;align-items:center;border-color:#fbcfe8!important;background:linear-gradient(135deg,#fff 0%,#fdf2f8 100%)!important}
.hesas-seventh-section h3{margin:0 0 4px;color:#831843}.hesas-seventh-section p{margin:0;color:#64748b;font-size:.84rem}
.hesas-seventh-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.hesas-seventh-summary span{background:#fff;border:1px solid #fbcfe8;border-radius:999px;padding:6px 9px;color:#475569;font-size:.78rem;white-space:nowrap}.hesas-seventh-summary b{color:#9d174d}.danger-text,.danger-text b{color:#b91c1c!important}
.hesas-modal.hesas-seventh-modal{width:min(960px,97vw)}.hesas-seventh-live-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.hesas-seventh-live-head small{color:#64748b}.hesas-seventh-table-wrap{max-height:62vh;overflow:auto;border:1px solid #e2e8f0;border-radius:13px}.hesas-seventh-table-wrap table{width:100%;border-collapse:collapse}.hesas-seventh-table-wrap th{position:sticky;top:0;background:#f8fafc;z-index:2;color:#475569}.hesas-seventh-table-wrap th,.hesas-seventh-table-wrap td{padding:9px 10px;border-bottom:1px solid #e2e8f0;text-align:right}.hesas-seventh-table-wrap td>small{display:block;color:#64748b}.hesas-seventh-table-wrap select{min-width:175px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:7px}.hesas-seventh-table-wrap tr.over-limit td{background:#fff1f2;color:#9f1239;font-weight:750}

/* Meeting shading: distinct, readable on screen and print. */
td.hesas-meeting-cell{position:relative!important;background-image:none!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
td.hesas-meeting-department{background:#ede9fe!important;box-shadow:inset 0 0 0 2px #8b5cf6!important}
td.hesas-meeting-heads_admin{background:#fef3c7!important;box-shadow:inset 0 0 0 2px #f59e0b!important}
td.hesas-meeting-supervisors_admin{background:#ccfbf1!important;box-shadow:inset 0 0 0 2px #14b8a6!important}
td.hesas-meeting-conflict{box-shadow:inset 0 0 0 3px #dc2626!important}
.hesas-meeting-mark{display:block;font-size:.66rem;font-weight:800;line-height:1.15;color:#312e81;text-align:center;white-space:normal;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hesas-meeting-heads_admin .hesas-meeting-mark{color:#78350f}.hesas-meeting-supervisors_admin .hesas-meeting-mark{color:#134e4a}
.hesas-meeting-conflict-badge{position:absolute;inset-inline-end:2px;top:2px;border-radius:999px;background:#dc2626;color:#fff;font-size:.56rem;font-weight:900;padding:1px 4px;z-index:3;line-height:1.35}
.hesas-meeting-legend{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:5px 7px;margin:4px 0 0;font-size:.69rem;color:#475569;line-height:1.2}
.hesas-meeting-legend span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.hesas-meeting-legend i{width:12px;height:9px;border-radius:3px;border:1px solid rgba(15,23,42,.18);display:inline-block}
.hesas-meeting-legend .department i{background:#ede9fe;border-color:#8b5cf6}.hesas-meeting-legend .heads_admin i{background:#fef3c7;border-color:#f59e0b}.hesas-meeting-legend .supervisors_admin i{background:#ccfbf1;border-color:#14b8a6}

@media(max-width:900px){.hesas-meeting-layout,.hesas-relief-layout{grid-template-columns:1fr}.setup-row-options{grid-template-columns:1fr 1fr!important}.hesas-modal{max-height:95vh}.hesas-seventh-section{grid-template-columns:1fr}.hesas-seventh-summary{justify-content:flex-start}}
@media(max-width:620px){.hesas-overlay{padding:8px}.hesas-modal-head,.hesas-modal-body{padding:14px}.hesas-field-grid,.setup-row-options,.hesas-relief-assignment,.hesas-return-list{grid-template-columns:1fr!important}.hesas-order-controls{grid-template-columns:1fr}.hesas-meeting-item{grid-template-columns:auto 1fr}.hesas-row-actions{grid-column:2}.hesas-modal{border-radius:14px;width:100%;max-height:97vh}.hesas-seventh-table-wrap{font-size:.8rem}.hesas-seventh-table-wrap th,.hesas-seventh-table-wrap td{padding:7px}.hesas-seventh-table-wrap select{min-width:130px}}
@media print{
  .hesas-overlay,.hesas-toast,.hesas-enhancement-trigger,.hesas-context-tools{display:none!important}
  .hesas-meeting-legend{display:flex!important;break-inside:avoid;page-break-inside:avoid}
  td.hesas-meeting-department{background:#ede9fe!important}td.hesas-meeting-heads_admin{background:#fef3c7!important}td.hesas-meeting-supervisors_admin{background:#ccfbf1!important}
}

/* Global teacher order: keep departments together in the master timetable. */
.hesas-modal.hesas-order-modal{width:min(860px,96vw)}
.hesas-order-groups{display:flex;flex-direction:column;gap:14px}
.hesas-order-group{border:1px solid #dbe3ee;border-radius:14px;background:#f8fafc;padding:10px}
.hesas-order-group-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 9px}
.hesas-order-group-head>div:first-child{display:flex;align-items:baseline;gap:8px;min-width:0}
.hesas-order-group-head b{color:#0f172a;font-size:.95rem}
.hesas-order-group-head small{color:#64748b;font-size:.75rem;white-space:nowrap}
.hesas-order-group .hesas-order-list{gap:6px}
.hesas-order-group .hesas-order-row{background:#fff}
@media(max-width:620px){.hesas-order-group{padding:8px}.hesas-order-group-head>div:first-child{align-items:flex-start;flex-direction:column;gap:2px}}


/* Executable suggestions in the move/swap rejection dialog. */
.diagnosis-alternatives .diagnosis-run{display:inline-flex;align-items:center;gap:6px;color:#0f5132;background:#e8f6ee;border:1px solid #9fd5b8;border-radius:999px;padding:7px 12px;font-weight:750;cursor:pointer}
.diagnosis-alternatives .diagnosis-run:hover{background:#d3efdf}
.diagnosis-alternatives .diagnosis-run svg,.diagnosis-run-plan svg{width:16px;height:16px}
/* The page reset strips padding and corners from every button, and `.primary` only paints it, so the
   whole look of this one has to be written out here or it renders as a bare coloured strip. */
.diagnosis-plan .diagnosis-run-plan{margin-top:14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 18px;min-height:42px;border-radius:10px;font-weight:750;font-size:.92rem;line-height:1.25;cursor:pointer;box-shadow:0 5px 14px #1769aa26;transition:background .15s ease}
.diagnosis-plan .diagnosis-run-plan:hover{background:#12578d!important}
.diagnosis-plan .diagnosis-run-plan:disabled{opacity:.6;cursor:default}
.diagnosis-plan .hesas-plan-note{margin:12px 0 0;padding:9px 12px;border-radius:9px;background:#fff;border:1px dashed #bad9eb;color:#31556e;font-size:.83rem;line-height:1.8}

/* Quality report. */
.hesas-quality-trigger{white-space:nowrap;border:1px solid #cbd5e1;background:#fff;color:#1e293b;border-radius:10px;padding:7px 11px;font-weight:700;cursor:pointer;box-shadow:inset 3px 0 0 #16a34a}
.hesas-quality-trigger.link{display:block;margin-top:6px;border:0;box-shadow:none;background:none;padding:0;color:#0f766e;font-size:.78rem;text-decoration:underline}
.hesas-modal.hesas-quality-modal{width:min(980px,97vw)}
.hesas-quality{display:flex;flex-direction:column;gap:14px}
.hesas-quality-summary{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center;border-radius:16px;padding:16px;border:1px solid #e2e8f0;background:#f8fafc}
.hesas-quality-summary h3{margin:0 0 4px}.hesas-quality-summary p{margin:0;color:#475569;line-height:1.7}
.hesas-quality-score{width:108px;height:108px;border-radius:50%;display:grid;place-content:center;text-align:center;background:#fff;border:6px solid #16a34a}
.hesas-quality-score b{font-size:1.7rem;color:#0f172a}.hesas-quality-score span{font-size:.8rem;color:#475569;font-weight:700}
.hesas-quality-summary.good .hesas-quality-score{border-color:#22c55e}.hesas-quality-summary.fair .hesas-quality-score{border-color:#f59e0b}.hesas-quality-summary.weak .hesas-quality-score{border-color:#dc2626}
.hesas-quality-hard{color:#991b1b!important;font-weight:750;margin-top:8px!important}
.hesas-quality-status{color:#475569;font-size:.85rem}
.hesas-quality-suggestions,.hesas-quality-advice{margin:0;padding-inline-start:22px;line-height:1.9;color:#334155}
.hesas-quality-issue-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.hesas-quality-issue-head small{color:#64748b;line-height:1.6}
.hesas-quality-share{text-align:center;min-width:70px}.hesas-quality-share b{display:block;font-size:1.25rem;color:#b45309}.hesas-quality-share small{color:#64748b}
.hesas-quality-bar{height:8px;border-radius:999px;background:#f1f5f9;overflow:hidden;margin:10px 0 6px}.hesas-quality-bar i{display:block;height:100%;background:linear-gradient(90deg,#f59e0b,#dc2626)}
.hesas-quality-meta{margin:0 0 8px;color:#64748b;font-size:.8rem}
.hesas-quality-issue details{margin-top:8px}.hesas-quality-issue summary{cursor:pointer;color:#0f766e;font-weight:700}
.hesas-quality-items{margin:8px 0 0;padding-inline-start:20px;max-height:260px;overflow:auto;line-height:1.8;color:#334155;font-size:.84rem}

/* Meeting slot suggestions. */
.hesas-suggest-card{margin-bottom:16px;background:linear-gradient(135deg,#fff 0%,#f5f3ff 100%);border-color:#ddd6fe}
.hesas-suggest-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap}.hesas-suggest-head h3{margin:0 0 4px}.hesas-suggest-head small{color:#64748b;line-height:1.6;display:block;max-width:560px}
.hesas-suggest-controls{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.hesas-suggest-controls label{display:flex;flex-direction:column;gap:4px;font-size:.8rem;color:#475569;font-weight:700}
.hesas-suggest-controls select{min-height:39px;border:1px solid #cbd5e1;border-radius:10px;padding:6px 8px;background:#fff}
.hesas-suggest-controls button,.hesas-suggest-slot button,.hesas-suggest-one button{min-height:39px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:7px 12px;cursor:pointer;font-weight:700;color:#334155}
.hesas-suggest-controls .primary,.hesas-suggest-slot .primary{background:#6d28d9;border-color:#6d28d9;color:#fff}
.hesas-suggest-list{display:flex;flex-direction:column;gap:10px;margin-top:12px;max-height:460px;overflow:auto}
.hesas-suggest-row{border:1px solid #e9d5ff;border-radius:13px;background:#fff;padding:10px 12px}
.hesas-suggest-dep b{color:#0f172a}.hesas-suggest-dep small{display:block;color:#64748b;margin:2px 0 8px}
.hesas-suggest-slot{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border-radius:10px;padding:8px 10px;margin-top:6px;border:1px solid #bbf7d0;background:#f0fdf4}
.hesas-suggest-slot.warn{border-color:#fde68a;background:#fffbeb}.hesas-suggest-slot small{display:block;color:#475569;line-height:1.6;margin-top:2px}
.hesas-suggest-row details summary{cursor:pointer;color:#6d28d9;font-weight:700;margin-top:6px}
.hesas-suggest-one{margin:-4px 0 12px}.hesas-suggest-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.hesas-suggest-chips button{border-radius:999px;padding:6px 10px;border:1px solid #bbf7d0;background:#f0fdf4;color:#14532d;font-size:.8rem;cursor:pointer}
.hesas-suggest-chips button.warn{border-color:#fde68a;background:#fffbeb;color:#78350f}.hesas-suggest-chips button.chosen{outline:2px solid #6d28d9}

/* Print header controls on the reports page. */
.hesas-print-head{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:8px 0}
.hesas-print-head label{display:flex;flex-direction:column;gap:3px;font-size:.78rem;color:#475569;font-weight:700}
.hesas-print-head input{min-height:36px;border:1px solid #cbd5e1;border-radius:9px;padding:5px 8px;min-width:140px}
.hesas-print-head small{color:#64748b;font-size:.75rem}
.hesas-print-extra{grid-column:1/-1;text-align:center;font-weight:900;font-size:13px}

/* A3 portrait with the whole week: every teacher on one page, like the school's printed sheet. */
.master-grid-a3-portrait-week{--pw-row-h:4.2mm;--pw-font:6.8pt;width:287mm;max-width:none;margin:0 auto}
.master-grid-a3-portrait-week .report-document-head{margin-bottom:2mm;gap:4mm}
.master-grid-a3-portrait-week .report-document-head h2{font-size:15pt}
.master-grid-a3-portrait-week .master-report-week-table{width:100%!important;min-width:0!important;table-layout:fixed}
.master-grid-a3-portrait-week .master-report-week-table th,.master-grid-a3-portrait-week .master-report-week-table td{height:var(--pw-row-h);padding:0 .2mm;font-size:var(--pw-font);line-height:1;border-color:#111;font-weight:700}
.master-grid-a3-portrait-week .master-report-week-table .mr-no{width:5mm}
.master-grid-a3-portrait-week .master-report-week-table .mr-department{width:6mm;padding:0}
.master-grid-a3-portrait-week .master-report-week-table .mr-department span{border-inline-start-width:0;padding:0;font-size:calc(var(--pw-font) + 1pt)}
.master-grid-a3-portrait-week .master-report-week-table .mr-teacher{width:31mm;padding-inline:1mm;overflow:hidden;text-overflow:ellipsis}
.master-grid-a3-portrait-week .master-report-week-table .mr-period{width:auto}
.master-grid-a3-portrait-week .master-report-week-table .mr-load{width:7mm}
.master-grid-a3-portrait-week .master-report-week-table .mr-notes{width:14mm;white-space:normal}
.master-grid-a3-portrait-week .master-report-week-table .mr-day-start,.master-grid-a3-portrait-week .master-report-week-table .mr-day{border-inline-start:2.6px solid #000}
.master-grid-a3-portrait-week .master-report-department tr:first-child td{border-top:2.6px solid #000}
.master-grid-a3-portrait-week td.mr-empty{color:transparent}
.master-grid-a3-portrait-week .hesas-meeting-mark{display:none}
.master-grid-a3-portrait-week .hesas-relief-note{font-size:calc(var(--pw-font) - .6pt);padding:0 1mm;margin:0}
.master-grid-a3-portrait-week .hesas-meeting-legend{font-size:7pt;padding:1mm 0 0}
/* A4 portrait, a day in every page: rows and text fill the sheet instead of sitting small at the top
   (hesas-work.js measures every day and sets the two values on it). */
/* The sheet is as wide as the paper, so the preview is the print: nothing is squeezed on the way to the printer. */
.master-grid-a4-portrait{--pd-row-h:7mm;--pd-font:10pt;width:200mm;max-width:none;margin:0 auto}
.master-grid-a4-portrait .master-report-day-table th,.master-grid-a4-portrait .master-report-day-table td{height:var(--pd-row-h);padding:.4mm .6mm;font-size:var(--pd-font);line-height:1.15}
.master-grid-a4-portrait .master-report-day-table .mr-department span{font-size:var(--pd-font)}
.master-grid-a4-portrait .master-report-day-table .mr-notes{white-space:normal;font-size:calc(var(--pd-font) - 1.5pt)}
.master-grid-a4-portrait .hesas-relief-note{font-size:calc(var(--pd-font) - 1.5pt)}
.master-grid-a4-portrait td.mr-empty{color:transparent}
/* A4 portrait: the five day tables of one department stacked on a single page. */
.master-grid-a4-portrait-week{--pw-row-h:5mm;--pw-font:7pt;width:202mm;max-width:none;margin:0 auto}
.master-grid-a4-portrait-week .master-report-day{break-after:auto!important;page-break-after:auto!important;break-inside:avoid;page-break-inside:avoid;margin:0 0 1.6mm}
/* One meeting legend for the page, under the last day. */
.master-grid-a4-portrait-week .master-report-day:not(:last-child) .hesas-meeting-legend{display:none!important}
.master-grid-a4-portrait-week .master-report-day-head{margin-bottom:.6mm;padding:0 2mm .4mm;gap:2mm;border-bottom-width:1px;box-sizing:border-box}
.master-grid-a4-portrait-week .master-report-day-head h2{font-size:9pt;padding:.5mm 8mm;border-radius:4px}
.master-grid-a4-portrait-week .master-report-day-head b{font-size:8pt}
.master-grid-a4-portrait-week .master-report-day-head small,.master-grid-a4-portrait-week .master-report-day-head>span{font-size:6.5pt}
/* The school, department and key are printed once, above the first day. */
.master-grid-a4-portrait-week .master-report-day+.master-report-day .master-report-day-head{grid-template-columns:1fr;justify-items:center}
.master-grid-a4-portrait-week .master-report-day+.master-report-day .master-report-day-head>div,.master-grid-a4-portrait-week .master-report-day+.master-report-day .master-report-day-head>span{display:none}
.master-grid-a4-portrait-week .master-report-day-table th,.master-grid-a4-portrait-week .master-report-day-table td{height:var(--pw-row-h);padding:0 .3mm;font-size:var(--pw-font);line-height:1;border-color:#111;font-weight:700}
.master-grid-a4-portrait-week .master-report-day-table .mr-department span{padding:0;border-inline-start-width:2px;font-size:var(--pw-font)}
.master-grid-a4-portrait-week .master-report-day-table .mr-notes{white-space:normal;font-size:calc(var(--pw-font) - .8pt)}
.master-grid-a4-portrait-week .master-report-department tr:first-child td{border-top:2px solid #000}
.master-grid-a4-portrait-week td.mr-empty{color:transparent}
.master-grid-a4-portrait-week .hesas-meeting-mark{display:none}
.master-grid-a4-portrait-week .hesas-relief-note{font-size:calc(var(--pw-font) - .8pt);padding:0 .5mm;margin:0}
.master-grid-a4-portrait-week .hesas-meeting-legend{font-size:6.5pt;padding:1mm 0 0}
.master-grid-a4-portrait-week .hesas-print-extra{font-size:9px}
.hs-stage-note{border:1px solid #bae6fd;background:#f0f9ff;color:#0c4a6e;border-radius:10px;padding:8px 12px;margin:8px 0;font-size:.86rem;line-height:1.6}
.hs-stage-box{border-color:#bae6fd}
/* «التحديث الذكي» sits next to «توليد ذكي» in a quieter teal. */
button.hs-smart-update{display:inline-flex;align-items:center;gap:6px;border:1px solid #0f766e!important;background:#f0fdfa!important;color:#0f766e!important;font-weight:800;border-radius:10px;padding:8px 14px;cursor:pointer;white-space:nowrap}
button.hs-smart-update:hover{background:#ccfbf1!important}
button.hs-smart-update svg{width:18px;height:18px}
.hs-joint-note{border:1px solid #fcd34d;background:#fffbeb;color:#78350f;border-radius:10px;padding:8px 12px;margin:8px 0;font-size:.86rem;line-height:1.6}
@media print{
  .hesas-quality-trigger,.hesas-print-head{display:none!important}
  .master-grid-a4-portrait-week{width:100%;break-inside:avoid;page-break-inside:avoid;break-after:page;page-break-after:always}
  .master-grid-a4-portrait-week:last-child{break-after:auto;page-break-after:auto}
  .master-grid-a4-portrait-week .master-report-day-table tr{break-inside:avoid;page-break-inside:avoid}
  .master-grid-a4-portrait-week td,.master-grid-a4-portrait-week th{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .master-grid-a4-portrait{width:100%}
  /* A day that needs more than one sheet still keeps whole rows and repeats its header; a department larger
     than what is left of the sheet continues on the next one instead of leaving it half empty. */
  .master-grid-a4-portrait .master-report-department{break-inside:auto;page-break-inside:auto}
  .master-grid-a4-portrait .master-report-day-table tr{break-inside:avoid;page-break-inside:avoid}
  .master-grid-a4-portrait .master-report-day-table thead{display:table-header-group}
  .master-grid-a4-portrait td,.master-grid-a4-portrait th{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .master-grid-a3-portrait-week{width:100%}
  .master-grid-a3-portrait-week .master-report-department{break-inside:auto}
  .master-grid-a3-portrait-week .master-report-week-table tr{break-inside:avoid;page-break-inside:avoid}
  .master-grid-a3-portrait-week td,.master-grid-a3-portrait-week th{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  body.hesas-print-quality>*:not(.hesas-overlay){display:none!important}
  body.hesas-print-quality .hesas-overlay{display:block!important;position:static;background:none;padding:0}
  body.hesas-print-quality .hesas-modal{width:100%;max-height:none;overflow:visible;box-shadow:none;border:0}
  body.hesas-print-quality .hesas-close,body.hesas-print-quality .hesas-quality-actions{display:none!important}
  body.hesas-print-quality details>*{display:block}
}

/* Meeting cells in every printed master timetable: hatched in the meeting type's colour, with no text. */
.master-grid-report td.hesas-meeting-cell{box-shadow:none!important;color:transparent!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.master-grid-report td.hesas-meeting-cell.hesas-meeting-conflict{color:inherit!important;box-shadow:inset 0 0 0 1.5px #dc2626!important}
.master-grid-report td.hesas-meeting-department{background:repeating-linear-gradient(135deg,#fff 0 .55mm,#7c3aed .55mm .95mm)!important}
.master-grid-report td.hesas-meeting-heads_admin{background:repeating-linear-gradient(135deg,#fff 0 .55mm,#d97706 .55mm .95mm)!important}
.master-grid-report td.hesas-meeting-supervisors_admin{background:repeating-linear-gradient(135deg,#fff 0 .55mm,#0d9488 .55mm .95mm)!important}
.master-grid-report .hesas-meeting-legend i{width:16px;height:10px;border-radius:2px}
.master-grid-report .hesas-meeting-legend .department i{background:repeating-linear-gradient(135deg,#fff 0 2px,#7c3aed 2px 3.5px);border-color:#7c3aed}
.master-grid-report .hesas-meeting-legend .heads_admin i{background:repeating-linear-gradient(135deg,#fff 0 2px,#d97706 2px 3.5px);border-color:#d97706}
.master-grid-report .hesas-meeting-legend .supervisors_admin i{background:repeating-linear-gradient(135deg,#fff 0 2px,#0d9488 2px 3.5px);border-color:#0d9488}
@media print{
  .master-grid-report td.hesas-meeting-department{background:repeating-linear-gradient(135deg,#fff 0 .55mm,#7c3aed .55mm .95mm)!important}
  .master-grid-report td.hesas-meeting-heads_admin{background:repeating-linear-gradient(135deg,#fff 0 .55mm,#d97706 .55mm .95mm)!important}
  .master-grid-report td.hesas-meeting-supervisors_admin{background:repeating-linear-gradient(135deg,#fff 0 .55mm,#0d9488 .55mm .95mm)!important}
  .master-grid-report .hesas-meeting-legend i{print-color-adjust:exact;-webkit-print-color-adjust:exact}
}

/* Thicker lines between departments (rows) and between days (columns), on screen and in print. */
.master-report-week-table .mr-day,.master-report-week-table .mr-day-start{border-inline-start:2.6px solid #000!important}
.master-report-department tr:first-child td{border-top:2.6px solid #000!important}
.master-table .day-start,.master-table th.day-group{border-inline-start:3px solid #101c28!important}
.master-table .department-start td{border-top:3px solid #101c28!important}
.portrait-master-table .portrait-department-start td{border-top:3px solid #101c28!important}

/* Order modes and the timetable guide link. */
.hesas-order-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.hesas-order-modes label{display:flex;flex-direction:column;gap:5px;font-size:.84rem;font-weight:700;color:#334155}
.hesas-order-modes select{min-height:41px;border:1px solid #cbd5e1;border-radius:10px;padding:6px 9px;background:#fff;font:inherit}
.hesas-order-group.entry-locked .hesas-order-buttons button,.hesas-order-groups.entry-locked>.hesas-order-group>.hesas-order-group-head .hesas-order-buttons button{opacity:.3;pointer-events:none}
.hesas-guide-link{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;border:1px solid #cbd5e1;background:#fff;color:#1e293b;border-radius:10px;padding:7px 11px;font-weight:700;text-decoration:none;box-shadow:inset 3px 0 0 #2563eb}
.hesas-guide-link:hover{background:#eff6ff}
.hesas-quality-result{border-radius:14px;padding:12px 14px;border:1px solid #bbf7d0;background:#f0fdf4;color:#14532d}
.hesas-quality-result.none{border-color:#fde68a;background:#fffbeb;color:#78350f}
.hesas-quality-result b{display:block;margin-bottom:3px}.hesas-quality-result p{margin:0;line-height:1.7}
@media(max-width:620px){.hesas-order-modes{grid-template-columns:1fr}}
@media print{.hesas-guide-link{display:none!important}}
/* repair-5: overview of teachers freed from specific periods */
.hesas-free-overview{display:grid;gap:8px;border-top:1px solid #e3eaef;padding-top:12px}
.hesas-free-overview h4{margin:0;font-size:13px;color:#24445a}
.hesas-free-overview table{width:100%}
.hesas-free-overview td small{display:block;color:#6b7f8c}
.hesas-free-overview tr.current td{background:#f1faf7}
.hesas-free-chips{display:flex;flex-wrap:wrap;gap:5px}
.hesas-free-chips span{background:#fff1f1;color:#a64141;border:1px solid #f1caca;border-radius:999px;padding:2px 8px;font-size:11px;white-space:nowrap}
.hesas-free-overview .row-actions{gap:6px}
.hesas-free-overview .row-actions button{padding:5px 10px;border-radius:7px;font-size:11px;background:#e8f1f7;color:#245f83;white-space:nowrap}
.hesas-free-overview .row-actions .danger-soft{background:#fff0f0;color:#b04444}
.viewer-mode .hesas-free-overview .danger-soft{display:none!important}

/* repair-6: one button style across injected tools and modals */
.hesas-enhancement-trigger,.hesas-quality-trigger:not(.link){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 14px!important;border-radius:10px!important;border:1px solid #d3dee7!important;background:#fff!important;color:#1f3b52!important;font-weight:700;font-size:13px;line-height:1.25;cursor:pointer;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;transition:background .15s,border-color .15s,box-shadow .15s}
.hesas-enhancement-trigger::before,.hesas-quality-trigger:not(.link)::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--hs-accent,#1769aa);flex:none}
.hesas-enhancement-trigger.meeting-trigger{--hs-accent:#7c3aed}
.hesas-enhancement-trigger.order-trigger{--hs-accent:#0f766e}
.hesas-enhancement-trigger.relief-trigger{--hs-accent:#0284c7}
.hesas-enhancement-trigger.seventh-trigger{--hs-accent:#db2777}
.hesas-quality-trigger{--hs-accent:#16a34a}
.hesas-enhancement-trigger:hover,.hesas-quality-trigger:not(.link):hover{background:#f3f8fb!important;border-color:#b6c8d5!important;box-shadow:0 3px 10px rgba(15,23,42,.08)!important}
.hesas-enhancement-trigger:focus-visible,.hesas-quality-trigger:focus-visible,.hesas-ex-tool:focus-visible,.hesas-ex-list-toggle:focus-visible,.hesas-teacher-report-card button:focus-visible,.hesas-modal button:focus-visible{outline:2px solid #1769aa;outline-offset:2px}
.hesas-modal button{font-family:inherit}
.hesas-actions button,.hesas-row-actions button,.hesas-order-actions button,.hesas-suggest-controls button,.hesas-suggest-slot button,.hesas-suggest-one button{min-height:40px;border-radius:10px;padding:8px 14px;font-weight:700;transition:background .15s,border-color .15s,box-shadow .15s}
.hesas-actions button:hover:not(:disabled),.hesas-row-actions button:hover:not(:disabled),.hesas-order-actions button:hover:not(:disabled),.hesas-suggest-controls button:hover:not(:disabled),.hesas-suggest-slot button:hover:not(:disabled),.hesas-suggest-one button:hover:not(:disabled),.hesas-order-buttons button:hover:not(:disabled){background:#f3f8fb;border-color:#b6c8d5}
.hesas-actions .primary,.hesas-order-actions .primary,.hesas-report-toolbar .primary{background:#1769aa!important;border-color:#1769aa!important;color:#fff!important;box-shadow:0 5px 14px #1769aa26}
.hesas-actions .primary:hover:not(:disabled),.hesas-order-actions .primary:hover:not(:disabled),.hesas-report-toolbar .primary:hover:not(:disabled){background:#125a93!important;border-color:#125a93!important}
.hesas-relief-item button.danger{min-height:38px;transition:background .15s}
.hesas-relief-item button.danger:hover{background:#fee2e2}
.hesas-modal button:disabled{opacity:.55;cursor:wait}

/* Exceptions page */
.hesas-ex-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-bottom:24px}
.hesas-ex-tool{display:grid;gap:6px;align-content:start;text-align:start;padding:16px 18px;border:1px solid #d9e4ec;border-top:4px solid var(--hs-accent,#1769aa);border-radius:14px;background:#fff;color:#1f3b52;cursor:pointer;box-shadow:0 1px 3px rgba(15,23,42,.05);transition:box-shadow .15s,transform .15s}
.hesas-ex-tool b{font-size:15px}
.hesas-ex-tool small{color:#6b7f8c;font-size:12px;line-height:1.7;font-weight:500}
.hesas-ex-tool:hover:not(:disabled){box-shadow:0 8px 20px rgba(15,23,42,.1);transform:translateY(-1px)}
.hesas-ex-tool:disabled{cursor:not-allowed;opacity:.6}
.hesas-ex-tool.relief{--hs-accent:#0284c7}
.hesas-ex-tool.meeting{--hs-accent:#7c3aed}
.hesas-ex-tool.order{--hs-accent:#0f766e}
.viewer-mode .hesas-ex-tools{display:none}
.hesas-ex-head{align-items:center;gap:12px;flex-wrap:wrap}
.hesas-ex-list-toggle{display:inline-flex;align-items:center;gap:10px;min-height:40px;padding:8px 14px;border-radius:10px;border:1px solid #c9dbe8;background:#eef5fa;color:#1d5a86;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s}
.hesas-ex-list-toggle span{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#1769aa;color:#fff;display:inline-grid;place-items:center;font-size:12px}
.hesas-ex-list-toggle:hover{background:#e2eef6}
.hesas-ex-list-toggle.open{background:#fff}
section.hesas-free-overview{margin-bottom:14px;padding:14px 16px;border-top:0}
.hesas-free-chips span{display:inline-flex;align-items:center}
.hesas-free-chips span button{margin-inline-start:6px;width:18px;height:18px;border-radius:50%;border:0;background:#f5d0d0;color:#9b2c2c;font-weight:800;line-height:18px;padding:0;cursor:pointer}
.hesas-free-chips span button:hover{background:#b91c1c;color:#fff}

/* Leave kept on the original teacher's row: hatched, display only */
td.hesas-kept-cell{color:transparent!important;background-color:#f8fafc!important;background-image:repeating-linear-gradient(135deg,rgba(71,85,105,.24) 0 2px,transparent 2px 7px)!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
td.hesas-kept-cell .hesas-kept-lesson{color:#475569;font-weight:700;font-style:italic;background:rgba(255,255,255,.8);border-radius:4px;padding:0 3px}

/* Relief form and list */
.hesas-check{display:flex;gap:10px;align-items:flex-start;margin:0 0 12px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;cursor:pointer}
.hesas-check input{margin-top:3px;width:17px;height:17px;accent-color:#1769aa;flex:none}
.hesas-check span{display:grid;gap:3px}
.hesas-check b{font-size:.86rem;color:#1e293b}
.hesas-check small{font-size:.78rem;color:#64748b;line-height:1.6;font-weight:500}
.hesas-help.warn{background:#fffbeb;color:#92400e;border:1px solid #fde68a;margin-bottom:12px}
.hesas-relief-options{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:6px}
.hesas-relief-options label{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;color:#334155;cursor:pointer}
.hesas-relief-options input{accent-color:#1769aa}
.hesas-relief-type.iddah,.hesas-relief-note.iddah{background:#f3e8ff;color:#6b21a8}
.hesas-relief-type.medical_start,.hesas-relief-type.medical_end,.hesas-relief-note.medical_start,.hesas-relief-note.medical_end{background:#ffedd5;color:#9a3412}

/* Teacher reports */
.hesas-teacher-reports{margin:18px 0;padding:16px 18px}
.hesas-teacher-reports-head h3{margin:0}
.hesas-teacher-reports-head p{margin:5px 0 12px;color:#718397;font-size:13px}
.hesas-teacher-reports-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.hesas-teacher-report-card{display:flex;flex-direction:column;justify-content:space-between;gap:10px;padding:13px 14px;border:1px solid #e1e9ef;border-radius:12px;background:#f9fbfd}
.hesas-teacher-report-card b{display:block;color:#1f3b52;font-size:14px}
.hesas-teacher-report-card small{display:block;margin-top:4px;color:#6b7f8c;font-size:12px;line-height:1.6}
.hesas-teacher-report-card button{align-self:flex-start;min-height:36px;padding:7px 14px;border-radius:9px;border:1px solid #1769aa;background:#fff;color:#1769aa;font-weight:700;cursor:pointer;transition:background .15s,color .15s}
.hesas-teacher-report-card button:hover{background:#1769aa;color:#fff}
.hesas-modal.hesas-teacher-report-modal{width:min(1100px,97vw)}
.hesas-report-toolbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.hesas-report-toolbar .hesas-field{margin:0;min-width:240px}
.hesas-report-count{margin-inline-start:auto;color:#475569;font-weight:700;align-self:center}
.hesas-report-toolbar .primary{min-height:40px;padding:8px 20px;border-radius:10px;border:1px solid #1769aa;font-weight:700;cursor:pointer}
.hesas-report-sheet{border:1px solid #e2e8f0;border-radius:12px;padding:18px;background:#fff}
.hesas-report-sheet-head{text-align:center;margin-bottom:14px}
.hesas-report-sheet-head b{display:block;color:#334155}
.hesas-report-sheet-head h2{margin:6px 0;font-size:1.15rem;color:#0f172a}
.hesas-report-sheet-head small{color:#64748b}
.hesas-report-table{width:100%;border-collapse:collapse;font-size:.86rem}
.hesas-report-table th,.hesas-report-table td{border:1px solid #cbd5e1;padding:6px 8px;text-align:start;vertical-align:top}
.hesas-report-table th{background:#eef3f7;color:#1e293b;font-weight:800}
.hesas-report-table tbody tr:nth-child(even) td{background:#f8fafc}
.hesas-report-table td:first-child,.hesas-report-table th:first-child{width:36px;text-align:center}
.hesas-report-chip{display:inline-block;margin:1px;padding:1px 7px;border-radius:999px;background:#fff1f1;color:#a64141;border:1px solid #f1caca;font-size:.76rem;white-space:nowrap}
.hesas-report-group{margin:16px 0 6px;color:#1f3b52}
.hesas-report-group small{color:#64748b;font-weight:600}
.hesas-report-sign{display:flex;justify-content:flex-end;gap:10px;align-items:baseline;margin-top:22px;color:#334155}
@media print{
  body.hesas-print-teacher-report>*:not(.hesas-overlay){display:none!important}
  body.hesas-print-teacher-report .hesas-overlay{display:block!important;position:static;background:none;padding:0}
  body.hesas-print-teacher-report .hesas-modal{width:100%;max-height:none;overflow:visible;box-shadow:none;border:0}
  body.hesas-print-teacher-report .hesas-modal-head,body.hesas-print-teacher-report .hesas-report-toolbar{display:none!important}
  body.hesas-print-teacher-report .hesas-report-sheet{border:0;padding:0}
  body.hesas-print-teacher-report .hesas-report-table th,body.hesas-print-teacher-report .hesas-report-table td,body.hesas-print-teacher-report .hesas-report-chip{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .hesas-teacher-reports{display:none!important}
}

/* repair-6: buttons that had no padding or radius of their own (teachers, requirements, subjects, setup window, platform) */
.teaching-setup-actions button,.setup-paste button,.setup-footer button,.platform-submit,.platform-add-user button,.account-row-actions button,.platform-owner>button,.row-actions button:not(.icon){display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 16px;border-radius:10px;font-weight:700;line-height:1.3;border:1px solid #cfdde8;background:#fff;color:#153e63;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.teaching-setup-actions button.primary,.setup-paste button.primary,.setup-footer button.primary,.platform-submit,.platform-add-user button.primary{border-color:#1769aa;color:#fff}
.teaching-setup-actions button:not(.primary):hover:not(:disabled),.setup-footer button:not(.primary):hover:not(:disabled),.account-row-actions button:not(.danger):hover:not(:disabled),.platform-owner>button:hover,.row-actions button:not(.icon):hover:not(:disabled){background:#eef5fa;border-color:#b6c8d5}
.teaching-setup-actions button.primary:hover:not(:disabled),.setup-paste button.primary:hover:not(:disabled),.setup-footer button.primary:hover:not(:disabled),.platform-submit:hover:not(:disabled),.platform-add-user button.primary:hover:not(:disabled){background:#125a93!important;border-color:#125a93}
.teaching-setup-actions button svg,.setup-footer button svg,.row-actions button:not(.icon) svg,.setup-tabs button svg{width:17px;height:17px;flex:none}
.row-actions button:not(.icon){padding:6px 11px;min-height:34px;font-size:12px;background:#eef5fa;border-color:#d5e3ee;color:#1d5a86;white-space:nowrap}
.account-row-actions button{padding:7px 12px;font-size:12px}
.account-row-actions button.danger{color:#b42318;border-color:#f4c7c3;background:#fff5f4}
.account-row-actions button.danger:hover:not(:disabled){background:#fee4e2}
.platform-owner>button{background:#eef4f8;border-color:transparent}
.setup-tabs button{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border-radius:10px;font-weight:700;transition:background .15s}
.setup-tabs button:not(.active):hover{background:#e6edf3}
.modal-head>button:not(.icon){flex:none;display:inline-grid;place-items:center;width:38px;height:38px;padding:0;border-radius:10px;border:1px solid transparent;background:#f1f5f9;color:#334155;font-size:22px;line-height:1}
.modal-head>button:not(.icon):hover{background:#e2e8f0}

/* repair-6: the free-period count badge was sized like the 38px icon beside it */
.availability-current>span.badge{width:auto;height:auto;display:inline-flex;align-items:center;flex:none;padding:5px 10px;border-radius:99px;font-size:12px;font-weight:700}
.availability-current>span.badge.red{color:#c23d50;background:#ffebee}
.availability-current>span.badge.green{color:#10845b;background:#e6f8f0}

/* repair-10: notifications bell and list */
.header-actions{display:flex;align-items:center;gap:10px}
.hesas-notice-bell{position:relative;display:inline-grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%;border:1px solid #dbe3ec;background:#fff;color:#334155;cursor:pointer}
.hesas-notice-bell:hover{background:#f1f5f9}
.hesas-notice-bell.has-error{color:#c23d50;border-color:#f3c3cb;background:#fff7f7}
.hesas-notice-count{position:absolute;top:-5px;left:-5px;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:#2563eb;color:#fff;font-size:11px;font-weight:700;line-height:19px;text-align:center}
.hesas-notice-count[hidden]{display:none}
.hesas-notice-bell.has-error .hesas-notice-count{background:#dc2626}
.hesas-modal.hesas-notices-modal{width:min(780px,96vw)}
.hesas-notice-list{display:grid;gap:10px;padding:16px 20px}
.hesas-notice{border:1px solid #e2e8f0;border-inline-start:4px solid #94a3b8;border-radius:12px;padding:10px 14px;background:#fff}
.hesas-notice.error{border-inline-start-color:#dc2626;background:#fff8f8}
.hesas-notice.warning{border-inline-start-color:#d97706;background:#fffbeb}
.hesas-notice.success{border-inline-start-color:#16a34a}
.hesas-notice.info{border-inline-start-color:#2563eb}
.hesas-notice-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hesas-notice-head b{font-size:.98rem;color:#0f172a}
.hesas-notice-level{font-size:11px;padding:2px 8px;border-radius:99px;background:#eff6ff;color:#1d4ed8}
.hesas-notice.error .hesas-notice-level{background:#fee2e2;color:#b91c1c}
.hesas-notice.success .hesas-notice-level{background:#dcfce7;color:#15803d}
.hesas-notice.warning .hesas-notice-level{background:#fef3c7;color:#b45309}
.hesas-notice-head time{margin-inline-start:auto;font-size:12px;color:#64748b}
.hesas-notice p{margin:6px 0 0;font-size:.9rem;line-height:1.8;color:#334155;white-space:pre-line}
.hesas-notice-actions{display:flex;justify-content:flex-end;padding:0 20px 16px}
@media print{.hesas-notice-bell{display:none!important}}
/* repair-12: readiness problems with one-click fixes, in the notifications list */
.hesas-readiness{margin:16px 20px 0;border-radius:12px;padding:12px 14px;border:1px solid #e2e8f0;background:#f8fafc;display:grid;gap:8px}
.hesas-readiness.ready{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.hesas-readiness.blocked{border-color:#fecaca;background:#fff}
.hesas-readiness-head{display:flex;align-items:center;gap:8px}.hesas-readiness-head b{color:#b91c1c;font-size:1rem}
.hesas-readiness-head button{margin-inline-start:auto;border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:4px 10px;cursor:pointer;font:inherit;font-size:12px}
.hesas-issue{border-top:1px dashed #fecaca;padding-top:8px}.hesas-issue>b{color:#0f172a}.hesas-issue>p{margin:4px 0 0;font-size:.88rem;line-height:1.8;color:#334155}
.hesas-fixes{display:grid;gap:6px;margin-top:8px}.hesas-fixes>span{font-size:12px;color:#475569;font-weight:700}.hesas-fixes.none{font-size:12px;color:#64748b}
.hesas-fix{display:grid;gap:2px;text-align:start;border:1px solid #bfdbfe;background:#eff6ff;border-radius:10px;padding:8px 12px;cursor:pointer;font:inherit;color:#1e3a8a}
.hesas-fix:hover:not(:disabled){background:#dbeafe}.hesas-fix:disabled{opacity:.6;cursor:wait}.hesas-fix small{color:#475569;font-size:12px;line-height:1.6}
.hesas-fix em{font-style:normal;font-size:11px;font-weight:700;color:#15803d}.hesas-fix.partial{border-color:#fde68a;background:#fffbeb;color:#78350f}.hesas-fix.partial em{color:#b45309}
.hesas-fix.busy{outline:2px solid #2563eb}.hesas-readiness-note{color:#475569}
.hesas-live-note{margin:10px 0 0;font-size:.85rem;line-height:1.7;color:#334155;max-width:520px}
.hesas-live-note.diagnosing{color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:8px 10px}
/* Smart class swaps */
button.hs-smart-update.hesas-swap-trigger{border-color:#7c3aed!important;background:#f5f3ff!important;color:#6d28d9!important}
button.hs-smart-update.hesas-swap-trigger:hover{background:#ede9fe!important}
.hesas-swaps-modal .hesas-swap-summary table{width:100%;border-collapse:collapse;font-size:.9rem}
.hesas-swaps-modal .hesas-swap-summary th,.hesas-swaps-modal .hesas-swap-summary td{padding:6px 8px;border-bottom:1px solid #e2e8f0;text-align:start}
.hesas-swaps-modal .hesas-swap-summary td.better{color:#15803d;font-weight:800}
.hesas-swap-note{color:#475569;font-size:.82rem;line-height:1.7;margin:8px 0 0}
.hesas-swap-list{display:grid;gap:8px;margin:12px 0}
.hesas-swap{display:flex;gap:10px;align-items:flex-start;border:1px solid #ddd6fe;background:#faf5ff;border-radius:10px;padding:10px 12px;cursor:pointer}
.hesas-swap input{margin-top:4px;width:18px;height:18px;flex:none}
.hesas-swap b{display:block;color:#1e293b}
.hesas-swap small{display:block;color:#64748b;margin-top:2px}
.hesas-swap ul{margin:6px 0 0;padding-inline-start:18px;color:#334155;font-size:.84rem;line-height:1.6}
.hesas-swap-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.hesas-swap-trial{margin-top:12px;border-inline-start:4px solid #7c3aed}
.hesas-swap-trial.done{border-inline-start-color:#15803d}
.hesas-swap-side{display:flex;gap:10px;flex-wrap:wrap;padding:4px 0}
.hesas-swap-side b{min-width:110px}
.hesas-swap-done{border-inline-start:4px solid #15803d}
/* The meeting form's note about who else is already meeting at the chosen time. */
.hesas-swap-note.warn{border:1px solid #fde68a;background:#fffbeb;color:#78350f;border-radius:10px;padding:8px 12px}
/* Class sheets without the teacher's name: the subject keeps the cell, on screen, in print and in the picture. */
[data-hesas-lesson-teacher="hide"] .schedule-report .report-lesson small{display:none!important}
/* Taking the last swap back, offered above the suggestions and again right after applying. */
.hesas-swap-undo{border-inline-start:4px solid #b45309;background:#fffbeb;margin-bottom:12px}
.hesas-swap-undo h3{margin-bottom:2px}
.hesas-swap-undo small{color:#92400e}
.hesas-swap-undo ul{margin:6px 0 0;padding-inline-start:18px;color:#334155;font-size:.86rem;line-height:1.7}
.hesas-swap-undo p{margin:8px 0 0;color:#475569;font-size:.86rem;line-height:1.7}
.hesas-swap-undo button,.hesas-swap-done button{border:1px solid #fcd34d;background:#fef3c7;color:#78350f;border-radius:10px;padding:8px 14px;font:inherit;font-weight:650;cursor:pointer}
.hesas-swap-undo button:hover,.hesas-swap-done button:hover{background:#fde68a}
@media (max-width:640px){.hesas-swap-side{display:block}.hesas-swaps-modal .hesas-swap-summary table{font-size:.8rem}}
@media print{.hesas-swap-trigger{display:none!important}}
/* Department timetables: one department per page; on landscape paper the table fills and is centred on the page. */
.department-report-stack>.master-grid-report{break-after:page;page-break-after:always}
.department-report-stack>.master-grid-report:last-child{break-after:auto;page-break-after:auto}
.hesas-dept-page{width:var(--dp-page-w);max-width:none;min-height:var(--dp-page-h);margin:0 auto;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box}
.hesas-dept-page .report-document-head{margin-bottom:2.5mm}
.hesas-dept-page .report-document-head h2{font-size:calc(var(--dp-font) + 6pt)}
.hesas-dept-page .master-report-week-table{width:100%!important;min-width:0!important;table-layout:fixed}
.hesas-dept-page .master-report-week-table th,.hesas-dept-page .master-report-week-table td{height:var(--dp-row-h);padding:0;font-size:var(--dp-font);line-height:1.05;border-color:#111;font-weight:800;color:#000;white-space:nowrap}
.hesas-dept-page .master-report-week-table thead th{height:calc(var(--dp-font) * 1.8)}
.hesas-dept-page .master-report-week-table .mr-department{display:none}
.hesas-dept-page .master-report-week-table .mr-no{width:var(--dp-no-w)}
.hesas-dept-page .master-report-week-table .mr-teacher{width:var(--dp-teacher-w);padding-inline:1.2mm;font-size:calc(var(--dp-font) + .5pt);overflow:hidden;text-overflow:ellipsis}
.hesas-dept-page.hesas-dept-wrap .master-report-week-table td.mr-teacher{white-space:normal;line-height:1.15;text-overflow:clip}
.hesas-dept-page .master-report-week-table .mr-period{width:auto}
.hesas-dept-page .master-report-week-table .mr-load{width:var(--dp-load-w)}
.hesas-dept-page .master-report-week-table .mr-notes{width:var(--dp-notes-w);font-size:calc(var(--dp-font) - 1pt)}
.hesas-dept-page .master-report-department tr:first-child td{border-top:2px solid #000}
.hesas-dept-page td.mr-empty{color:transparent}
.hesas-dept-page .hesas-meeting-legend{padding-top:1.5mm;font-size:9pt}
@media print{
  .report-workspace:has(.hesas-dept-page){margin:0!important;padding:0!important}
  .department-report-stack:has(>.hesas-dept-page){display:block;gap:0}
  .department-report-stack>.hesas-dept-page{margin:0}
  .hesas-dept-page{width:100%;height:calc(var(--dp-page-h) - 2.5mm);min-height:0;overflow:hidden;break-inside:avoid;page-break-inside:avoid}
  .hesas-dept-page td,.hesas-dept-page th{print-color-adjust:exact;-webkit-print-color-adjust:exact}
}
[data-hesas-png]{display:inline-flex;align-items:center;gap:6px}
.hesas-names-control select{min-width:170px}
@media print{[data-hesas-png],[data-hesas-names]{display:none!important}}
.hesas-seventh-count{font-size:1.05em}
.hesas-seventh-over{color:#b91c1c;font-weight:700}
@media print{.hesas-report-sheet .hesas-report-group{break-after:avoid;page-break-after:avoid}.hesas-report-sheet table{break-inside:auto}.hesas-report-sheet tr{break-inside:avoid;page-break-inside:avoid}}
/* Extra seventh swap */
button.hs-smart-update.hesas-seventh-swap-trigger{border-color:#b45309!important;background:#fffbeb!important;color:#92400e!important}
button.hs-smart-update.hesas-seventh-swap-trigger:hover{background:#fef3c7!important}
.hesas-seventh-target h3 small{font-weight:600;color:#64748b}
.hesas-seventh-option{border-color:#fde68a;background:#fffdf5}
.hesas-seventh-option input{accent-color:#b45309}
/* Solutions centre */
button.hesas-solutions-bell{color:#b45309}
button.hesas-solutions-bell.has-solutions{color:#15803d}
button.hesas-solutions-bell.has-solutions .hesas-notice-count{background:#15803d}
.hesas-solutions-modal .hesas-solution{border-inline-start:4px solid #f59e0b}
.hesas-solutions-modal .hesas-solution.confirmed{border-inline-start-color:#15803d}
.hesas-solutions-modal .hesas-solution h3{margin:0 0 6px}
.hesas-solutions-modal .hesas-solution h3 small{color:#92400e;font-weight:600}
.hesas-solution-why,.hesas-solution-how,.hesas-solution-proof{margin:4px 0;color:#334155;font-size:.9rem;line-height:1.8}
.hesas-solution-proof{color:#15803d}
.hesas-solution-steps{margin:6px 0 0;padding-inline-start:18px;color:#1e293b;font-size:.88rem;line-height:1.8}
.hesas-solution-note{display:block;color:#64748b;margin-top:6px}
.hesas-solutions-cause{border-inline-start:4px solid #dc2626}
.hesas-solutions-cause.ok{border-inline-start-color:#15803d}
.hesas-solutions-cause p{white-space:pre-line;margin:4px 0;line-height:1.8}
.hesas-solutions-stale{border-inline-start:4px solid #b45309}
.hesas-solutions-progress{border-inline-start:4px solid #2563eb}
.hesas-solutions-attempts{margin:8px 0 0;padding-inline-start:18px;font-size:.85rem;line-height:1.8;color:#475569}
.hesas-solutions-attempts li.solved{color:#15803d;font-weight:700}
.hesas-fixes.solutions-link button{display:block;width:100%;text-align:start;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:10px;padding:8px 10px;cursor:pointer}
.hesas-fixes.solutions-link button small{display:block;color:#15803d;margin-top:2px}
@media print{.hesas-solutions-bell{display:none!important}}
/* Seventh-period window: the reason for each limit, and one press to lift a block */
.hesas-seventh-scope{border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;margin-bottom:10px;background:#f8fafc}
.hesas-seventh-scope select{min-width:220px}
.hesas-seventh-reason{color:#475569;font-size:.82rem;line-height:1.6;max-width:260px}
.hesas-seventh-reason small{display:block;color:#b45309}
.hesas-seventh-actions{white-space:nowrap}
.hesas-seventh-actions button{border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d;border-radius:8px;padding:4px 8px;font-size:.8rem;cursor:pointer;margin-inline-end:4px}
.hesas-seventh-actions button:hover{background:#dcfce7}
.hesas-seventh-ok{color:#94a3b8;font-size:.8rem}
.hesas-seventh-table-wrap td small{display:block;color:#64748b;font-size:.75rem}

/* النسخ الاحتياطية في صفحة التنصيب: بطاقة تحت بطاقة التنصيب بالمقاس نفسه */
.hesas-backup{direction:rtl;background:#fff;border:1px solid #dce5ed;border-radius:19px;width:min(680px,100%);padding:26px;margin:16px auto 24px;box-shadow:0 20px 60px #102a4317;color:#0f172a}
.hesas-backup h2{font-size:1.05rem;margin:0 0 6px}
.hesas-backup-help{color:#64748b;font-size:.85rem;line-height:1.7;margin:0 0 14px}
.hesas-backup code{background:#f1f5f9;border-radius:5px;padding:1px 5px;font-size:.8rem}
.hesas-backup-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.hesas-backup button,.hesas-backup-file{border:1px solid #0d9488;background:#0d9488;color:#fff;border-radius:10px;padding:8px 14px;font:inherit;font-size:.85rem;cursor:pointer}
.hesas-backup button:hover:not(:disabled),.hesas-backup-file:hover{filter:brightness(1.06)}
.hesas-backup button.ghost{background:#fff;color:#0f172a;border-color:#cbd5e1}
.hesas-backup button.ghost.danger{color:#b91c1c;border-color:#fecaca}
.hesas-backup button:disabled,.hesas-backup-file.disabled{opacity:.55;cursor:not-allowed}
.hesas-backup-now{background:#f0fdfa;border:1px solid #99f6e4;border-radius:10px;padding:8px 10px;font-size:.85rem;margin:0 0 10px}
.hesas-backup-note{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px;font-size:.85rem;margin:0 0 10px;line-height:1.7}
.hesas-backup-note.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.hesas-backup-note button{padding:5px 10px;font-size:.8rem;margin-inline-start:6px}
.hesas-backup-empty{color:#64748b;font-size:.85rem;margin:8px 0}
.hesas-backup-list{width:100%;border-collapse:collapse;font-size:.82rem}
.hesas-backup-list th{text-align:start;color:#64748b;font-weight:600;border-bottom:1px solid #e2e8f0;padding:6px 4px}
.hesas-backup-list td{border-bottom:1px solid #f1f5f9;padding:8px 4px;vertical-align:top}
.hesas-backup-list td small{display:block;color:#64748b;font-size:.74rem}
.hesas-backup-list td small.warn{color:#b45309}
.hesas-backup-kind{display:inline-block;background:#e0f2fe;color:#075985;border-radius:999px;padding:1px 8px;font-size:.74rem}
.hesas-backup-kind.pre_restore{background:#fef3c7;color:#92400e}
.hesas-backup-kind.upload{background:#ede9fe;color:#5b21b6}
.hesas-backup-kind.auto{background:#f1f5f9;color:#475569}
.hesas-backup-row-actions{white-space:nowrap}
.hesas-backup-row-actions button{padding:5px 9px;font-size:.78rem;margin-inline-end:4px}
.hesas-backup-foot{color:#94a3b8;font-size:.75rem;line-height:1.7;margin:10px 0 0}
.hesas-backup-confirm,.hesas-backup-done{border:1px solid #e2e8f0;border-radius:12px;padding:14px;margin-top:14px;background:#f8fafc}
.hesas-backup-confirm h3,.hesas-backup-done h3{font-size:.95rem;margin:0 0 8px}
.hesas-backup-confirm p,.hesas-backup-done p{font-size:.84rem;line-height:1.7;margin:0 0 8px}
.hesas-backup-confirm p.warn,.hesas-backup-done p.warn{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:10px;padding:8px 10px}
.hesas-backup-confirm .field{display:block;margin-bottom:8px}
.hesas-backup-confirm .field span{display:block;font-size:.8rem;color:#475569;margin-bottom:4px}
.hesas-backup-confirm .field input{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:8px 10px;font:inherit;font-size:.85rem}
.hesas-backup-check{display:flex;align-items:center;gap:6px;font-size:.84rem;margin-bottom:10px}
.hesas-backup-progress{background:#f1f5f9;border-radius:9px;padding:7px 10px;font-size:.82rem;margin:10px 0 0}
.hesas-backup-progress.error{background:#fef2f2;color:#991b1b}
.hesas-backup-confirm .field select{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:8px 10px;font:inherit;font-size:.85rem;background:#fff}
/* ملاحظة «يلزم تحديث الجدول» بعد تغيير توزيع الفصول */
.hesas-teaching-note{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:#fff7ed;border:1px solid #fed7aa;border-inline-start:5px solid #ea580c;color:#7c2d12;border-radius:12px;padding:10px 14px;margin:10px 16px;font-size:.85rem;line-height:1.7}
.hesas-teaching-note b{color:#9a3412}
.hesas-teaching-note span{flex:1 1 320px}
.hesas-teaching-note button{border:1px solid #ea580c;background:#ea580c;color:#fff;border-radius:9px;padding:6px 12px;font:inherit;font-size:.8rem;cursor:pointer}
.hesas-teaching-note button.ghost{background:#fff;color:#7c2d12;border-color:#fed7aa}
/* زر «إفراغ الجدول» بجانب زر الاجتماعات في الجدول العام */
.hesas-clear-trigger{border-color:#fecaca!important;background:#fff5f5!important;color:#b91c1c!important}
.hesas-clear-trigger:hover:not(:disabled){background:#fee2e2!important}
.hesas-clear-trigger:disabled{opacity:.55;cursor:not-allowed}
/* نافذة «إفراغ الجدول» */
.hesas-clear-modal{max-width:640px}
.hesas-clear-loading{color:#64748b;font-size:.88rem;padding:8px 0}
.hesas-clear-loading.error{color:#991b1b}
.hesas-clear-choice{display:flex;gap:10px;align-items:flex-start;border:2px solid #e2e8f0;border-radius:12px;padding:12px 14px;margin-bottom:8px;cursor:pointer}
.hesas-clear-choice.on{border-color:#0d9488;background:#f0fdfa}
.hesas-clear-choice b{display:block;font-size:.92rem}
.hesas-clear-choice small{display:block;color:#64748b;font-size:.78rem;line-height:1.7;margin-top:2px}
.hesas-clear-pick{border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;margin:-4px 0 10px}
.hesas-clear-pick input[type=search],.hesas-clear-pick select{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:7px 10px;font:inherit;font-size:.85rem;margin-bottom:8px}
.hesas-clear-names{max-height:240px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:2px 10px}
.hesas-clear-names label{display:flex;align-items:center;gap:6px;font-size:.82rem;padding:3px 4px;border-radius:7px;cursor:pointer}
.hesas-clear-names label:hover{background:#f1f5f9}
.hesas-clear-names i{color:#94a3b8;font-style:normal;font-size:.74rem;margin-inline-start:auto}
.hesas-clear-empty{color:#94a3b8;font-size:.82rem;margin:6px 0}
.hesas-clear-selected{font-size:.82rem;color:#0f766e;margin:8px 0 0}
.hesas-clear-selected button{border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:2px 8px;font:inherit;font-size:.76rem;cursor:pointer}
.hesas-clear-summary{background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;border-radius:10px;padding:9px 12px;font-size:.84rem;line-height:1.8;margin:10px 0}

/* repair-32: the seventh-period group tools and the rewards window before a smart generation */
.hesas-seventh-bulk{border:1px solid #fbcfe8;border-radius:12px;background:#fff7fb;padding:11px 13px;margin-bottom:12px}
.hesas-seventh-bulk-head{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;margin-bottom:8px}
.hesas-seventh-bulk-head b{color:#831843}
.hesas-seventh-bulk-head small{color:#64748b}
.hesas-seventh-bulk-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:6px}
.hesas-seventh-bulk-row .hesas-field{flex:1 1 200px;margin:0}
.hesas-seventh-bulk-row>button{min-height:39px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:7px 12px;cursor:pointer;font-weight:700;color:#334155}
.hesas-seventh-bulk-row>button.primary{background:#9d174d;border-color:#9d174d;color:#fff;margin-inline-start:auto}
.hesas-seventh-bulk-row>button:disabled{opacity:.55;cursor:default}
.hesas-seventh-bulk-count{color:#831843;font-weight:700;font-size:.84rem}
.hesas-pick-col{width:38px;text-align:center!important}
.hesas-pick-col input{width:18px;height:18px;accent-color:#9d174d;cursor:pointer}
.hesas-seventh-table-wrap tr.hesas-picked td{background:#fdf2f8}
.hesas-reward-tag{display:inline-block!important;margin-top:3px;padding:1px 8px;border-radius:999px;background:#ecfdf5;color:#047857!important;border:1px solid #a7f3d0;font-weight:700}
.hesas-modal.hesas-rewards-modal{width:min(980px,97vw)}
.hesas-rewards-sure{display:flex;flex-direction:column;gap:3px;border:1px solid #a7f3d0;background:#ecfdf5;color:#065f46;border-radius:12px;padding:10px 13px;margin-bottom:10px;line-height:1.7}
.hesas-rewards-sure b{font-size:1rem}.hesas-rewards-sure span{font-size:.86rem;color:#064e3b}
.hesas-rewards-note{border:1px solid #fde68a;background:#fffbeb;color:#92400e;border-radius:10px;padding:8px 11px;margin-bottom:10px;font-size:.84rem;line-height:1.7}
.hesas-rewards-table{max-height:48vh}
.hesas-rewards-table select{min-width:120px}
.hesas-check{display:flex;align-items:center;gap:6px;font-size:.86rem;color:#334155;font-weight:650;min-height:43px}
.hesas-muted{color:#94a3b8}
.hesas-rewards-actions .primary{background:#9d174d;border-color:#9d174d}
@media (max-width:700px){.hesas-seventh-bulk-row>button.primary{margin-inline-start:0}}
/* «تبديل حر» in the «تعديلات الجدول» bar: a switch, its state, and the note under it. */
.hesas-free-swap{display:flex;flex-direction:column;gap:2px;padding:5px 12px;border:1px solid #dce6ee;border-radius:10px;background:#f8fafc}
.hesas-free-swap.on{border-color:#f59e0b;background:#fffbeb}
.hesas-free-swap-switch{position:relative;display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:.92rem;color:#0f172a}
.hesas-free-swap-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.hesas-switch{position:relative;flex:none;width:38px;height:22px;border-radius:999px;background:#cbd5e1;transition:background .15s}
.hesas-switch::after{content:"";position:absolute;top:3px;right:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:right .15s}
.hesas-free-swap-switch input:checked+.hesas-switch{background:#d97706}
.hesas-free-swap-switch input:checked+.hesas-switch::after{right:19px}
.hesas-free-swap-switch input:focus-visible+.hesas-switch{outline:2px solid #2563eb;outline-offset:2px}
.hesas-free-swap-switch input:disabled+.hesas-switch{opacity:.55}
.hesas-free-swap-switch em{font-style:normal;font-size:.78rem;color:#64748b}
.hesas-free-swap.on .hesas-free-swap-switch em{color:#92400e;font-weight:700}
.hesas-free-swap small{font-size:.76rem;color:#64748b;line-height:1.5}
.hesas-free-swap.on small{color:#92400e}
.hesas-free-swap small.hesas-free-swap-error{color:#b91c1c}
/* The report when it is turned off: rule by rule, the new ones marked. */
.hesas-free-swap-report{width:min(760px,calc(100vw - 32px))}
.hesas-fs-summary{margin:0 0 6px;font-size:.92rem;line-height:1.8;color:#334155}
.hesas-fs-summary.ok{color:#047857;font-weight:700}
.hesas-fs-rule{border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;margin:10px 0}
.hesas-fs-rule.has-new{border-color:#fca5a5;background:#fff7f7}
.hesas-fs-rule h3{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;font-size:.98rem;color:#0f172a}
.hesas-fs-rule h3 span{border-radius:999px;background:#e2e8f0;padding:0 9px;font-size:.8rem}
.hesas-fs-rule p{margin:4px 0 0;font-size:.84rem;color:#64748b}
.hesas-fs-rule ul{margin:6px 0 0;padding-inline-start:18px}
.hesas-fs-rule li{margin:3px 0;font-size:.9rem;line-height:1.7;color:#1e293b}
.hesas-fs-rule em{font-style:normal;font-size:.72rem;font-weight:800;color:#fff;background:#dc2626;border-radius:999px;padding:1px 8px;margin-inline-start:4px;white-space:nowrap}
.hesas-fs-actions{display:flex;justify-content:flex-end;margin-top:12px}
/* Two lessons in one cell (from «تبديل حر»): the cell is outlined and a small count names the others on hover. */
.hesas-overlap-cell{position:relative;outline:2px dashed #d97706;outline-offset:-2px}
.hesas-overlap-mark{position:absolute;top:2px;left:2px;z-index:3;min-width:20px;height:18px;padding:0 5px;border-radius:9px;background:#d97706;color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center;cursor:help}
.hesas-free-swap small.hesas-free-swap-overlaps{color:#92400e;font-weight:700}
.hesas-free-swap-overlaps button,.hesas-fs-overlaps button{margin-inline-start:6px;border:1px solid #d97706;border-radius:8px;background:#fff;color:#92400e;font:inherit;font-size:.78rem;font-weight:800;padding:1px 9px;cursor:pointer}
.hesas-fs-overlaps{margin:0 0 10px;padding:10px 12px;border:1px solid #f59e0b;border-radius:10px;background:#fffbeb;color:#78350f;font-size:.9rem;line-height:1.8}

/* ---------- التربية العملية ونظام الزيارات للمدير (repair-39) ---------- */
aside nav .hesas-nav-item{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:0 13px;border:0;border-radius:9px;background:none;color:#b9ccdc;font:inherit;text-align:start;cursor:pointer}
aside nav .hesas-nav-item:hover{background:#ffffff12;color:#fff}
aside nav .hesas-nav-item svg{width:20px;height:20px;flex:0 0 20px}
aside nav .hesas-nav-system{margin-top:6px;border:1px solid #ffffff2e;color:#e2f2ef}
.hesas-practicum-cell{position:relative}
.hesas-practicum-mark{position:absolute;bottom:2px;left:2px;z-index:3;padding:0 5px;height:17px;border-radius:9px;background:#0e7490;color:#fff;font-size:10.5px;font-weight:800;line-height:17px;cursor:help}
@media print{.hesas-practicum-mark{display:none!important}}
.hesas-system-choice{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(12,44,72,.72);backdrop-filter:blur(3px);direction:rtl}
.hesas-choice-card{width:min(640px,100%);background:#fff;border-radius:22px;padding:26px 24px 20px;box-shadow:0 30px 80px rgba(2,6,23,.35);text-align:center}
.hesas-choice-card h2{margin:0 0 4px;font-size:1.35rem;color:#0f172a}
.hesas-choice-card>p{margin:0 0 18px;color:#475569}
.hesas-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.hesas-choice-grid button{display:grid;justify-items:center;gap:8px;padding:22px 14px;border:2px solid #dbe5ee;border-radius:18px;background:#f8fbfd;color:#153e63;font:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.hesas-choice-grid button:hover,.hesas-choice-grid button:focus-visible{border-color:#1769aa;box-shadow:0 10px 26px rgba(23,105,170,.18);transform:translateY(-2px);outline:none}
.hesas-choice-grid button[data-choice="visits"]{color:#0f5f58;background:#f3fbf9}
.hesas-choice-grid button[data-choice="visits"]:hover,.hesas-choice-grid button[data-choice="visits"]:focus-visible{border-color:#0f766e;box-shadow:0 10px 26px rgba(15,118,110,.18)}
.hesas-choice-grid svg{width:40px;height:40px}
.hesas-choice-grid b{font-size:1.08rem}
.hesas-choice-grid small{color:#64748b;line-height:1.6;font-size:.82rem}
.hesas-choice-note{margin:16px 0 0;color:#64748b;font-size:.8rem}
@media (max-width:520px){.hesas-choice-card{padding:20px 16px 16px}.hesas-choice-grid{grid-template-columns:1fr}.hesas-choice-grid button{grid-template-columns:auto 1fr;justify-items:start;text-align:start;padding:14px;column-gap:12px}.hesas-choice-grid svg{grid-row:span 2;width:32px;height:32px;align-self:center}}
.hesas-practicum-modal{width:min(1180px,97vw)}
.hesas-pr-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.hesas-pr-stats{display:flex;flex-wrap:wrap;gap:8px}
.hesas-pr-stats span{padding:6px 11px;border-radius:999px;background:#f1f5f9;color:#334155;font-size:.84rem}
.hesas-pr-stats span.warn{background:#fff7ed;color:#9a3412}
.hesas-pr-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.hesas-pr-actions button,.hesas-pr-card-actions button{min-height:39px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:7px 12px;cursor:pointer;font-weight:700;color:#1e293b}
.hesas-pr-actions .primary,.hesas-pr-card-actions .primary{background:#1769aa;border-color:#1769aa;color:#fff}
.hesas-pr-card-actions .danger{color:#b91c1c;border-color:#fecaca;background:#fff7f7}
.hesas-pr-actions .hesas-pr-move{background:#fff7ed;border-color:#f59e0b;color:#92400e}
.hesas-pr-limit{display:flex;align-items:center;gap:8px;font-size:.85rem;color:#334155;font-weight:650}
.hesas-pr-limit select{min-height:39px;border:1px solid #cbd5e1;border-radius:10px;padding:4px 8px;font:inherit;background:#fff}
.hesas-pr-note{margin:0 0 14px;padding:10px 13px;border-radius:12px;background:#f0f9ff;color:#0c4a6e;font-size:.85rem;line-height:1.75}
.hesas-pr-alert{margin:0 0 12px;padding:11px 14px;border-radius:12px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;line-height:1.7}
.hesas-pr-card{border:1px solid #e2e8f0;border-radius:16px;padding:14px 16px;margin-bottom:12px;background:#fff}
.hesas-pr-card.off{background:#f8fafc;opacity:.85}
.hesas-pr-card-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:10px}
.hesas-pr-card-head h3{margin:0 0 3px;font-size:1.08rem;color:#0f172a}
.hesas-pr-card-head h3 em{font-style:normal;font-size:.75rem;padding:2px 8px;border-radius:999px;background:#e2e8f0;color:#475569;margin-inline-start:6px}
.hesas-pr-card-head small{color:#64748b;line-height:1.7}
.hesas-pr-card-actions{display:flex;flex-wrap:wrap;gap:6px}
.hesas-pr-total{margin:8px 0;color:#334155;font-size:.9rem}
.hesas-pr-none{margin:6px 0 0;color:#64748b;font-size:.86rem}
.hesas-pr-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.hesas-pr-table{width:100%;border-collapse:collapse;font-size:.86rem;min-width:640px}
.hesas-pr-table th{background:#f1f5f9;color:#334155;padding:8px;text-align:start;font-size:.8rem}
.hesas-pr-table td{padding:8px;border-top:1px solid #eef2f6;vertical-align:top}
.hesas-pr-table td small{display:block;color:#64748b;margin-top:3px;font-size:.76rem}
.hesas-pr-chips{display:flex;flex-wrap:wrap;gap:4px}
.hesas-pr-chip{display:inline-block;padding:3px 8px;border-radius:999px;font-size:.76rem;font-weight:700;border:1px solid transparent;white-space:nowrap}
.hesas-pr-chip.own{background:#ccfbf1;color:#115e59;border-color:#99f6e4}
.hesas-pr-chip.host{background:#f1f5f9;color:#64748b;border-color:#e2e8f0}
.hesas-pr-chip.host.late{background:#fff7ed;color:#9a3412;border-color:#fed7aa}
.hesas-pr-chip.host.clash{background:#fef2f2;color:#991b1b;border-color:#fecaca}
.hesas-pr-chip.pick{cursor:pointer;background:#fff;color:#334155;border-color:#cbd5e1;font-family:inherit;min-height:32px}
.hesas-pr-chip.pick.own{background:#ccfbf1;color:#115e59;border-color:#5eead4}
.hesas-pr-status.ok{color:#047857!important}.hesas-pr-status.warn{color:#b45309!important}.hesas-pr-status.bad{color:#b91c1c!important}
.hesas-pr-form h3{margin:0 0 12px;color:#0f172a}
.hesas-pr-form .hesas-pr-wide{grid-column:1/-1}
.hesas-pr-form .hesas-field input[type=date]{min-height:43px}
.hesas-pr-set{border:1px solid #e2e8f0;border-radius:12px;padding:10px 13px 12px;margin:0 0 12px}
.hesas-pr-set legend{padding:0 6px;font-weight:800;color:#1e293b;font-size:.9rem}
.hesas-pr-set>small{display:block;color:#64748b;margin-top:6px}
.hesas-pr-days{display:flex;flex-wrap:wrap;gap:8px 16px}
.hesas-pr-days label{display:flex;align-items:center;gap:6px;min-height:36px;font-weight:650;color:#334155}
.hesas-pr-radio{display:flex;align-items:flex-start;gap:8px;margin:6px 0;line-height:1.6;color:#1e293b}
.hesas-pr-radio input[type=radio]{margin-top:5px;accent-color:#1769aa;width:17px;height:17px;flex:none}
.hesas-pr-radio span{display:grid;gap:2px}.hesas-pr-radio small{color:#64748b}
.hesas-pr-radio input[type=number]{width:80px;min-height:36px;border:1px solid #cbd5e1;border-radius:8px;padding:4px 8px;font:inherit}
.hesas-pr-picks{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px}.hesas-pr-picks small{flex-basis:100%;color:#64748b}
.hesas-pr-lessons{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin:0 0 12px;color:#334155;font-size:.86rem}
.hesas-pr-fine{margin:2px 0 6px;color:#9a3412;font-size:.84rem}
.hesas-pr-form>.hesas-pr-fine{margin:-4px 0 12px;color:#475569}
.hesas-pr-gen{display:flex;align-items:center;gap:7px;min-height:39px;padding:4px 10px;border:1px solid #99f6e4;border-radius:10px;background:#f0fdfa;color:#115e59;font-size:.85rem;font-weight:700;cursor:pointer}
.hesas-pr-gen input{width:17px;height:17px;accent-color:#0f766e;margin:0}
.hesas-pr-card-head h3 em.soon{background:#e0f2fe;color:#075985}
.hesas-pr-sub{margin:16px 0 8px;font-size:.98rem;color:#0f172a}
.hesas-pr-parts span{display:block;line-height:1.7}
.hesas-pr-hosts{min-width:560px}
.hesas-pr-active{display:flex;gap:8px;align-items:center;margin:0 0 10px;color:#334155;font-weight:650}
.hesas-pr-done h3{margin:0 0 6px;color:#047857}.hesas-pr-done p{color:#334155;line-height:1.7}
.hesas-pr-done ul{margin:8px 0;padding-inline-start:20px;line-height:1.9;color:#475569;font-size:.88rem}.hesas-pr-done li.own{color:#0f766e;font-weight:700}
/* On a phone each assignment is a card of its own, no sideways scrolling. */
@media (max-width:620px){
  .hesas-pr-table{min-width:0}.hesas-pr-table thead{display:none}
  .hesas-pr-table,.hesas-pr-table tbody,.hesas-pr-table tr,.hesas-pr-table td{display:block;width:auto}
  .hesas-pr-table tr{border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px;margin-bottom:8px;background:#fbfdff}
  .hesas-pr-table td{border:0;padding:3px 0}
  .hesas-pr-table td[data-label]:before{content:attr(data-label)": ";color:#64748b;font-size:.76rem;font-weight:700}
  .hesas-pr-table td:first-child{font-size:1rem}
  .hesas-pr-row-actions .hesas-row-actions{justify-content:flex-end;margin-top:4px}
}
@media (max-width:620px){.hesas-pr-actions{width:100%}.hesas-pr-actions button{flex:1 1 auto}.hesas-pr-limit{width:100%;justify-content:space-between}.hesas-pr-gen{width:100%}.hesas-pr-card{padding:12px}.hesas-pr-card-actions button{flex:1 1 auto}.hesas-pr-form .hesas-field-grid{grid-template-columns:1fr}}
/* Printing a trainee's week: one landscape A4 page each. */
.hesas-pr-print{display:none}
@page hesas-practicum{size:A4 landscape;margin:9mm}
@media print{
  body.hesas-print-practicum>*:not(.hesas-pr-print){display:none!important}
  html:has(body.hesas-print-practicum),body.hesas-print-practicum{background:#fff!important}
  body.hesas-print-practicum .hesas-pr-print{display:block!important;direction:rtl;font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:#0f172a;background:#fff}
  .hesas-pr-sheet{page:hesas-practicum;break-after:page;page-break-after:always;padding:0}
  .hesas-pr-sheet:last-child{break-after:auto;page-break-after:auto}
  .hesas-pr-sheet header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:2px solid #0f172a;padding-bottom:6px;margin-bottom:8px}
  .hesas-pr-sheet header b{display:block;font-size:13pt}.hesas-pr-sheet header small{font-size:10pt;color:#334155}
  .hesas-pr-sheet h1{margin:0;font-size:18pt;text-align:center}
  .hesas-pr-sheet-name{text-align:left;font-size:15pt;font-weight:800}
  .hesas-pr-sheet-info{display:flex;flex-wrap:wrap;gap:6px 20px;margin:0 0 8px;font-size:11pt}
  .hesas-pr-sheet-info small{color:#475569;margin-inline-end:5px}
  .hesas-pr-grid,.hesas-pr-list{width:100%;border-collapse:collapse;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .hesas-pr-grid th,.hesas-pr-grid td{border:1px solid #475569;text-align:center;vertical-align:middle;padding:3px}
  .hesas-pr-grid thead th{background:#e2e8f0;font-size:11pt}
  .hesas-pr-grid tbody th{background:#f1f5f9;font-size:12pt;width:11%}
  .hesas-pr-grid td{height:17mm;font-size:10.5pt}
  .hesas-pr-grid td b{display:block;font-size:13pt}.hesas-pr-grid td span{display:block}.hesas-pr-grid td small{display:block;color:#334155;font-size:9pt}
  .hesas-pr-grid .late{background:repeating-linear-gradient(135deg,#f1f5f9 0 6px,#e2e8f0 6px 12px)}
  .hesas-pr-grid tr.off td{background:repeating-linear-gradient(135deg,#fff 0 6px,#f1f5f9 6px 12px)}
  .hesas-pr-grid tbody th small{display:block;font-size:8.5pt;font-weight:600;color:#64748b}
  .hesas-pr-list{margin-top:8px;font-size:10.5pt}.hesas-pr-list th,.hesas-pr-list td{border:1px solid #94a3b8;padding:3px 6px;text-align:start}.hesas-pr-list th{background:#e2e8f0}
  .hesas-pr-sheet footer{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:12mm;font-size:11pt;text-align:center}
  .hesas-pr-sheet footer b{display:block;font-size:10.5pt;margin-top:2px}
  .hesas-pr-sheet footer i{display:block;margin-top:9mm;border-top:1px dotted #0f172a}
  /* The cooperating teachers' report: the screen's two tables, plain, with the lessons as words. */
  .hesas-pr-sheet-note{margin:0 0 8px;font-size:10.5pt;color:#334155}
  .hesas-pr-hosts-sheet .hesas-pr-table-wrap{overflow:visible}
  .hesas-pr-hosts-sheet .hesas-pr-table{min-width:0;font-size:10.5pt;margin-bottom:6px;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .hesas-pr-hosts-sheet .hesas-pr-table th,.hesas-pr-hosts-sheet .hesas-pr-table td{border:1px solid #94a3b8;padding:3px 6px}
  .hesas-pr-hosts-sheet .hesas-pr-table thead th{background:#e2e8f0;color:#0f172a;font-size:10.5pt}
  .hesas-pr-hosts-sheet tr{break-inside:avoid}
  .hesas-pr-hosts-sheet .hesas-pr-chip{padding:0 5px;font-size:9.5pt;border-color:#cbd5e1}
  .hesas-pr-hosts-sheet .hesas-pr-sub{margin:8px 0 4px;font-size:12pt}
  .hesas-pr-hosts-sheet footer{margin-top:8mm}
}

/* ---------- الهاتف (repair-39): أزرار أصغر، لا نص مقطوع، ولا شريط عائم يغطي المحتوى ---------- */
@media (max-width:640px){
  .button-row{gap:6px}
  .button-row>button{flex:1 1 calc(50% - 6px);min-width:0;justify-content:center;white-space:normal;text-align:center;line-height:1.35;font-size:.86rem;padding:8px 10px}
  button.hs-smart-update{white-space:normal;font-weight:750}
  .hesas-quality-trigger.link{white-space:normal;line-height:1.5}
  .global-copyright{position:static!important;display:block;width:max-content;max-width:calc(100% - 24px);margin:12px auto;background:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  .hesas-modal-head h2{font-size:1.08rem}
  /* Lists (teachers, classes, subjects…): tighter cells, and long codes wrap, so more columns show before the list scrolls. */
  .table-wrap th,.table-wrap td{padding:9px 10px}
  .table-wrap td{overflow-wrap:anywhere}
}

/* ---------- صفحة الاستعلام (repair-40): the coordinator's window, and the printed pages for departments and teachers ---------- */
.hesas-inq-top{display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;align-items:center;padding:14px;border:1px solid #dbe5ee;border-radius:16px;background:linear-gradient(135deg,#f0f7fd,#f3fbf9)}
.hesas-inq-qr{background:#fff;border-radius:12px;padding:6px;border:1px solid #e2e8f0}
.hesas-inq-qr svg,.hq-qr svg{display:block;width:100%;height:auto}
.hesas-inq-main p{margin:8px 0 0;color:#475569;font-size:.86rem;line-height:1.75}
.hesas-inq-codes{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.hesas-inq-codes span{display:grid;line-height:1.2}.hesas-inq-codes small{color:#64748b;font-size:.78rem;font-weight:700}
.hesas-inq-codes b{font-size:1.9rem;letter-spacing:.14em;color:#0f4c81;font-variant-numeric:tabular-nums}
.hesas-inq-switch{display:flex;align-items:center;gap:8px;min-height:38px;padding:4px 12px;border-radius:999px;border:1px solid #fecaca;background:#fef2f2;color:#991b1b;font-weight:800;font-size:.86rem;cursor:pointer}
.hesas-inq-switch.on{border-color:#99f6e4;background:#f0fdfa;color:#115e59}
.hesas-inq-switch input{width:17px;height:17px;margin:0;accent-color:#0f766e}
.hesas-inq-link{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
.hesas-inq-link code{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:5px 9px;font-size:.8rem;color:#0f172a;max-width:100%;overflow-wrap:anywhere}
.hesas-inq-link button,.hesas-inq-link a{min-height:34px;padding:5px 11px;border-radius:9px;border:1px solid #cbd5e1;background:#fff;font:inherit;font-weight:700;font-size:.84rem;color:#1e293b;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center}
.hesas-inq-export{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 4px}
.hesas-inq-export button{min-height:42px;border:1px solid #cbd5e1;border-radius:11px;background:#fff;padding:8px 14px;cursor:pointer;font-weight:800;color:#1e293b}
.hesas-inq-export .primary{background:#1769aa;border-color:#1769aa;color:#fff}
.hesas-inq-table code{font-size:.98rem;font-weight:800;letter-spacing:.1em;color:#0f4c81;font-variant-numeric:tabular-nums}
.hesas-inq-table{min-width:560px}
.hesas-inq-teachers-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.hesas-inq-teachers-head input{min-height:38px;border:1px solid #cbd5e1;border-radius:10px;padding:5px 10px;font:inherit;min-width:220px}
.hesas-inq-danger{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;padding:11px 14px;border:1px solid #fecaca;border-radius:12px;background:#fff7f7;color:#7f1d1d;font-size:.85rem;line-height:1.7}
.hesas-inq-danger button{min-height:38px;border:1px solid #fca5a5;border-radius:10px;background:#fff;color:#b91c1c;font-weight:800;padding:6px 12px;cursor:pointer}
@media (max-width:620px){.hesas-inq-top{grid-template-columns:1fr}.hesas-inq-qr{width:150px;margin:0 auto}.hesas-inq-export button{flex:1 1 100%}.hesas-inq-teachers-head input{min-width:0;width:100%}.hesas-inq-table{min-width:0}}

.hesas-inq-print{display:none;direction:rtl;font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:#0f172a;background:#fff}
/* Before printing, each page is laid out off screen at the printed width and measured, so it can be set tighter to keep to one page. */
.hesas-inq-print.hq-measure{display:block;position:absolute;top:0;left:-10000px;width:192mm;visibility:hidden}
.hq-measure .hq-sheet{height:auto!important;overflow:visible!important}
@page hesas-inquiry{size:A4 portrait;margin:9mm}
@media print{
  body.hesas-print-inquiry>*:not(.hesas-inq-print){display:none!important}
  html:has(body.hesas-print-inquiry),body.hesas-print-inquiry{background:#fff!important}
  body.hesas-print-inquiry .hesas-inq-print{display:block!important}
  .hq-sheet{page:hesas-inquiry;break-after:page;page-break-after:always}
  .hq-sheet:last-child{break-after:auto;page-break-after:auto}
}
.hq-sheet{box-sizing:border-box;height:278mm;overflow:hidden;display:flex;flex-direction:column;gap:4.5mm;padding:8mm 9mm 6mm;border:2.2pt solid #0f4c81;border-radius:5mm;outline:.6pt solid #0f4c81;outline-offset:-2.2mm;background:#fff;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.hq-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6mm;padding-bottom:3.5mm;border-bottom:1.2pt solid #cbd5e1}
.hq-head>div:first-child b{display:block;font-size:12.5pt}.hq-head>div:first-child small{font-size:9.5pt;color:#475569}
.hq-title{display:flex;align-items:center;gap:3mm}
.hq-mark{width:11mm;height:11mm;border-radius:3mm;background:linear-gradient(135deg,#1769aa,#0f766e);color:#fff;display:grid;place-items:center;font-weight:800;font-size:15pt}
.hq-title h1{margin:0;font-size:19pt;color:#0f4c81}
.hq-school{justify-self:end;text-align:center;border:1pt solid #cbd5e1;border-radius:3mm;padding:1.5mm 4mm;line-height:1.2}
.hq-school small{display:block;font-size:8.5pt;color:#64748b}.hq-school b{font-size:14pt;letter-spacing:.14em}
.hq-kind{display:inline-block;padding:.6mm 3.5mm;border-radius:99px;background:#e0f2fe;color:#075985;font-size:9.5pt;font-weight:800}
.hq-hero{display:grid;grid-template-columns:minmax(0,1fr) 62mm;gap:7mm;align-items:center}
.hq-hero h2{margin:2mm 0 4mm;font-size:22pt;line-height:1.25}
.hq-codes{display:flex;gap:4mm}
.hq-codes span{flex:1;border:1pt solid #cbd5e1;border-radius:3.5mm;padding:2.5mm 4mm;text-align:center;background:#f8fafc;line-height:1.15}
.hq-codes span.main{border:1.6pt solid #1769aa;background:#eff6ff}
.hq-codes small{display:block;font-size:9.5pt;color:#475569;font-weight:700}
.hq-codes b{display:block;font-size:22pt;letter-spacing:.16em;color:#0f172a;font-variant-numeric:tabular-nums}
.hq-codes span.main b{color:#0f4c81}
.hq-steps{margin:4mm 0 0;padding:0;list-style:none;counter-reset:hq-step;font-size:10.5pt;line-height:1.75;color:#1e293b}
.hq-steps li{counter-increment:hq-step;position:relative;padding-inline-start:8mm;margin-bottom:1mm}
.hq-steps li:before{content:counter(hq-step);position:absolute;inset-inline-start:0;top:.9mm;width:5.6mm;height:5.6mm;border-radius:50%;background:#1769aa;color:#fff;font-size:8.5pt;font-weight:800;display:grid;place-items:center;line-height:1}
.hq-qr{margin:0;text-align:center}
.hq-qr svg{display:block;width:100%;height:auto;box-sizing:border-box;border:1pt solid #e2e8f0;border-radius:3mm;padding:1mm;background:#fff}
.hq-qr figcaption{margin-top:1.5mm;font-size:9.5pt;font-weight:700;color:#0f4c81}
.hq-link{margin:-2mm 0 0;text-align:center;font-size:9pt;color:#475569;font-family:Consolas,"Courier New",monospace}
.hq-sub{margin:0;font-size:12.5pt;color:#0f4c81;border-bottom:1pt solid #e2e8f0;padding-bottom:1.5mm}.hq-sub small{font-size:9.5pt;color:#64748b;font-weight:600}
.hq-list{display:grid;gap:1.6mm 6mm;align-content:start;grid-auto-flow:column}
.hq-list.c2{grid-template-columns:1fr 1fr}.hq-list.c3{grid-template-columns:1fr 1fr 1fr}
.hq-row{display:grid;grid-template-columns:7mm minmax(0,1fr) auto;align-items:center;gap:2.5mm;padding:1.6mm 2.5mm;border:.8pt solid #e2e8f0;border-radius:2.5mm;break-inside:avoid}
.hq-row:nth-child(odd){background:#f8fafc}
.hq-n{width:6mm;height:6mm;border-radius:50%;background:#e0f2fe;color:#075985;display:grid;place-items:center;font-size:8.5pt;font-weight:800}
.hq-name{font-size:10.5pt;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hq-row b{font-size:12.5pt;letter-spacing:.12em;color:#0f4c81;font-variant-numeric:tabular-nums}
.hq-list.c3 .hq-name{font-size:9.5pt}.hq-list.c3 .hq-row b{font-size:11pt}
/* The install guide: iPhone and Android side by side, at the foot of every page. */
.hq-install{margin-top:auto;border:1pt solid #bae6fd;border-radius:3.5mm;background:#f0f9ff;padding:2.6mm 4mm 2.4mm}
.hq-install h3{margin:0 0 1.6mm;display:flex;align-items:center;gap:2mm;font-size:11.5pt;color:#0f4c81}
.hq-install h3 svg{width:5mm;height:5mm;flex:none}
.hq-install-cols{display:grid;grid-template-columns:1fr 1fr;gap:5mm}
.hq-install-cols>div{background:#fff;border:.8pt solid #dbeafe;border-radius:2.5mm;padding:1.8mm 3mm}
.hq-install-cols b{display:block;font-size:10pt;color:#0f172a;margin-bottom:.6mm}
.hq-install ol{margin:0;padding-inline-start:4.5mm;font-size:9.2pt;line-height:1.55;color:#1e293b}
.hq-install ol svg{display:inline-block;width:3.6mm;height:3.6mm;vertical-align:-.7mm;margin:0 .4mm;color:#1769aa}
.hq-install p{margin:1.6mm 0 0;font-size:8.8pt;color:#334155;line-height:1.5}
.hq-foot{display:flex;justify-content:space-between;gap:6mm;padding-top:2.5mm;border-top:1pt solid #e2e8f0;font-size:8.5pt;color:#64748b}
.hq-sheet:not(:has(.hq-install)) .hq-foot{margin-top:auto}
/* The teacher's own page: centred, the code and the QR code large. */
.hq-person{text-align:center;margin-top:3mm}
.hq-person h2{margin:2.5mm 0 1mm;font-size:27pt;line-height:1.25}
.hq-person p{margin:0;font-size:12pt;color:#475569}
.hq-codes.big{width:150mm;margin:1mm auto 0}
.hq-codes.big b{font-size:27pt}
.hq-qr.big{width:auto;margin:1mm auto 0}
.hq-qr.big svg{width:62mm;margin:0 auto}
.hq-qr.big figcaption{font-size:10.5pt}
.hq-steps.wide{width:150mm;margin:0 auto;font-size:11pt}
.hq-note{width:150mm;margin:0 auto;padding:2mm 4mm;border-radius:3mm;background:#fffbeb;border:1pt solid #fde68a;color:#92400e;font-size:9.6pt;text-align:center}
/* A page with a long list is set tighter: a smaller QR code and type, closer rows. */
.hq-sheet.tight{gap:3.2mm;padding-top:6mm}
.hq-sheet.tight .hq-hero{grid-template-columns:minmax(0,1fr) 48mm;gap:5mm}
.hq-sheet.tight .hq-hero h2{font-size:18pt;margin:1mm 0 2.5mm}
.hq-sheet.tight .hq-codes b{font-size:18pt}
.hq-sheet.tight .hq-steps{margin-top:2.5mm;font-size:9.6pt;line-height:1.6}
.hq-sheet.tight .hq-row{padding:1.1mm 2.5mm}
.hq-sheet.tight .hq-qr.big svg{width:56mm}
.hq-sheet.tight .hq-person h2{font-size:23pt}
/* Tighter still, before a list goes to three columns. */
.hq-sheet.tighter{gap:2.6mm}
.hq-sheet.tighter .hq-hero{grid-template-columns:minmax(0,1fr) 44mm}
.hq-sheet.tighter .hq-steps{margin-top:2mm}
.hq-sheet.tighter .hq-list{gap:1.1mm 5mm}
.hq-sheet.tighter .hq-row{padding:.75mm 2.5mm}
.hq-sheet.tighter .hq-install{padding:2mm 3.5mm 1.8mm}
.hq-sheet.tighter .hq-install ol{font-size:8.6pt;line-height:1.45}
.hq-sheet.tighter .hq-install p{font-size:8.3pt;margin-top:1.2mm}
/* Three columns keep whole names: a long one wraps instead of being cut. */
.hq-list.c3 .hq-name{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
.hq-list.c3 .hq-row b{letter-spacing:.06em}
/* The install guide as a page of its own, when a page could not hold it. */
.hq-guide .hq-install{margin-top:6mm;padding:5mm 6mm}
.hq-guide .hq-install h3{font-size:16pt;margin-bottom:4mm}.hq-guide .hq-install h3 svg{width:7mm;height:7mm}
.hq-guide .hq-install-cols{gap:7mm}.hq-guide .hq-install-cols>div{padding:4mm 5mm}
.hq-guide .hq-install-cols b{font-size:14pt;margin-bottom:2mm}
.hq-guide .hq-install ol{font-size:12.5pt;line-height:1.9}.hq-guide .hq-install ol svg{width:5mm;height:5mm}
.hq-guide .hq-install p{font-size:12pt;margin-top:4mm}
.hq-guide .hq-foot{margin-top:auto}
/* repair-41: the program's logo (assets/hesas-logo.png, chosen by the user from images Codex generated) in the side menu, the platform header and the printed pages. */
.brand>span{background:url(hesas-logo.png) center/cover no-repeat!important;border-radius:11px;overflow:hidden}
.brand>span>svg{visibility:hidden}
img.hq-mark{display:block;object-fit:cover;background:none}
/* repair-43: «استيراد من aSc». */
.hesas-asc-modal .hesas-modal-body{display:grid;gap:14px}
.hesas-asc-pick{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.hesas-asc-file{border:1px solid #0d9488;background:#0d9488;color:#fff;border-radius:10px;padding:9px 16px;font:inherit;font-weight:700;cursor:pointer}
.hesas-asc-file:focus-within{outline:3px solid #99f6e4;outline-offset:2px}
.hesas-asc-name{color:#334155;font-size:.9rem}
.hesas-asc-how{margin:0;color:#475569;line-height:1.8;font-size:.92rem}
.hesas-asc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.hesas-asc-grid>div{border:1px solid #e2e8f0;border-radius:14px;padding:12px 14px;background:#f8fafc;display:flex;flex-direction:column;gap:2px}
.hesas-asc-grid span{color:#475569;font-size:.85rem}.hesas-asc-grid b{font-size:1.5rem;color:#0f172a}.hesas-asc-grid small{color:#475569}
.hesas-asc-sec{border:1px solid #e2e8f0;border-radius:14px;padding:12px 16px}
.hesas-asc-sec h3{margin:0 0 6px;font-size:1rem;color:#0f172a}
.hesas-asc-sec p{margin:6px 0;line-height:1.8}.hesas-asc-sec ul{margin:6px 0;padding-inline-start:20px;line-height:1.8}
.hesas-asc-note{color:#475569;font-size:.9rem}
.hesas-asc-times{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.hesas-asc-times>span{border:1px solid #e2e8f0;border-radius:10px;padding:4px 10px;background:#fff;font-size:.88rem}
.hesas-asc-radio{display:flex;flex-wrap:wrap;gap:6px 18px;margin:6px 0}
.hesas-asc-radio label,.hesas-asc-check{display:flex;align-items:flex-start;gap:8px;line-height:1.7;cursor:pointer}
.hesas-asc-radio input,.hesas-asc-check input{margin-top:6px;flex:none}
.hesas-asc-checks{display:grid;gap:4px}
.hesas-asc-table{width:100%;border-collapse:collapse}
.hesas-asc-table th,.hesas-asc-table td{text-align:start;padding:6px 8px;border-bottom:1px solid #eef2f7;vertical-align:middle}
.hesas-asc-table th{color:#475569;font-size:.85rem;font-weight:600}
.hesas-asc-table select{font:inherit;border:1px solid #cbd5e1;border-radius:8px;padding:5px 8px;max-width:100%}
.hesas-asc-tag{color:#0f766e;font-weight:700}
.hesas-asc-names{color:#334155;line-height:1.9}
.hesas-asc-ok{color:#0f766e}
.hesas-asc-go{display:flex;flex-direction:column;align-items:flex-start;gap:10px;border-top:1px solid #e2e8f0;padding-top:12px}
.hesas-asc-go button,.hesas-asc-done button{border:0;background:#1769aa;color:#fff;border-radius:10px;padding:10px 20px;font:inherit;font-weight:700;cursor:pointer}
.hesas-asc-go button:disabled{background:#94a3b8;cursor:not-allowed}
.hesas-asc-done{border:1px solid #99f6e4;background:#f0fdfa;border-radius:14px;padding:16px 18px;line-height:1.9}
.hesas-asc-done h3{margin:0 0 6px;color:#0f766e}
@media (max-width:640px){.hesas-asc-table td,.hesas-asc-table th{display:block;border:0;padding:3px 0}.hesas-asc-table tr{display:block;border-bottom:1px solid #eef2f7;padding:6px 0}.hesas-asc-table thead{display:none}}
/* repair-43: the administration's codes in the inquiry window. */
.hesas-inq-admin-help{margin:0 0 8px;color:#475569;line-height:1.8;font-size:.9rem}
.hesas-inq-table input[data-inq-admin-name]{font:inherit;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px;width:100%;max-width:260px}
.hesas-inq-admin-add{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 16px}
.hesas-inq-admin-add input{flex:1 1 220px;font:inherit;border:1px solid #cbd5e1;border-radius:10px;padding:8px 10px}
.hesas-inq-admin-add button{border:1px solid #0d9488;background:#0d9488;color:#fff;border-radius:10px;padding:8px 14px;font:inherit;font-weight:700;cursor:pointer}
