/* ─────────────────────────────────────────────
   الصفحات الداخلية وصفحة الدخول — تُحمَّل بعد home.css
   ───────────────────────────────────────────── */

body.inner { display: flex; flex-direction: column; min-height: 100vh; }
.inner-main { flex: 1; padding-block: 36px 64px; width: 100%; }
.inline-form { margin: 0; }

.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 700; font-size: 14px; padding-inline-end: 6px; }
.user-chip small { display: block; font-weight: 600; font-size: 12px; color: var(--gold-dark); line-height: 1.2; }
.user-chip > span { display: flex; flex-direction: column; line-height: 1.3; }
.logout-btn { font: inherit; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #A32D2D; border: 1px solid #F0CFCF; padding: 9px 14px; border-radius: 999px; min-height: 44px; cursor: pointer; }
.logout-btn:hover { background: #FCEBEB; }
[dir="ltr"] .logout-btn svg { transform: scaleX(-1); }

/* ── صفحة الدخول ── */
.login-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--navy); position: relative; overflow: hidden; }
.login-page .hero-pattern { position: fixed; }
.login-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; max-width: 1200px; width: 100%; margin-inline: auto; }
.login-top a { color: #D5DBEA; text-decoration: none; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.login-top a:hover { color: var(--gold-soft); }
.login-top .lang-btn { color: #fff; border-color: rgba(255,255,255,.35); }
.login-top .lang-btn:hover { background: rgba(255,255,255,.1); }
[dir="ltr"] .back-arrow { transform: scaleX(-1); }
.login-wrap { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 16px 48px; }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 36px 30px 30px; box-shadow: 0 30px 70px rgba(0,0,0,.28); border-top: 5px solid var(--gold); }
.login-card .logo { display: block; width: 110px; height: auto; margin: 0 auto 10px; }
.login-card h1 { margin: 0; text-align: center; font-size: 24px; font-weight: 800; color: var(--navy); }
.login-card .sub { margin: 4px 0 22px; text-align: center; color: var(--muted); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; color: var(--ink); }
.field input { font: inherit; padding: 11px 14px; border: 1px solid #DEDBD2; border-radius: 12px; background: #FBFAF7; min-height: 46px; }
.field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--navy); background: #fff; }
.pass-wrap { position: relative; }
.pass-wrap input { width: 100%; padding-inline-end: 48px; }
.pass-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pass-toggle:hover { background: var(--gold-light); color: var(--navy); }
.btn-primary { width: 100%; font: inherit; font-weight: 800; font-size: 16px; background: var(--navy); color: #fff; border: 0; border-radius: 12px; padding: 13px; min-height: 50px; cursor: pointer; margin-top: 6px; }
.login-alt { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.login-alt a { color: var(--navy); font-weight: 700; }
.login-alt.qr-hint { background: #F8F6F0; border-radius: 12px; padding: 10px 12px; line-height: 1.6; }
.btn-primary:hover { background: var(--navy-dark); }
.msg { padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.msg.error { background: #FCEBEB; color: #A32D2D; }
.msg.ok { background: #E5F4EC; color: #1E7F55; }

/* ── لوحة الإدارة واللوحة الشخصية ── */
.page-head { margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; color: var(--navy); }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid #ECE8DE; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; text-decoration: none; color: inherit; position: relative; transition: transform .2s, box-shadow .2s; }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18,39,93,.10); }
.tile-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--gold-light); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.tile-title { font-weight: 800; font-size: 17px; color: var(--navy); }
.tile-text { color: var(--muted); font-size: 14px; line-height: 1.7; }
.tile .soon { position: absolute; top: 12px; inset-inline-end: 12px; font-size: 12px; font-weight: 700; background: #F1EFE8; color: #5F5E5A; padding: 2px 10px; border-radius: 999px; }
.tile.is-soon { opacity: .75; }

@media (max-width: 900px) {
  .user-chip { display: none; }
}

/* ── عناصر لوحة الإدارة ── */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--gold-dark); text-decoration: none; font-weight: 700; }
.crumbs span { margin-inline: 6px; opacity: .6; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; background: #F3F1EA; padding: 6px; border-radius: 999px; width: fit-content; margin-bottom: 20px; }
.subtabs a { text-decoration: none; color: #4A5163; font-weight: 700; font-size: 15px; padding: 8px 20px; border-radius: 999px; border: 1px solid transparent; }
.subtabs a:hover { background: var(--gold-light); color: var(--navy); }
.subtabs a[aria-current="page"] { background: var(--gold-tint); border-color: var(--gold); color: var(--navy); }
.section-title { font-size: 20px; color: var(--navy); margin: 28px 0 12px; }
.panel { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 6px 0; margin-bottom: 16px; overflow-x: auto; }
.panel.form-row, form.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px 18px; }
.form-title { width: 100%; color: var(--navy); }
.form-row label, .filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.form-row input, .form-row select, .filters input, .filters select, .table input, .table select {
  font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #DEDBD2; border-radius: 10px; background: #FBFAF7; min-height: 40px; color: var(--ink); }
.form-row input:focus, .filters input:focus, .table input:focus, .table select:focus, .filters select:focus { outline: 2px solid var(--gold); border-color: var(--navy); background: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 14px 18px; margin-bottom: 14px; }
.filters .grow { flex: 1 1 200px; }
.filters .grow input { width: 100%; }
.btn { font: inherit; font-weight: 700; font-size: 14px; background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 10px; padding: 8px 16px; min-height: 40px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--navy); border-color: #DEDBD2; }
.btn.ghost:hover { background: var(--gold-light); }
.btn.sm { padding: 5px 12px; min-height: 34px; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 13px; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid #ECE8DE; white-space: nowrap; }
.table td { padding: 8px 14px; border-bottom: 1px solid #F3F1EA; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-off td { opacity: .55; }
.table .strong { font-weight: 800; color: var(--navy); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .actions form, .inline-edit { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.table .empty { text-align: center; color: var(--muted); padding: 24px; }
.muted-sm { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #E8ECF6; color: var(--navy); }
.badge.gold { background: var(--gold-tint); color: #7A5300; }
.badge.green { background: #E5F4EC; color: #1E7F55; }
.badge.gray { background: #F1EFE8; color: #5F5E5A; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 4px 0; }
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 14px 8px; font-size: 14px; border-top: 1px solid #F3F1EA; }
.pager a, .pager-cur { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; }
.pager a { color: var(--navy); border: 1px solid #ECE8DE; }
.pager a:hover { background: var(--gold-light); }
.pager-cur { background: var(--navy); color: #fff; font-weight: 700; }
.pager-total { margin-inline-end: auto; color: var(--muted); }
.pager-per { margin-inline-start: 12px; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.pager-per a { min-width: 34px; height: 30px; }
.badge.red { background: #FCEBEB; color: #A32D2D; }

/* ── استيراد البيانات ── */
.imp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; }
.imp-file { font-weight: 800; color: var(--navy); }
.imp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.imp-stat { background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.imp-stat b { font-size: 24px; color: var(--navy); line-height: 1.2; }
.imp-stat span { font-size: 13px; color: var(--muted); }
.imp-stat.is-bad b { color: #A32D2D; }
.imp-block { padding: 0; margin-bottom: 12px; overflow: hidden; }
.imp-block > summary { cursor: pointer; padding: 14px 18px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 8px; list-style: none; min-height: 48px; }
.imp-block > summary::-webkit-details-marker { display: none; }
.imp-block > summary::before { content: '▸'; color: var(--gold-dark); transition: transform .15s; }
[dir="rtl"] .imp-block > summary::before { content: '◂'; }
.imp-block[open] > summary::before { transform: rotate(-90deg); }
[dir="rtl"] .imp-block[open] > summary::before { transform: rotate(90deg); }
.imp-block.is-bad > summary { color: #A32D2D; }
.imp-block .hint { margin: 0 18px 10px; }
.imp-block .table { border-top: 1px solid #F3F1EA; }
.imp-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 18px; }
.imp-review { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-inline-start: 4px solid var(--gold); }
.imp-review-q { display: flex; flex-direction: column; gap: 2px; }
.imp-review-q b { color: var(--navy); }
.imp-review ul { margin: 0; padding-inline-start: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.imp-choice { display: flex; flex-direction: column; gap: 6px; font-size: 14px; border-top: 1px dashed #ECE8DE; padding-top: 8px; }
.imp-choice label, .imp-options label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.imp-choice input, .imp-options input { width: 18px; height: 18px; accent-color: var(--navy); }
.imp-options { padding: 12px 18px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 700; color: var(--navy); }
.imp-actions { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 24px; }
.tpl-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none; color: var(--navy); transition: border-color .15s, transform .15s; }
.tpl-card svg { color: #1E7F55; }
.tpl-card:hover { border-color: var(--gold); transform: translateY(-2px); }

/* ── الطلاب والكادر ── */
a.plain { color: inherit; text-decoration: none; border-bottom: 1px dashed #C9C3B3; }
a.plain:hover { color: var(--gold-dark); border-bottom-color: var(--gold); }
.kid { display: inline-block; background: #F6F4EE; border-radius: 8px; padding: 2px 8px; margin: 2px; font-size: 13px; }
.kid small { color: var(--muted); }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--navy) !important; font-size: 14px !important; cursor: pointer; min-height: 36px; }
label.check input { width: 18px; height: 18px; accent-color: var(--navy); min-height: 0; padding: 0; }
label.check.small { font-size: 12px !important; color: var(--muted) !important; min-height: 26px; }
.dept-grid, .class-grid { display: grid; gap: 6px 14px; padding: 14px 18px; }
.dept-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.class-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.dept-pick { border: 1px solid #F0ECE2; border-radius: 12px; padding: 6px 10px; }

/* ── شريط التصدير ── */
.export-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 0 4px; }
.export-bar .btn { gap: 6px; }

/* ── الحسابات واللوحة الشخصية ── */
a.user-chip { text-decoration: none; border-radius: 999px; padding: 4px 10px 4px 6px; }
a.user-chip:hover { background: var(--gold-light); }
.acc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.acc-actions span { margin-inline-end: 6px; }
.table input.is-suggest { color: #8A8E9A; font-style: italic; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dash-card { padding: 16px 18px; }
.dash-card h2 { font-size: 17px; color: var(--navy); margin: 0 0 10px; }
.dash-card.is-soon { opacity: .7; }
.dash-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid #F3F1EA; }
.dash-row:last-child { border-bottom: 0; }
.dash-row > b { color: var(--navy); min-width: 110px; }
.pw-form label { flex: 1 1 200px; }

.pw-cell code { font-family: Consolas, 'Courier New', monospace; font-weight: 700; font-size: 14px; background: #FBF0D9; padding: 3px 8px; border-radius: 6px; }

/* ── العرض فقط (المدير ونائبه) ── */
.readonly .edit-only, .readonly [data-edit], .readonly form[method="post"] button:not(.keep):not([name="reveal_one"]):not([value="reveal"]):not([value="cards"]):not([value="export"]) { display: none !important; }
.readonly form[method="post"]:not(#bulk) input:not([type="hidden"]), .readonly form[method="post"] select, .readonly form[method="post"] textarea { pointer-events: none; background: #F6F5F1; }
.readonly form[method="post"]:not(#bulk) label.check { pointer-events: none; opacity: .85; }
.nophones .ph { display: none !important; }

/* ── بطاقات التطبيقات ── */
.app-tiles { margin-bottom: 22px; }
.app-tile .tile-icon { background: linear-gradient(135deg, #12275D, #1d3a7d); color: #DBA73D; }
.app-tile:hover .tile-icon { box-shadow: 0 0 0 4px rgba(219,167,61,.25); }

/* ── أشرطة ثابتة عند النزول في صفحات الإدارة: التبويبات، ثم التصفية، ثم أزرار الحسابات أو التصدير ── */
.inner .subtabs { position: sticky; top: calc(var(--top-h, 0px) + 8px); z-index: 30; box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(-8px -100vmax); }
.inner .filters { position: sticky; top: calc(var(--top-h, 0px) + var(--tabs-h, 0px) + 8px); z-index: 29; box-shadow: 0 0 0 8px var(--bg), 0 0 0 100vmax var(--bg); clip-path: inset(-8px -100vmax); }
.inner .acc-actions, .inner .export-bar { position: sticky; top: calc(var(--top-h, 0px) + var(--tabs-h, 0px) + var(--filt-h, 0px) + 8px); z-index: 28; background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(-6px -100vmax); padding-block: 6px; }
/* على الشاشات الصغيرة يأخذ شريط التصفية مساحة كبيرة، فيبقى في مكانه */
@media (max-width: 900px) { .inner .filters { position: static; box-shadow: none; clip-path: none; } }

/* ── نموذج التقييم ── */
.badge.ok { background: #E5F4EC; color: #1E7F55; } .badge.bad { background: #FCEBEB; color: #A32D2D; }
.ev-levels { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ev-cyc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; padding: 6px 10px; }
.ev-cyc > span { font-size: 13px; font-weight: 700; color: var(--muted); margin-inline-end: 4px; }
.ev-cyc a { text-decoration: none; color: var(--navy); font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 999px; border: 1px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.ev-cyc a small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.ev-cyc a:hover { background: var(--gold-light); } .ev-cyc a.on { background: var(--gold-tint); border-color: var(--gold); }
.ev-table input, .ev-table select { width: 100%; } .ev-table .ev-max { width: 90px; text-align: center; font-weight: 800; }
.ev-move { white-space: nowrap; } .ev-move .btn { padding: 2px 8px; min-height: 28px; }
.ev-table tfoot td { border-top: 1px solid #ECE8DE; }
.ev-cycles { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.ev-card { padding: 16px 18px; }
.ev-card h2 { margin: 0; font-size: 18px; color: var(--navy); } .ev-card > p { margin: 0 0 6px; }
.ev-blk { border-top: 1px solid #F3F1EA; padding-top: 10px; margin-top: 10px; }
.ev-blk-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--navy); }
.ev-seg { display: inline-flex; border: 1px solid #DEDBD2; border-radius: 12px; overflow: hidden; }
.ev-seg label { cursor: pointer; } .ev-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ev-seg span { display: inline-block; padding: 6px 12px; font-size: 13px; font-weight: 700; color: #4A5163; background: #fff; }
.ev-seg input:checked + span { background: var(--navy); color: #fff; }
.ev-seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.ev-pct { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 14px; }
.ev-pct span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ev-pct input { width: 64px; text-align: center; font-weight: 800; font: inherit; font-weight: 800; padding: 7px 8px; border: 1px solid #DEDBD2; border-radius: 10px; background: #FBFAF6; color: var(--ink); }
.ev-pct input:focus { outline: 2px solid var(--gold); border-color: var(--navy); background: #fff; }
.ev-pct .ev-sum { margin-inline-start: auto; }
.ev-scale input { width: 100%; }
@media (max-width: 640px) { .ev-cycles { grid-template-columns: 1fr; } }

.ev-del { cursor: pointer; min-width: 70px; justify-content: center; } .ev-del input { display: none; }
.ev-table tr.is-del td { background: #FCEBEB; } .ev-table tr.is-del input, .ev-table tr.is-del select { text-decoration: line-through; color: #A32D2D; }
.ev-table tr.is-del .ev-del { border-color: #E2A4A4; color: #A32D2D; }
/* شريط اختيار الصف ثابت تحت التبويبين عند النزول */
.inner .ev-levels { position: sticky; top: calc(var(--top-h, 0px) + var(--tabs-h, 0px) + 8px); z-index: 29; background: var(--bg); box-shadow: 0 0 0 8px var(--bg), 0 0 0 100vmax var(--bg); clip-path: inset(-8px -100vmax); }
@media (max-width: 900px) { .inner .ev-levels { position: static; box-shadow: none; clip-path: none; } }

/* ── إدخال العلامات ── */
.badge.warn { background: #FDF2DC; color: #8A5A12; } .badge.navy { background: #E6EAF5; color: var(--navy); }
.empty-panel { padding: 22px; text-align: center; color: var(--muted); }
.gr-pick .gr-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-inline-start: auto; align-self: center; }
.gr-panel { padding: 0 0 14px; }
.gr-scroll { overflow-x: auto; }
.gr-table td { white-space: nowrap; }
.gr-in { width: 90px; text-align: center; font-weight: 800 !important; }
.gr-in.err { border-color: #C0392B !important; background: #FCEBEB !important; color: #A32D2D; }
.gr-in.abs { background: #F1EFE8 !important; color: var(--muted); }
.gr-in:disabled { background: #F5F3EC !important; color: var(--ink); opacity: 1; }
.gr-auto { display: inline-block; width: 90px; text-align: center; padding: 8px 0; border-radius: 10px; background: #F5F3EC; color: var(--muted); font-weight: 800; }
.gr-avg { display: inline-block; min-width: 54px; text-align: center; color: var(--navy); font-size: 15px; }
.gr-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px 0; }
.gr-prog { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.gr-bar { flex: 1; height: 8px; background: #EEEAE0; border-radius: 99px; overflow: hidden; } .gr-bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 99px; transition: width .2s; }
.gr-save { font-size: 13px; font-weight: 700; } .gr-save.ok { color: #1E7F55; } .gr-save.wait { color: var(--muted); } .gr-save.bad { color: #A32D2D; }
.gr-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gr-panel .hint { padding: 0 16px; }
.gr-tile { margin-bottom: 18px; }
@media (max-width: 640px) { .gr-in, .gr-auto { width: 70px; } }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── العلامات: ثبات الأعمدة، والمتابعة والاعتماد ── */
.gr-table .gr-st { min-width: 150px; }
.gr-table td:nth-child(5) { min-width: 70px; }
.gr-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.tile .tile-count { background: var(--gold); color: #fff; min-width: 26px; text-align: center; }
.gf-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-inline-start: auto; align-self: center; }
.gf-key { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.st-open { background: #F1EFE8; color: #77746C; }
.st-part { background: #FDF2DC; color: #8A5A12; }
.st-submitted { background: #E3EBFA; color: #1D4C9A; }
.st-verified { background: #E5F4EC; color: #1E7F55; }
.gf-level h2, .gf-inbox h2 { font-size: 18px; margin: 0; padding: 14px 16px 10px; }
.gf-level { padding: 0 0 6px; margin-bottom: 16px; }
.gf-table th { white-space: normal; min-width: 78px; font-size: 12.5px; line-height: 1.35; vertical-align: bottom; }
.gf-table th small { display: block; color: var(--muted); font-weight: 600; }
.gf-table td { white-space: nowrap; }
.gf-cell { padding: 4px !important; }
.gf-cell a { display: block; text-align: center; padding: 8px 6px; border-radius: 9px; font-weight: 800; font-size: 13px; color: inherit; text-decoration: none; transition: transform .12s; }
.gf-cell a:hover { transform: scale(1.06); }
.gf-cell.st-open, .gf-cell.st-part, .gf-cell.st-submitted, .gf-cell.st-verified { background: none; }
.gf-cell.st-open a { background: #F1EFE8; color: #77746C; } .gf-cell.st-part a { background: #FDF2DC; color: #8A5A12; }
.gf-cell.st-submitted a { background: #E3EBFA; color: #1D4C9A; } .gf-cell.st-verified a { background: #E5F4EC; color: #1E7F55; }
.gf-na { text-align: center; color: #C9C5BA; }
.gf-state { min-width: 190px; }
.gf-state .badge { margin-inline-end: 6px; }
.gf-inl, .gf-ref-acts form { display: inline-block; margin: 0; }
.gf-log-link { font-size: 12.5px; margin-inline-start: 8px; color: var(--muted); }
.gf-note { font-size: 12.5px; color: #A32D2D; white-space: normal; margin-top: 4px; max-width: 280px; }
.gf-inbox { margin-bottom: 16px; padding-bottom: 8px; border: 2px solid var(--gold); }
.gf-ref { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid #EEEAE0; }
.gf-ref-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.gf-ret { display: inline-block; }
.gf-ret summary { list-style: none; cursor: pointer; display: inline-block; }
.gf-ret summary::-webkit-details-marker { display: none; }
.gf-ret[open] form { display: flex; gap: 6px; margin-top: 6px; }
.gf-ret input { min-width: 220px; }
.gf-late { padding: 12px 16px; margin-bottom: 16px; }
.gf-late summary { cursor: pointer; font-weight: 800; color: var(--navy); }

/* ── العلامات: المكتملة غير المسلّمة، والتقرير ── */
.gf-cell.st-full a, .gf-key.st-full { box-shadow: inset 0 0 0 2px var(--gold); }
.kid.kid-full { background: var(--gold-tint); color: #7A5300; font-weight: 800; box-shadow: inset 0 0 0 1px var(--gold); }
.msg.warn { background: #FDF2DC; color: #8A5A12; }
.rp-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-sort { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-inline-start: auto; align-self: center; }
.seg { display: inline-flex; border: 1px solid #E2DDD0; border-radius: 10px; overflow: hidden; }
.seg a { padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; background: #fff; }
.seg a + a { border-inline-start: 1px solid #E2DDD0; }
.seg a.on { background: var(--navy); color: #fff; }
.rp-panel { padding: 0 0 12px; }
.rp-table th { white-space: normal; min-width: 64px; font-size: 12.5px; line-height: 1.35; vertical-align: bottom; text-align: center; }
.rp-table th small { display: block; color: var(--muted); font-weight: 600; }
.rp-table td { white-space: nowrap; text-align: center; }
.rp-table .rp-name { text-align: start; }
.rp-table .rp-hl { background: #FBF6E9; }
.rp-table thead .rp-hl { background: #F6EED8; }
.rp-fail { color: #C0392B !important; font-weight: 800; }
.rp-miss { color: #B8B3A6; }
.rp-foot td { background: #F5F3EC; font-weight: 800; color: var(--navy); }
.rp-table tfoot td:first-child, .rp-cmp .rp-foot td:first-child { text-align: start; }
.rp-cmp { margin-bottom: 16px; padding-bottom: 6px; }
.rp-cmp h2 { font-size: 18px; margin: 0; padding: 14px 16px 10px; }
.rp-bar { display: inline-block; width: 90px; height: 8px; background: #EEEAE0; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.rp-bar i { display: block; height: 100%; background: #1E7F55; border-radius: 99px; }
.rp-hint { padding: 0 16px; }
.rp-print-head { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .topbar, .crumbs, .filters, .rp-acts, .footer, .page-head p, .rp-hint, .gf-log-link { display: none !important; }
  .page-head h1 { font-size: 16px; } .page-head { margin: 0 0 6px; }
  body, .inner { background: #fff !important; }
  .panel { box-shadow: none !important; border: 0 !important; }
  .rp-print-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
  .rp-table, .rp-cmp table { font-size: 10px; } .rp-table td, .rp-table th { padding: 3px 4px !important; min-width: 0; }
  .gr-scroll { overflow: visible !important; }
  .badge { padding: 0 4px; font-size: 9px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.gf-late .kid.st-open { background: #F1EFE8; color: #77746C; }
.gf-late .kid.st-part { background: #FDF2DC; color: #8A5A12; font-weight: 700; }
.gf-late .kid.st-full { box-shadow: inset 0 0 0 2px var(--gold); font-weight: 800; }
.gf-late .dash-row > span { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── صفحات الجداول العريضة بعرض الشاشة، وتثبيت عمود الاسم ── */
.inner-main.wide { max-width: none; padding-inline: 28px; }
.rp-table th, .rp-table td { padding: 8px 6px !important; }
.rp-table th { min-width: 50px; }
.gf-table th { min-width: 62px; }
.rp-table th:first-child, .rp-table td:first-child { position: sticky; inset-inline-start: 0; z-index: 2; background: #fff; min-width: 34px; width: 34px; }
.rp-table .rp-name { position: sticky; inset-inline-start: 34px; z-index: 2; background: #fff; box-shadow: inset -1px 0 0 #ECE8DE; }
[dir="ltr"] .rp-table .rp-name { box-shadow: inset 1px 0 0 #ECE8DE; }
.rp-table tfoot td:first-child { position: sticky; inset-inline-start: 0; z-index: 2; background: #F5F3EC; }
.gf-table th:first-child, .gf-table td:first-child { position: sticky; inset-inline-start: 0; z-index: 2; background: #fff; }

/* ── لوحة الإدارة: مجموعات، وبطاقات ملوّنة بلون خفيف وأيقونة في مربع أبيض ── */
.adm-group { display: flex; align-items: center; gap: 12px; font-size: 17px; margin: 30px 0 14px; }
.adm-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, transparent, #E2DDD0); }
[dir="rtl"] .adm-group::after { background: linear-gradient(to right, transparent, #E2DDD0); }
.adm-tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile.tone { background: var(--tb); border-color: color-mix(in srgb, var(--ti) 14%, transparent); }
.tile.tone .tile-icon { width: 60px; height: 60px; border-radius: 18px; background: #fff; color: var(--ti); box-shadow: 0 6px 16px color-mix(in srgb, var(--ti) 16%, transparent); transition: transform .25s; }
a.tile.tone:hover { box-shadow: 0 12px 28px color-mix(in srgb, var(--ti) 18%, transparent); }
a.tile.tone:hover .tile-icon { transform: scale(1.08) rotate(-4deg); }
.tile.tone .tile-title { color: var(--navy); }
.tile.tone .tile-text { color: #5B6170; }
.tile.tone.is-soon { opacity: .6; }
.tile.tone .soon { background: rgba(255,255,255,.75); }
.tile.tone .tile-count { background: var(--gold); color: #fff; }

/* ── حجم العرض لكل مستخدم: كل المنصة تكبر وتصغر بتناسق ── */
body.inner.ui-compact { zoom: .84; }
body.inner.ui-normal  { zoom: .92; }
body.inner.ui-large   { zoom: 1.04; }
.ui-size { display: inline-flex; align-items: flex-end; gap: 2px; border: 1px solid #DEDBD2; border-radius: 999px; padding: 3px 6px; margin: 0; }
.ui-size button { border: 0; background: none; cursor: pointer; color: #8A8678; font-family: inherit; font-weight: 800; line-height: 1; padding: 6px 7px; border-radius: 999px; }
.ui-size button:hover { background: var(--gold-light); color: var(--navy); }
.ui-size button.on { background: var(--gold-tint); color: var(--navy); }
.ui-size .sz-compact { font-size: 12px; } .ui-size .sz-normal { font-size: 15px; } .ui-size .sz-large { font-size: 19px; }
.ui-default { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; }
.seg button { border: 0; padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: #fff; cursor: pointer; }
.seg button + button { border-inline-start: 1px solid #E2DDD0; }
.seg button.on { background: var(--navy); color: #fff; }

/* ── رأس الصفحات أصغر، والجداول أكثف ── */
.inner-main { padding-block: 22px 48px; }
.crumbs { font-size: 13px; margin-bottom: 4px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 23px; line-height: 1.4; }
.page-head p { font-size: 14px; margin-top: 2px; }
.topbar .wrap { padding-block: 8px; }
.table { line-height: 1.45; }
.table td { padding: 7px 12px; }
.table th { padding: 8px 12px; }
.tile { padding: 18px; }

/* ── الطباعة: تقرير الشعبة في صفحة واحدة حتى 30 طالبًا تقريبًا ── */
@media print {
  body.inner { zoom: 1 !important; }
  .inner-main, .inner-main.wide { padding: 0 !important; }
  .rp-draft { background: none !important; padding: 0 !important; margin: 0 0 4px !important; font-size: 9px !important; color: #8A5A12 !important; }
  .rp-draft .kid { padding: 0 3px !important; font-size: 9px !important; background: none !important; }
  .rp-panel, .rp-cmp { padding: 0 !important; margin: 0 0 6px !important; }
  .rp-cmp h2 { font-size: 11px !important; padding: 2px 0 !important; }
  .rp-table, .rp-cmp table { font-size: 8.5px !important; line-height: 1.15 !important; }
  .rp-table th, .rp-table td, .rp-cmp th, .rp-cmp td { padding: 2px 3px !important; min-width: 0 !important; height: auto !important; }
  .rp-table th { font-size: 8px !important; line-height: 1.15 !important; }
  .rp-table th small { font-size: 7px !important; }
  .rp-table .rp-name { white-space: nowrap; }
  .rp-table .badge { background: none !important; padding: 0 !important; font-size: 8px !important; font-weight: 700; }
  .rp-table .badge.warn { color: #8A5A12 !important; }
  .rp-table .badge.warn::before { content: "· "; }
  .rp-table thead { display: table-header-group; }
  .rp-table tr { page-break-inside: avoid; break-inside: avoid; }
  .rp-table tfoot { display: table-row-group; }
  .rp-bar { display: none !important; }
  .rp-print-head { font-size: 10px !important; margin-bottom: 3px !important; }
  .page-head h1 { font-size: 13px !important; }
  .page-head, .crumbs { margin: 0 !important; }
}
@media print {
  @page { size: A4 landscape; margin: 7mm 8mm; }
  .rp-table td, .rp-table th, .rp-table .muted-sm, .rp-table .strong { font-size: 8.5px !important; line-height: 1.05 !important; }
  .rp-table th, .rp-table td { padding: 1.5px 3px !important; }
  .rp-table thead th { padding-block: 2px !important; }
}
/* التكبير والتصغير يغيّران ارتفاع الصفحة: تعويض ليبقى التذييل في أسفل الشاشة */
body.inner.ui-compact { min-height: calc(100vh / .84); }
body.inner.ui-normal  { min-height: calc(100vh / .92); }
body.inner.ui-large   { min-height: calc(100vh / 1.04); }
.ui-size .sz-compact { font-size: 13px; } .ui-size .sz-normal { font-size: 16px; } .ui-size .sz-large { font-size: 20px; }
@media (max-width: 640px) { .ui-size { display: none; } }

/* ── التقرير: حدود لكل الخانات، والعلامات في الوسط، والاسم إلى البداية ── */
.rp-table, .rp-cmp table { border-collapse: collapse; }
.rp-table th, .rp-table td { border: 1px solid #E2DDD0; text-align: center; }
.rp-table .rp-name, .rp-table th.rp-name { text-align: start; }
.rp-table tfoot td:first-child { text-align: start; }
.rp-cmp th, .rp-cmp td { border: 1px solid #E2DDD0; text-align: center; }
.rp-cmp td:first-child, .rp-cmp th:first-child { text-align: start; }

/* ── الطباعة: حجم الخط يتبع عدد الطلاب ليملأ الصفحة ويبقى مقروءًا ── */
@media print {
  .rp-table th, .rp-table td, .rp-cmp th, .rp-cmp td { border: 1px solid #9A968C !important; }
  .rp-table.rp-n-l td, .rp-table.rp-n-l th, .rp-table.rp-n-l .muted-sm, .rp-table.rp-n-l .strong { font-size: 12.5px !important; line-height: 1.25 !important; }
  .rp-table.rp-n-l th, .rp-table.rp-n-l td { padding: 6px 4px !important; }
  .rp-table.rp-n-m td, .rp-table.rp-n-m th, .rp-table.rp-n-m .muted-sm, .rp-table.rp-n-m .strong { font-size: 11.5px !important; line-height: 1.2 !important; }
  .rp-table.rp-n-m th, .rp-table.rp-n-m td { padding: 4.5px 4px !important; }
  .rp-table.rp-n-s td, .rp-table.rp-n-s th, .rp-table.rp-n-s .muted-sm, .rp-table.rp-n-s .strong { font-size: 10.5px !important; line-height: 1.15 !important; }
  .rp-table.rp-n-s th, .rp-table.rp-n-s td { padding: 3.5px 3px !important; }
  .rp-table.rp-n-xs td, .rp-table.rp-n-xs th, .rp-table.rp-n-xs .muted-sm, .rp-table.rp-n-xs .strong { font-size: 9.5px !important; line-height: 1.1 !important; }
  .rp-table.rp-n-xs th, .rp-table.rp-n-xs td { padding: 2.5px 3px !important; }
  .rp-table th small { font-size: .85em !important; }
  .rp-table .badge { font-size: inherit !important; }
}
@media print { body.inner { min-height: 0 !important; display: block !important; } }

/* ── البحث السريع ── */
.find-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #DEDBD2; background: #FBFAF6; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; padding: 8px 12px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.find-btn:hover { background: var(--gold-light); color: var(--navy); }
.find-btn kbd, .finder kbd { font-family: inherit; font-size: 11px; background: #fff; border: 1px solid #E2DDD0; border-radius: 6px; padding: 1px 6px; color: #8A8678; }
.finder { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 24px)); margin: 10vh auto auto; }
.finder::backdrop { background: rgba(18,39,93,.35); backdrop-filter: blur(3px); }
.finder-box { background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(18,39,93,.25); overflow: hidden; }
.finder-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #EEEAE0; color: var(--navy); }
.finder-in input { flex: 1; border: 0 !important; outline: 0; font: inherit; font-size: 17px; background: transparent !important; box-shadow: none !important; padding: 4px 0 !important; color: var(--ink); }
.finder ul { list-style: none; margin: 0; padding: 6px; max-height: 55vh; overflow: auto; }
.finder li[data-i] { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.finder li[aria-selected="true"], .finder li[data-i]:hover { background: var(--gold-light); }
.finder .fi { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.finder .ft { display: flex; flex-direction: column; line-height: 1.35; }
.finder .ft b { color: var(--navy); font-size: 15px; } .finder .ft small { color: var(--muted); font-size: 12.5px; }
.finder .fnone { padding: 14px; color: var(--muted); font-size: 14px; }
.finder-hint { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 18px 16px; font-size: 13px; color: var(--muted); }
.finder-hint button { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; }
@media (max-width: 640px) { .find-btn span, .find-btn kbd { display: none; } }
@media print { .find-btn, .finder { display: none !important; } }
.finder-hint[hidden] { display: none; }

/* ── سراج المنصة ── */
.sj { position: fixed; bottom: 16px; inset-inline-end: 18px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.sj-btn { border: 0; background: none; padding: 0; cursor: pointer; width: 96px; height: 74px; filter: drop-shadow(0 8px 14px rgba(18,39,93,.22)); transition: transform .2s; }
.sj-btn:hover { transform: translateY(-3px) scale(1.04); }
.sj-btn img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sj-panel { width: min(370px, calc(100vw - 24px)); height: min(520px, calc(100vh - 140px)); background: #fff; border-radius: 20px; box-shadow: 0 22px 60px rgba(18,39,93,.28); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #ECE8DE; }
.sj-panel[hidden] { display: none; }
.sj-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: linear-gradient(135deg, #12275D, #1d3a7d); color: #fff; }
.sj-face { width: 62px; height: 48px; object-fit: contain; flex: none; }
.sj-title { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.sj-title b { font-size: 15.5px; color: #F1CF85; } .sj-title small { font-size: 11.5px; opacity: .8; }
.sj-ic { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.sj-ic:hover { background: rgba(255,255,255,.22); }
#sjVoice[aria-pressed="false"] .sj-wave, #sjVoice[aria-pressed="true"] .sj-mute { display: none; }
.sj-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background: #FBFAF6; }
.sj-msg { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.6; white-space: pre-line; }
.sj-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #ECE8DE; color: var(--ink); border-start-start-radius: 4px; }
.sj-msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-start-end-radius: 4px; }
.sj-msg.alert { border-color: #F2C8C8; background: #FDF3F3; color: #8B2C2C; }
.sj-msg.go { border-color: var(--gold); background: var(--gold-light); }
.sj-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sj-link { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 7px 9px; border-radius: 12px; background: #FBFAF6; border: 1px solid #EEEAE0; color: inherit; }
.sj-link:hover { background: var(--gold-light); border-color: var(--gold); }
.sj-link .fi { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.sj-link b { display: block; font-size: 13.5px; color: var(--navy); } .sj-link small { font-size: 11.5px; color: var(--muted); }
.sj-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; background: #FBFAF6; }
.sj-sugg:empty { display: none; }
.sj-sugg button { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; }
.sj-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #EEEAE0; background: #fff; }
.sj-in input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 9px 12px !important; border-radius: 12px; }
.sj-in button { border: 0; background: var(--navy); color: #F1CF85; width: 42px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
[dir="rtl"] .sj-in button svg { transform: scaleX(-1); }
.sj.busy .sj-log::after { content: "• • •"; align-self: flex-start; color: var(--gold-dark); letter-spacing: 2px; animation: sjdots 1s infinite; }
@keyframes sjdots { 50% { opacity: .3; } }
@media (max-width: 640px) { .sj-btn { width: 74px; height: 57px; } }
@media print { .sj { display: none !important; } }
.sj-ahead { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-top: 1px solid #EEEAE0; background: #fff; max-height: 168px; overflow-y: auto; }
.sj-ahead[hidden] { display: none; }
.sj-ahead a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--navy); font-size: 13px; }
.sj-ahead a:hover { background: var(--gold-light); }
.sj-ahead .fi { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex: none; }
.sj-ahead small { color: var(--muted); font-size: 11.5px; margin-inline-start: auto; }
/* سراج: الزر والنافذة مثبّتان كلٌّ وحده (الحساب في الصفحة) */
.sj { position: static !important; display: block !important; }
.sj-btn { position: fixed; z-index: 61; bottom: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; transition: none; }
.sj-btn img { pointer-events: none; -webkit-user-drag: none; }
.sj-btn:hover { transform: none; filter: drop-shadow(0 10px 18px rgba(18,39,93,.3)); }
.sj.dragging .sj-btn { cursor: grabbing; filter: drop-shadow(0 16px 24px rgba(18,39,93,.35)); }
.sj-panel { position: fixed; z-index: 60; }
.sj-rate { width: auto !important; padding: 0 8px; font: inherit; font-size: 12px; font-weight: 700; }

/* ───────── الأعوام والأرشيف والولد الأكبر ───────── */
.arch-bar { background: #FDF2DC; border-bottom: 2px solid var(--gold); color: #7A5300; }
.arch-bar .wrap { display: flex; align-items: center; gap: 10px; padding-block: 8px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.arch-bar .btn { margin-inline-start: auto; }
body.is-archive .edit-only { display: none !important; }
.eld-mark { color: var(--gold); font-size: 13px; }
.kid.eldest { background: var(--gold-tint); color: #7A5300; font-weight: 700; }
td.num { text-align: center; }
.ok-t { color: #1E7F55; font-weight: 700; } .bad-t { color: #A32D2D; font-weight: 700; }
.form-actions { display: flex; gap: 10px; margin: 12px 0; }
.yr-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.yr-steps > li { background: #fff; border: 1px solid var(--line, #E6E2D6); border-inline-start: 5px solid #D9D5C8; border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.yr-steps > li.done { border-inline-start-color: #1E7F55; }
.yr-steps > li.now { border-inline-start-color: var(--gold); box-shadow: 0 2px 10px rgba(219,167,61,.15); }
.yr-steps > li > b { color: var(--navy); font-size: 15px; }
.yr-steps > li.done > b::after { content: " ✓"; color: #1E7F55; }
.yr-steps .form-row { margin: 0; padding: 0; background: none; box-shadow: none; border: 0; }
.yr-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.yr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.yr-cols h3 { font-size: 14px; color: var(--navy); margin: 6px 0; }
.yr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.yr-chip { background: #F6F4EE; border-radius: 9px; padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none; }
.yr-chip small { color: var(--muted); font-weight: 600; }
.yr-chip.to { background: #E6EAF5; }
.yr-chip:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.yr-grid select { min-width: 120px; }
.yr-grid tr.yr-r-repeated td { background: #FDF6F6; } .yr-grid tr.yr-r-pending td { background: #FFFAEF; } .yr-grid tr.yr-r-left td { opacity: .6; }
.yr-sheets { margin: 0; padding-inline-start: 18px; columns: 2; font-size: 14px; flex-basis: 100%; }
.btn.danger { color: #A32D2D; }
tr.is-cur td { background: #FFFBF1; }
@media (max-width: 720px) { .yr-cols { grid-template-columns: 1fr; } .yr-sheets { columns: 1; } }

/* سراج لا يظهر في الطباعة بأي حال (الزر واللوحة منفصلان) */
@media print { .sj, .sj-btn, .sj-panel, #sj, #sjBtn { display: none !important; } }

/* ───────── ملاحظات النظار ───────── */
.nt-compose { display: grid; grid-template-columns: minmax(260px, 1fr) 1.3fr; gap: 16px; align-items: start; }
.nt-pick { border: 1px solid #ECE8DE; border-radius: 12px; padding: 8px 10px; }
.nt-all { border-bottom: 1px solid #ECE8DE; margin-bottom: 4px; font-weight: 800; color: var(--navy) !important; }
.nt-list { max-height: 330px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.nt-write { display: flex; flex-direction: column; gap: 10px; }
.nt-write textarea { width: 100%; font: inherit; border: 1px solid #DCD7CA; border-radius: 10px; padding: 8px 10px; resize: vertical; }
.nt-card { background: #fff; border: 1px solid #ECE8DE; border-inline-start: 5px solid #E6B04A; border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; }
.nt-card:has(.badge.green) { border-inline-start-color: #1E7F55; }
.nt-card.is-new { box-shadow: 0 0 0 2px #C9D3EE; }
.nt-card.is-del { opacity: .55; }
.nt-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nt-card .nt-date { margin-inline-start: auto; }
.nt-card p { margin: 8px 0; line-height: 1.8; white-space: normal; }
.nt-kids summary { cursor: pointer; color: var(--navy); font-weight: 700; font-size: 13px; }
.nt-act { margin-top: 6px; }
.nt-edit { margin: -2px 0 12px; }
.nt-edit > summary { list-style: none; display: inline-block; }
.nt-edit .nt-del { margin: 6px 0; }
@media (max-width: 760px) { .nt-compose { grid-template-columns: 1fr; } .nt-list { grid-template-columns: 1fr; } }
@media print { .nt-filters, .export-bar, .subtabs { display: none !important; } .nt-card { break-inside: avoid; box-shadow: none; } }
.nt-compose { padding: 14px 16px; }
.nt-write label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.nt-write select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #DEDBD2; border-radius: 10px; background: #FBFAF7; min-height: 40px; color: var(--ink); max-width: 240px; }
.nt-write textarea { background: #FBFAF7; }
.nt-write .btn { align-self: flex-start; }
.nt-edit textarea { width: 100%; font: inherit; border: 1px solid #DEDBD2; border-radius: 10px; padding: 8px 10px; }
.nt-write textarea, .nt-edit textarea { font-weight: 400; font-size: 14px; color: var(--ink); }

/* ───────── لوحة النظار ───────── */
.sp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sp-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.sp-card b { font-size: 17px; color: var(--navy); }
.sp-card span { font-size: 13px; color: var(--muted); }
.sp-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-tint); }
.sp-rel { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-rel i { font-style: normal; font-size: 11.5px; border-radius: 7px; padding: 1px 7px; background: #F1EFE8; }
.sp-rel i.published { background: #E5F4EC; color: #1E7F55; } .sp-rel i.referred { background: #FDF2DC; color: #8A5A12; } .sp-rel i.returned { background: #FCEBEB; color: #A32D2D; }
.sp-assign { margin-bottom: 12px; } .sp-assign > summary { list-style: none; display: inline-block; }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; background: #E6EAF5; border-radius: 9px; padding: 4px 6px 4px 10px; font-weight: 700; color: var(--navy); }
.sp-chip button { border: 0; background: #fff; color: #A32D2D; border-radius: 6px; cursor: pointer; width: 22px; height: 22px; }
.print-only { display: none; }
@media print { .print-only { display: block; } .sp-cards, .sp-tabs, .sp-assign, .export-bar, .page-head p { display: none !important; } }

/* زرّ الرئيسية في الشريط العلوي (لوحة الإدارة أو لوحتي) */
.home-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #E8D6A8; background: var(--gold-tint); color: #7A5300; font-size: 14px; font-weight: 800; padding: 8px 12px; border-radius: 999px; min-height: 40px; text-decoration: none; white-space: nowrap; }
.home-btn:hover { background: #F6E3B4; }
@media (max-width: 900px) { .home-btn span { display: none; } }
@media print { .home-btn { display: none !important; } }
/* لائحة النظار ولوحة الناظر */
.sp-list td, .sp-list th { white-space: nowrap; }
.sp-list td.sp-cls { white-space: normal; min-width: 260px; }
.sp-table tr.on td { background: #FFF8E8; }
.sp-table tr.on td:first-child { box-shadow: inset -4px 0 0 var(--gold); }
.sp-table a.plain { font-weight: 800; }
.sp-rel-b { font-size: 12px; border-radius: 7px; padding: 1px 8px; background: #F1EFE8; color: var(--muted); white-space: nowrap; }
.sp-rel-b.published { background: #E5F4EC; color: #1E7F55; } .sp-rel-b.referred { background: #FDF2DC; color: #8A5A12; } .sp-rel-b.returned { background: #FCEBEB; color: #A32D2D; }
@media print { .sp-table, .sp-filters, .crumbs, .page-head, .nt-compose, .nt-edit, .nt-act { display: none !important; } .sp-ptitle { margin: 0 0 8px; font-size: 18px; } }
/* فلتر لوحة الناظر ثابت في مكانه فوق التبويبات، والرجوع إليه بعد كل اختيار */
.inner .filters.sp-filters { position: static; box-shadow: none; clip-path: none; scroll-margin-top: calc(var(--top-h, 0px) + 12px); }

/* ───────── البريد الداخلي ───────── */
.mail-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 40px; border: 1px solid #DEDBD2; background: #FBFAF6; color: var(--navy); border-radius: 999px; text-decoration: none; }
.mail-btn.has { border-color: #9FB2E0; background: #EEF2FB; }
.mail-btn b { position: absolute; top: -6px; inset-inline-end: -6px; background: #C0392B; color: #fff; font-size: 11px; line-height: 18px; min-width: 18px; padding: 0 4px; border-radius: 9px; text-align: center; }
@media print { .mail-btn { display: none !important; } }
.ml-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ml-table tbody tr { cursor: pointer; } .ml-table tr.ml-unread td { font-weight: 800; background: #F7F9FE; }
.ml-snip { font-weight: 400; max-width: 560px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-compose { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ml-compose fieldset { border: 1px solid #ECE8DE; border-radius: 12px; padding: 8px 12px; margin: 0; }
.ml-compose legend { font-weight: 800; color: var(--navy); padding: 0 6px; font-size: 14px; }
.ml-groups { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.ml-dept { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ml-dept select, .ml-filter, .ml-f input, .ml-f textarea { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #DEDBD2; border-radius: 10px; background: #FBFAF7; color: var(--ink); }
.ml-filter { width: 100%; max-width: 320px; margin-bottom: 6px; }
.ml-list { max-height: 240px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 12px; }
.ml-list small { color: var(--muted); font-weight: 600; }
.ml-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ml-f textarea { resize: vertical; font-weight: 400; } .ml-f input[type=file] { background: none; border: 0; padding: 4px 0; }
.ml-to { margin: 0; color: var(--navy); }
.ml-msg { background: #fff; border: 1px solid #ECE8DE; border-inline-start: 5px solid #9FB2E0; border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }
.ml-msg.mine { border-inline-start-color: var(--gold); background: #FFFDF7; }
.ml-msg header { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.ml-msg .ml-date { margin-inline-start: auto; }
.ml-body { margin: 10px 0; line-height: 1.9; }
.ml-files { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .ml-files a { text-decoration: none; color: var(--navy); }
.ml-reads summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 700; }
.ml-reads .kid.rd { background: #E5F4EC; }
.ml-acts { display: flex; gap: 8px; margin-top: 6px; }

/* ───────── الشريط العلوي المرتّب: الشعار · البحث · (الرئيسية، البريد، قائمة الحساب) ───────── */
.tb2 .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; flex-wrap: nowrap; }
.tb2 .brand img { height: 58px; }
.tb2 .brand-name { white-space: nowrap; }
.tb2 .tb-search { justify-self: center; width: 100%; max-width: 460px; height: 44px; justify-content: flex-start; padding: 0 14px; font-weight: 600; font-size: 14.5px; }
.tb2 .tb-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb2 .tb-search kbd { margin-inline-start: auto; }
.tb2 .top-actions { gap: 10px; flex-wrap: nowrap; }
.tb2 .mail-btn { width: 44px; height: 44px; }
.me-menu { position: relative; }
.me-menu > summary { list-style: none; cursor: pointer; } .me-menu > summary::-webkit-details-marker { display: none; }
.me { display: flex; align-items: center; gap: 8px; border: 1px solid #DEDBD2; border-radius: 999px; padding: 3px 12px 3px 4px; background: #fff; }
[dir="rtl"] .me { padding: 3px 4px 3px 12px; }
.me:hover, .me-menu[open] > .me { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.me .av { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 15px; flex: none; }
.me-name { display: flex; flex-direction: column; line-height: 1.2; font-size: 13.5px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.me-name small { color: var(--gold-dark, #B8862A); font-size: 11.5px; font-weight: 700; }
.me-pop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 290px; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; box-shadow: 0 18px 44px rgba(18,39,93,.18); padding: 8px; z-index: 80; }
.me-hd { padding: 8px 12px 10px; border-bottom: 1px solid #F0ECE2; margin-bottom: 4px; display: flex; flex-direction: column; }
.me-hd b { color: var(--navy); font-size: 15px; } .me-hd small { color: var(--gold-dark, #B8862A); font-weight: 700; }
.me-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: start; }
a.me-row:hover, button.me-row:hover { background: #F6F4EE; }
.me-row > svg { color: var(--navy); flex: none; }
.me-row .seg { margin-inline-start: auto; }
.seg { display: inline-flex; border: 1px solid #DEDBD2; border-radius: 10px; overflow: hidden; margin: 0; padding: 0; gap: 0; align-items: stretch; }
.seg button, .seg a, .seg b { border: 0; background: none; padding: 3px 10px; font: inherit; font-weight: 800; color: var(--muted); text-decoration: none; cursor: pointer; border-radius: 0; display: flex; align-items: center; font-size: 13px; }
.seg .on { background: var(--gold-tint); color: #7A5300; cursor: default; }
.seg a:hover, .seg button:hover { background: #F6F4EE; color: var(--navy); }
.me-pop .ui-size button.sz-compact { font-size: 12px; } .me-pop .ui-size button.sz-normal { font-size: 15px; } .me-pop .ui-size button.sz-large { font-size: 18px; }
.me-pop hr { border: 0; border-top: 1px solid #F0ECE2; margin: 4px 6px; }
.me-out { color: #A32D2D; } .me-out > svg { color: #A32D2D; }
[dir="ltr"] .me-out svg { transform: scaleX(-1); }
@media (max-width: 980px) { .tb2 .me-name, .tb2 .home-btn span { display: none; } .tb2 .me { padding: 2px; } }
@media (max-width: 720px) {
  .tb2 .wrap { grid-template-columns: auto 1fr auto; gap: 8px; padding-block: 8px; }
  .tb2 .brand img { height: 42px; } .tb2 .brand-name { font-size: 15px; }
  .tb2 .tb-search { width: 42px; height: 42px; padding: 0; justify-content: center; justify-self: end; border-radius: 50%; }
  .tb2 .tb-search span, .tb2 .tb-search kbd { display: none; }
  .tb2 .top-actions { gap: 6px; } .tb2 .mail-btn, .tb2 .home-btn { width: 40px; height: 40px; padding: 0; justify-content: center; min-height: 0; }
}
@media (max-width: 640px) { .me-pop .ui-size { display: inline-flex; } }
@media print { .me-menu { display: none !important; } }
.me-pop .seg button.on, .me-pop .seg button[aria-pressed="true"] { background: var(--gold-tint) !important; color: #7A5300 !important; }
.tb2 .tb-search kbd { white-space: nowrap; }

/* ───────── الجدول الأسبوعي ───────── */
.tt-wrap { overflow-x: auto; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; }
.tt-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 640px; }
.tt-grid th, .tt-grid td { border: 1px solid #ECE8DE; padding: 6px; vertical-align: top; text-align: center; }
.tt-grid thead th { background: var(--navy); color: #fff; font-size: 14px; padding: 9px 6px; }
.tt-grid thead th.today { background: #B8862A; }
.tt-grid th.tt-p { width: 64px; background: #F6F4EE; color: var(--navy); font-size: 15px; vertical-align: middle; }
.tt-grid thead th.tt-p { background: #0E1F4B; color: #fff; }
.tt-grid td { height: 62px; }
.tt-grid td.today { background: #FFFBF1; }
.tt-grid td.free { background: repeating-linear-gradient(135deg, #FBFAF7 0 8px, #F6F4EE 8px 16px); }
.tt-it { display: flex; flex-direction: column; line-height: 1.3; padding: 3px 0; }
.tt-it + .tt-it { border-top: 1px dashed #E2DDD0; }
.tt-it b { color: var(--navy); font-size: 14px; } .tt-it small { color: var(--muted); font-size: 12px; font-weight: 600; }
.tt-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tt-title small { flex-basis: 100%; font-size: 13px; color: #555; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .tt-filters, .subtabs { display: none !important; }
  .tt-wrap { border: 0; overflow: visible; } .tt-grid { min-width: 0; }
  .tt-grid thead th { background: #E5E5E5 !important; color: #000 !important; } .tt-grid td.today, .tt-grid td.free { background: none !important; }
  .tt-grid th, .tt-grid td { border-color: #888; } .tt-grid td { height: 20mm; }
}

/* إشعار البريد الفوري */
.ml-toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 900; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 36px)); }
.ml-toast { display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid #ECE8DE; border-inline-start: 4px solid var(--gold); border-radius: 14px; box-shadow: 0 14px 36px rgba(18,39,93,.18); padding: 12px 12px 12px 14px; animation: mtIn .35s ease; transition: opacity .35s, transform .35s; }
.ml-toast.out { opacity: 0; transform: translateY(8px); }
.ml-toast .mt-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-tint); color: #7A5300; display: flex; align-items: center; justify-content: center; }
.ml-toast .mt-tx { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); line-height: 1.35; }
.ml-toast .mt-tx small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.ml-toast .mt-tx b { display: block; color: var(--navy); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-toast .mt-tx em { font-style: normal; font-size: 12.5px; font-weight: 800; color: #B8862A; }
.ml-toast .mt-x { flex: none; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.ml-toast .mt-x:hover { color: var(--navy); }
@keyframes mtIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media print { .ml-toasts { display: none !important; } }

/* التقارير والنشاط */
.sx-filters label { min-width: 150px; }
.sx-dept-b { align-self: center; }
.sx-print-head { display: none; }
.sx-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.sx-k { background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; padding: 12px 14px; }
.sx-k small { display: block; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.sx-k b { font-size: 26px; color: var(--navy); line-height: 1.3; margin-inline-end: 6px; }
.sx-d { display: block; font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.sx-d.up { color: #2E7D4F; } .sx-d.dn { color: #A32D2D; }
.sx-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-bottom: 14px; }
.sx-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.sx-card { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 14px 16px; min-width: 0; }
.sx-card.sx-wide { margin-bottom: 14px; }
.sx-card h3 { margin: 0 0 2px; font-size: 16px; color: var(--navy); }
.sx-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.sx-leg { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.sx-leg span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; background: var(--c); vertical-align: -1px; }
.sx-svg { width: 100%; height: auto; display: block; direction: ltr; font-family: inherit; }
.sx-svg text { font-family: inherit; }
.sx-grid-l, .sx-svg .sx-grid { stroke: #EFECE4; }
.sx-svg .sx-base { stroke: #C9C5BA; }
.sx-svg .sx-ax { font-size: 11px; fill: #8A8E9A; }
.sx-svg .sx-lab { font-size: 12px; font-weight: 700; fill: #4A4F5C; } .sx-svg .sx-lab.b { font-size: 13px; fill: var(--ink); }
.sx-svg .sx-val { font-size: 11.5px; font-weight: 800; fill: var(--navy); } .sx-svg .sx-val.g { fill: #4A4F5C; }
.sx-svg .sx-key { font-size: 11.5px; font-weight: 700; fill: #4A4F5C; }
.sx-svg rect:hover { opacity: .85; }
.sx-t { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.sx-t th { color: var(--muted); font-weight: 700; text-align: start; padding: 6px; border-bottom: 1px solid #ECE8DE; font-size: 12.5px; }
.sx-t td { padding: 6px; border-bottom: 1px solid #F3F0E8; font-weight: 600; }
.sx-t .sx-code a { color: var(--navy); font-weight: 800; }
.sx-bw { background: #EEF0F5; border-radius: 4px; width: 110px; height: 8px; } .sx-bar { height: 8px; border-radius: 4px; background: var(--navy); }
.sx-st { font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.sx-st.none { background: #F1EFE8; color: #6B7080; } .sx-st.part { background: #FFF3D6; color: #8A5A00; }
.sx-st.sent { background: #E3EEFB; color: #1F4E8C; } .sx-st.pub { background: #E3F1EA; color: #2E6B47; }
.sx-mail { font-size: 12px; font-weight: 800; color: var(--navy); border: 1px solid #DEDBD2; border-radius: 8px; padding: 1px 8px; white-space: nowrap; text-decoration: none; display: inline-block; }
.sx-mail:hover { background: var(--gold-tint); }
.sx-more { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 800; color: #B8862A; }
.sx-ok { color: #2E6B47; font-weight: 700; font-size: 13.5px; }
.sx-note { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.sx-seg { margin: 10px 0 4px; flex-wrap: wrap; }
@media (max-width: 1100px) { .sx-kpis { grid-template-columns: repeat(3, 1fr); } .sx-grid, .sx-g3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .sx-kpis { grid-template-columns: repeat(2, 1fr); } .sx-bcol { display: none; } }
@media print {
  .sx-filters, .sx-tabs, .sx-mail, .sx-more, .no-print, .sx-seg { display: none !important; }
  .sx-print-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
  .sx-card, .sx-k { break-inside: avoid; border-color: #DDD; }
  .sx-kpis { grid-template-columns: repeat(6, 1fr); } .sx-grid { grid-template-columns: 1.35fr 1fr; } .sx-g3 { grid-template-columns: repeat(3, 1fr); }
}
.sx-one { margin-bottom: 14px; }
.sx-cls { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.sx-cl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; border: 1px solid #ECE8DE; border-radius: 12px; padding: 9px 11px; text-decoration: none; color: var(--ink); }
.sx-cl:hover { border-color: var(--gold); background: #FFFCF4; }
.sx-cl b { color: var(--navy); font-size: 14px; } .sx-cl .sx-cl-p { margin-inline-start: auto; font-weight: 800; color: var(--navy); }
.sx-cl small { width: 100%; color: var(--muted); font-weight: 600; font-size: 12px; }
.sx-cl .sx-bw { width: 100%; display: block; } .sx-cl .sx-bar { display: block; }
.sx-cl.empty { opacity: .55; }
.sx-idle .sx-mail { margin-inline-start: auto; }
.sx-lvf { display: inline-block; margin: 0 10px; } .sx-lvf label { font-size: 13px; font-weight: 700; color: var(--muted); }

/* تصدير الجداول */
.tt-x-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.tt-x-n { font-weight: 700; color: var(--muted); } .tt-x-n b { color: var(--navy); font-size: 17px; }
.tt-x-go { margin-inline-start: auto; display: flex; gap: 8px; }
.tt-x-err { color: #A32D2D; font-weight: 700; }
.tt-x-grp { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 10px 16px 14px; margin: 0 0 12px; }
.tt-x-grp legend { padding: 0 6px; } .tt-x-grp legend b { color: var(--navy); }
.tt-x-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 12px; }
.tt-x-items.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tt-print-body { background: #fff; }
.tt-print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 20px; background: var(--gold-tint); border-bottom: 1px solid #E8D6A8; position: sticky; top: 0; z-index: 3; }
.tt-print-bar span { color: #7A5300; font-weight: 600; font-size: 14px; } .tt-print-bar .btn { margin-inline-start: auto; }
.tt-page { padding: 18px 22px; max-width: 1200px; margin: 0 auto; }
.tt-page-hd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--navy); padding-bottom: 6px; margin-bottom: 10px; }
.tt-page-hd b { font-size: 20px; color: var(--navy); } .tt-page-hd small { color: #555; font-size: 13px; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .tt-print-bar { display: none !important; }
  .tt-page { padding: 0; max-width: none; break-after: page; page-break-after: always; }
  .tt-page:last-of-type { break-after: auto; page-break-after: auto; }
  .tt-print-body .tt-wrap { border: 0; overflow: visible; } .tt-print-body .tt-grid { min-width: 0; }
  .tt-print-body .tt-grid thead th { background: #E5E5E5 !important; color: #000 !important; }
  .tt-print-body .tt-grid td.today, .tt-print-body .tt-grid td.free { background: none !important; }
  .tt-print-body .tt-grid th, .tt-print-body .tt-grid td { border-color: #888; padding: 2px 4px; } .tt-print-body .tt-grid td { height: 15mm; }
  .tt-print-body .tt-it { padding: 1px 0; line-height: 1.2; } .tt-print-body .tt-it b { font-size: 12px; } .tt-print-body .tt-it small { font-size: 10px; }
  .tt-print-body .tt-grid thead th { padding: 5px 4px; font-size: 13px; } .tt-print-body .tt-page-hd { margin-bottom: 6px; }
  .tt-print-body .tt-grid { break-inside: avoid; }
  .tt-print-body .siraj-fab, .tt-print-body .siraj, .tt-print-body [class*="siraj"] { display: none !important; }
}

/* التقارير — إضافات */
.sx-kpis { grid-template-columns: repeat(7, 1fr); }
.sx-kpis.k5 { grid-template-columns: repeat(5, 1fr); }
a.sx-k { text-decoration: none; color: inherit; } a.sx-k:hover { border-color: var(--gold); }
.sx-k-risk b { color: #A32D2D; }
.sx-pos { color: #2E7D4F !important; } .sx-neg { color: #A32D2D !important; }
.sx-st.bad { background: #FBE4E4; color: #A32D2D; }
.sx-even { grid-template-columns: 1fr 1fr; }
.sx-kind { margin: 0 0 6px; }
.sx-more-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.sx-svg a.sx-lnk { cursor: pointer; } .sx-svg a.sx-lnk:hover rect { opacity: .8; } .sx-svg a.sx-lnk:hover .sx-lab { fill: #B8862A; text-decoration: underline; }
.rp-acts { position: relative; }
.sx-send { display: inline-block; } .sx-send > summary { list-style: none; cursor: pointer; } .sx-send > summary::-webkit-details-marker { display: none; }
.sx-send-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20; width: 300px; background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; box-shadow: 0 18px 44px rgba(18,39,93,.18); padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: start; }
.sx-send-pop b { color: var(--navy); font-size: 14px; } .sx-send-pop textarea { width: 100%; font: inherit; font-size: 13px; border: 1px solid #DEDBD2; border-radius: 10px; padding: 8px; }
.hon-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 10px; }
.hon-mini > div { border: 1px solid #F0ECE2; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.hon-mini > div > b { color: var(--navy); font-size: 14px; }
.hon-mini span { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .hon-mini small { color: var(--muted); font-weight: 600; }
.hon-mini i, .hon-row i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; }
.r1 { background: #F6D77B; color: #6B4A00; } .r2 { background: #E1E4EA; color: #3D4452; } .r3 { background: #EBC9A4; color: #6A3E14; }
.hon-hd { display: flex; align-items: center; gap: 16px; border-bottom: 3px double var(--gold); padding-bottom: 10px; margin-bottom: 16px; }
.hon-hd img { height: 70px; } .hon-hd h1 { margin: 0; color: var(--navy); font-size: 30px; } .hon-hd p { margin: 0; color: #555; }
.hon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hon-lv { border: 1px solid #E5DFCF; border-radius: 14px; padding: 10px 14px; break-inside: avoid; }
.hon-lv h2 { margin: 0 0 6px; font-size: 17px; color: var(--navy); }
.hon-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid #F3F0E8; }
.hon-row i { width: 26px; height: 26px; } .hon-row b { flex: 1; font-size: 14px; } .hon-row span { color: #777; font-size: 12px; } .hon-row em { font-style: normal; font-weight: 800; color: var(--navy); }
@media (max-width: 1100px) { .sx-kpis, .sx-kpis.k5 { grid-template-columns: repeat(3, 1fr); } .sx-even { grid-template-columns: 1fr; } .hon-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sx-kpis, .sx-kpis.k5 { grid-template-columns: repeat(2, 1fr); } .sx-send-pop { inset-inline-end: auto; inset-inline-start: 0; } }
@media print { .sx-send, .sx-kind { display: none !important; } .sx-kpis { grid-template-columns: repeat(7, 1fr); } .sx-kpis.k5 { grid-template-columns: repeat(5, 1fr); } .sx-more-row { display: table-row !important; } .hon-page { break-after: auto; } }
.gr-head:has(.sx-send) { position: relative; z-index: 300; }

/* الأجندة */
.ag-form { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; overflow: visible; }
.ag-form h2 { margin: 0; color: var(--navy); font-size: 18px; }
.ag-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-kind input { position: absolute; opacity: 0; }
.ag-kind span { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--k); color: var(--k); font-weight: 800; font-size: 14px; cursor: pointer; }
.ag-kind input:checked + span { background: var(--k); color: #fff; }
.ag-kind input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.ag-row { display: flex; flex-wrap: wrap; gap: 12px; } .ag-row label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; color: var(--muted); } .ag-row .grow { flex: 1 1 220px; }
.ag-full { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; color: var(--muted); }
.ag-full input[type=text], .ag-full textarea { font: inherit; font-size: 15px; border: 1px solid #DEDBD2; border-radius: 10px; padding: 9px 12px; color: var(--ink); }
.ag-cls { border: 1px solid #ECE8DE; border-radius: 14px; padding: 8px 14px 12px; margin: 0; }
.ag-cls legend { font-weight: 800; color: var(--navy); padding: 0 6px; }
.ag-cls-acts { display: flex; gap: 6px; margin-bottom: 6px; }
.ag-grp + .ag-grp { border-top: 1px dashed #ECE8DE; margin-top: 8px; padding-top: 8px; }
.ag-grp-h b { color: var(--navy); }
.ag-grp-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 10px; margin-top: 4px; }
.ag-grp-items label.off { opacity: .35; }
.ag-siraj { display: flex; gap: 12px; align-items: flex-start; background: #FFF8E7; border: 1px solid #F0D9A0; border-radius: 16px; padding: 12px 14px; }
.ag-siraj img { width: 56px; height: auto; flex: none; }
.ag-siraj b { color: #7A5300; } .ag-siraj p { margin: 4px 0 8px; color: var(--ink); font-weight: 600; line-height: 1.6; }
.ag-siraj-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-form-acts { display: flex; gap: 8px; }
.ag-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ag-file { font-size: 12.5px; font-weight: 700; color: var(--navy); background: #F3F1EA; border-radius: 8px; padding: 2px 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ag-x { border: 0; background: none; color: #A32D2D; font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ag-filters { align-items: center; }
.ag-week { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ag-week b { color: var(--navy); }
.ag-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-inline-start: auto; }
.ag-legend span { font-size: 12.5px; font-weight: 700; color: var(--muted); } .ag-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--k); margin-inline-end: 5px; vertical-align: -1px; }
.ag-ttl small { font-weight: 600; }
.ag-week-grid { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); gap: 10px; align-items: start; }
.ag-day { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 8px; min-height: 160px; }
.ag-day > header { display: flex; align-items: center; gap: 6px; padding: 4px 6px 8px; border-bottom: 1px solid #F0ECE2; margin-bottom: 8px; color: var(--navy); }
.ag-day > header span { color: var(--muted); font-size: 13px; font-weight: 700; }
.ag-day.today { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-tint); } .ag-day.today > header { color: #7A5300; }
.ag-day.past { opacity: .78; }
.ag-exn { margin-inline-start: auto; font-style: normal; font-size: 11.5px; font-weight: 800; background: #FDECEC; color: #B42318; border-radius: 999px; padding: 1px 8px; }
.ag-exn.over { background: #B42318; color: #fff; }
.ag-empty { color: #C9C5BA; text-align: center; margin: 18px 0; }
.ag-it { border: 1px solid #ECE8DE; border-inline-start: 4px solid var(--k); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.ag-it-top { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 4px; }
.ag-chip { font-size: 11.5px; font-weight: 800; color: #fff; background: var(--k); border-radius: 999px; padding: 1px 8px; }
.ag-per, .ag-sub { font-size: 11.5px; font-weight: 800; color: var(--k); background: color-mix(in srgb, var(--k) 10%, #fff); border-radius: 999px; padding: 1px 7px; }
.ag-it-t { display: block; color: var(--ink); font-size: 14px; line-height: 1.4; }
.ag-it p { margin: 4px 0 0; font-size: 13px; color: #4A4F5C; line-height: 1.5; }
.ag-cls-l { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .ag-cls-l span { font-size: 11px; font-weight: 700; background: #F3F1EA; border-radius: 6px; padding: 0 6px; color: #4A4F5C; }
.ag-cls-l .ag-scope { background: var(--gold-tint); color: #7A5300; }
.ag-it footer { display: flex; align-items: center; gap: 6px; margin-top: 6px; } .ag-it footer small { color: var(--muted); font-size: 11.5px; }
.ag-acts { margin-inline-start: auto; display: flex; gap: 8px; } .ag-acts a, .ag-acts button { font: inherit; font-size: 12px; font-weight: 800; color: var(--navy); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; } .ag-acts form { margin: 0; } .ag-acts button { color: #A32D2D; }
@media (max-width: 900px) { .ag-week-grid { grid-template-columns: 1fr; } .ag-day { min-height: 0; } .ag-legend { margin-inline-start: 0; } }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .ag-filters, .ag-form, .subtabs, .ag-acts { display: none !important; }
  .ag-week-grid { grid-template-columns: repeat(var(--days), 1fr) !important; gap: 4px; }
  .ag-day { border-color: #999; border-radius: 6px; padding: 4px; min-height: 0; break-inside: avoid; } .ag-day.past { opacity: 1; }
  .ag-it { padding: 4px 6px; break-inside: avoid; } .ag-it-t { font-size: 12px; } .ag-it p { font-size: 11px; }
  .ag-chip { background: none !important; color: #000 !important; border: 1px solid #000; }
}

/* أوراق الصف */
.sh-filters { align-items: center; } .sh-filters label { flex-direction: row; align-items: center; gap: 8px; } .sh-day { color: var(--navy); }
.sh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sh-card { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 90px; }
.sh-card header { display: flex; align-items: center; gap: 8px; } .sh-card header b { color: var(--navy); font-size: 16px; }
.sh-st { margin-inline-start: auto; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #F1EFE8; color: #6B7080; }
.st-saved .sh-st { background: #FFF3D6; color: #8A5A00; } .st-sent .sh-st { background: #E3EEFB; color: #1F4E8C; } .st-seen .sh-st { background: #E3F1EA; color: #2E6B47; }
.sh-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-photos figure { position: relative; margin: 0; } .sh-photos img { width: 84px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid #ECE8DE; display: block; }
.sh-photos figure form { position: absolute; top: 2px; inset-inline-end: 2px; } .sh-photos .ag-x { background: #fff; border-radius: 50%; width: 22px; height: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.sh-add { width: 84px; height: 110px; border: 2px dashed #D9CFB6; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #8A6A1F; font-size: 12px; font-weight: 800; cursor: pointer; text-align: center; background: #FFFCF4; }
.sh-add:hover { border-color: var(--gold); }
.sh-note { display: flex; flex-direction: column; gap: 6px; } .sh-note textarea { font: inherit; font-size: 13.5px; border: 1px solid #DEDBD2; border-radius: 10px; padding: 8px; } .sh-note .btn { align-self: flex-start; }
.sh-send { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 12px 16px; position: sticky; bottom: 10px; box-shadow: 0 8px 24px rgba(18,39,93,.10); }
.sh-upl-msg { font-weight: 700; color: #7A5300; }
.sh-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.sh-sum > span { background: #fff; border: 1px solid #ECE8DE; border-radius: 12px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--muted); } .sh-sum b { font-size: 18px; color: var(--navy); }
.sh-sum .st-sent b { color: #1F4E8C; } .sh-sum .st-seen b { color: #2E6B47; } .sh-sum .st-saved b { color: #8A5A00; }
.sh-in-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.sh-in { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: start; background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; padding: 8px; font: inherit; cursor: pointer; min-height: 90px; }
.sh-in:disabled { cursor: default; opacity: .7; } .sh-in:not(:disabled):hover { border-color: var(--gold); }
.sh-in.st-sent { border-color: #9DBBE3; box-shadow: 0 0 0 2px #E3EEFB; }
.sh-in-hd { display: flex; align-items: center; gap: 6px; } .sh-in-hd b { color: var(--navy); font-size: 13.5px; } .sh-in .sh-st { font-size: 10.5px; padding: 1px 7px; }
.sh-in img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.sh-in .sh-more { position: absolute; bottom: 14px; inset-inline-start: 14px; background: rgba(18,39,93,.85); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; border-radius: 8px; padding: 0 6px; }
.sh-in-empty { color: var(--muted); font-size: 12px; } .sh-in-note { color: #4A4F5C; font-size: 11.5px; }
.sh-dlg { border: 0; border-radius: 18px; padding: 16px; width: min(1000px, 96vw); max-height: 92vh; }
.sh-dlg::backdrop { background: rgba(18,39,93,.45); }
.sh-dlg-x { position: sticky; top: 0; float: inline-end; border: 0; background: #F3F1EA; border-radius: 50%; width: 34px; height: 34px; font-size: 22px; cursor: pointer; }
.sh-view-hd { font-size: 17px; color: var(--navy); margin-bottom: 6px; } .sh-view-hd small { display: block; color: var(--muted); font-size: 13px; }
.sh-view-note { background: #FFF8E7; border-radius: 10px; padding: 8px 12px; }
.sh-view-imgs { display: flex; flex-direction: column; gap: 10px; } .sh-view-imgs img { width: 100%; border-radius: 10px; border: 1px solid #ECE8DE; }
.ag-row input, .ag-row select { font: inherit; font-size: 14.5px; color: var(--ink); border: 1px solid #DEDBD2; border-radius: 10px; padding: 8px 10px; background: #fff; min-height: 42px; }
.ag-row select[name=period] { min-width: 80px; }

/* أي عنصر مخفي يبقى مخفيًا مهما كان نمطه (إصلاح: صندوق سراج الفارغ في الأجندة) */
[hidden] { display: none !important; }
/* الشريط العلوي: بطاقة الاسم بضعف العرض وبارتفاع البحث، والبحث أضيق قليلًا */
.tb2 .tb-search { max-width: 380px; }
.tb2 .me { min-width: 240px; height: 44px; box-sizing: border-box; justify-content: space-between; padding: 3px 14px 3px 4px; }
[dir="rtl"] .tb2 .me { padding: 3px 4px 3px 14px; }
.tb2 .me .av { width: 36px; height: 36px; }
@media (max-width: 980px) { .tb2 .me { min-width: 0; padding: 2px; } }
/* الاسم في وسط البطاقة، والدور بجانبه: «الاسم / الدور» (في العربية والإنكليزية) */
.tb2 .me-name { flex: 1; flex-direction: row; justify-content: center; align-items: baseline; gap: 5px; text-align: center; }
.tb2 .me-name small::before { content: '/'; margin-inline-end: 5px; color: #C9C5BA; font-weight: 400; }

/* زرّ الدليل في الشريط العلوي */
.help-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #DEDBD2; background: #FBFAF6; color: var(--navy); font-weight: 800; font-size: 14px; text-decoration: none; }
.help-btn:hover { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
@media (max-width: 980px) { .help-btn span { display: none; } .help-btn { width: 42px; padding: 0; justify-content: center; } }

/* دليل الاستخدام — على أسلوب كتيّب «بصمة» */
.hp-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.hp-side { position: sticky; top: calc(var(--top-h, 70px) + 10px); background: #fff; border: 1px solid #ECE8DE; border-radius: 18px; padding: 14px; max-height: calc(100vh - 110px); overflow: auto; }
.hp-side-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; } .hp-side-hd b { color: var(--navy); font-size: 17px; }
.hp-back { font-size: 12.5px; font-weight: 800; color: #B8862A; text-decoration: none; }
.hp-q { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid #DEDBD2; border-radius: 999px; padding: 9px 14px; margin-bottom: 10px; background: #FBFAF6; }
.hp-res { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-res a { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); } .hp-res a:hover { background: #F6F4EE; }
.hp-res b { display: block; color: var(--navy); font-size: 14px; } .hp-res small { color: var(--muted); font-size: 12px; line-height: 1.5; } .hp-none { color: var(--muted); padding: 8px; }
.hp-toc details { border-top: 1px solid #F0ECE2; } .hp-toc details:first-child { border-top: 0; }
.hp-toc summary { list-style: none; cursor: pointer; padding: 9px 4px; font-weight: 800; color: var(--navy); font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.hp-toc summary::-webkit-details-marker { display: none; }
.hp-chn { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.hp-toc ul { list-style: none; margin: 0 0 8px; padding: 0 32px 0 0; } [dir="ltr"] .hp-toc ul { padding: 0 0 0 32px; }
.hp-toc li a { display: block; padding: 5px 8px; border-radius: 8px; color: #4A4F5C; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.hp-toc li a:hover { background: #F6F4EE; color: var(--navy); }
.hp-toc li a[aria-current="page"] { background: var(--gold-tint); color: #7A5300; font-weight: 800; }
.hp-main { background: #fff; border: 1px solid #ECE8DE; border-radius: 18px; padding: 22px 28px 26px; min-width: 0; }
.hp-banner { background: #1F4E79; color: #fff; border-radius: 14px; padding: 16px 22px; margin-bottom: 18px; }
.hp-banner span { font-size: 13px; font-weight: 700; color: #F3D58E; } .hp-banner h1 { margin: 2px 0 0; font-size: 28px; color: #fff; }
.hp-h { color: #1F4E79; font-size: 22px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 3px solid var(--gold); }
.hp-body { font-size: 15.5px; line-height: 1.9; color: var(--ink); }
.hp-body p { margin: 0 0 12px; }
.hp-steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 14px; }
.hp-steps > li { counter-increment: st; position: relative; padding-inline-start: 44px; margin-bottom: 12px; }
.hp-steps > li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: #1F4E79; color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.hp-list { padding-inline-start: 22px; margin: 0 0 14px; } .hp-list li { margin-bottom: 8px; }
.hp-body b { color: #1A2B4A; }
.hp-body kbd { font-family: inherit; font-size: 13px; font-weight: 800; background: #EEF2F8; color: #1F4E79; border: 1px solid #D5DEEA; border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.hp-n { font-style: normal; display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 50%; background: #D93025; color: #fff; font-size: 12px; font-weight: 800; vertical-align: 1px; }
.hp-ok { color: #2E7D4F; font-weight: 800; }
.hp-tip, .hp-warn { border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14.5px; }
.hp-tip { background: #EEF6E8; border-inline-start: 4px solid #5BA27A; } .hp-tip::before { content: '💡 '; }
.hp-warn { background: #FFF4E5; border-inline-start: 4px solid #E0A33A; } .hp-warn::before { content: '⚠️ '; }
.hp-fig { margin: 6px 0 18px; text-align: center; }
.hp-fig img { max-width: 100%; border-radius: 12px; border: 1px solid #E3DED2; box-shadow: 0 6px 20px rgba(18,39,93,.08); }
.hp-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hp-legend span { display: inline-block; font-size: 12.5px; font-weight: 800; padding: 1px 10px; border-radius: 999px; margin: 2px; }
.hp-legend .st0 { background: #F1EFE8; color: #6B7080; } .hp-legend .st1 { background: #FFF3D6; color: #8A5A00; } .hp-legend .st2 { background: #FFE9C7; color: #8A5A00; } .hp-legend .st3 { background: #E3EEFB; color: #1F4E8C; } .hp-legend .st4 { background: #E3F1EA; color: #2E6B47; }
.hp-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 14px; border-top: 1px solid #F0ECE2; }
.hp-pager a { display: flex; flex-direction: column; text-decoration: none; color: var(--navy); font-weight: 800; padding: 8px 14px; border: 1px solid #ECE8DE; border-radius: 12px; max-width: 48%; }
.hp-pager a:hover { border-color: var(--gold); } .hp-pager small { color: var(--muted); font-weight: 700; } .hp-next { text-align: end; margin-inline-start: auto; }
@media (max-width: 900px) { .hp-wrap { grid-template-columns: 1fr; } .hp-side { position: static; max-height: none; } .hp-main { padding: 16px; } .hp-banner h1 { font-size: 22px; } }
@media print { .hp-side, .hp-pager { display: none !important; } .hp-wrap { display: block; } .hp-main { border: 0; padding: 0; } }

/* سراج: جواب من الدليل بخطوات مرقّمة */
.sj-msg.bot.guide { white-space: pre-line; line-height: 1.7; }

/* الحضور اليومي */
.at-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.at-chk { font-weight: 800; font-size: 13px; padding: 4px 12px; border-radius: 999px; background: #F1EFE8; color: #6B7080; } .at-chk.ok { background: #E3F1EA; color: #2E6B47; }
.at-legend { color: var(--muted); font-size: 13px; }
.at-roll { list-style: none; margin: 0 0 14px; padding: 0; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; overflow: hidden; }
.at-roll > li { border-bottom: 1px solid #F1EEE6; padding: 8px 12px; } .at-roll > li:last-child { border-bottom: 0; }
.at-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.at-n { color: var(--muted); font-size: 12px; min-width: 20px; }
.at-name { flex: 1; min-width: 150px; color: var(--ink); font-size: 15px; }
.at-flag { font-style: normal; background: #FDE8E6; color: #B42318; border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 800; }
.at-seg { display: inline-flex; border: 1px solid #DEDBD2; border-radius: 12px; overflow: hidden; }
.at-seg button { font: inherit; font-size: 13.5px; font-weight: 700; border: 0; background: #fff; color: #4A4F5C; padding: 8px 12px; cursor: pointer; min-height: 40px; }
.at-seg button + button { border-inline-start: 1px solid #ECE8DE; }
.at-seg button.on[data-st=present] { background: #E3F1EA; color: #2E6B47; }
.at-seg button.on[data-st=absent] { background: #B42318; color: #fff; }
.at-seg button.on[data-st=late] { background: #E0A33A; color: #fff; }
.at-seg button.on[data-st=leave] { background: #1F4E8C; color: #fff; }
.at-saved { font-size: 12px; min-width: 60px; color: var(--muted); } .at-saved.ok { color: #2E7D32; } .at-saved.bad { color: #B42318; font-weight: 700; }
.at-more { display: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 2px; padding-inline-start: 30px; }
.at-st-absent .at-more, .at-st-late .at-more, .at-st-leave .at-more { display: flex; }
.at-st-absent { background: #FFF6F5; } .at-st-late { background: #FFFAF0; } .at-st-leave { background: #F4F8FD; }
.at-more input[type=time], .at-reason { font: inherit; font-size: 14px; border: 1px solid #DEDBD2; border-radius: 10px; padding: 6px 8px; background: #fff; }
.at-reason { flex: 1; min-width: 180px; }
.at-x, .at-time { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: #4A4F5C; }
.at-time, .at-chips, .at-tl-late, .at-tl-leave { display: none; }
.at-st-late .at-time, .at-st-leave .at-time { display: inline-flex; } .at-st-late .at-tl-late, .at-st-leave .at-tl-leave { display: inline; }
.at-st-leave .at-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; } .at-st-leave .at-x { display: none; }
.at-chips button { font: inherit; font-size: 12.5px; border: 1px solid #C9D7EA; background: #fff; color: #1F4E8C; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.at-call { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; } .at-call a { font-size: 13px; color: #1F4E8C; text-decoration: none; background: #fff; border: 1px solid #DCE5F2; border-radius: 10px; padding: 3px 9px; }
.at-st-late .at-call, .at-st-leave .at-call { display: none; }
.at-done { justify-content: space-between; } .at-count { font-weight: 700; color: var(--navy); font-size: 14px; }
.at-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.at-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 12px 14px; text-decoration: none; color: inherit; border-inline-start: 5px solid #E0A33A; }
.at-card.done { border-inline-start-color: #5BA27A; } .at-card:hover { border-color: var(--gold); }
.at-card-hd { display: flex; align-items: center; gap: 8px; } .at-card-hd b { color: var(--navy); font-size: 16px; }
.at-card.done .sh-st { background: #E3F1EA; color: #2E6B47; }
.at-card-n { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); } .at-card-n b { font-size: 17px; }
.at-k-absent b, td.at-bad { color: #B42318; } .at-k-late b { color: #B8862A; } .at-k-leave b { color: #1F4E8C; }
td.at-bad { font-weight: 800; }
.at-today { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.at-tcls { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 10px 14px; }
.at-tcls h3 { margin: 0 0 6px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; } .at-tcls h3 a { color: var(--navy); } .at-tcls h3 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.at-tcls ul { list-style: none; margin: 0; padding: 0; } .at-tcls li { padding: 4px 0; border-top: 1px dashed #EEE; font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; }
.at-tcls li span { color: #4A4F5C; } .at-tcls li.at-k-absent b { color: #B42318; } .at-tcls li.at-k-late b { color: #8A5A00; } .at-tcls li.at-k-leave b { color: #1F4E8C; }
.at-unc { display: flex; flex-wrap: wrap; gap: 8px; } .at-unc a { display: flex; flex-direction: column; background: #FFF8E7; border: 1px solid #F0DDAE; border-radius: 12px; padding: 6px 12px; text-decoration: none; } .at-unc b { color: var(--navy); } .at-unc small { color: var(--muted); font-size: 11.5px; }
.at-who { font: inherit; border: 0; background: none; color: var(--navy); font-weight: 700; cursor: pointer; padding: 0; text-align: start; } .at-who:hover { text-decoration: underline; }
.at-tbl td, .at-tbl th { text-align: start; } .at-term-row td { background: #F3F1EA; font-weight: 800; color: var(--navy); }
tr.at-k-absent td:nth-child(2) { color: #B42318; } tr.at-k-late td:nth-child(2) { color: #8A5A00; } tr.at-k-leave td:nth-child(2) { color: #1F4E8C; }
.at-set { margin-top: 18px; background: #fff; border: 1px solid #ECE8DE; border-radius: 14px; padding: 10px 14px; } .at-set summary { cursor: pointer; font-weight: 800; color: var(--navy); }
@media (max-width: 640px) { .at-name { min-width: 0; flex: 1 1 50%; } .at-seg { width: 100%; order: 3; } .at-seg button { flex: 1; padding: 8px 4px; } .at-more { padding-inline-start: 0; } }
.at-tbl { width: 100%; } .at-tbl td, .at-tbl th { padding: 6px 10px; }
.at-tbl:not(.at-log) td:nth-child(n+3), .at-tbl:not(.at-log) th:nth-child(n+3) { text-align: center; width: 13%; }
.at-done { padding-inline-end: 90px; }

/* جرس التنبيهات */
.bl-wrap { position: relative; }
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #DEDBD2; background: #FBFAF6; color: var(--navy); border-radius: 999px; cursor: pointer; padding: 0; }
.bell-btn.has { border-color: #E8C77A; background: #FFF6E0; color: #8A5A00; }
.bell-btn.has svg { animation: bl-ring 1.2s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes bl-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.bell-btn b { position: absolute; top: -6px; inset-inline-end: -6px; background: #C0392B; color: #fff; font-size: 11px; line-height: 18px; min-width: 18px; padding: 0 4px; border-radius: 9px; text-align: center; }
.bl-pop { position: absolute; top: calc(100% + 8px); inset-inline-end: -60px; width: min(380px, 92vw); background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; box-shadow: 0 14px 40px rgba(18,39,93,.18); z-index: 1200; overflow: hidden; }
.bl-hd { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #F1EEE6; } .bl-hd b { color: var(--navy); }
.bl-hd button { font: inherit; font-size: 12.5px; border: 0; background: none; color: #1F4E8C; cursor: pointer; font-weight: 700; }
.bl-list, .bl-page { list-style: none; margin: 0; padding: 0; } .bl-list { max-height: 60vh; overflow: auto; }
.bl-list li a, .bl-page li a { display: grid; grid-template-columns: 12px 1fr; gap: 2px 10px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #F5F2EB; font-size: 13.5px; line-height: 1.5; }
.bl-list li a small, .bl-page li a small { grid-column: 2; color: var(--muted); font-size: 11.5px; }
.bl-list li.new a, .bl-page li.new a { background: #FFF9EC; font-weight: 700; }
.bl-list li a:hover, .bl-page li a:hover { background: #F6F4EE; }
.bl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: #9AA0AC; }
.bl-att { background: #B42318; } .bl-sheets { background: #2C5D8A; } .bl-note { background: #6B3FA0; } .bl-grades { background: #2E7D4F; } .bl-agenda { background: #B8862A; }
.bl-empty { padding: 16px; color: var(--muted); text-align: center; font-size: 13px; }
.bl-more { display: block; text-align: center; padding: 10px; font-weight: 700; font-size: 13px; color: var(--navy); background: #FBFAF6; text-decoration: none; }
.bl-page { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.bl-acts { margin-bottom: 10px; }
.bl-prefs { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.bl-prefs fieldset { border: 1px solid #F1EEE6; border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; } .bl-prefs legend { font-weight: 800; color: var(--navy); padding: 0 6px; }
.bl-prefs label { display: flex; align-items: center; gap: 8px; font-size: 14px; } .bl-prefs .btn { align-self: flex-start; }
.bl-toast .mt-ic { background: #FFF6E0; color: #8A5A00; }
@media (max-width: 980px) { .tb2 .bell-btn { width: 40px; height: 40px; } }
@media (max-width: 640px) { .bl-pop { position: fixed; top: 64px; inset-inline: 8px; width: auto; } }
@media print { .bl-wrap { display: none !important; } }

/* الشريط العلوي على الهواتف الضيقة: الأزرار أصغر قليلًا ليتّسع الجرس */
@media (max-width: 460px) {
  .tb2 .top-actions { gap: 4px; }
  .tb2 .bell-btn, .tb2 .mail-btn, .tb2 .home-btn, .tb2 .help-btn, .tb2 .tb-search { width: 34px !important; height: 34px !important; min-width: 0; }
  .tb2 .me .av { width: 32px; height: 32px; }
  .tb2 .brand img { height: 34px; width: auto; } .tb2 .brand-name { font-size: 14px; }
}
/* التقارير: الحضور، ولوحة الناظر */
.sx-k .sx-k-sub { display: block; color: var(--muted); font-size: 12px; }
.sx-k b.sx-bad, .sx-t td.sx-bad b { color: #B42318; }
td.sp-abs a { font-weight: 800; color: var(--navy); } td.sp-abs.at-bad a { color: #B42318; }

/* مكتبة التطبيقات */
.apx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-bottom: 14px; }
.apx-card { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.apx-card.off { opacity: .65; }
.apx-hd { display: flex; gap: 12px; align-items: center; } .apx-hd b { color: var(--navy); font-size: 16px; display: block; } .apx-hd small { color: var(--muted); font-size: 12.5px; }
.apx-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--tb); color: var(--ti); display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.apx-ic img { width: 30px; height: 30px; object-fit: contain; }
.apx-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.apx-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .apx-btns form { display: inline-flex; gap: 4px; margin: 0; }
.btn.danger { color: #B42318; border-color: #F1C9C5; }
.apx-form { display: flex; flex-direction: column; gap: 14px; }
.apx-sec { background: #fff; border: 1px solid #ECE8DE; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.apx-sec h3 { margin: 0; color: var(--navy); font-size: 16px; }
.apx-sec label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 700; color: #4A4F5C; }
.apx-sec input[type=text], .apx-sec input:not([type]), .apx-sec input[type=url], .apx-sec input[type=search], .apx-sec select { font: inherit; font-size: 14.5px; border: 1px solid #DEDBD2; border-radius: 10px; padding: 8px 10px; background: #fff; font-weight: 400; }
.apx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 700px) { .apx-row { grid-template-columns: 1fr; } }
.apx-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 700px) { .apx-kinds { grid-template-columns: 1fr; } }
.apx-kinds label { flex-direction: row; align-items: flex-start; gap: 10px; border: 1.5px solid #E5E1D6; border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.apx-kinds label:has(input:checked) { border-color: var(--gold); background: #FFFBF0; }
.apx-kinds span b { display: block; color: var(--navy); } .apx-kinds span small { font-weight: 400; color: var(--muted); }
.apx-drop { border: 2px dashed #D9CFB6; border-radius: 14px; padding: 16px; background: #FFFCF4; text-align: center; cursor: pointer; }
.apx-drop input { display: none; } .apx-drop span { font-size: 15px; color: #8A6A1F; }
.apx-lab { font-size: 13.5px; font-weight: 700; color: #4A4F5C; }
.apx-icons, .apx-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.apx-icons label, .apx-colors label { cursor: pointer; } .apx-icons input, .apx-colors input { position: absolute; opacity: 0; pointer-events: none; }
.apx-icons span { width: 42px; height: 42px; border: 1.5px solid #E5E1D6; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); background: #fff; }
.apx-icons input:checked + span { border-color: var(--gold); background: #FFF6E0; box-shadow: 0 0 0 2px #F3D58E; }
.apx-colors span { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; border: 2px solid transparent; }
.apx-colors input:checked + span { border-color: var(--navy); }
.apx-roles { display: flex; flex-wrap: wrap; gap: 6px 18px; } .apx-roles label { flex-direction: row; font-weight: 400; }
.apx-people { max-height: 220px; overflow: auto; border: 1px solid #F1EEE6; border-radius: 12px; padding: 8px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.apx-people label { flex-direction: row; align-items: center; font-weight: 400; gap: 6px; }
.apx-sec label.check { flex-direction: row; align-items: center; gap: 8px; } .apx-active { font-weight: 700 !important; }
.apx-imgnow img { width: 32px; height: 32px; object-fit: contain; }
.apx-acts { justify-content: flex-start; }
.tile-icon.has-img img { width: 30px; height: 30px; object-fit: contain; }
.apx-tip { margin-top: 6px; }
.inner .sx-filters { position: static; box-shadow: none; clip-path: none; }
/* إعدادات الصفحة الرئيسية */
.hm-grid { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 8px 12px; align-items: start; }
.hm-grid > b { color: var(--muted); font-size: 12.5px; }
.hm-grid > label { padding-top: 9px; }
.hm-grid input, .hm-grid textarea { font: inherit; font-size: 14.5px; border: 1px solid #DEDBD2; border-radius: 10px; padding: 8px 10px; background: #fff; width: 100%; box-sizing: border-box; }
@media (max-width: 760px) { .hm-grid { grid-template-columns: 1fr; } .hm-grid > b, .hm-grid > span { display: none; } }
.hm-news { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #F1EEE6; }
.hm-news b { display: block; color: var(--navy); } .hm-news.off { opacity: .55; }
.hm-hero-now { position: relative; max-width: 520px; border-radius: 14px; overflow: hidden; }
.hm-hero-now img { display: block; width: 100%; height: 180px; object-fit: cover; }
.hm-hero-now::after { content: ''; position: absolute; inset: 0; background: rgba(11,26,66,var(--dim)); }
.hm-hero-now span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 24px; z-index: 1; }

/* ═════ بوابة أولياء الأمور ═════ */
.pp-kids { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 16px; }
.pp-kid { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff; border: 1.5px solid #E6E1D4; color: var(--navy); text-decoration: none; font-weight: 800; }
.pp-kid i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #EEF1F8; color: var(--navy); }
.pp-kid small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.pp-kid.on { border-color: var(--gold); background: var(--gold-tint); }
.pp-kid.on i { background: var(--navy); color: #fff; }
.pp-child { background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 6px 24px rgba(18,39,93,.06); }
.pp-child-hd { display: flex; align-items: center; gap: 14px; }
.pp-child-hd .av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 22px; font-weight: 800; background: var(--navy); color: #fff; }
.pp-child-hd b { display: block; font-size: 20px; color: var(--navy); }
.pp-child-hd small { color: var(--muted); font-size: 14px; }
.pp-soon { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pp-soon span { background: #F4F2EC; border-radius: 10px; padding: 8px 14px; font-weight: 700; color: #6B7080; }
.pp-head { padding: 18px 0 6px; }
.pp-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 14px; margin-bottom: 6px; scrollbar-width: none; }
.pp-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid #E6E1D4; color: var(--navy); text-decoration: none; font-weight: 800; font-size: 15px; }
.pp-tabs a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pp-tabs a i { font-style: normal; font-size: 12px; background: var(--gold); color: var(--navy); border-radius: 999px; padding: 0 7px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pp-tile { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 18px; padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: 0 6px 22px rgba(18,39,93,.06); border-top: 4px solid var(--gold); }
.pp-tile .k { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.pp-tile b { font-size: 20px; color: var(--navy); }
.pp-tile b.muted { font-size: 16px; color: #8A8E9A; }
.pp-tile small { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.pp-stats .pp-tile b { font-size: 28px; }
.st-absent { color: #A32D2D !important; font-weight: 800; } .st-late { color: #9A6200 !important; font-weight: 800; } .st-leave { color: #3B5BA9 !important; font-weight: 800; } .st-present { color: #237A4B !important; }
.pp-gr summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.pp-gr summary::-webkit-details-marker { display: none; }
.pp-gr summary::after { content: '▾'; color: var(--muted); }
.pp-gr[open] summary::after { content: '▴'; }
.pp-gr .pp-avg { margin-inline-start: auto; font-weight: 800; color: var(--navy); background: var(--gold-tint); border-radius: 999px; padding: 2px 12px; }
.pp-gr header { display: flex; justify-content: flex-end; margin: 8px 0; }
.pp-gr header:has(a[hidden]) { display: none; }
@media (max-width: 600px) { .pp-stats { grid-template-columns: 1fr 1fr; } .pp-stats .pp-tile { padding: 12px 14px; } }
.pp-gr h2 { margin: 0; font-size: 18px; color: var(--navy); }
.pp-gr .num { text-align: center; white-space: nowrap; width: 9em; }
.pp-gr td.fail { color: #A32D2D; font-weight: 800; }
.pp-gr tfoot th { background: #F8F6F0; }
.pp-day h2 { font-size: 16px; color: var(--navy); margin: 18px 0 8px; } .pp-day h2 small { color: var(--muted); font-weight: 600; }
.pp-ag, .pp-note { background: #fff; border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; border-inline-start: 4px solid #D9D5C8; display: flex; flex-direction: column; gap: 4px; }
.pp-ag.k-exam { border-inline-start-color: #C0392B; } .pp-ag.k-homework { border-inline-start-color: var(--gold); }
.pp-ag b { color: var(--navy); font-size: 16px; } .pp-ag p, .pp-note p { margin: 0; line-height: 1.7; }
.pp-ag .badge, .pp-note .badge { align-self: flex-start; }
.pp-file { align-self: flex-start; font-weight: 700; color: var(--navy); }
.pp-note header { display: flex; justify-content: space-between; align-items: center; }
.pp-note.cat-praise { border-inline-start-color: #2E9E5B; } .pp-note.cat-behavior { border-inline-start-color: #C0392B; }
@media (max-width: 600px) { .pp-tabs { gap: 4px; } .pp-tabs a { padding: 8px 11px; font-size: 13.5px; } }
.pp-notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; text-decoration: none; color: var(--ink, #1D2433); border-inline-start: 4px solid #D9D5C8; }
.pp-notice.unread { border-inline-start-color: var(--gold); background: #FFFBF1; font-weight: 700; }
.pp-notice.k-att_absent { border-inline-start-color: #C0392B; }
.pp-notice small { color: var(--muted); white-space: nowrap; font-weight: 400; }
.pw-box .kid { margin-inline-end: 6px; }
.pw-cred { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0; }
.pw-cred div { background: #F8F6F0; border-radius: 12px; padding: 8px 14px; }
.pw-cred dt { color: var(--muted); font-size: 13px; } .pw-cred dd { margin: 0; font-family: Consolas, monospace; font-size: 20px; font-weight: 700; }
.pw-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.btn.wa { background: #25D366; border-color: #25D366; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.btn.wa:hover { background: #1EBE5A; }
