/* ألوان الموقع: غيّرها من هنا فتتغير في كل الصفحات */
:root {
  --bg: #f4f6fa; --surface: #ffffff; --ink: #15202e; --muted: #5b6778; --line: #c9d2de;
  --navy: #12355b; --navy-ink: #ffffff; --amber: #e8a317; --tint: #e6edf6; --err: #b3261e; --ok: #1f7a4d;
}
/* ألوان الوضع الليلي (تُطبّق تلقائياً إن كان جهاز المستخدم على الوضع الداكن) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1522; --surface: #142133; --ink: #e8eef6; --muted: #9fb0c5; --line: #2f4360;
    --navy: #7fb2ea; --navy-ink: #0c1522; --amber: #f0b642; --tint: #1a2c44; --err: #ff8a80; --ok: #6fd3a0;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1522; --surface: #142133; --ink: #e8eef6; --muted: #9fb0c5; --line: #2f4360;
  --navy: #7fb2ea; --navy-ink: #0c1522; --amber: #f0b642; --tint: #1a2c44; --err: #ff8a80; --ok: #6fd3a0;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 140px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Noto Sans Arabic', 'Segoe UI', Arial, sans-serif;
  font-size: 16px; line-height: 1.7;
}
a { color: var(--navy); }

/* ── الشريط العلوي مع مؤشر "الموجة" ── */
.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: var(--navy-ink); padding: 10px 16px; }
.top-in { max-width: 860px; margin: auto; display: flex; flex-direction: column; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top h1 { font-size: 18px; font-weight: 800; margin: 0; line-height: 1.4; }.top a { color: inherit; font-size: 14px; text-decoration: none; opacity: .9; white-space: nowrap; }
.top a:hover { text-decoration: underline; }
.dial { position: relative; height: 26px; margin-top: 6px; }
.ticks {
  position: absolute; top: 8px; right: 0; left: 0; height: 14px; opacity: .55;
  background: repeating-linear-gradient(to left, currentColor 0 1px, transparent 1px 12px);
  -webkit-mask: linear-gradient(to top, #000 60%, transparent); mask: linear-gradient(to top, #000 60%, transparent);
}
.ticks.big { background: repeating-linear-gradient(to left, currentColor 0 2px, transparent 2px 60px); opacity: .9; height: 20px; top: 4px; }
.needle { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--amber); border-radius: 2px; right: 0; transition: right .35s ease; box-shadow: 0 0 8px var(--amber); }
.readout { font-size: 13px; margin-top: 2px; display: flex; justify-content: space-between; opacity: .95; }

/* ── المحتوى ── */
.wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.wrap.wide { max-width: 1400px; } /* صفحة الإدارة: جدول بأعمدة كثيرة */
/* شعار الجمعية بجانب النبذة (وفوقها على الجوال) */
/* زر واتساب: أخضر داكن بنص أبيض (تباين واضح للقراءة) */
.btn.wa { background: #1a7f45; color: #fff; }
.btn.wa:hover { background: #156b3a; }
.wa-icon { width: 22px; height: 22px; flex: none; }
.wa-contact { margin: 36px 0 0; padding: 20px 16px; text-align: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.wa-contact h3 { margin: 0 0 6px; font-size: 20px; color: var(--navy); }
.wa-contact p { margin: 0 0 14px; color: var(--muted); }

/* موعد المتقدم في رسالة النجاح */
.success .slot { margin: 10px auto 0; padding: 8px 14px; border: 2px solid var(--navy); border-radius: 8px; font-weight: 700; color: var(--navy); display: inline-block; }

/* مكان الاختبار ورابط الخريطة في رسالة النجاح */
.success .place { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; margin: 10px 0 0; }

/* دعوة الانضمام إلى مجموعة واتساب الاختبار في رسالة النجاح */
.wa-group { margin: 14px 0 0; padding: 14px; border: 2px solid #1a7f45; border-radius: 10px; background: #eef8f1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wa-group-msg { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.8; color: #14532d; }
.wa-qr { display: block; width: 180px; height: 180px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }

/* رسالة «اكتمل التسجيل» بدل النموذج */
.closed { text-align: center; padding: 32px 16px; border: 2px solid var(--err); border-radius: 12px; background: var(--surface); }
.closed-icon { font-size: 40px; line-height: 1; }
.closed h4 { margin: 10px 0 6px; font-size: 26px; font-weight: 800; color: var(--err); }
.closed p { margin: 0; color: var(--muted); font-size: 16px; }
.reg-closed .top .dial, .reg-closed .top .readout, .reg-closed .top-row a { display: none; }

/* تنبيه مهم أعلى الصفحة */
.notice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 16px; border-radius: 10px;
          border: 2px solid var(--amber); border-right-width: 8px; background: var(--surface);
          background: color-mix(in srgb, var(--amber) 14%, var(--surface)); }
.notice-icon { font-size: 26px; line-height: 1.3; flex: none; }
.notice-title { display: block; font-size: 18px; font-weight: 800; color: var(--navy); }
.notice p { margin: 4px 0 0; font-size: 17px; line-height: 1.8; }
.notice p strong { color: var(--navy); }
.nowrap { white-space: nowrap; } /* لا يُقسم التاريخ على سطرين */

.hero { display: flex; align-items: center; gap: 24px; }
.hero-logo { flex: none; height: 180px; width: auto; background: #fff; border-radius: 10px; padding: 8px; box-sizing: content-box; }
.hero h2 { font-size: 26px; line-height: 1.45; margin: 8px 0 10px; color: var(--navy); }
.lead { color: var(--muted); font-size: 17px; margin: 0; }
.lead + .lead { margin-top: 10px; }
.sec {
  display: block; padding: 8px 14px; background: var(--tint); border-right: 5px solid var(--navy);
  color: var(--navy); font-weight: 800; font-size: 18px; margin: 32px 0 14px;
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 0; }
.fact { background: var(--surface); border: 1.5px solid var(--line); border-top: 4px solid var(--amber); border-radius: 8px; padding: 12px 14px; }
.fact .k { display: block; font-size: 13px; color: var(--muted); }
.fact .v { display: block; font-weight: 800; font-size: 17px; }
.fact .s { display: block; font-size: 14px; color: var(--muted); }
.learn { margin: 0; padding-right: 20px; }
.learn li { margin-bottom: 4px; }
/* قائمة الشروط داخل إطار مميّز */
.conditions { background: var(--surface); border: 1.5px solid var(--line); border-right: 5px solid var(--amber); border-radius: 8px; padding: 12px 36px 12px 16px; }
.conditions li { margin-bottom: 6px; }
.conditions li:last-child { margin-bottom: 0; }
.conditions li::marker { color: var(--navy); font-weight: 800; }
/* الشروط العامة في نهاية النموذج */
.terms { margin-top: 26px; }
.terms .subsec { margin-bottom: 12px; }
.terms-notes-title { margin: 16px 0 6px; color: var(--navy); font-size: 16px; font-weight: 800; }
.terms-notes { color: var(--muted); font-size: 15px; }
.terms-notes li { margin-bottom: 6px; }
/* مربع الموافقة على الشروط */
.agree {
  display: flex; align-items: center; gap: 12px; min-height: 52px; margin-top: 16px; padding: 10px 14px;
  background: var(--surface); border: 1.5px solid var(--navy); border-radius: 8px; font-weight: 700; cursor: pointer;
}
.agree input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--navy); cursor: pointer; }
.bad .agree { border-color: var(--err); }
.agree .req::after { content: "\00a0*"; } /* مسافة لا تنكسر: النجمة تبقى ملاصقة لآخر كلمة */

/* ── النموذج ── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.full { grid-column: 1 / -1; }
/* مربع رفع الصورة (حقل الملف الحقيقي مخفي، والمربع كله قابل للضغط) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 140px; padding: 12px; border: 2px dashed var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted); text-align: center; cursor: pointer;
}
.upload:hover { border-color: var(--navy); }
.f:focus-within .upload { outline: 3px solid var(--amber); outline-offset: 1px; }
.upload.has-image { border-style: solid; border-color: var(--ok); color: var(--ok); }
.upload-preview { max-width: 100%; max-height: 180px; border-radius: 6px; }
.upload-portrait { max-width: 260px; } /* مربع الصورة الشخصية أضيق (صورة طولية) */
.bad .upload { border-color: var(--err); }
.subsec { grid-column: 1 / -1; margin: 12px 0 0; padding-bottom: 6px; border-bottom: 1.5px solid var(--line); color: var(--navy); font-size: 17px; font-weight: 800; }
.f { display: block; }
.l { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.req::after { content: " *"; color: var(--err); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search], input[type=date], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 6px; padding: 10px 12px; min-height: 46px;
}
input:focus, select:focus, .opt input:focus-visible + span, button:focus-visible, a:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.ltr { direction: ltr; text-align: right; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: inline-block; padding: 9px 22px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; min-height: 44px; }
.opt input:checked + span { background: var(--navy); color: var(--navy-ink); border-color: var(--navy); font-weight: 700; }
.hint { font-size: 13px; color: var(--muted); margin-top: 3px; }
.err { color: var(--err); font-size: 13.5px; margin-top: 3px; font-weight: 500; min-height: 0; }
.bad input[type=text], .bad input[type=tel], .bad input[type=email], .bad input[type=date], .bad select { border-color: var(--err); }
.bad .opt span { border-color: var(--err); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 800; border: 0; border-radius: 6px; padding: 12px 26px; min-height: 48px;
  cursor: pointer; background: var(--navy); color: var(--navy-ink); text-decoration: none;
}
.btn.alt { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn.small { padding: 8px 16px; min-height: 40px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: wait; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.alert { padding: 10px 14px; border-radius: 6px; border: 1.5px solid var(--err); color: var(--err); background: var(--surface); margin-top: 16px; font-weight: 500; }

/* ── رسالة نجاح التسجيل ── */
.success { background: var(--surface); border: 1.5px solid var(--ok); border-radius: 8px; padding: 18px; }
.stamp { border: 2px solid var(--ok); color: var(--ok); display: inline-block; padding: 4px 14px; border-radius: 6px; font-weight: 800; margin-bottom: 8px; }
.ref { font-size: 28px; font-weight: 800; color: var(--navy); }

.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 20px 16px 30px; border-top: 1px solid var(--line); }

/* ── صفحة الدخول ── */
.login-card { max-width: 400px; margin: 48px auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 24px; }
.login-card h2 { margin: 0 0 14px; color: var(--navy); font-size: 22px; text-align: center; }
/* خلفية بيضاء حول الشعار حتى يبدو جيداً في الوضع الليلي أيضاً */
.login-logo { display: block; width: auto; height: 160px; margin: 0 auto 12px; background: #fff; border-radius: 8px; padding: 6px; box-sizing: content-box; }

/* ── صفحة الإدارة ── */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar .tools { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stats .fact .v { font-size: 26px; }
.search { max-width: 340px; }
.table-wrap { background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
table.list td bdi { white-space: nowrap; } /* الأرقام لا تنكسر على سطرين */
table.list td bdi.email { white-space: normal; } /* البريد ينكسر بعد @ فقط عند الحاجة */
table.list td:nth-child(2) { min-width: 7em; } /* الاسم: عرض كافٍ لكلمتين قبل أن ينزل لسطر جديد */
table.list th { background: var(--tint); color: var(--navy); font-weight: 800; }
table.list tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line); color: var(--muted); }
.badge.yes { border-color: var(--ok); color: var(--ok); }
.badge.warn { border-color: var(--err); color: var(--err); }
/* صور البطاقة المصغّرة في صفحة الإدارة */
.id-thumbs { display: inline-flex; gap: 6px; }
.exam-slot { white-space: nowrap; font-size: 14px; }

/* شريط التنقل في صفحات الإدارة */
.admin-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 16px;
             padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user form { margin: 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-links a { padding: 6px 10px; border-radius: 6px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav-links a:hover { background: var(--tint); }
.nav-links a[aria-current="page"] { background: var(--navy); color: var(--navy-ink); }

/* حالة الطلب وسداد الرسوم */
.badge.st-new { border-color: var(--line); color: var(--muted); }
.badge.st-ok { border-color: var(--ok); color: var(--ok); }
.badge.st-missing { border-color: var(--amber); color: var(--ink); }
.badge.st-rejected { border-color: var(--err); color: var(--err); }
.last-edit { font-size: 13px; color: var(--muted); }

/* صفحات الإدارة الإضافية: بطاقات وأقسام */
.card { border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); padding: 16px; margin: 0 0 16px; }
.card h3 { margin: 0 0 12px; font-size: 18px; color: var(--navy); }
.card .grid { margin: 0; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { border-top: 1px solid var(--line); padding: 10px 0; }
.history li:first-child { border-top: 0; padding-top: 0; }
.history .meta { font-size: 13px; color: var(--muted); }
.history .chg { margin: 4px 0 0; font-size: 15px; }
.history del { color: var(--err); }
.history ins { color: var(--ok); text-decoration: none; font-weight: 700; }
.saved { color: var(--ok); font-weight: 700; }
.app-summary { display: flex; gap: 16px; align-items: flex-start; }
.app-summary h3 { margin: 0 0 4px; }
.app-summary p { margin: 4px 0; }
.app-photo { width: 96px; height: 120px; object-fit: cover; border: 1.5px solid var(--line); border-radius: 6px; flex: none; background: var(--tint); }
.btn.danger { color: #fff; }
@media (max-width: 560px) { .app-summary { flex-direction: column; align-items: center; text-align: center; } .app-summary .row-actions { justify-content: center; } }
textarea { font: inherit; width: 100%; min-height: 90px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-sizing: border-box; }

/* لوحة الإدارة: حالة التسجيل وزر فتحه/إغلاقه */
.reg-status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
              margin: 0 0 14px; padding: 12px 16px; border-radius: 8px; border: 2px solid var(--ok); background: var(--surface); }
.reg-status strong { display: block; font-size: 17px; color: var(--ok); }
.reg-status .hint { display: block; margin: 0; }
.reg-status.is-closed { border-color: var(--err); }
.reg-status.is-closed strong { color: var(--err); }
.btn.danger { background: var(--err); border-color: var(--err); }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn { white-space: nowrap; }
.id-thumbs img { display: block; width: 64px; height: 42px; object-fit: cover; border: 1.5px solid var(--line); border-radius: 4px; background: #fff; }
.id-thumbs img.portrait { width: 42px; } /* الصورة الشخصية طولية */
.id-thumbs a:hover img { border-color: var(--navy); }
.att { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.att-save { font-size: 12px; font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; padding: 2px 4px; }
.att-save:hover { text-decoration: underline; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* ── الشاشات الصغيرة (الجوال) ── */
@media (max-width: 640px) {
  .grid, .facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stats .fact { padding: 8px 10px; }
  .stats .fact .v { font-size: 20px; }
  .hero { flex-direction: column; gap: 12px; text-align: center; }
  .hero-logo { height: 150px; }
  .hero h2 { font-size: 22px; }
  .top h1 { font-size: 16px; }
  .search { max-width: none; width: 100%; }
  .toolbar > * { width: 100%; }
}

/* ── صفحة الإدارة: عرض المسجلين كبطاقات (بطاقة عمودية لكل مسجل) ── */
/* هذا هو العرض الافتراضي على كل الشاشات. يضيف admin.js الصنف cards، ويُزيله فقط إن اختار المستخدم «عرض كجدول» على شاشة عريضة. */
/* (بطاقة واحدة في كل صف على الجوال، واثنتان على التابلت، وثلاث أو أربع على اللابتوب والشاشة الكبيرة) */
.table-wrap.cards { background: transparent; border: 0; overflow: visible; }
.cards table.list thead { display: none; }
.cards table.list, .cards table.list tr, .cards table.list td { display: block; width: 100%; }
.cards table.list tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.cards table.list tr { background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 0; display: flex; flex-direction: column; }
.cards table.list td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 5px 14px; }
/* النصوص الطويلة (مثل البريد) تنكسر داخل البطاقة بدل أن تخرج منها */
.cards table.list td, .cards table.list td bdi { white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.cards table.list td:nth-child(2) { min-width: 0; }
.cards table.list td::before { content: attr(data-label); color: var(--muted); font-size: 13px; flex: none; }
/* رأس البطاقة: الاسم بخط أكبر، ثم الرقم والحالة */
.cards table.list td.c-name { order: -3; font-size: 17px; font-weight: 800; color: var(--navy); padding-top: 8px; }
.cards table.list td.c-id { order: -2; }
.cards table.list td.c-status { order: -1; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
/* المرفقات والموعد والأزرار في أسفل البطاقة، مفصولة بخط */
.cards table.list td.c-att { align-items: center; }
.cards table.list td.c-actions { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; display: block; }
.cards table.list td.c-actions::before { display: none; }
.cards table.list td.c-actions .row-actions { width: 100%; justify-content: center; }

/* جداول صفحتي «الحسابات» و«سجل العمليات» (أعمدة قليلة): جدول على الشاشة العريضة، وبطاقات على الجوال والتابلت */
@media (max-width: 1300px) {
  .table-wrap { background: transparent; border: 0; overflow: visible; }
  table.list thead { display: none; }
  table.list, table.list tr, table.list td { display: block; width: 100%; }
  table.list tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
  table.list tr { background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 0; }
  table.list td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 5px 12px; }
  table.list td, table.list td bdi { white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
  table.list td::before { content: attr(data-label); color: var(--muted); font-size: 13px; flex: none; }
}

/* ── الجوال بالوضع الأفقي (شاشة قصيرة): الشريط العلوي لا يبقى ثابتاً حتى لا يغطي الحقول ── */
@media (max-height: 500px) and (orientation: landscape) {
  .top { position: static; }
  html { scroll-padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .needle { transition: none; } }

/* ── الطباعة وحفظ PDF ── */
@media print {
  @page { size: A4; margin: 12mm; }
  /* طباعة الألوان والخلفيات كما هي (المتصفح يحذفها عادة عند الطباعة) */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* الطباعة بالألوان الفاتحة دائماً حتى لو كان الجهاز على الوضع الليلي */
  :root {
    --bg: #ffffff; --surface: #ffffff; --ink: #15202e; --muted: #5b6778; --line: #c9d2de;
    --navy: #12355b; --navy-ink: #ffffff; --amber: #e8a317; --tint: #e6edf6; --err: #b3261e; --ok: #1f7a4d;
  }
  body { background: #fff; font-size: 14px; }
  .top { position: static; }
  .dial, .readout, .top a { display: none; } /* مؤشر التقدم ورابط «سجّل الآن» لا معنى لهما على الورق */
  .wrap { max-width: none; padding: 12px 0 0; }
  .sec, .subsec, .terms-notes-title { break-after: avoid; }
  .fact, .conditions li, .terms-notes li, .agree, .login-card, .upload { break-inside: avoid; }
  .grid { display: block; } /* في الطباعة: الحقول تحت بعضها حتى تتوزع على الصفحات بلا فراغات كبيرة */
  .grid > * { margin-bottom: 12px; }
  .grid > .f { break-inside: avoid; } /* عنوان الحقل يبقى مع خانته في نفس الصفحة */
  .upload-portrait { max-width: 200px; }
  .actions, .alert, .foot { display: none; } /* الأزرار والروابط لا تعمل على الورق */
  input:focus, select:focus, .f:focus-within .upload { outline: none; }
  input { caret-color: transparent; } /* إخفاء مؤشر الكتابة */
}
