/* ==========================================================
   محرك الوثائق A4 — فضاء الأستاذ الرائد
   كل الوثائق تُطبع على ورق A4 بهوامش صفرية، والمحتوى يضبط داخل الصفحة.
   ========================================================== */
@page{size:A4;margin:0}
body.land-doc{--pg:landscape}
:root{--pw:210mm;--ph:297mm;--ink-doc:#111827;--line-doc:#1b2433;--head-doc:#e8edf5;--accent-doc:#0a1a2f;--accent-2:#d89b24}

body.doc-page{background:#e9edf4;color:var(--ink)}
.doc-top{background:#fff;border-bottom:1px solid var(--line)}
.doc-bar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:14px 0}
.doc-bar h1{font-size:1.2rem;font-weight:900;color:var(--navy);flex:1 1 260px}
.doc-bar h1 small{display:block;font-size:.8rem;color:var(--muted);font-weight:700}
.doc-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.seg{display:inline-flex;border:1.5px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.seg button{border:0;background:transparent;padding:7px 14px;font-weight:800;cursor:pointer;font-size:.85rem}
.seg button[aria-pressed="true"]{background:var(--navy);color:var(--gold-2)}
.mode-chip{display:inline-flex;align-items:center;gap:7px;font-size:.78rem;font-weight:800;padding:5px 12px;border-radius:99px;background:#fff7e0;border:1px solid #f0d594;color:#8a5a00}
.mode-chip.sub{background:#e0f6ec;border-color:#a8e3c7;color:#0b7a52}
.mode-chip svg{width:14px;height:14px}
.doc-opts{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;padding:0 0 14px}
.opt{display:grid;gap:3px;font-size:.78rem;font-weight:800;color:var(--muted)}
.opt select,.opt input{border:1.5px solid var(--line);border-radius:9px;padding:6px 10px;background:#fff;font-weight:700;color:var(--ink);min-width:110px;font-size:.88rem}
.doc-note{background:#fff8e6;border:1px solid #f3dca0;color:#7a5200;border-radius:12px;padding:10px 14px;font-size:.84rem;font-weight:700;margin:14px 0 0}
.doc-note.ok{background:#e9f9f1;border-color:#b5e8cf;color:#0b6b48}
.doc-note.bad{background:#fee2e2;border-color:#fca5a5;color:#991b1b}
.doc-stage{padding:22px 0 30px}
.sheets{display:flex;flex-direction:column;align-items:center;gap:22px}
.frame{width:var(--fw,210mm);height:var(--fh,297mm);flex:none;position:relative}
.frame .sheet{transform:scale(var(--sc,1));transform-origin:top right;position:absolute;top:0;right:0}
html[dir=ltr] .frame .sheet,.sheet[dir=ltr]{transform-origin:top left}
.frame.land{--fw:297mm;--fh:210mm}

/* ---------- the sheet ---------- */
.sheet{width:210mm;height:297mm;background:#fff;color:var(--ink-doc);box-shadow:0 8px 30px rgba(10,26,47,.18);position:relative;overflow:hidden;
  padding:8mm 10mm 10mm;display:flex;flex-direction:column;font-family:var(--font);font-size:10pt;line-height:1.45;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
.sheet.land{width:297mm;height:210mm;padding:7mm 9mm 9mm}
.sheet *{box-sizing:border-box}
.sheet.has-foot{padding-bottom:13mm}
.sheet-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;position:relative;z-index:2}
.sheet.overflow{outline:3px solid #dc2626}
.ovf-warn{display:none}

/* ---------- editable fields ---------- */
.f{outline:none;min-width:8mm;display:inline-block;cursor:text;white-space:pre-wrap;word-break:break-word;border-radius:1px}
.f1{white-space:nowrap;word-break:normal}
.f:empty::before{content:attr(data-ph);color:#a6afbd;font-weight:500}
.f:empty{border-bottom:.3mm dotted #6b7686}
.f:hover:not([data-locked]),.f:focus:not([data-locked]){background:#fff7d6;box-shadow:0 0 0 .6mm #f3d98a}
.f[data-locked]{cursor:not-allowed;border-bottom:0}
.f[data-locked]::after{content:none}
td.f,th.f{display:table-cell;min-width:0;white-space:pre-wrap}
td[contenteditable]:hover,td[contenteditable]:focus{background:#fff7d6}
td[contenteditable]:empty::before{content:'';}
@media print{
  .f:empty::before{content:''}
  .f:hover,.f:focus,td[contenteditable]:hover,td[contenteditable]:focus{background:none!important;box-shadow:none!important}
}

/* ---------- official header ---------- */
.oh{display:grid;grid-template-columns:64mm 1fr 64mm;gap:4mm;align-items:start;height:29mm;flex:none;padding-bottom:2.2mm;border-bottom:.5mm solid var(--accent-doc);position:relative;margin-bottom:3mm}
.oh::after{content:"";position:absolute;inset-inline:0;bottom:-1.4mm;height:.25mm;background:var(--accent-2)}
.oh-r{text-align:center;font-weight:700;font-size:8.6pt;line-height:5.5mm}
.oh-r .l1{font-weight:900;font-size:9.4pt}
.oh-r .row{display:flex;justify-content:center;gap:1.2mm;white-space:nowrap;height:5.5mm;overflow:hidden}
.oh-c{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:1.5mm}
.oh-title{font-size:16pt;font-weight:900;color:var(--accent-doc);line-height:1.25;margin:0}
.oh-title.sm{font-size:14pt}
.oh-rule{width:34mm;height:.8mm;background:var(--accent-2);margin:1.4mm 0;border-radius:1mm}
.oh-sub{font-size:8.6pt;font-weight:700;color:#334155}
.oh-l{font-size:8.6pt;font-weight:700;line-height:5.5mm}
.oh-l .row{display:flex;gap:1.2mm;height:5.5mm;justify-content:flex-start;white-space:nowrap;overflow:hidden}
.oh .k{flex:none;font-weight:800;color:#0b1b2f}
.oh .f{flex:0 1 auto;min-width:18mm;max-width:100%;overflow:hidden;font-weight:700}
.oh-l .f{flex:1 1 auto;text-align:start}
.oh-r .f{min-width:20mm;text-align:center}
.oh .yr{font-weight:800}

/* ---------- common building blocks ---------- */
.bar{background:var(--accent-doc);color:#fff;font-weight:800;font-size:9.6pt;padding:1.1mm 3mm;border-radius:1mm;margin:3mm 0 1.6mm;display:flex;justify-content:space-between;align-items:center;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.bar.gold{background:var(--accent-2);color:#0a1a2f}
table.gt{width:100%;border-collapse:collapse;table-layout:fixed;font-size:9.4pt}
.gt th,.gt td{border:.3mm solid var(--line-doc);padding:1mm 1.6mm;vertical-align:middle;text-align:center;word-break:break-word;overflow-wrap:anywhere}
.gt th{background:var(--head-doc);font-weight:800;font-size:9pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.gt td.l,.gt th.l{text-align:start}
.gt td.lbl{background:var(--head-doc);font-weight:800;text-align:start;width:30mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.gt td.idx{width:9mm;font-weight:800;color:#334155}
.gt tr{break-inside:avoid}
.gt.zebra tbody tr:nth-child(even) td{background:#f8fafc}
.gt-fill{flex:1 1 auto}
.sigs{display:flex;justify-content:space-between;gap:6mm;margin-top:3mm;flex:none;font-weight:800;font-size:9.4pt}
.sigs>div{flex:1;text-align:center;min-height:22mm;border-top:.3mm solid transparent}
.sigs small{display:block;font-weight:600;color:#475569;font-size:8pt;margin-top:1mm}
.note-box{border:.3mm solid var(--line-doc);border-radius:1.5mm;padding:2mm 3mm;font-size:9pt}
.dots{display:inline-block;border-bottom:.3mm dotted #444;min-width:25mm}
.row-flex{display:flex;gap:4mm}
.spacer{flex:1 1 auto}

/* ---------- free-mode extras ---------- */
.free-foot{position:absolute;inset-inline:10mm;bottom:3.2mm;height:6mm;display:flex;justify-content:center;align-items:center;font-size:7.6pt;font-weight:700;color:#55627a;border-top:.25mm solid #cbd3df;padding-top:1mm;z-index:3}
.free-foot b{color:#0a1a2f;font-weight:900;letter-spacing:.2px}
.free-foot .url{direction:ltr;font-weight:900;color:#a56a00}
.wm{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4}
.wm-in{position:absolute;width:260%;height:260%;left:-80%;top:-80%;transform:rotate(-32deg);display:flex;flex-wrap:wrap;align-content:flex-start;gap:0}
.wm-in span{flex:none;width:78mm;height:46mm;display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(10,26,47,.075);font-weight:900;font-size:17pt;line-height:1.25;text-align:center;direction:ltr;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.wm-in span small{font-size:10pt;font-weight:800;direction:rtl}
.sheet.sample::before{content:"نموذج";position:absolute;inset:0;display:grid;place-items:center;font-size:120pt;font-weight:900;color:rgba(216,155,36,.13);transform:rotate(-28deg);z-index:4;pointer-events:none}

/* lock badge for locked identity fields (screen only) */
.lock-tip{font-size:.72rem}

/* ---------- ad gate (download) ---------- */
.gate-box{text-align:center;width:min(520px,100%)}
.gate-box .count{font-size:2.6rem;font-weight:900;color:var(--navy);line-height:1}
.gate-ad{min-height:250px;margin:16px 0;border:1.5px dashed var(--line);border-radius:14px;display:grid;place-items:center;color:#94a3b8;font-weight:700;font-size:.85rem;background:#f8fafc;overflow:hidden}
.gate-ad ins{display:block;width:100%}
.progress{height:8px;background:#e5eaf2;border-radius:99px;overflow:hidden;margin:12px 0 18px}
.progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--gold),var(--gold-2));transition:width 1s linear}

/* ---------- SEO text under the tool ---------- */
.doc-seo{background:#fff;border-top:1px solid var(--line);padding:34px 0 10px}
.doc-seo h2{font-size:1.25rem;margin-bottom:8px;color:var(--navy)}
.doc-seo h3{font-size:1.02rem;margin:18px 0 6px}
.doc-seo p,.doc-seo li{color:#334155;font-size:.95rem}
.doc-seo ul{padding-inline-start:22px}
.doc-related{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 26px}
.doc-related a{background:#f1f4fa;border:1px solid var(--line);padding:6px 14px;border-radius:99px;font-weight:700;font-size:.85rem}
.doc-related a:hover{border-color:var(--gold);color:#946300}

/* ---------- print ---------- */
@media print{
  html,body{background:#fff!important;margin:0!important;padding:0!important;width:auto!important;height:auto!important}
  body.doc-page>*:not(.doc-stage){display:none!important}
  .doc-stage{padding:0!important;margin:0!important}
  .wrap{width:auto!important;margin:0!important}
  .sheets{display:block;gap:0}
  .frame{width:auto!important;height:auto!important;position:static;break-after:page;page-break-after:always}
  .frame:last-child{break-after:auto;page-break-after:auto}
  .frame .sheet{position:static;transform:none!important;box-shadow:none!important;margin:0;outline:none!important}
  .sheet{break-inside:avoid;page-break-inside:avoid}
  .no-print,.col-del,.row-tools{display:none!important}
}
@media screen and (max-width:900px){.doc-bar h1{font-size:1.02rem}}

/* ---------- row tools (add / delete) ---------- */
.rowbtn{margin-inline-start:auto;background:#fff;color:#0a1a2f;border:0;border-radius:1mm;font:inherit;font-weight:800;font-size:8pt;padding:.4mm 2.4mm;cursor:pointer}
.rowx{position:absolute;inset-inline-end:0;top:0;border:0;background:#fee2e2;color:#991b1b;font-weight:900;width:4mm;height:100%;line-height:1;cursor:pointer;opacity:0;font-size:9pt;padding:0}
.gt td.idx{position:relative}
.gt tr:hover .rowx{opacity:1}
.gt td.idx .n::before{content:attr(data-n)}
.grow{flex:1 1 0;min-height:0;display:flex;flex-direction:column}
.grow>table{flex:1 1 auto;height:100%}
.sheet.fr .gt td.l,.sheet.fr .gt th.l{text-align:start}

/* ---------- covers ---------- */
.sheet.cover{--c1:#0a1a2f;--c2:#d89b24;--c3:#fff4d6;padding:0}
.cover[data-theme=emerald]{--c1:#064e3b;--c2:#c99a1d;--c3:#e8f7ef}
.cover[data-theme=burgundy]{--c1:#6b1022;--c2:#c99a1d;--c3:#fbeaee}
.cover[data-theme=sky]{--c1:#0b4f94;--c2:#e8981a;--c3:#e6f2ff}
.cover[data-theme=rose]{--c1:#9d174d;--c2:#d9a63c;--c3:#fde8f1}
.cover .cv-frame{position:absolute;inset:7mm;border:1.4mm solid var(--c1);border-radius:3mm;pointer-events:none;z-index:1}
.cover .cv-frame::after{content:"";position:absolute;inset:2.2mm;border:.35mm solid var(--c2);border-radius:1.6mm}
.cover .sheet-body{padding:17mm 18mm 15mm;align-items:center;text-align:center}
.cv-inst{font-weight:800;font-size:11pt;line-height:6.4mm;color:var(--c1);width:100%}
.cv-inst .l1{font-size:13pt;font-weight:900}
.cv-inst .row{display:flex;justify-content:center;gap:2mm;white-space:nowrap}
.cv-emblem{width:44mm;height:44mm;border-radius:50%;background:var(--c1);display:grid;place-items:center;margin:9mm 0 7mm;box-shadow:0 0 0 1.6mm #fff,0 0 0 2.4mm var(--c2);color:var(--c2);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.cv-emblem svg{width:24mm;height:24mm}
.cv-title{font-size:40pt;font-weight:900;color:var(--c1);line-height:1.2;margin:0}
.cv-rule{display:flex;align-items:center;gap:3mm;margin:4mm 0;width:70mm}
.cv-rule i{flex:1;height:.7mm;background:var(--c2);border-radius:1mm}
.cv-rule b{width:3.2mm;height:3.2mm;background:var(--c2);transform:rotate(45deg)}
.cv-sub{font-size:13pt;font-weight:700;color:#334155;max-width:140mm;line-height:1.7}
.cv-card{width:100%;margin-top:auto;border:.7mm solid var(--c1);border-radius:4mm;background:var(--c3);padding:3mm 7mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.cv-row{display:flex;align-items:baseline;gap:3mm;height:13mm;border-bottom:.3mm dotted #7b8697;font-size:14pt}
.cv-row:last-child{border-bottom:0}
.cv-row .k{flex:none;font-weight:900;color:var(--c1);min-width:34mm;text-align:start}
.cv-row .f{flex:1;text-align:start;font-weight:800;min-width:0;overflow:hidden;white-space:nowrap;border-bottom:0!important}
.cv-year{margin-top:7mm;background:var(--c1);color:#fff;font-weight:900;font-size:14pt;padding:2mm 12mm;border-radius:99px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.cv-year b{color:var(--c2)}
.sheet.fr .cv-row .k{min-width:38mm}

.cover.has-foot .cv-frame{bottom:12mm}
.cover.has-foot .sheet-body{padding-bottom:20mm}
.cv-emblem{width:50mm;height:50mm;margin:12mm 0 8mm}
.cv-emblem svg{width:28mm;height:28mm}

/* ---------- anthem ---------- */
.anth{flex:1;border:.5mm solid var(--accent-2);border-radius:3mm;margin-top:1mm;padding:7mm 9mm;position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;background:linear-gradient(#fffdf6,#fff)}
.anth::before{content:"";position:absolute;inset:1.6mm;border:.25mm solid #e6c777;border-radius:2mm;pointer-events:none}
.anth .k{font-size:13pt;font-weight:900;color:#a56a00}
.anth h2{font-size:28pt;font-weight:900;color:var(--accent-doc);margin:2mm 0 0;line-height:1.5}
.anth .dv{display:flex;align-items:center;gap:3mm;width:80mm;margin:2mm 0 5mm}
.anth .dv i{flex:1;height:.6mm;background:var(--accent-2)}.anth .dv b{width:3mm;height:3mm;background:var(--accent-2);transform:rotate(45deg)}
.anth .vs{flex:1;width:100%;display:flex;flex-direction:column;justify-content:space-evenly}
.anth .v{display:grid;grid-template-columns:1fr 8mm 1fr;align-items:center;font-size:19pt;font-weight:800;color:#0b1b2f;line-height:1.6}
.anth .v span.s{color:var(--accent-2);font-size:12pt}
.anth .motto{margin-top:4mm;background:var(--accent-doc);color:#fff;border-radius:99px;padding:2.2mm 12mm;font-size:17pt;font-weight:900;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.anth .motto b{color:var(--accent-2)}
.anth .endl{font-size:19pt;font-weight:800;margin-top:3mm;color:#0b1b2f}

/* ---------- rules ---------- */
.art{border:.3mm solid var(--line-doc);border-radius:2mm;margin-bottom:2.2mm;overflow:hidden;flex:1 1 0;display:flex;flex-direction:column}
.art h4{background:var(--head-doc);padding:1.1mm 3mm;font-size:10pt;font-weight:900;display:flex;gap:2mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.art h4 b{color:#a56a00}
.art ul{margin:0;padding:1.4mm 7mm;font-size:9.6pt;line-height:1.55;flex:1;display:flex;flex-direction:column;justify-content:space-around}
.art li{padding:.3mm 0}
.pledge{border:.3mm dashed #8892a3;border-radius:2mm;padding:2.4mm 4mm;text-align:center;font-weight:800;font-size:9.6pt;margin:1mm 0 2mm;background:#fffaf0;-webkit-print-color-adjust:exact;print-color-adjust:exact}

/* ---------- stats / checks / vertical headers ---------- */
.stats{display:flex;gap:2.5mm;margin-top:2.4mm;flex:none}
.stats>div{flex:1;border:.3mm solid var(--line-doc);border-radius:1.5mm;padding:1mm 2.4mm;display:flex;justify-content:space-between;align-items:center;font-weight:800;font-size:9pt;background:#f8fafc;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.stats b{font-size:11.5pt;color:var(--accent-doc);font-weight:900}
.gt th.rot{height:15mm;padding:0}
.gt th.rot span{display:block;writing-mode:vertical-rl;transform:rotate(180deg);margin:auto;white-space:nowrap;font-size:8pt}
.sheet.fr .gt th.rot span{transform:none}
.gt td.tk{cursor:pointer;font-weight:900;color:#0a1a2f;font-size:10pt;padding:0}
.gt td.tk:hover{background:#fff7d6}
.gt td.gen{cursor:pointer;font-weight:800}
.gt td.we,.gt th.we{background:#eef1f6!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.gt td.off,.gt th.off{background:repeating-linear-gradient(45deg,#e5e7eb,#e5e7eb 1px,#f3f4f6 1px,#f3f4f6 3px)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.gt td.calc{background:#f4f7fb;font-weight:900;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.gt td.low{color:#b91c1c;font-weight:900}
.gt tfoot td{background:var(--head-doc);font-weight:900;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.gt.dense th,.gt.dense td{padding:.3mm .6mm;font-size:8.4pt}
.gt.xs th,.gt.xs td{padding:.2mm .4mm;font-size:7.6pt}
.pg-btns{display:flex;gap:2mm;margin-inline-start:auto}
.chart-box{border:.3mm solid var(--line-doc);border-radius:2mm;padding:2mm 3mm;flex:1 1 0;min-height:0;display:flex;flex-direction:column}
.chart-box svg{width:100%;flex:1;min-height:0}
.two{display:grid;grid-template-columns:1fr 1fr;gap:4mm}
.kv{display:grid;grid-template-columns:auto 1fr;gap:1.2mm 3mm;align-items:baseline;font-size:9.6pt;border:.3mm solid var(--line-doc);border-radius:2mm;padding:2mm 3mm}
.kv .k{font-weight:800}
.kv .v{border-bottom:.3mm dotted #6b7686;min-height:5.4mm;font-weight:700}
.kv .v.c{background:#f4f7fb;font-weight:900;border-bottom:0;padding-inline:2mm;border-radius:1mm}
.doc-opts .btn{align-self:flex-end}
.sheet.land .sigs>div{min-height:11mm}
.bar .f:empty::before{color:#c3cddd}
/* ---------- timetable ---------- */
table.tt{width:100%;height:100%;border-collapse:collapse;table-layout:fixed}
.tt th,.tt td{border:.3mm solid var(--line-doc);text-align:center;padding:0}
.tt thead th{background:var(--accent-doc);color:#fff;height:8mm;font-size:10.4pt;font-weight:900;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tt thead th.tm{width:23mm;font-size:8.6pt}
.tt td.tm{background:var(--head-doc);font-size:8.2pt;font-weight:800;direction:ltr;line-height:1.35;cursor:pointer;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tt td.tm small{display:block;color:#64748b;font-weight:700;font-size:7pt}
.tt tr.sg td{height:5.4mm;background:#dbe3f0;font-size:8pt;font-weight:900;text-align:start;padding:0 2.4mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tt tr.sg td .st{cursor:pointer;color:#a56a00;margin-inline-start:2mm}
.tt tr.sg td .sx{float:inline-end;display:inline-flex;gap:1mm}
.tt tr.sg td .sx button{border:0;background:#fff;border-radius:1mm;font:inherit;font-weight:900;font-size:8pt;padding:0 2mm;cursor:pointer;line-height:4mm}
.tt tr.br td{height:4.6mm;background:repeating-linear-gradient(135deg,#eef1f6,#eef1f6 2mm,#fff 2mm,#fff 4mm);font-size:7.4pt;font-weight:800;color:#64748b;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tt td.c{position:relative;cursor:pointer;height:10mm}
.tt td.c:hover{outline:.5mm solid var(--accent-2);outline-offset:-.5mm}
.tt .cw{position:absolute;inset:0;display:flex;flex-direction:column}
.tt .ce{flex:1;display:flex;align-items:center;justify-content:center;gap:1.4mm;font-weight:800;font-size:9.4pt;line-height:1.15;padding:.6mm 1mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tt .ce+.ce{border-top:.2mm dashed #94a3b8}
.tt .ce i{font-style:normal;font-size:7pt;font-weight:900;background:rgba(255,255,255,.75);border-radius:1mm;padding:0 1mm}
.sb-arabic{background:#dbeafe;color:#1e3a8a}.sb-french{background:#e0e7ff;color:#3730a3}.sb-math{background:#dcfce7;color:#14532d}.sb-science{background:#ccfbf1;color:#115e59}
.sb-islamic{background:#d1fae5;color:#065f46}.sb-social{background:#fef3c7;color:#92400e}.sb-art{background:#fce7f3;color:#9d174d}.sb-other{background:#f1f5f9;color:#334155}.sb-amazigh{background:#ffedd5;color:#9a3412}
.tt-legend{display:flex;flex-wrap:wrap;gap:1.6mm;margin-top:2.4mm;flex:none;font-size:8pt;font-weight:800}
.tt-legend span{border-radius:99px;padding:.4mm 3mm;border:.2mm solid rgba(0,0,0,.12);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chips label{display:inline-flex;gap:5px;align-items:center;border:1.5px solid var(--line);border-radius:99px;padding:4px 11px;font-weight:800;font-size:.8rem;background:#fff;cursor:pointer;color:var(--ink)}
.chips input{accent-color:var(--navy)}
.chips label:has(input:checked){background:var(--navy);color:var(--gold-2);border-color:var(--navy)}
.pop-grid{display:grid;gap:10px;margin:12px 0}
.pop-grid label{display:grid;gap:4px;font-weight:800;font-size:.85rem;color:var(--muted)}
.pop-grid input{border:1.5px solid var(--line);border-radius:10px;padding:9px 12px;font:inherit;font-weight:700;color:var(--ink)}
.subj-chips{display:flex;flex-wrap:wrap;gap:6px}
.subj-chips button{border:1.5px solid rgba(0,0,0,.1);border-radius:99px;padding:5px 12px;font:inherit;font-weight:800;font-size:.8rem;cursor:pointer}

.tt.multi td.c{height:11mm}
.tt.multi .ce{font-size:7.2pt;white-space:nowrap;padding:.2mm .6mm;gap:1mm}
.tt.multi .ce i{font-size:6pt}
.tt td.tm{white-space:nowrap}

/* ---------- daily journal ---------- */
.jinfo{display:flex;gap:2mm;margin-bottom:2mm;flex:none}
.jinfo>div{flex:1;border:.3mm solid var(--line-doc);border-radius:1.5mm;padding:.8mm 2mm;display:flex;flex-direction:column;background:#f8fafc;min-width:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.jinfo .k{font-size:7.4pt;font-weight:800;color:#64748b;line-height:1.2}
.jinfo .jv{font-size:9.6pt;font-weight:900;color:var(--accent-doc);min-height:4.6mm;line-height:1.3}
table.jt{--jf:9.4pt;height:auto!important;font-size:var(--jf)}
.jt th,.jt td{font-size:var(--jf);line-height:1.38}
.jt th{font-size:calc(var(--jf) - .4pt)}
.jt td{vertical-align:top;text-align:start}
.jt td.tm{text-align:center;font-weight:800;direction:ltr;white-space:nowrap;color:#334155;vertical-align:middle;width:17mm}
.jt td.l{text-align:start}
.jt tr.sg td{background:#dbe3f0;font-weight:900;font-size:calc(var(--jf) - .8pt);padding:.5mm 2mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.jt tr.lb td{padding:1mm 2mm;font-weight:700;border-top:.45mm solid var(--line-doc);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.jt tr.lb .lt{font-weight:900}
.jt tr.lb .obj{font-weight:600;font-size:calc(var(--jf) - .6pt);margin-top:.4mm;color:#1f2937}
.jt td:last-child{text-align:center;width:12mm;vertical-align:middle;font-weight:700}
.jt tr.st td{vertical-align:middle}
.jt tr.st td.l:nth-child(3){vertical-align:middle}
.jnotes{flex:none;border:.3mm solid var(--line-doc);border-radius:1.5mm;margin-top:2mm;padding:1mm 2.4mm;height:19mm;display:flex;flex-direction:column;font-size:8.4pt}
.jnotes b{font-weight:800;color:#334155;font-size:8pt}
.jnotes .jn{flex:1;font-size:9pt}
.gate-lock{background:#fff;border:1.5px dashed var(--line);border-radius:18px;padding:40px;text-align:center;max-width:560px;margin:30px auto;display:grid;gap:12px}
.gate-lock p{color:var(--muted)}

/* ---------- schemas (mind-map lesson sheets) ---------- */
.sheet.sch{--sf:9.6pt;font-size:var(--sf)}
.sch-strip{display:flex;gap:1.6mm;flex:none;margin-bottom:1.6mm}
.sch-strip>div{flex:1;border:.3mm solid var(--line-doc);border-radius:1.4mm;padding:.5mm 1.8mm;background:#f8fafc;min-width:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sch-strip .k{display:block;font-size:6.8pt;font-weight:800;color:#64748b;line-height:1.2}
.sch-strip b{font-size:8.8pt;font-weight:900;color:var(--accent-doc);line-height:1.25;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sch-lesson{flex:none;display:flex;align-items:center;gap:3mm;background:var(--accent-doc);color:#fff;border-radius:2mm;padding:1.4mm 4mm;margin-bottom:2mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sch-lesson span{background:var(--accent-2);color:#0a1a2f;font-weight:900;font-size:8pt;border-radius:99px;padding:.3mm 3mm;flex:none}
.sch-lesson b{font-size:12pt;font-weight:900;line-height:1.35}
.sch-map{flex:1 1 0;min-height:0;display:grid;grid-template-columns:1fr 60mm 1fr;gap:3mm}
.sch-wing{display:flex;flex-direction:column;gap:2.2mm;min-height:0;overflow:hidden}
.sch-card{flex:1 1 auto;border:.35mm solid var(--cc,#0a1a2f);border-radius:2mm;overflow:hidden;display:flex;flex-direction:column;background:#fff;position:relative}
.sch-card .hd{display:flex;align-items:center;gap:2mm;background:var(--cc,#0a1a2f);color:#fff;padding:.9mm 2mm;font-weight:900;font-size:calc(var(--sf) + .4pt);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sch-card .no{flex:none;width:5.2mm;height:5.2mm;border-radius:50%;background:#fff;color:var(--cc,#0a1a2f);display:grid;place-items:center;font-size:8pt;font-weight:900}
.sch-card .tt{flex:1;line-height:1.25}
.sch-card .tp{flex:none;background:rgba(255,255,255,.2);border-radius:99px;padding:0 2.2mm;font-size:calc(var(--sf) - 1pt);font-weight:800;white-space:nowrap}
.sch-card .bd{padding:1.2mm 2.4mm;line-height:1.42;font-size:var(--sf);flex:1;display:flex;flex-direction:column;justify-content:center}
.sch-card .bd ul{margin:0;padding-inline-start:4mm}
.sch-card .bd li{padding:.15mm 0}
.sch-core{display:flex;flex-direction:column;gap:2.4mm;min-height:0;overflow:hidden}
.sch-node{flex:none;border-radius:5mm;background:linear-gradient(160deg,#0a1a2f,#16335a);color:#fff;text-align:center;padding:3mm 2.4mm;border:.8mm solid var(--accent-2);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sch-node .sj{font-size:13pt;font-weight:900;color:#ffd77a;line-height:1.3}
.sch-node .lv{font-size:9pt;font-weight:800;margin-top:.6mm}
.sch-node .tm{display:inline-block;margin-top:1.6mm;background:var(--accent-2);color:#0a1a2f;border-radius:99px;font-weight:900;font-size:9pt;padding:.3mm 3.6mm}
.sch-box{flex:1 1 auto;border:.3mm solid var(--line-doc);border-radius:2mm;overflow:hidden;display:flex;flex-direction:column;min-height:0}
.sch-box h5{margin:0;background:var(--head-doc);padding:.8mm 2.4mm;font-size:calc(var(--sf) - .2pt);font-weight:900;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sch-box ul{margin:0;padding:1.2mm 2.4mm;padding-inline-start:5.4mm;font-size:calc(var(--sf) - .6pt);line-height:1.4;flex:1}
.sch-v{flex:1 1 0;min-height:0;display:flex;flex-direction:column;gap:2mm}
.sch-v .top{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:3mm}
.sch-v .list{flex:1 1 0;min-height:0;display:flex;flex-direction:column;gap:2mm;overflow:hidden}
.sch-v .sch-card .bd ul{columns:1}
.sheet.sch .sigs>div{min-height:11mm}
.sheet.sch.fr .sch-card .hd,.sheet.sch.fr .sch-box h5{direction:ltr}

/* ---------- lesson sheets (jodadat) ---------- */
.lz-top{display:grid;grid-template-columns:1fr 1fr;gap:3mm;margin-bottom:2mm;flex:none}
.lz-top:has(.sch-box:only-child){grid-template-columns:1fr}
.lz-top .sch-box ul{padding-block:1mm}
.jt tr.sep td{background:#fff3d0;font-weight:900;text-align:center;font-size:calc(var(--jf) - .4pt);padding:.6mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.lzt td.lb2{font-weight:800;background:#f4f7fb;text-align:center;vertical-align:middle;width:auto;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.lzt td:last-child{text-align:start;width:auto;font-weight:500;vertical-align:middle}
.lzt td{vertical-align:middle}

/* ====== استعمال الزمن (نسخة النموذج الأصلي: فترات، حصص، أفواج) ====== */
.tx-opts{display:grid;gap:10px;padding-bottom:12px}
.tx-det{border:1.5px solid var(--line);border-radius:12px;background:#fff;padding:0}
.tx-det>summary{cursor:pointer;font-weight:900;font-size:.9rem;padding:10px 14px;color:var(--ink);list-style:none;display:flex;align-items:center;gap:8px}
.tx-det>summary::-webkit-details-marker{display:none}
.tx-det>summary::after{content:'▾';margin-inline-start:auto;color:var(--muted)}
.tx-det[open]>summary::after{content:'▴'}
.tx-det .in{padding:2px 14px 14px;display:grid;gap:10px}
.tx-times{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tx-tc{border:1.5px solid var(--line);border-radius:10px;padding:8px 10px;display:grid;gap:5px;font-weight:800;font-size:.78rem;color:var(--muted)}
.tx-tc b{color:#92400e;font-size:.82rem}
.tx-tc div{display:flex;gap:6px;align-items:center}
.tx-tc input,.tx-dur input,.tx-grp input[type=text]{border:1.5px solid var(--line);border-radius:8px;padding:5px 8px;font:inherit;font-weight:800;color:var(--ink);width:100%;min-width:0;background:#fff}
.tx-dur{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.tx-dur label{display:grid;gap:3px;font-weight:800;font-size:.78rem;color:var(--muted);min-width:170px}
.tx-dur input{width:90px}
.tx-grp{display:flex;flex-wrap:wrap;gap:8px}
.tx-grp>div{display:flex;gap:6px;align-items:center;border:1.5px solid var(--line);border-radius:10px;padding:6px 10px;background:#f8fafc;font-weight:800;font-size:.8rem}
.tx-grp input[type=text]{width:120px}
.tx-grp input[type=color],.doc-opts input[type=color]{width:34px;height:28px;padding:0;border:1px solid var(--line);border-radius:6px;cursor:pointer;background:none;min-width:0}
.tx-dt{width:100%;border-collapse:collapse;font-size:.8rem}
.tx-dt th,.tx-dt td{border:1px solid var(--line);padding:6px 8px;text-align:center}
.tx-dt th{background:#f1f5f9;font-weight:900;color:var(--ink)}
.tx-dt td:first-child{font-weight:900;background:#f8fafc;white-space:nowrap}
.tx-dt td>div{display:flex;gap:5px;align-items:center;justify-content:center;flex-wrap:wrap}
.tx-dt input[type=number]{width:52px;border:1.5px solid var(--line);border-radius:8px;padding:4px 6px;font:inherit;font-weight:900;text-align:center}
.tx-dt select{border:1.5px solid var(--line);border-radius:8px;padding:4px 6px;font:inherit;font-weight:800;font-size:.76rem;background:#fff}
.tx-hint{font-size:.76rem;color:var(--muted);font-weight:700;line-height:1.7}
#txWarn:empty{display:none}
@media(max-width:760px){.tx-times{grid-template-columns:repeat(2,minmax(0,1fr))}.tx-dt{display:block;overflow-x:auto}}

.tx-pills{display:flex;gap:2.5mm;justify-content:center;flex:none;margin:0 0 2mm}
.tx-pill{border:.3mm solid #475569;border-radius:99px;padding:.3mm 5mm;font-weight:900;font-size:8.8pt;color:#0b1b2f;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx-wrap{flex:1 1 auto;min-height:0;display:flex}
table.tx{width:100%;height:100%;border-collapse:collapse;table-layout:fixed;border:.45mm solid #0b1b2f}
.tx th,.tx td{border:.3mm solid #0b1b2f;padding:0;text-align:center;overflow:hidden}
.tx thead th{background:var(--accent-doc);color:#fff;height:7.5mm;font-size:9.6pt;font-weight:900;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx tr.pr{height:25%}
.tx td.pn{background:var(--head-doc);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx td.pn span{display:block;writing-mode:vertical-rl;transform:rotate(180deg);font-weight:900;font-size:8pt;white-space:nowrap;margin:auto}
.tx td.pt{background:#fff;direction:ltr;font-weight:900;font-size:8pt;position:relative}
.tx td.pt span{position:absolute;inset-inline:0;text-align:center}
.tx td.pt .a{top:1mm}.tx td.pt .z{bottom:1mm}
.tx tr.br td{height:5mm;background:repeating-linear-gradient(135deg,#e9edf4,#e9edf4 1.6mm,#fff 1.6mm,#fff 3.2mm);font-size:7.8pt;font-weight:900;color:#475569;letter-spacing:.2mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx tr.nn td{height:2.6mm;background:#94a3b8;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx td.dc{position:relative;padding:0}
.tx .stk{position:absolute;inset:0;display:flex;flex-direction:column}
.tx .tx-b{min-height:0;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2mm;padding:.3mm .8mm;line-height:1.1;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx .tx-b+.tx-b{border-top:.25mm solid #0b1b2f}
.tx .tx-e{flex:1;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.tx .tx-sn,.tx .tx-s{font:inherit;font-weight:900;font-size:8.4pt;color:#0b1b2f;text-align:center;text-align-last:center;max-width:100%}
.tx .tx-m{display:flex;gap:1.6mm;align-items:center;justify-content:center;font-size:7.4pt;font-weight:800;color:#1e293b;white-space:nowrap}
.tx .tx-gn{font-weight:900}
.tx select{border:0;background:transparent;padding:0;margin:0;width:100%;cursor:pointer;color:inherit}
.tx select.tx-g{width:auto;font-size:7.4pt;font-weight:900}
.tx select:hover,.tx input.tx-d:hover{background:rgba(255,255,255,.65)}
.tx .tx-du{display:inline-flex;gap:.6mm;align-items:baseline}
.tx .tx-du em{font-style:normal}
.tx input.tx-d{border:0;background:transparent;width:7mm;padding:0;font:inherit;font-weight:900;text-align:center;-moz-appearance:textfield;appearance:textfield;color:inherit}
.tx input.tx-d::-webkit-outer-spin-button,.tx input.tx-d::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
@media print{.tx select{-webkit-appearance:none;appearance:none}.tx select:hover,.tx input.tx-d:hover{background:none}}
.tx .tx-b.sm{flex-direction:row;flex-wrap:wrap;column-gap:1.4mm;row-gap:0;align-content:center}
.tx .tx-b.sm .tx-sn,.tx .tx-b.sm .tx-s{width:auto;font-size:8pt}
.tx .tx-b.sm .tx-s{max-width:23mm}
.tx .tx-b.sm .tx-gn{display:none}
.tx .tx-b.sm .tx-m{font-size:7.2pt}

/* مذكرة: لوحة تبديل مواد اليوم */
.jslots{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;flex-basis:100%;padding:8px 12px;border:1px dashed #cbd3df;border-radius:10px;background:#fff;margin-top:6px}
.jslots>b{font-size:.85rem;color:#0a1a2f;width:100%}
.jslots .opt{font-size:.8rem}
.jslots select{min-width:150px}

/* ===== المذكرة اليومية على النموذج (jm) ===== */
.sheet.jr .jtop{flex:none;margin-bottom:1.6mm}
.jtop .jb{text-align:center;font-size:8pt;font-weight:700;color:#334155;margin-bottom:.6mm}
.jtop .jd{text-align:center;font-size:13pt;font-weight:900;color:#0a1a2f;margin-bottom:1.2mm}
.jtop .ji{display:flex;justify-content:space-between;align-items:center;gap:3mm;font-size:10pt;font-weight:800;color:#0a1a2f;margin-bottom:.8mm}
.jtop .ji b{font-weight:900}
.jtop .ji .jdm{flex:1;text-align:center}
table.jm{width:100%;border-collapse:collapse;table-layout:fixed;border:.4mm solid #111}
table.jm th,table.jm td{border:.3mm solid #111;padding:.8mm 1.4mm;line-height:1.3}
table.jm tbody.blk{border-top:.4mm solid #111}
table.jm tr.bh th{background:#fff;font-size:calc(var(--jf) - .8pt);font-weight:800;text-align:center;padding:.5mm 1mm;vertical-align:middle;-webkit-print-color-adjust:exact;print-color-adjust:exact}
table.jm th.sd0{width:14mm}
table.jm th.c1{width:22mm}
table.jm th.c2{width:30mm}
table.jm th.c4{width:12mm}
table.jm td.cp{font-weight:900;text-align:center;vertical-align:middle;font-size:calc(var(--jf) + .8pt)}
table.jm td.tp{text-align:center;vertical-align:middle}
table.jm td.gl{text-align:start;vertical-align:middle}
table.jm td.n{text-align:center;vertical-align:middle;font-weight:700;width:auto;font-size:calc(var(--jf) + 1.2pt)}
table.jm td.sd{width:14mm;padding:1mm .6mm;vertical-align:top;text-align:center;position:relative}
table.jm td.sd{display:table-cell}
table.jm td.sd .t1,table.jm td.sd .t2{display:block;font-weight:800;font-size:calc(var(--jf) + .6pt);direction:ltr}
table.jm td.sd .gv{display:block;writing-mode:vertical-rl;transform:rotate(180deg);margin:2mm auto;font-size:calc(var(--jf) - .4pt);font-weight:700;white-space:nowrap}
table.jm tbody.brk td{border-left:0;border-right:0;text-align:center;font-weight:800;font-size:calc(var(--jf) - .4pt);padding:.8mm;letter-spacing:.3px;background:#fff}
table.jm td:last-child{width:auto;text-align:center;font-weight:700}
.sheet.jr .jnotes{flex:none;position:relative;border:.4mm solid #e8943a;border-radius:6mm;margin-top:5mm;padding:2mm 3mm;min-height:34mm;height:auto;display:flex;flex-direction:column}
.sheet.jr .jnotes>b{position:absolute;top:-3.6mm;right:6mm;background:#fff;border:.4mm solid #d9534f;border-radius:1.6mm;padding:.2mm 6mm;font-size:8.6pt}
.sheet.jr .jnotes .jn{flex:1;font-size:9pt;min-height:24mm}
table.jm th.c1{width:25mm}
table.jm th.c2{width:28mm}
table.jm td.cp .sb{display:block;font-size:calc(var(--jf) - 1pt);font-weight:700;color:#475569;margin-bottom:.4mm}
table.jm td.cp{font-size:calc(var(--jf) + .2pt);overflow-wrap:anywhere;hyphens:auto}
table.jm td.tp{overflow-wrap:anywhere}
.grow>table.jm{flex:none;height:auto!important}

/* Shared identity review v4 */
.oh-r [data-i="min1"],.oh-r [data-i="min2"]{font-size:7pt;white-space:normal;line-height:1.25;align-content:center}
html[data-lang="fr"] .oh-r [data-i="min2"]{font-size:6.4pt}
.cv-inst [data-i="min1"],.cv-inst [data-i="min2"]{white-space:normal;line-height:1.55}
#docAccountTools{margin-top:10px}
.sheet [data-key="email"]{overflow-wrap:anywhere;direction:ltr}

.calendar-note{font-size:7.6pt;line-height:1.4;margin:6px 0;color:#334155}

.roster-preview th,.roster-preview td{padding:5px 8px;border-bottom:1px solid #e2e8f0;text-align:right;white-space:nowrap}.roster-preview td[dir=ltr]{text-align:left}

.oh .yr,.cv-year b{direction:ltr;unicode-bidi:isolate;display:inline-block}

/* v5: reliable top/bottom time anchors in table cells. */
.tx td.pt .time-stack{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:1mm 0}
.tx td.pt .time-stack span{position:static;display:block;line-height:1.3}
.sigs>[hidden],.sigs[hidden]{display:none!important}
.doc-signatures{flex:none;min-height:15mm;margin-top:2mm!important}
.doc-signature-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.doc-signature-tools label{display:flex;align-items:center;gap:6px;min-height:44px}
.doc-signature-tools input{width:18px;height:18px}

.doc-signatures{align-self:stretch;width:100%}
/* Added signature areas reserve realistic handwriting space without stealing table height. */
.doc-signatures>div{min-height:15mm}

/* v8: a day is exactly one portrait page; footer space is reserved, never overlaid. */
.sheet.jr .sheet-body{min-height:0;overflow:visible}
.sheet.jr .jhost{flex:1 1 0;min-height:0;overflow:visible}
.sheet.jr .jnotes{flex:0 0 auto;min-height:26mm;margin-top:6mm}
.sheet.jr .jnotes .jn{min-height:18mm;overflow-wrap:anywhere}
.sheet.jr .sigs{flex:0 0 auto;margin-top:3mm}
.sheet.jr .sigs>div{min-height:9mm}
.sheet.jr.journal-compact table.jm td{padding:.45mm .9mm;line-height:1.16}
.sheet.jr.journal-compact table.jm th{padding:.3mm .6mm}
.sheet.jr.journal-compact .jnotes{min-height:23mm}
.sheet.jr table.jm th,.sheet.jr table.jm td,.sheet.jr table.jm .gv{font-size:max(9pt,var(--jf))}
#journalFitWarning[hidden]{display:none}

/* v8: one portrait monthly attendance sheet; absent-day columns truly disappear. */
.sheet.attendance-one [hidden]{display:none!important}
.sheet.attendance-one .grow>table{flex:none;height:auto;font-size:9pt;table-layout:fixed}
.sheet.attendance-one table td,.sheet.attendance-one table th{font-size:9pt;line-height:1.05;padding:.35mm .15mm;vertical-align:middle}
.sheet.attendance-one table th.dd{padding:.5mm 0}
.sheet.attendance-one table th.dd small{font-size:9pt}
.sheet.attendance-one table td.l{overflow-wrap:anywhere;padding-inline:.6mm}
.sheet.attendance-one .sigs>div{min-height:9mm}
.sheet.attendance-one .bar{font-size:9pt}
#attendanceFitWarning[hidden]{display:none}

.sheet.attendance-one.attendance-dense table td{padding:0 .1mm;line-height:1}

.sheet.jr table.jm thead th{font-size:9pt!important;white-space:nowrap;overflow-wrap:normal;padding:.5mm .3mm}

/* v9: numeric date selector independent of Arabic browser numeral localization */
.latn-date{display:inline-flex;align-items:center;gap:5px;direction:ltr;max-width:100%;font-family:Arial,sans-serif;font-variant-numeric:tabular-nums}
.opt .latn-date select{min-width:0;width:auto;min-height:44px;font:14px Arial,sans-serif;padding:8px;direction:ltr}
.latn-date select[data-part=Year]{min-width:82px}
.tx-opts input[type=number],.tx-opts input[data-tm],.tx-d,.tx .time-stack{font-family:Arial,sans-serif;font-variant-numeric:tabular-nums;direction:ltr}
.tx-dt input[inputmode=numeric]{width:52px;min-width:0;border:1.5px solid var(--line);border-radius:8px;padding:4px 6px;font:inherit;font-weight:900;text-align:center}
.tx-opts input[inputmode=numeric],.tx .time-stack{font-family:Arial,sans-serif;font-variant-numeric:tabular-nums;direction:ltr}
.tx-opts,.tx-det,.tx-det .in,.tx-det .in>*{min-width:0;max-width:100%}
.tx-opts .opt,.tx-opts .opt select{min-width:0;max-width:100%}
#txDaysTbl{min-width:0;max-width:100%;overflow-x:auto}

/* v8: وقت الدخول أعلى الخانة ووقت الخروج أسفلها بمحاذاة الخط، والفوج في الوسط */
table.jm td.sd{position:relative;padding:1mm .6mm 6mm}
table.jm td.sd .t1{position:absolute;top:.8mm;left:0;right:0;margin:0}
table.jm td.sd .t2{position:absolute;bottom:.8mm;left:0;right:0;margin:0}
table.jm td.sd .gv{position:absolute;top:50%;left:50%;margin:0;transform:translate(-50%,-50%) rotate(180deg)}
table.jm td.sd{min-height:11mm}

table.jm td.gl{white-space:pre-line}
