/* Lumax — مكوّنات النمط C «طبقات» (W9.1)
   كل القواعد تحت html[data-ui="c"] فلا تتغيّر الواجهة السابقة عند إيقاف الإعداد ui.c.
   الألوان كلها متغيّرات (app.css: الفاتح، والداكن المضبوط يدوياً)، لذلك لا يمرّ هذا الملف على dark-css.js.
   المرجع: reports/study-2026-11-20/redesign/pattern-c-full.html (v3) — والتوثيق المختصر: C-COMPONENTS.md */

/* ═════════ 1. الأساس ═════════ */
html[data-ui="c"] body { font-family: var(--font-c); font-size: var(--fs-5); line-height: 1.55; background: var(--bg); color: var(--ink); }
html[data-ui="c"] h1, html[data-ui="c"] h2, html[data-ui="c"] h3, html[data-ui="c"] h4 { font-weight: 600; }
html[data-ui="c"] .num, html[data-ui="c"] .c-num { font-variant-numeric: tabular-nums; }
html[data-ui="c"] :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
html[data-ui="c"].c-locked { overflow: hidden; } /* html وحده — body بـ overflow:hidden يصير صندوق تمرير فيختفي الشريط العلوي الملتصق */
html[data-ui="c"] .c-hide { display: none !important; }

/* ═════════ 2. لمسات C على مكوّنات الواجهة الحالية (البنية لا تتغيّر) ═════════ */
html[data-ui="c"] .card { border: 0; border-radius: var(--r-card); box-shadow: var(--sh); background: var(--surface); }
html[data-ui="c"] .card-head { border-bottom-color: var(--line2); }
html[data-ui="c"] .card-head h3 { font-size: var(--fs-4); font-weight: 600; }
html[data-ui="c"] .btn { border-radius: var(--r-pill); font-weight: 600; }
html[data-ui="c"] .btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
html[data-ui="c"] .btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
/* QA: بوابة العميل والعارض كانا يفرضان نصاً داكناً على الزر الذهبي — في الداكن يصبح فاتحاً على ذهبي فاتح (2:1) */
html[data-ui="c"] body.cp-body .btn-primary, html[data-ui="c"] .cq .btn-primary { color: var(--on-brand); }
html[data-ui="c"] .input, html[data-ui="c"] select.input, html[data-ui="c"] textarea.input { border-radius: 14px; border-color: var(--line); }
html[data-ui="c"] .input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
html[data-ui="c"] .modal { border-radius: var(--r-sheet); box-shadow: var(--sh-lg); }
html[data-ui="c"] .page-head h2 { font-size: var(--fs-2); font-weight: 600; letter-spacing: 0; }
html[data-ui="c"] .page-head.c-ph-empty, html[data-ui="c"] .page-head h2.dup-title, html[data-ui="c"] main h1.dup-title, html[data-ui="c"] main h2.dup-title { display: none; }
html[data-ui="c"] main div:has(> .dup-title:only-child), html[data-ui="c"] main header:has(> .dup-title:only-child) { display: none; }
html[data-ui="c"] .page-head:has(> div:first-child > h2.dup-title:only-child) > div:first-child { display: none; }
html[data-ui="c"] .seg { border-radius: var(--r-pill); }
html[data-ui="c"] .seg button { border-radius: var(--r-pill); }
html[data-ui="c"] .stat { border-top: 0; border-radius: var(--r-card); }
html[data-ui="c"] .table th { font-weight: 500; color: var(--muted); }
html[data-ui="c"] .state .ic { border-radius: 28px; background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .dropdown { border: 0; border-radius: var(--r-card); box-shadow: var(--sh-lg); }
/* الجرس: غير المقروء بلون العلامة الخفيف (كان بنفسجياً رمادياً #f8f8ff من النمط القديم) */
html[data-ui="c"] .dropdown .unread { background: var(--brand-tint); }
html[data-ui="c"] .dropdown .list li { border-radius: 0; }
/* ⌘K: حقل البحث بلا إطار مستطيل (حلقة التركيز كانت مربعة الزوايا داخل لوحة مستديرة) */
html[data-ui="c"] .qs-in { padding: 14px 18px; }
html[data-ui="c"] .qs-in input, html[data-ui="c"] .qs-in input:focus, html[data-ui="c"] .qs-in input:focus-visible { outline: 0; border: 0; box-shadow: none; background: transparent; font: 400 var(--fs-5) var(--font-c); height: 40px; }
html[data-ui="c"] .qs:focus-within .qs-in { box-shadow: inset 0 -2px 0 var(--brand); }
html[data-ui="c"] .qs { border-radius: var(--r-card); }

/* ═════════ 3. الهيكل: الدوك العائم + الشريط العلوي + زر «جديد» (الكمبيوتر) ═════════ */
html[data-ui="c"] .c-dock {
  position: fixed; top: var(--dock-gap); bottom: var(--dock-gap); inset-inline-start: var(--dock-gap); width: var(--dock-w); z-index: 40;
  background: var(--surface); border: 0; border-radius: var(--r-sheet); box-shadow: var(--sh); transform: none !important;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 14px; overflow-y: auto; scrollbar-width: none;
}
html[data-ui="c"] .c-dock::-webkit-scrollbar { display: none; }
html[data-ui="c"] .c-dock-logo { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; flex: none; }
html[data-ui="c"] .c-dock-logo img { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; }
/* طلب المالك 2026-11-22: شعار أكبر وأيقونات أصغر — علامة Lumax الذهبية (mark-gold.svg، بلا هوامش icon.svg) بعرض 64px أعلى الدوك */
html[data-ui="c"] .c-dock-logo:has(.c-dock-mk) { width: 76px; height: 50px; }
html[data-ui="c"] .c-dock-logo img.c-dock-mk { width: 64px; height: 46px; border-radius: 0; }
html[data-ui="c"] .c-dock-nav { flex: none; overflow: visible; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
html[data-ui="c"] .c-dock-it {
  width: 76px; min-height: 64px; padding: 10px 0 8px; border: 0; border-radius: 20px; background: none; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; cursor: pointer;
  font: 500 var(--fs-6)/1.3 var(--font-c); color: var(--muted); text-align: center; text-decoration: none !important;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
html[data-ui="c"] .c-dock-it svg { width: 20px; height: 20px; color: currentColor; flex: none; }
html[data-ui="c"] .c-dock-it .lb { max-width: 72px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
html[data-ui="c"] .c-dock-it:hover { background: var(--sunk); color: var(--ink); }
html[data-ui="c"] .c-dock-it.active, html[data-ui="c"] .c-dock-it.on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
html[data-ui="c"] .c-dock-it .c-bd, html[data-ui="c"] .c-dock-it .ndot { position: absolute; top: 4px; inset-inline-start: 46px; margin: 0; border: 2px solid var(--surface); }
html[data-ui="c"] .c-dock-it .c-bd + .ndot { display: none; }
/* QA: نقطة «إشعار جديد» (ndot من core.js) داخل الدوك كانت بلا شكل (نص مائل صغير فوق الأيقونة) — نفس شارة c-bd */
html[data-ui="c"] .c-dock-it .ndot { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d92d20; color: #fff; font: 600 12px/16px var(--font-c); font-style: normal; text-align: center; display: inline-block; }
html[data-ui="c"] .c-dock-it .ndot[hidden] { display: none; }
html[data-ui="c"] .c-dock-sp { flex: 1; min-height: 8px; }
html[data-ui="c"] .c-dock-me { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; }
html[data-ui="c"] .c-dock-me .avatar, html[data-ui="c"] .c-me .avatar { width: 44px; height: 44px; font-size: 15px; }
html[data-ui="c"] .shell .main { margin-inline-start: calc(var(--dock-w) + var(--dock-gap) * 2); }
/* القاعدة القديمة «الشريط الجانبي أكبر لغير الإدارة» (app.css: ‎.shell:not([data-role=admin]) .sidebar/.main‎ مع !important) تكسر عرض الدوك لكل الأدوار غير المالك */
@media (min-width: 761px) {
  html[data-ui="c"] .shell:not([data-role=admin]) > .sidebar.c-dock, html[data-ui="c"] .shell:not([data-role=admin]) .c-dock { width: var(--dock-w); }
  /* «جديد» والشعار بالحجم نفسه لكل الأدوار: الإدارة كانت بمقياس 78% القديم (‎.sidebar > * { zoom }‎) فصار «جديد» 50px عند المالك و64px عند غيره */
  html[data-ui="c"] .c-dock > * { zoom: 1; }
  html[data-ui="c"] .shell .main { margin-inline-start: calc(var(--dock-w) + var(--dock-gap) * 2) !important; }
}
/* ═ الطبقات اللاصقة — نظام واحد لكل الصفحات ═
   1) الشريط العلوي: لاصق أعلى الصفحة (z 30)؛ ارتفاعه الفعلي في --c-top-h (يقيسه core.js، والقيمة هنا احتياط).
   2) حبّات القسم (الكمبيوتر فقط): لاصقة تحت الشريط مباشرة (top: --c-top-h، z 29) وبخلفيته نفسها، فلا تنزلق تحته ولا يظهر المحتوى خلفها؛
      ارتفاعها في --c-hub-h (صفر على الهاتف حيث تمرّ مع الصفحة، أو بلا حبّات؛ يقرّره :has والقياس الفعلي في --c-hub-real).
   3) أي عنصر لاصق داخل الصفحة (لوحة جانبية، ملخّص، رأس مجموعة) يبدأ تحت الرأس: top: var(--c-stick-top) — لا أرقام ثابتة مثل 16px.
   4) أسفل الهاتف: الشريط السفلي (z 40) — الأشرطة اللاصقة السفلية تقف فوقه.
   --topbar-h القديم يساوي ارتفاع الرأس كاملاً حتى تصحّ القواعد القديمة التي تعتمد عليه (تبويبات الإعدادات، الملخّصات الجانبية…). */
html[data-ui="c"] { --c-top-h: 82px; --c-hub-h: 0px; --c-head-h: calc(var(--c-top-h) + var(--c-hub-h)); --c-stick-top: calc(var(--c-head-h) + 16px); --topbar-h: var(--c-head-h); }
@media (min-width: 761px) {
  html[data-ui="c"]:has(.hub-slot > .hub-head) { --c-hub-h: var(--c-hub-real, 62px); }
  html[data-ui="c"] .hub-slot { top: var(--c-top-h); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
}
html[data-ui="c"] .shell .topbar {
  position: sticky; top: 0; z-index: 30; height: auto; min-height: 0; gap: 12px; padding: 20px 36px 14px 36px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border: 0;
}
html[data-ui="c"] .shell .topbar h1, html[data-ui="c"] .shell .topbar #page-title { font-size: var(--fs-1); font-weight: 600; line-height: 1.3; flex: 1; min-width: 0; margin: 0; color: var(--ink); justify-self: auto; }
html[data-ui="c"] .shell .topbar #page-title .cp-tpill, html[data-ui="c"] .shell .topbar #page-title .cp-tpill .tp-tx b, html[data-ui="c"] .cp-shell .topbar .cp-title .cp-tpill, html[data-ui="c"] .cp-shell .topbar .cp-title .cp-tpill .tp-tx b { font-size: inherit !important; font-weight: 600 !important; }
html[data-ui="c"] .topbar .cp-tpill, html[data-ui="c"] .topbar .cp-tpill .tp-tx b { background: none !important; box-shadow: none !important; padding: 0 !important; color: inherit !important; font: inherit; }
html[data-ui="c"] .topbar .cp-tpill { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
html[data-ui="c"] .topbar .cp-tpill > svg, html[data-ui="c"] .topbar .cp-tpill .tp-sec, html[data-ui="c"] .topbar .cp-tpill .tp-chev { display: none !important; }
html[data-ui="c"] .topbar .cp-tpill .tp-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="c"] .topbar .cp-tpill .tp-n { font: 600 var(--fs-6)/26px var(--font-c); min-width: 26px; height: 26px; padding: 0 9px; border-radius: 13px; background: var(--sunk); color: var(--ink2) !important; text-align: center; }
html[data-ui="c"] .shell .topbar .title-tile, html[data-ui="c"] .shell .topbar .menu-toggle, html[data-ui="c"] .shell .topbar .tb-avatar { display: none; }
html[data-ui="c"] .topbar .tb-end { display: flex; align-items: center; gap: 10px; }
html[data-ui="c"] .topbar .tb-quick {
  display: flex; align-items: center; gap: 8px; height: 48px; width: 300px; padding: 0 18px; border: 0; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--sh); color: var(--muted); font: 400 var(--fs-5) var(--font-c); cursor: pointer;
}
html[data-ui="c"] .topbar .tb-quick svg { width: 18px; height: 18px; }
html[data-ui="c"] .topbar .tb-quick kbd { margin-inline-start: auto; font: 500 var(--fs-6) var(--font-c); color: var(--muted); background: none; border: 0; direction: ltr; }
html[data-ui="c"] .topbar .icon-btn { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--sh); color: var(--ink2); }
html[data-ui="c"] .topbar .icon-btn svg { width: 20px; height: 20px; }
html[data-ui="c"] .topbar .icon-btn[data-bell] .dot { top: -4px; inset-inline-end: -4px; border-color: var(--surface); } /* QA: بعددين كانت الشارة تغطي الجرس كله */
html[data-ui="c"] .topbar .lang-switch.top { height: 48px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh); border: 0; padding: 4px; }
html[data-ui="c"] .topbar .lang-switch.top button { border-radius: var(--r-pill); min-width: 40px; }
html[data-ui="c"] .c-me { width: 48px; height: 48px; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; display: grid; place-items: center; box-shadow: var(--sh); }
html[data-ui="c"] .c-me .avatar { width: 48px; height: 48px; }
html[data-ui="c"] .shell .content { padding: 6px 36px 120px; max-width: 1520px; }
html[data-ui="c"] .hub-head { background: none; border: 0; padding: 0 36px 6px; }
html[data-ui="c"] .hub-head .hub-t { display: none; }
html[data-ui="c"] .hub-tabs { gap: 8px; max-width: 1520px; padding: 4px 0 8px; }
html[data-ui="c"] .hub-tabs a { height: 44px; padding: 0 16px; border: 0; margin: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh); color: var(--ink2); font: 500 var(--fs-5) var(--font-c); }
html[data-ui="c"] .hub-tabs a.on { background: var(--brand); color: var(--on-brand); box-shadow: none; }
html[data-ui="c"] .hub-tabs a.on::after { display: none; }
html[data-ui="c"] .hub-tabs a.on svg { color: currentColor; } /* أيقونة الحبّة النشطة كانت بلون العلامة على خلفية العلامة فتختفي (‎.hub-tabs a.on svg‎ القديمة) */
/* «جديد» على الكمبيوتر: زر ذهبي ثابت أعلى الدوك تحت الشعار (كان زراً عائماً أسفل الشاشة يغطي آخر الصفوف ويتنافس مع زر الصفحة)؛
   قائمته تنفتح بجانب الدوك من الأعلى. الهاتف: «+» وسط الشريط السفلي فقط. */
html[data-ui="c"] .c-dock-new {
  flex: none; width: 64px; height: 64px; margin: 0 0 14px; border: 0; border-radius: 22px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--brand); color: var(--on-brand); font: 600 var(--fs-6)/1.2 var(--font-c); box-shadow: var(--sh-brand);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
html[data-ui="c"] .c-dock-new:hover { background: var(--brand-ink); }
html[data-ui="c"] .c-dock-new:active { transform: scale(.96); }
html[data-ui="c"] .c-dock-new svg { width: 20px; height: 20px; stroke-width: 2.2; transition: transform var(--t-sheet) var(--ease); }
html[data-ui="c"] .c-dock-new.on svg, html[data-ui="c"] .c-plus.on svg { transform: rotate(45deg); }
html[data-ui="c"] .tabbar.c-tabbar { display: none; }
html[data-ui="c"] .c-only-phone { display: none; }
html[data-ui="c"] .c-tb-logo { display: none; }
@media (max-width: 1100px) and (min-width: 761px) {
  html[data-ui="c"] .topbar .tb-quick { width: 48px; padding: 0; justify-content: center; }
  html[data-ui="c"] .topbar .tb-quick span, html[data-ui="c"] .topbar .tb-quick kbd { display: none; }
  html[data-ui="c"] .shell .topbar h1 { font-size: var(--fs-2); }
}
/* قرار المالك 2026-11-22: الدوك يتّسع لكل وجهات الدور (حتى 9 + «المزيد») عمودياً بدل إسقاط وجهات — ارتفاع الوجهة يصغر مع ارتفاع الشاشة وعدد الوجهات
   (--n من core.js)، بين 46px و64px؛ وتحت 940px يصغر الشعار و«جديد» والصورة والمسافات. التمرير يبقى احتياطاً للشاشات الأقصر جداً. */
html[data-ui="c"] .c-dock { --dock-oh: 306px; }
html[data-ui="c"] .c-dock-it { min-height: clamp(46px, calc((100vh - var(--dock-oh)) / var(--n, 8) - 4px), 64px); }
@media (max-height: 940px) and (min-width: 761px) {
  html[data-ui="c"] .c-dock { --dock-oh: 224px; padding: 12px 0 10px; gap: 2px; }
  html[data-ui="c"] .c-dock-nav { gap: 2px; }
  html[data-ui="c"] .c-dock-it { padding: 4px 0; gap: 3px; border-radius: 16px; }
  html[data-ui="c"] .c-dock-it .c-bd, html[data-ui="c"] .c-dock-it .ndot { top: 1px; }
  html[data-ui="c"] .c-dock-logo { width: 40px; height: 36px; margin-bottom: 4px; }
  html[data-ui="c"] .c-dock-logo img { width: 32px; height: 32px; }
  html[data-ui="c"] .c-dock-logo:has(.c-dock-mk) { width: 72px; height: 44px; margin-bottom: 6px; }
  html[data-ui="c"] .c-dock-logo img.c-dock-mk { width: 58px; height: 42px; }
  html[data-ui="c"] .c-dock-new { width: 56px; height: 50px; margin-bottom: 6px; border-radius: 18px; gap: 1px; }
  html[data-ui="c"] .c-dock-new svg { width: 20px; height: 20px; }
  html[data-ui="c"] .c-dock-me .avatar { width: 40px; height: 40px; }
  html[data-ui="c"] .c-dock-sp { min-height: 4px; }
}

/* ═════════ 4. الهاتف: شريط سفلي بأربع وجهات و«+» في المنتصف ═════════ */
@media (max-width: 760px) {
  html[data-ui="c"] .c-dock, html[data-ui="c"] .shell .backdrop { display: none !important; }
  html[data-ui="c"] .c-only-phone { display: revert; }
  html[data-ui="c"] .c-tile-w.c-only-phone { display: block; }
  html[data-ui="c"] body { background: var(--bg); }
  html[data-ui="c"] .shell .main { margin-inline-start: 0; }
  html[data-ui="c"] .shell .topbar {
    display: flex !important; grid-template-areas: none; align-items: center; gap: 10px; min-height: 64px;
    padding: calc(env(safe-area-inset-top) + 8px) 16px 10px; border: 0; border-radius: 0; box-shadow: none; color: var(--ink);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }
  html[data-ui="c"] .shell .topbar::after { display: none; }
  /* U10: الشريط العلوي القديم بروح C — صف أول: الصورة الشخصية (تفتح «المزيد») أو رجوع، الشعار في الوسط، البحث والجرس؛
     صف ثانٍ: عنوان الصفحة. «المزيد» لم يعد في الشريط السفلي. */
  html[data-ui="c"] .shell .topbar { flex-wrap: wrap; row-gap: 4px; padding-bottom: 8px; }
  html[data-ui="c"] .shell .topbar .back-btn { order: 0; }
  html[data-ui="c"] .shell .topbar .tb-avatar { order: 1; }
  html[data-ui="c"] .shell .topbar .c-tb-logo {
    display: flex; align-items: center; justify-content: center; position: absolute; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%);
    height: 44px; padding: 0 6px; border-radius: 12px;
  }
  html[data-ui="c"] .shell .topbar .c-tb-logo img { height: 42px; width: auto; max-width: 132px; display: block; }
  html[data-ui="c"] .shell .topbar h1, html[data-ui="c"] .shell .topbar #page-title, html[data-ui="c"] .cp-shell .topbar .cp-title { order: 5; flex: 1 0 100%; min-width: 0; font-size: var(--fs-3) !important; line-height: 1.35; margin: 0 !important; padding-top: 10px; text-align: start; justify-self: auto; color: var(--ink); overflow: hidden; }
  html[data-ui="c"] .shell .topbar #page-title:empty { display: none; }
  html[data-ui="c"] .shell .topbar #page-title .cp-tpill > span { max-width: none; }
  html[data-ui="c"] .shell .topbar .tb-end { order: 3; margin-inline-start: auto; gap: 8px; }
  html[data-ui="c"] .shell .topbar .tb-avatar { position: relative; border-radius: 50%; }
  html[data-ui="c"] .shell .topbar .tb-avatar.on .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
  html[data-ui="c"] .shell .topbar .tb-avatar .c-bd, html[data-ui="c"] .shell .topbar .tb-avatar .ndot { position: absolute; top: -4px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d92d20; color: #fff; font: 600 12px/16px var(--font-c); font-style: normal; text-align: center; border: 2px solid var(--bg); }
  html[data-ui="c"] .shell .topbar .tb-avatar .c-bd[hidden] { display: none; }
  html[data-ui="c"] .shell .topbar .back-btn { background: var(--surface); color: var(--brand-ink); box-shadow: var(--sh); border-radius: 50%; }
  html[data-ui="c"] .shell .topbar .icon-btn[data-bell] { border-radius: 50%; background: var(--surface); box-shadow: var(--sh); }
  html[data-ui="c"] .shell .topbar .tb-avatar { display: grid; border: 0; background: none; padding: 0; }
  html[data-ui="c"] .shell .topbar .tb-avatar .avatar { width: 44px; height: 44px; }
  html[data-ui="c"] .topbar .tb-avatar .avatar, html[data-ui="c"] .topbar .tb-avatar .avatar img { border-radius: 50%; } /* دائرة كالجرس والبحث بجانبها (كانت مربعاً مستدير الزوايا) */
  html[data-ui="c"] .topbar .tb-quick { width: 44px; height: 44px; padding: 0; justify-content: center; }
  html[data-ui="c"] .topbar .tb-quick span, html[data-ui="c"] .topbar .tb-quick kbd, html[data-ui="c"] .topbar .lang-switch.top, html[data-ui="c"] .topbar .theme-btn, html[data-ui="c"] .topbar .c-me { display: none; }
  html[data-ui="c"] .topbar .icon-btn, html[data-ui="c"] .topbar .back-btn { width: 44px; height: 44px; }
  html[data-ui="c"] .shell .content { padding: 4px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
  html[data-ui="c"] .hub-head { padding: 0 16px 4px; }
  html[data-ui="c"] .tabbar.c-tabbar {
    display: flex; align-items: center; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; height: auto; min-height: 72px;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); border: 0; border-radius: 28px 28px 0 0;
    background: var(--surface); box-shadow: 0 -8px 30px -12px rgba(0, 0, 0, .18); backdrop-filter: none;
  }
  html[data-ui="c"] .c-tabbar .c-tab {
    flex: 1; min-width: 0; min-height: 52px; padding: 4px 2px; border: 0; border-radius: 16px; background: none; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font: 500 12px/1.3 var(--font-c); color: var(--muted); text-decoration: none !important; cursor: pointer;
  }
  html[data-ui="c"] .c-tabbar .c-tab svg { width: 24px; height: 24px; padding: 0; background: none !important; box-shadow: none !important; color: currentColor; }
  html[data-ui="c"] .c-tabbar .c-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit !important; }
  html[data-ui="c"] .c-tabbar .c-tab.active { color: var(--brand-ink); font-weight: 600; }
  html[data-ui="c"] .c-tabbar .c-tab.active span { color: var(--brand-ink) !important; font-weight: 600; }
  html[data-ui="c"] .c-tabbar .tcount, html[data-ui="c"] .c-tabbar .ndot { position: absolute; top: 0; inset-inline-start: calc(50% + 4px); inset-inline-end: auto; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d92d20; color: #fff; font: 600 12px/20px var(--font-c); font-style: normal; text-align: center; border: 2px solid var(--surface); }
  html[data-ui="c"] .c-tabbar .c-plus {
    flex: none; width: 60px; height: 60px; margin: -34px 6px 0; border: 0; border-radius: 50%; cursor: pointer;
    display: grid; place-items: center; background: var(--brand); color: var(--on-brand);
    box-shadow: 0 10px 24px -8px rgba(154, 100, 16, .6), 0 0 0 6px var(--bg);
  }
  html[data-ui="c"] .c-tabbar .c-plus svg { width: 26px; height: 26px; stroke-width: 2.2; transition: transform var(--t-sheet) var(--ease); }
  html[data-ui="c"] .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* QA: نجمة «إضافة للشريط الجانبي» لا معنى لها على الهاتف (لا دوك) */
  html[data-ui="c"] .c-pin { display: none; }
  /* QA: بطاقة «فعّل الإشعارات» كانت تغطي الشريط السفلي وزر «+» */
  html[data-ui="c"] body:has(.c-tabbar) .np, html[data-ui="c"] body:has(.cp-tabbar) .np { bottom: calc(var(--tabbar-h, 76px) + env(safe-area-inset-bottom)); padding-bottom: 12px; }
}

/* ═════════ 5. الطبقات: ورقة جانبية (كمبيوتر) / سفلية (هاتف) — «المزيد»، «+»، التفاصيل ═════════ */
html[data-ui="c"] .c-layer { position: fixed; inset: 0; z-index: 450; }
html[data-ui="c"] .c-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--t-sheet) var(--ease); }
html[data-ui="c"] .c-layer.on .c-scrim { opacity: 1; }
html[data-ui="c"] .c-sheet {
  position: absolute; top: 16px; bottom: 16px; inset-inline-end: 16px; width: min(460px, calc(100vw - 32px)); z-index: 1;
  background: var(--surface); color: var(--ink); border-radius: var(--r-sheet); box-shadow: var(--sh-lg);
  padding: 22px 24px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  transform: translateX(calc(100% + 24px)); transition: transform var(--t-sheet) var(--ease);
}
html[data-ui="c"][dir="rtl"] .c-sheet { transform: translateX(calc(-100% - 24px)); }
html[data-ui="c"] .c-layer.on .c-sheet { transform: none; }
html[data-ui="c"] .c-sheet.wide { width: min(560px, calc(100vw - 32px)); }
html[data-ui="c"] .c-grab { display: none; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
html[data-ui="c"] .c-sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
html[data-ui="c"] .c-sheet-h b { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 600; }
html[data-ui="c"] .c-sheet-f { position: sticky; bottom: -24px; display: flex; gap: 10px; padding: 14px 0 0; margin-top: 16px; background: var(--surface); }
html[data-ui="c"] .c-sheet-f .c-btn { flex: 1 1 auto; min-width: 0; } /* أساس auto: الزر ذو النص الطويل («تم التعاقد — اطلب الاعتماد») يأخذ عرضه والآخر يتقلص — بأساس 0 كان يفيض خارج الورقة حتى حافة الشاشة على الهاتف */
html[data-ui="c"] .c-ibtn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--ink2); cursor: pointer; }
html[data-ui="c"] .c-ibtn svg { width: 20px; height: 20px; }
/* «+» على الكمبيوتر: قائمة منبثقة فوق زر «جديد» */
html[data-ui="c"] .c-create-root.pop .c-scrim { background: transparent; }
html[data-ui="c"] .c-create-root.pop .c-sheet { top: calc(var(--dock-gap) + 76px); bottom: auto; inset-inline-start: calc(var(--dock-w) + var(--dock-gap) + 12px); inset-inline-end: auto; width: 300px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 14px; border-radius: var(--r-card); transform: translateY(-6px) scale(.97); opacity: 0; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
html[data-ui="c"] .c-create-root.pop.on .c-sheet { transform: none; opacity: 1; }
html[data-ui="c"] .c-create-root.pop .c-sheet-h { margin: 2px 6px 6px; }
html[data-ui="c"] .c-create-root.pop .c-sheet-h b { font-size: var(--fs-4); }
html[data-ui="c"] .c-create-root.pop .c-sheet-h .c-ibtn { display: none; }
html[data-ui="c"] .c-create-list { display: grid; gap: 4px; }
/* «جديد» على الكمبيوتر: قائمة مدمجة بجانب الدوك (صفوف 48px بلا سهم — كل صف فعل وليس صفحة) */
html[data-ui="c"] .c-create-root.pop .c-sheet { width: 264px; padding: 12px 10px 10px; }
html[data-ui="c"] .c-create-root.pop .c-create-list { gap: 2px; }
html[data-ui="c"] .c-create-root.pop .c-create-list .c-li { min-height: 48px; padding: 6px 10px; gap: 12px; border-radius: 14px; }
html[data-ui="c"] .c-create-root.pop .c-create-list .c-li-ic { width: 36px; height: 36px; }
html[data-ui="c"] .c-create-root.pop .c-create-list .c-li-ic svg { width: 18px; height: 18px; }
html[data-ui="c"] .c-create-root.pop .c-create-list .c-li-go { display: none; }
html[data-ui="c"] .c-create-root.pop .c-create-list .c-li:hover .c-li-ic, html[data-ui="c"] .c-create-root.pop .c-create-list .c-li:focus-visible .c-li-ic { background: var(--brand); color: var(--on-brand); }
/* «المزيد»: بلاطات بأقسام */
html[data-ui="c"] .c-more .c-srch { width: 100%; margin-bottom: 6px; justify-content: flex-start; }
html[data-ui="c"] .c-more .c-srch kbd { margin-inline-start: auto; font: 500 var(--fs-6) var(--font-c); color: var(--muted); background: none; border: 0; direction: ltr; }
html[data-ui="c"] .c-more-sec h3 { font-size: var(--fs-6); font-weight: 500; color: var(--muted); margin: 18px 4px 8px; }
html[data-ui="c"] .c-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
html[data-ui="c"] .c-tile-w { position: relative; min-width: 0; }
html[data-ui="c"] .c-tile {
  width: 100%; min-height: 92px; padding: 10px 8px; border: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--sh);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative;
  font: 500 var(--fs-6)/1.35 var(--font-c); color: var(--ink); text-align: center; text-decoration: none !important; cursor: pointer;
}
html[data-ui="c"] .c-tile > svg { width: 26px; height: 26px; color: var(--brand-ink); }
html[data-ui="c"] .c-tile-tx { font: 600 var(--fs-4)/26px var(--font-c); color: var(--brand-ink); }
html[data-ui="c"] .c-tile.s { background: var(--sunk); box-shadow: none; }
html[data-ui="c"] .c-tile.bad, html[data-ui="c"] .c-tile.bad > svg { color: var(--bad); }
html[data-ui="c"] .c-tile:hover { box-shadow: 0 0 0 1.5px var(--brand-line), var(--sh); }
html[data-ui="c"] .c-tile .c-bd { position: absolute; top: 8px; inset-inline-end: 10px; }
html[data-ui="c"] .c-tile .tm-sun { display: none; }
html[data-ui="c"].dark .c-tile .tm-moon { display: none; }
html[data-ui="c"].dark .c-tile .tm-sun { display: block; }
html[data-ui="c"] .c-pin { position: absolute; top: 4px; inset-inline-start: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: .55; }
html[data-ui="c"] .c-pin svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-pin:hover, html[data-ui="c"] .c-pin.on { opacity: 1; color: var(--brand); }
html[data-ui="c"] .c-pin.on svg { fill: currentColor; }
@media (max-width: 760px) { html[data-ui="c"] .c-pin { display: none; } } /* كانت تظهر على الهاتف: هذه القاعدة بعد قاعدة الإخفاء فتغلبها */
/* «المزيد» يُفتح من الصورة: رأسه هوية الحساب (الصورة، الاسم، الدور) بدل كلمة «المزيد» */
html[data-ui="c"] .c-more-me { justify-content: flex-start; gap: 12px; }
html[data-ui="c"] .c-more-av .av, html[data-ui="c"] .c-more-av > * { width: 48px; height: 48px; border-radius: 50%; font-size: 16px; }
html[data-ui="c"] .c-more-who { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
html[data-ui="c"] .c-more-who b { font-size: var(--fs-4); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-more-who small { font-size: var(--fs-6); color: var(--muted); }
@media (max-width: 760px) {
  html[data-ui="c"] .c-sheet, html[data-ui="c"][dir="rtl"] .c-sheet {
    top: auto; bottom: 0; inset-inline: 0; width: auto; max-height: 88vh; max-height: 88dvh; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%);
  }
  html[data-ui="c"] .c-layer.on .c-sheet { transform: none; }
  html[data-ui="c"] .c-grab { display: block; }
  html[data-ui="c"] .c-sheet-h .c-ibtn { display: none; }
  /* الشريط الملتصق يصل لأسفل الشاشة، فحشوته تشمل منطقة مؤشر الرئيسية (كانت 4px فتقع الأزرار على المؤشر في تطبيق الشاشة الرئيسية)،
     والهامش السالب يلغي التكرار مع حشوة الورقة حين لا يكون ملتصقاً */
  html[data-ui="c"] .c-sheet-f { bottom: calc(-20px - env(safe-area-inset-bottom)); padding-bottom: calc(4px + env(safe-area-inset-bottom)); margin-bottom: calc(-1 * env(safe-area-inset-bottom)); }
}

/* ═════════ 6. المكوّنات (للشاشات: W9.2–W9.5) ═════════ */
/* بطاقة */
html[data-ui="c"] .c-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh); padding: 20px; min-width: 0; }
html[data-ui="c"] .c-card.flush { padding: 0; overflow: hidden; }
html[data-ui="c"] .c-card.sunk { background: var(--sunk); box-shadow: none; }
html[data-ui="c"] .c-card.fav { background: linear-gradient(160deg, #fdf6ea, #f8e9cc); box-shadow: 0 0 0 1.5px var(--brand-line), var(--sh); }
html[data-ui="c"].dark .c-card.fav { background: #2b251c; }
html[data-ui="c"] .c-card-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--fs-4); font-weight: 600; }
html[data-ui="c"] .c-card-h .c-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--sunk); font-size: var(--fs-6); display: grid; place-items: center; font-weight: 600; }
html[data-ui="c"] .c-card-h a, html[data-ui="c"] .c-card-h .c-link { margin-inline-start: auto; font-size: var(--fs-6); font-weight: 500; color: var(--brand-ink); }
html[data-ui="c"] a.c-card { color: inherit; text-decoration: none; display: block; transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
html[data-ui="c"] a.c-card:hover { box-shadow: 0 0 0 1.5px var(--brand-line), var(--sh); }
/* شبكة بطاقات */
html[data-ui="c"] .c-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(var(--c-min, 280px), 1fr)); }
html[data-ui="c"] .c-grid > * { min-width: 0; }
html[data-ui="c"] .c-grid.c-g1 { grid-template-columns: minmax(0, 1fr); }
html[data-ui="c"] .c-grid.c-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-ui="c"] .c-grid.c-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-ui="c"] .c-grid.c-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html[data-ui="c"] .c-grid.c-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { html[data-ui="c"] .c-grid.c-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } html[data-ui="c"] .c-grid.c-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { html[data-ui="c"] .c-grid, html[data-ui="c"] .c-grid.c-g2, html[data-ui="c"] .c-grid.c-g3, html[data-ui="c"] .c-grid.c-g4, html[data-ui="c"] .c-grid.c-main { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
html[data-ui="c"] .c-stack { display: grid; gap: 12px; }
/* أزرار حبّة — 3 أنواع: أساسي / ثانوي / نصّي، و44px صغير */
html[data-ui="c"] .c-btn {
  height: var(--btn-h); padding: 0 22px; border: 0; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; text-decoration: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 var(--fs-5) var(--font-c);
  background: var(--sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
html[data-ui="c"] .c-btn svg { width: 18px; height: 18px; flex: none; }
html[data-ui="c"] .c-btn:active { transform: scale(.98); }
html[data-ui="c"] .c-btn-p { background: var(--brand); color: var(--on-brand); box-shadow: none; }
html[data-ui="c"] .c-btn-p:hover { background: var(--brand-ink); }
html[data-ui="c"] .c-btn-s:hover { background: var(--line2); }
html[data-ui="c"] .c-btn-g { background: none; color: var(--brand-ink); box-shadow: none; padding: 0 12px; }
html[data-ui="c"] .c-btn-g:hover { background: var(--brand-tint); }
html[data-ui="c"] .c-btn-ok { background: var(--ok); color: #fff; box-shadow: none; }
html[data-ui="c"].dark .c-btn-ok { color: #0f1a16; }
html[data-ui="c"] .c-btn-bad { background: var(--surface); color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
html[data-ui="c"] .c-btn-sm { height: var(--btn-h-sm); padding: 0 16px; font-size: 14px; }
html[data-ui="c"] .c-btn-icon { width: var(--btn-h-sm); padding: 0; }
html[data-ui="c"] .c-btn-block { width: 100%; }
html[data-ui="c"] .c-btn[disabled], html[data-ui="c"] .c-btn.disabled { opacity: .5; pointer-events: none; }
html[data-ui="c"] .c-btn.loading { color: transparent !important; position: relative; pointer-events: none; }
html[data-ui="c"] .c-btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: spin .8s linear infinite; }
html[data-ui="c"] .c-btn-p.loading::after { border-color: var(--on-brand) transparent var(--on-brand) transparent; }
html[data-ui="c"] .c-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* حبّات (فلاتر سريعة) */
html[data-ui="c"] .c-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; margin: 0; }
html[data-ui="c"] .c-chips::-webkit-scrollbar { display: none; }
html[data-ui="c"] .c-chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
html[data-ui="c"] .c-chip {
  flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-5) var(--font-c); color: var(--ink2); white-space: nowrap; text-decoration: none !important;
}
html[data-ui="c"] .c-chip svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-chip em { font-style: normal; font-size: var(--fs-6); color: var(--muted); }
html[data-ui="c"] .c-chip.on { background: var(--brand); color: var(--on-brand); box-shadow: none; }
html[data-ui="c"] .c-chip.on em { color: inherit; opacity: .85; }
html[data-ui="c"] .c-fgrp .c-chip { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
html[data-ui="c"] .c-fgrp .c-chip.on { background: var(--brand); color: var(--on-brand); box-shadow: none; }
/* شريط الفلاتر (كمبيوتر) + زر الفلاتر وورقتها (هاتف) */
html[data-ui="c"] .c-fbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
html[data-ui="c"] .c-srch {
  height: 44px; flex: 0 1 280px; min-width: 150px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh);
  display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--muted); font: 400 var(--fs-5) var(--font-c); cursor: text;
}
html[data-ui="c"] .c-srch svg { width: 18px; height: 18px; flex: none; }
html[data-ui="c"] .c-srch input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: 0; font: inherit; color: var(--ink); }
html[data-ui="c"] .c-dd {
  height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh); cursor: pointer; flex: none;
  display: inline-flex; align-items: center; gap: 6px; font: 400 var(--fs-5) var(--font-c); color: var(--ink2); white-space: nowrap; position: relative;
}
html[data-ui="c"] .c-dd svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-dd.on { background: var(--brand-tint); color: var(--brand-ink); box-shadow: inset 0 0 0 1.5px var(--brand-line); font-weight: 600; }
html[data-ui="c"] .c-dd select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
html[data-ui="c"] .c-fbtn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--sh); color: var(--ink2); display: none; place-items: center; position: relative; cursor: pointer; }
html[data-ui="c"] .c-fbtn svg { width: 20px; height: 20px; }
html[data-ui="c"] .c-fbtn i { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font: 600 var(--fs-6)/20px var(--font-c); font-style: normal; text-align: center; padding: 0 5px; }
html[data-ui="c"] .c-fbar .c-fend { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
html[data-ui="c"] .c-fgrp { margin-bottom: 16px; }
html[data-ui="c"] .c-fgrp > small { display: block; font-size: var(--fs-6); color: var(--muted); margin-bottom: 8px; }
@media (max-width: 760px) {
  html[data-ui="c"] .c-fbar { flex-wrap: nowrap; }
  html[data-ui="c"] .c-fbar .c-srch { flex: 1; }
  html[data-ui="c"] .c-fbar .c-dd { display: none; }
  html[data-ui="c"] .c-fbtn { display: grid; }
}
/* رأس الصفحة */
html[data-ui="c"] .c-ph { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 20px; }
html[data-ui="c"] .c-ph-t { flex: 1; min-width: 0; }
html[data-ui="c"] .c-ph h1, html[data-ui="c"] .c-ph h2 { font-size: var(--fs-1); font-weight: 600; line-height: 1.3; margin: 0; }
html[data-ui="c"] .c-ph p { font-size: var(--fs-5); color: var(--muted); margin: 2px 0 0; }
html[data-ui="c"] .c-ph.sm h1, html[data-ui="c"] .c-ph.sm h2 { font-size: var(--fs-2); }
@media (max-width: 760px) { html[data-ui="c"] .c-ph h1, html[data-ui="c"] .c-ph h2 { font-size: var(--fs-3); } html[data-ui="c"] .c-ph .c-actions { width: 100%; } html[data-ui="c"] .c-ph .c-actions .c-btn { flex: 1; } html[data-ui="c"] .c-ph .c-actions .c-btn.c-btn-icon { flex: none; } }
/* شريط KPI + بطاقة رقم */
html[data-ui="c"] .c-kst { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 20px; }
html[data-ui="c"] .c-kst > * { background: var(--surface); border-radius: 20px; box-shadow: var(--sh); padding: 12px 16px; min-width: 0; color: inherit; text-decoration: none !important; }
html[data-ui="c"] .c-kst small { display: block; font-size: var(--fs-6); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-kst b { font-size: var(--fs-3); font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-ui="c"] .c-kst em { font-style: normal; font-size: var(--fs-6); margin-inline-start: 6px; }
html[data-ui="c"] .c-kp { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh); padding: 18px 20px; min-width: 0; }
html[data-ui="c"] .c-kp small { display: block; font-size: var(--fs-6); color: var(--muted); }
html[data-ui="c"] .c-kp b { display: block; font-size: var(--fs-2); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.35; }
html[data-ui="c"] .c-kp em { font-style: normal; font-size: var(--fs-6); }
html[data-ui="c"] .ok-t { color: var(--ok); } html[data-ui="c"] .bad-t { color: var(--bad); } html[data-ui="c"] .warn-t { color: var(--warn); } html[data-ui="c"] .mut-t { color: var(--muted); }
@media (max-width: 760px) { html[data-ui="c"] .c-kst { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 4px 16px 8px; } html[data-ui="c"] .c-kst > * { flex: none; min-width: 140px; } }
/* بطاقة المال الذهبية (لا أسود) */
html[data-ui="c"] .c-hero { background: var(--hero); color: var(--hero-ink); border-radius: var(--r-card); padding: 22px; box-shadow: var(--sh); }
html[data-ui="c"] .c-hero small { color: var(--hero-mut); font-size: var(--fs-6); display: block; }
html[data-ui="c"] .c-hero .c-big { font-size: var(--fs-1); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
/* صفوف القوائم */
html[data-ui="c"] .c-list { display: grid; grid-template-columns: minmax(0, 1fr); }
html[data-ui="c"] .c-li { display: flex; align-items: center; gap: 12px; min-height: var(--row-h); padding: 10px 0; border-top: 1px solid var(--line2); color: inherit; text-decoration: none !important; }
html[data-ui="c"] .c-list > .c-li:first-child, html[data-ui="c"] .c-li.first { border-top: 0; }
html[data-ui="c"] .c-li-btn { width: 100%; border: 0; border-top: 0; background: none; padding: 10px; border-radius: 16px; cursor: pointer; font: inherit; text-align: start; }
html[data-ui="c"] .c-li-btn:hover { background: var(--sunk); }
html[data-ui="c"] .c-li-ic { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .c-li-ic svg { width: 20px; height: 20px; }
html[data-ui="c"] .c-li-t { flex: 1; min-width: 0; }
html[data-ui="c"] .c-li-t b { display: block; font-size: var(--fs-5); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-li-t small { display: block; font-size: var(--fs-6); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-li-t small svg { width: 13px; height: 13px; vertical-align: -2px; flex: none; }
html[data-ui="c"] .c-li-e { flex: none; display: flex; align-items: center; gap: 8px; font-size: var(--fs-6); color: var(--muted); }
html[data-ui="c"] .c-li-go { width: 18px; height: 18px; color: var(--muted); flex: none; }
/* QA: سهم «فتح» في الصفوف كان معكوساً (يشير للخلف «›» في العربية و«‹» في الإنجليزية) — الأيقونة تشير لليمين، فتُقلب في RTL فقط (كالمرجع v3) */
html[data-ui="c"][dir="rtl"] .c-li-go { transform: scaleX(-1); }
/* شارات الحالة + عدّاد */
html[data-ui="c"] .c-tag { font-size: var(--fs-6); font-weight: 500; padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); background: var(--sunk); }
html[data-ui="c"] .c-tag svg { width: 14px; height: 14px; }
html[data-ui="c"] .c-tag.ok { color: var(--ok); background: var(--ok-bg); } html[data-ui="c"] .c-tag.warn { color: var(--warn); background: var(--warn-bg); }
html[data-ui="c"] .c-tag.bad, html[data-ui="c"] .c-tag.late { color: var(--bad); background: var(--bad-bg); } html[data-ui="c"] .c-tag.info { color: var(--info); background: var(--info-bg); }
html[data-ui="c"] .c-tag.pur { color: var(--pur); background: var(--pur-bg); } html[data-ui="c"] .c-tag.br { color: var(--brand-ink); background: var(--brand-tint); }
html[data-ui="c"] .c-tag.urgent { color: #fff; background: var(--urgent); }
html[data-ui="c"] .c-bd { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d92d20; color: #fff; font: 600 12px/20px var(--font-c); font-style: normal; text-align: center; display: inline-block; }
html[data-ui="c"] .c-bd[hidden] { display: none; }
/* تبويبات مجزّأة + تبويبات حبّية */
html[data-ui="c"] .c-seg { display: inline-flex; background: var(--sunk); border-radius: var(--r-pill); padding: 4px; gap: 2px; box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
html[data-ui="c"] .c-seg > a, html[data-ui="c"] .c-seg > button { height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: none; display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--font-c); color: var(--ink2); white-space: nowrap; cursor: pointer; text-decoration: none !important; }
html[data-ui="c"] .c-seg > .on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh); }
html[data-ui="c"] .c-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; }
html[data-ui="c"] .c-tabs::-webkit-scrollbar, html[data-ui="c"] .c-seg::-webkit-scrollbar { display: none; }
html[data-ui="c"] .c-tabs > a, html[data-ui="c"] .c-tabs > button { flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: none; display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-5) var(--font-c); color: var(--muted); cursor: pointer; text-decoration: none !important; }
html[data-ui="c"] .c-tabs > .on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
/* حقول النماذج */
html[data-ui="c"] .c-fld { display: block; margin: 0 0 14px; min-width: 0; }
html[data-ui="c"] .c-fld > small, html[data-ui="c"] .c-fld > label { display: block; font-size: var(--fs-6); color: var(--muted); margin: 0 0 6px; }
html[data-ui="c"] .c-fld > small b.req, html[data-ui="c"] .c-fld > label b.req { color: var(--bad); font-weight: 600; }
html[data-ui="c"] .c-input {
  width: 100%; height: var(--btn-h); padding: 0 16px; border: 0; border-radius: var(--r-tile); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line);
  font: 400 var(--fs-5) var(--font-c); color: var(--ink); outline: 0; transition: box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
html[data-ui="c"] textarea.c-input { height: auto; min-height: 96px; padding: 14px 16px; line-height: 1.6; resize: vertical; }
html[data-ui="c"] select.c-input { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6f80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 40px; }
html[data-ui="c"][dir="ltr"] select.c-input { background-position: right 14px center; padding-left: 16px; padding-right: 40px; }
html[data-ui="c"] .c-input:focus { box-shadow: inset 0 0 0 2px var(--brand); background: var(--surface); }
html[data-ui="c"] .c-input::placeholder { color: var(--muted); }
html[data-ui="c"] .c-fld.err .c-input { box-shadow: inset 0 0 0 2px var(--bad); }
html[data-ui="c"] .c-fld .c-err { display: block; font-size: var(--fs-6); color: var(--bad); margin-top: 6px; }
html[data-ui="c"] .c-fld .c-hint { display: block; font-size: var(--fs-6); color: var(--muted); margin-top: 6px; }
html[data-ui="c"] .c-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
html[data-ui="c"] .c-form > .full { grid-column: 1 / -1; }
html[data-ui="c"] .c-form-sec { grid-column: 1 / -1; font-size: var(--fs-4); font-weight: 600; margin: 8px 0 12px; padding-top: 14px; border-top: 1px solid var(--line2); }
html[data-ui="c"] .c-form > .c-form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 760px) { html[data-ui="c"] .c-form { grid-template-columns: minmax(0, 1fr); } }
/* نافذة كبيرة في المنتصف (نماذج الإضافة والتعديل) */
html[data-ui="c"] .c-modal-root { position: fixed; inset: 0; z-index: 460; display: grid; place-items: center; padding: 40px 16px; }
html[data-ui="c"] .c-modal {
  position: relative; z-index: 1; width: min(880px, 100%); max-height: calc(100vh - 80px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-sheet); box-shadow: var(--sh-lg); overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(.98); transition: opacity var(--t-sheet) var(--ease), transform var(--t-sheet) var(--ease);
}
html[data-ui="c"] .c-modal-root.on .c-modal { opacity: 1; transform: none; }
html[data-ui="c"] .c-modal.sm { width: min(520px, 100%); }
html[data-ui="c"] .c-modal-h { display: flex; align-items: center; gap: 12px; padding: 22px 28px 14px; }
html[data-ui="c"] .c-modal-h b { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 600; }
html[data-ui="c"] .c-modal-b { padding: 4px 28px 20px; overflow-y: auto; overscroll-behavior: contain; }
html[data-ui="c"] .c-modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 28px 22px; border-top: 1px solid var(--line2); }
@media (max-width: 760px) {
  html[data-ui="c"] .c-modal-root { place-items: end stretch; padding: 0; }
  html[data-ui="c"] .c-modal { width: 100%; max-height: 92vh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; transform: translateY(100%); opacity: 1; }
  html[data-ui="c"] .c-modal-h, html[data-ui="c"] .c-modal-b { padding-inline: 20px; }
  html[data-ui="c"] .c-modal-f { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
  html[data-ui="c"] .c-modal-f .c-btn { flex: 1; }
}
/* الفراغ / الخطأ / التحميل */
/* حالة الفراغ (طلب المالك 2026-11-22: «الأيقونات كبيرة»): مربع صغير 44px بأيقونة 22px بجانب عنوان قصير وسطر شرح وزر واحد، بلا مساحة عمودية زائدة.
   في البطاقات تبدأ من بداية السطر مثل صفوف البطاقة؛ خارجها تتوسّط مجموعةً واحدة. */
html[data-ui="c"] .c-empty { display: grid; grid-template-columns: auto minmax(0, max-content); column-gap: 12px; row-gap: 2px; align-items: center; justify-items: start; justify-content: center; align-content: center; text-align: start; padding: 18px 14px; }
html[data-ui="c"] .c-empty-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; grid-row: 1 / span 2; grid-column: 1; align-self: center; }
html[data-ui="c"] .c-empty-ic svg { width: 22px; height: 22px; }
html[data-ui="c"] .c-empty b { grid-column: 2; font-size: var(--fs-5); font-weight: 600; line-height: 1.35; align-self: end; }
html[data-ui="c"] .c-empty p { grid-column: 2; font-size: var(--fs-6); line-height: 1.45; color: var(--muted); max-width: 340px; margin: 0; align-self: start; }
html[data-ui="c"] .c-empty:not(:has(> p)) > b { grid-row: 1 / span 2; align-self: center; }
html[data-ui="c"] .c-empty > :not(.c-empty-ic):not(b):not(p) { grid-column: 2; justify-self: start; }
html[data-ui="c"] .c-card .c-empty, html[data-ui="c"] .card-body .c-empty, html[data-ui="c"] .c-sheet .c-empty { justify-content: start; padding: 8px 2px; }
html[data-ui="c"] .c-empty.err .c-empty-ic { background: var(--bad-bg); color: var(--bad); }
/* بوابة العميل (cp-empty: صورة العلامة + عنوان + سطر) بنفس الشكل المضغوط */
html[data-ui="c"] .cp-empty { display: grid; grid-template-columns: auto minmax(0, max-content); column-gap: 12px; row-gap: 2px; align-items: center; justify-items: start; justify-content: center; align-content: center; text-align: start; padding: 24px 14px; color: var(--muted); }
html[data-ui="c"] .cp-empty img { width: 40px; height: 40px; grid-row: 1 / span 2; opacity: 1; }
html[data-ui="c"] .cp-empty b { grid-column: 2; font-size: var(--fs-5); font-weight: 600; color: var(--ink); align-self: end; }
html[data-ui="c"] .cp-empty > span { grid-column: 2; font-size: var(--fs-6); max-width: 340px; align-self: start; }
html[data-ui="c"] .c-skl { background: linear-gradient(90deg, var(--sunk) 25%, var(--line2) 50%, var(--sunk) 75%); background-size: 200% 100%; border-radius: 12px; animation: c-shimmer 1.3s linear infinite; min-height: 14px; }
html[data-ui="c"] .c-skl.card { border-radius: var(--r-card); min-height: 120px; }
html[data-ui="c"] .c-skl.row { height: 48px; margin-bottom: 8px; border-radius: 16px; }
@keyframes c-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* ملاحظة / تنبيه داخل الصفحة */
html[data-ui="c"] .c-note { display: flex; gap: 12px; align-items: flex-start; border-radius: 20px; padding: 14px 16px; font-size: var(--fs-5); line-height: 1.7; background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .c-note > svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
html[data-ui="c"] .c-note b { display: block; }
html[data-ui="c"] .c-note.info { background: var(--info-bg); color: var(--info); } html[data-ui="c"] .c-note.warn { background: var(--warn-bg); color: var(--warn); }
html[data-ui="c"] .c-note.ok { background: var(--ok-bg); color: var(--ok); } html[data-ui="c"] .c-note.bad { background: var(--bad-bg); color: var(--bad); }
/* صورة شخصية */
html[data-ui="c"] .c-av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-5); font-weight: 600; color: #fff; background: var(--h, var(--brand)); flex: none; overflow: hidden; }
/* QA: الداكن — بلا لون خاص يبقى الأفاتار ذهبياً غامقاً (الأبيض على الذهبي الفاتح كان 3:1) */
html[data-ui="c"].dark .c-av:not([style*="--h"]) { background: var(--brand-300); }
html[data-ui="c"] .c-av img { width: 100%; height: 100%; object-fit: cover; }
html[data-ui="c"] .c-av.s { width: 30px; height: 30px; font-size: var(--fs-6); } html[data-ui="c"] .c-av.l { width: 52px; height: 52px; font-size: var(--fs-3); }

/* ═════════ 7. بوابة العميل في النمط C ═════════ */
html[data-ui="c"] .cp-shell .c-dock-logo img { border-radius: 12px; }
html[data-ui="c"] .cp-shell .topbar .cp-title { font-size: var(--fs-1); font-weight: 600; flex: 1; min-width: 0; margin: 0; }
html[data-ui="c"] .cp-shell .topbar [data-ptile] { display: none; }
@media (max-width: 760px) { html[data-ui="c"] .cp-shell .topbar .cp-title { font-size: var(--fs-3); flex: 1 0 100%; order: 5; } }

/* ═════════ 8. الحركة: تُلغى كلها مع prefers-reduced-motion ═════════ */
@media (prefers-reduced-motion: reduce) {
  html[data-ui="c"] *, html[data-ui="c"] *::before, html[data-ui="c"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── W9.2: حلقة التقدّم (ui.ring) ── */
html[data-ui="c"] .c-ring { position: relative; display: inline-grid; place-items: center; width: var(--sz, 120px); height: var(--sz, 120px); flex: none; }
html[data-ui="c"] .c-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
html[data-ui="c"] .c-ring circle { fill: none; }
html[data-ui="c"] .c-ring .t { stroke: var(--sunk); }
html[data-ui="c"] .c-ring .v { stroke: var(--brand); stroke-linecap: round; transition: stroke-dasharray var(--t-sheet) var(--ease); }
html[data-ui="c"] .c-ring.ok .v { stroke: var(--ok); } html[data-ui="c"] .c-ring.bad .v { stroke: var(--bad); }
html[data-ui="c"] .c-ring-in { position: relative; display: grid; justify-items: center; line-height: 1.15; text-align: center; }
html[data-ui="c"] .c-ring-in b { font-size: calc(var(--sz, 120px) * .2); font-weight: 600; }
html[data-ui="c"] .c-ring-in small { font-size: min(var(--fs-6), calc(var(--sz, 120px) * .11)); color: var(--muted); }
/* النص داخل الحلقة لا يتجاوزها (حلقة الحضور المصغّرة 96px: «من 8:00 ساعات» كان يلمس الإطار ويخرج منه) */
html[data-ui="c"] .c-ring-in { max-width: calc(var(--sz, 120px) * .78); }
/* الحالات الموحّدة (W9 · v3 شاشة 06): هيكل التحميل، والفراغ/الخطأ خارج البطاقات يظهران داخل بطاقة */
html[data-ui="c"] .c-skl-stack { display: grid; gap: 12px; }
html[data-ui="c"] #main > .c-empty, html[data-ui="c"] .c-empty.err:not(.c-card .c-empty) { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh); }
html[data-ui="c"] td > .c-empty { padding: 14px 12px; }
html[data-ui="c"] .c-empty > .btn, html[data-ui="c"] .c-empty > .c-btn, html[data-ui="c"] .c-empty > a { margin-top: 8px; }

/* ═════════ QA (إدارة): أهداف لمس ≥44px على الهاتف — الأزرار الصغيرة والتبويبات والمقاطع وروابط رؤوس البطاقات كانت 17–40px ═════════ */
@media (max-width: 767px) {
  html[data-ui="c"] .btn-sm, html[data-ui="c"] .seg button, html[data-ui="c"] .c-seg > a, html[data-ui="c"] .c-seg > button, html[data-ui="c"] .tabs a { min-height: 44px; }
  html[data-ui="c"] .btn-sm { min-width: 44px; min-height: 44px !important; }
  html[data-ui="c"] .ac-flt button, html[data-ui="c"] .card-head a.small, html[data-ui="c"] .co-back, html[data-ui="c"] .co-badges a.badge, html[data-ui="c"] .tdb-title, html[data-ui="c"] .al-view button, html[data-ui="c"] .al-view-x { min-height: 44px; display: inline-flex; align-items: center; }
  html[data-ui="c"] .tdb-title{ display: flex; }
  html[data-ui="c"] .al-view-x { min-width: 44px; justify-content: center; }
  html[data-ui="c"] main a[href^="tel:"], html[data-ui="c"] main > a.small:first-child, html[data-ui="c"] .page-head a.small { display: inline-flex; align-items: center; min-height: 44px; }
  html[data-ui="c"] main .icon-btn, html[data-ui="c"] .modal .icon-btn { width: 44px; height: 44px; min-width: 44px; }
  html[data-ui="c"] .seg button { display: inline-flex; align-items: center; justify-content: center; }
  html[data-ui="c"] .shell .topbar .tb-avatar { min-width: 44px; min-height: 44px; place-items: center; }
  /* روابط «الكل / المحاسبة…» في رؤوس البطاقات: مساحة نقر أكبر دون تغيير الشكل */
  html[data-ui="c"] .c-card-h a { padding: 14px 10px; margin-block: -14px; margin-inline-end: -10px; }
  html[data-ui="c"] .cc .cc-acts .icon-btn, html[data-ui="c"] .cc-acts .icon-btn { width: 44px; height: 44px; }
  html[data-ui="c"] .cc .cc-name { padding: 11px 0; margin: -11px 0; }
  html[data-ui="c"] .pc-seg button, html[data-ui="c"] .act-more, html[data-ui="c"] .mw-qa, html[data-ui="c"] .mw-b, html[data-ui="c"] .rc2-people{ min-height: 44px; }
  html[data-ui="c"] .mw-qa { display: inline-flex; align-items: center; }
  html[data-ui="c"] .mw-r.td > a.mw-b { min-height: 44px; }
  /* مفاتيح التبديل الصغيرة (36×21) ودائرة الإنجاز: مساحة نقر غير مرئية حولها */
  html[data-ui="c"] .td-ck { width: 44px; height: 44px; margin: -11px; }
  html[data-ui="c"] .td-ck::before { inset: 11px; }
}
/* QA (إدارة): حبّات «تبويبات مركز العمل» في محرّر القائمة كانت بنفسجية (#4338ca) — ألوان العلامة الذهبية وحبّة C */
/* QA (إدارة): الإشعارات العائمة (toast) كانت سطحاً أسود (#1b1c29) — قرار المالك: لا أسطح سوداء. سطح C فاتح بظل، والأيقونة بلون الحالة */
html[data-ui="c"] .toast { background: var(--surface); color: var(--ink); border: 1px solid var(--line2); border-radius: var(--r-tile); box-shadow: var(--sh-lg); font-family: var(--font-c); }
html[data-ui="c"] .toast.ok svg { color: var(--ok); } html[data-ui="c"] .toast.bad svg { color: var(--bad); } html[data-ui="c"] .toast.warn svg { color: var(--warn); } html[data-ui="c"] .toast.info svg { color: var(--brand); }
html[data-ui="c"] .toast .x { color: var(--muted); min-width: 32px; min-height: 32px; }
/* QA (إدارة): «المهام المحذوفة» على الهاتف — الأزرار كانت تعصر العنوان في عمود بكلمة واحدة لكل سطر */
html[data-ui="c"] .dt-list li { flex-wrap: wrap; row-gap: 10px; }
html[data-ui="c"] .dt-list li > .grow { flex: 1 1 260px; min-width: 0; }
html[data-ui="c"] .dt-list .danger { color: var(--bad); }

/* ═════════ QA (shell): شريط «تراجع» في بوابة العميل — بلا سطح أسود (قرار المالك)، بطاقة فاتحة بظل وذهبي ═════════ */
html[data-ui="c"] body .cp-undo { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 18px 40px -16px rgba(0, 0, 0, .35); }
html[data-ui="c"] body .cp-undo .cp-undo-tx small { color: var(--muted); }
html[data-ui="c"] body .cp-undo button { background: var(--brand-tint); color: var(--brand-ink); min-height: 40px; border-radius: var(--r-pill); }
html[data-ui="c"] body .cp-undo-t { background: var(--brand); }
/* QA: حاويات تأخذ التركيز برمجياً (tabindex=-1: طبقة المراجعة، المحتوى) كانت تُظهر خطاً ذهبياً بطول الشاشة */
html[data-ui="c"] [tabindex="-1"]:focus, html[data-ui="c"] [tabindex="-1"]:focus-visible { outline: none; }
/* QA: أرقام الفواتير/الإيصالات (INV-2026-1003) كانت تنكسر عند الشرطة على سطرين في صفوف الفواتير */
html[data-ui="c"] bdi.mono, html[data-ui="c"] .mono[dir="ltr"] { white-space: nowrap; }
/* QA: نموذج «دفعت» — مسافات بين الحقول (كانت التسميات ملتصقة بالحقل السابق) وزر ملف مصمم */
html[data-ui="c"] .claim-form { display: grid; gap: 14px; }
html[data-ui="c"] .claim-form .field { margin: 0; }
html[data-ui="c"] .claim-form .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
html[data-ui="c"] .claim-m span { white-space: nowrap; }
/* «دفعت» (قرار المالك): المبلغ المستحق بطاقة واضحة في الأعلى، وملاحظة التأكيد سطر هادئ تحتها */
html[data-ui="c"] .claim-form .clm-due { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-tile); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-line); }
html[data-ui="c"] .claim-form .clm-due small { color: var(--muted); font-size: var(--fs-6); }
html[data-ui="c"] .claim-form .clm-due b { font-size: var(--fs-2); font-weight: 700; color: var(--brand-ink); line-height: 1.2; }
html[data-ui="c"] .claim-form .clm-due b span { font-size: var(--fs-5); font-weight: 600; }
html[data-ui="c"] .claim-form .clm-due > span { color: var(--ink2); font-size: var(--fs-6); }
html[data-ui="c"] .claim-form .clm-note { display: flex; gap: 8px; align-items: center; margin: -4px 0 0; color: var(--muted); font-size: var(--fs-6); }
html[data-ui="c"] .claim-form .clm-note svg { width: 16px; height: 16px; flex: none; }
html[data-ui="c"] .claim-file { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px; border: 1.5px dashed var(--line); border-radius: 14px; cursor: pointer; }
html[data-ui="c"] .claim-file .btn { flex: none; min-height: 36px; }
html[data-ui="c"] .claim-file small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
/* QA: التنبيهات على الكمبيوتر كانت فوق الدوك (بداية السطر) — تُزاح بجانبه */
@media (min-width: 761px) { html[data-ui="c"] body:has(.c-dock) .toasts { inset-inline-start: calc(var(--dock-w) + var(--dock-gap) * 2); } }
/* QA: عنوان الدفعة «اشتراك 12-2026» كان ينكسر عند الشرطة («-2026 / 12») في عمود «القادمة» الضيق */
html[data-ui="c"] .cpp-page .c-li-t > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* تدقيق «العمل» (أزرار): مساحة لمس ≥44px على الشاشات اللمسية لروابط رؤوس البطاقات والشرائح الصغيرة دون تغيير شكلها */
@media (pointer: coarse) {
  html[data-ui="c"] .c-card-h a, html[data-ui="c"] .cs-crumb a { display: inline-block; padding-block: 14px; margin-block: -14px; padding-inline: 6px; margin-inline-end: -6px; }
  html[data-ui="c"] .ml-chip, html[data-ui="c"] a.badge { position: relative; }
  html[data-ui="c"] .ml-chip::after, html[data-ui="c"] a.badge::after { content: ''; position: absolute; inset: -6px -2px; }
  html[data-ui="c"] a.badge::after { inset: -9px -2px; }
  html[data-ui="c"] .td-cc-t { padding-block: 11px; margin-block: -11px; }
}
/* تدقيق «العمل»: نافذة «فعّل الإشعارات» كانت فوق الأوراق والنوافذ المفتوحة (z 9999) فتغطي أزرارها، وعلى سطح المكتب فوق زر «جديد» */
html[data-ui="c"] .np { z-index: 140; } /* فوق الشريط والزر العائم (40–45) وتحت كل الطبقات (لوحة العمل 150، الأوراق 450…) */
@media (min-width: 861px) { html[data-ui="c"] .np { bottom: 104px; } }
/* تدقيق «العمل» — لوحة العمل ورابط المشاركة: شارة «POST» كانت كحلية شبه سوداء (لا أسطح سوداء) → ذهبية فاتحة، وأزرار Feed/Board بارتفاع لمس 44px */
html[data-ui="c"] .fd-card:not(.carousel):not(.guideline) .fd-tag, html[data-ui="c"] .ab-group:not(.carousel):not(.guide) .ab-gtag { background: var(--brand-tint); color: var(--brand-ink); }
@media (pointer: coarse) { html[data-ui="c"] .dv-seg button { height: 44px; } }
/* تدقيق «العمل» — أسطح داكنة متبقية (لا أسطح سوداء): شريط زوم اللوحة داخل تفاصيل المهمة، وشريحة «هوية العلامة» المختارة في صفحة الشركة */
html[data-ui="c"] .ab-tools { background: var(--surface); color: var(--ink); border-radius: var(--r-pill); padding: 6px; box-shadow: var(--sh-lg); }
html[data-ui="c"] .ab-tools button { color: var(--ink); border-radius: var(--r-pill); }
html[data-ui="c"] .ab-tools button:hover { background: var(--sunk); }
html[data-ui="c"] .bk-nav button.on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-ink); }
html[data-ui="c"] .bk-nav button.on em { color: var(--brand-ink); }
@media (pointer: coarse) { html[data-ui="c"] .ab-tools button { min-width: 40px; height: 40px; } html[data-ui="c"] .bk-nav button { height: 40px; } }
/* الشاشات القديمة داخل النمط C على الهاتف: أزرار .btn-sm و.icon-btn.sm وشرائح .seg كانت 40px — الحد الأدنى للمس 44px */
@media (pointer: coarse) {
  html[data-ui="c"] .btn.btn-sm, html[data-ui="c"] .icon-btn.sm, html[data-ui="c"] .seg > button, html[data-ui="c"] .cal-seg > button { min-height: 44px; }
  html[data-ui="c"] .icon-btn.sm { min-width: 44px; }
}
/* QA (هاتف بشق الشاشة): النوافذ تحفظ مسافة الأمان أسفلها كـ padding للنافذة كلها، فيلتصق الذيل اللاصق فوقها بـ 34px ويظهر المحتوى الممرَّر تحته
   (مثل «تعديل الشريط السفلي») — المسافة تنتقل لداخل الذيل */
@media (max-width: 760px) {
  html[data-ui="c"] .modal:has(> .modal-foot) { padding-bottom: 0; }
  html[data-ui="c"] .modal > .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
html[data-ui="c"] .tb-pick input[type="checkbox"] { accent-color: var(--brand); }
/* «تعديل الشريط»: «الرئيسية» و«البريد» ثابتان (مقفلان) أول الشريط */
html[data-ui="c"] .tb-pick label.lk { opacity: .75; cursor: default; }
html[data-ui="c"] .tb-pick label.lk > svg:last-child { width: 14px; height: 14px; margin-inline-start: auto; color: var(--muted); }
/* كل مربعات الاختيار والراديو بلون العلامة (لا الأزرق الافتراضي) */
html[data-ui="c"] input[type="checkbox"], html[data-ui="c"] input[type="radio"] { accent-color: var(--brand); }
@media (max-width: 760px) { html[data-ui="c"] .c-tile-w.c-desk-only { display: none; } }

/* ── منطقة إسقاط الملفات (ui.dropFiles): «رفع ملف» وإثبات «دفعت» ── */
html[data-ui="c"] .c-drop { display: grid; gap: 10px; }
html[data-ui="c"] .c-drop-z { display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 16px 18px; border: 1.5px dashed var(--brand-line); border-radius: var(--r-tile); background: var(--brand-tint); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
html[data-ui="c"] .c-drop-z:hover, html[data-ui="c"] .c-drop.over .c-drop-z { border-color: var(--brand); }
html[data-ui="c"] .c-drop-z:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
html[data-ui="c"] .c-drop-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--brand); box-shadow: var(--sh); }
html[data-ui="c"] .c-drop-ic svg { width: 22px; height: 22px; }
html[data-ui="c"] .c-drop-tx { display: grid; gap: 2px; min-width: 0; }
html[data-ui="c"] .c-drop-tx b { font-weight: 600; font-size: var(--fs-5); }
html[data-ui="c"] .c-drop-tx small { color: var(--muted); font-size: var(--fs-6); }
html[data-ui="c"] .c-drop.has:not(.one) .c-drop-z { min-height: 60px; padding: 10px 14px; }
html[data-ui="c"] .c-drop.has:not(.one) .c-drop-ic { width: 36px; height: 36px; box-shadow: none; }
html[data-ui="c"] .c-drop-list { display: grid; gap: 8px; }
html[data-ui="c"] .c-drop-f { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--surface); }
html[data-ui="c"] .c-drop-th { width: 56px; height: 56px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--sunk); color: var(--ink2); }
html[data-ui="c"] .c-drop-th img { width: 100%; height: 100%; object-fit: cover; }
html[data-ui="c"] .c-drop-th svg { width: 22px; height: 22px; }
html[data-ui="c"] .c-drop-n { flex: 1; min-width: 0; display: grid; gap: 2px; }
html[data-ui="c"] .c-drop-n b { font-weight: 600; font-size: var(--fs-5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="c"] .c-drop-n small { color: var(--muted); font-size: var(--fs-6); }
html[data-ui="c"] .c-drop-f .c-btn-sm { flex: none; }
html[data-ui="c"] .c-drop-pg { display: flex; align-items: center; gap: 10px; }
html[data-ui="c"] .c-drop-pg i { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--sunk); overflow: hidden; }
html[data-ui="c"] .c-drop-pg b { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .2s; }
html[data-ui="c"] .c-drop-pg span { min-width: 44px; text-align: end; color: var(--ink2); font-size: var(--fs-6); font-weight: 600; }
html[data-ui="c"] .c-drop.busy .c-drop-z { pointer-events: none; opacity: .6; }
/* قائمة منبثقة بنمط C — «⋯» و«تقارير ▾» و«مشاركة ▾» (ui-c.js popMenu) */
html[data-ui="c"] .c-pop { position: fixed; z-index: 480; min-width: 220px; max-width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; background: var(--surface); border-radius: var(--r-tile); box-shadow: 0 18px 44px rgba(18, 19, 26, .18), 0 0 0 1px var(--line); padding: 6px; animation: fade .12s ease; }
html[data-ui="c"] .c-pop > a, html[data-ui="c"] .c-pop > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; border: 0; background: none; padding: 8px 12px; border-radius: 10px; font: 400 var(--fs-5) var(--font-c); color: var(--ink); cursor: pointer; text-align: start; text-decoration: none; }
html[data-ui="c"] .c-pop > a:hover, html[data-ui="c"] .c-pop > button:hover, html[data-ui="c"] .c-pop > a:focus-visible, html[data-ui="c"] .c-pop > button:focus-visible { background: var(--sunk); outline: 0; }
html[data-ui="c"] .c-pop > .on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
html[data-ui="c"] .c-pop > .bad, html[data-ui="c"] .c-pop > .bad svg { color: var(--bad); }
html[data-ui="c"] .c-pop > [disabled] { opacity: .45; cursor: default; }
html[data-ui="c"] .c-pop svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
html[data-ui="c"] .c-pop > .on svg { color: inherit; }
html[data-ui="c"] .c-pop em { margin-inline-start: auto; font-style: normal; font-size: var(--fs-6); color: var(--muted); }
html[data-ui="c"] .c-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
html[data-ui="c"] .c-pop-h { display: block; padding: 6px 12px 2px; font-size: var(--fs-6); color: var(--muted); }
@media (max-width: 760px) { html[data-ui="c"] .c-pop > a, html[data-ui="c"] .c-pop > button { min-height: 44px; } }
/* زر «⋯» دائري وزر قائمة بسهم (تبويب «تقارير ▾») */
html[data-ui="c"] .c-ibtn-more { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--sh); color: var(--ink2); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
html[data-ui="c"] .c-ibtn-more svg { width: 20px; height: 20px; }
html[data-ui="c"] .c-ibtn-more[aria-expanded="true"] { background: var(--sunk); }
/* سطر حبّات القسم يحمل الفعل الرئيسي و«⋯» للصفحة (liftToHub) */
html[data-ui="c"] .hub-head:has(.hub-acts) .hub-tabs { flex: 1 1 auto; width: auto; min-width: 0; }
html[data-ui="c"] .hub-acts { flex: none; display: flex; gap: 8px; align-items: center; padding: 4px 0 8px; margin-inline-start: auto; }
html[data-ui="c"] .hub-acts .btn, html[data-ui="c"] .hub-acts .c-btn { height: 44px; border-radius: var(--r-pill); }

/* ═════════ «المزيد» — قرار المالك (mockups3): B2 قائمة كبيرة على الكمبيوتر، A3 ورقة بتبويبات على الهاتف ═════════ */
/* مشترك: مفتاح التبديل ومقطع اللغة */
html[data-ui="c"] .c-sw { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; background: var(--line); transition: background var(--t-fast) var(--ease); }
html[data-ui="c"] .c-sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start var(--t-fast) var(--ease); }
html[data-ui="c"].dark .c-sw { background: var(--brand); }
html[data-ui="c"].dark .c-sw::after { inset-inline-start: 21px; }
html[data-ui="c"] .c-lseg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
html[data-ui="c"] .c-lseg button { min-width: 48px; height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink2); font: 500 var(--fs-6) var(--font-c); cursor: pointer; }
html[data-ui="c"] .c-lseg button.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
html[data-ui="c"] [data-more-c].open, html[data-ui="c"] .c-dock-more.open { background: var(--brand-tint); color: var(--brand-ink); }

/* ── B2: الكمبيوتر ── */
html[data-ui="c"] .c-mega-root { pointer-events: none; } /* الشريط الجانبي تحت الطبقة يبقى قابلاً للنقر */
html[data-ui="c"] .c-mega-root > * { pointer-events: auto; }
html[data-ui="c"] .c-mega-root .c-scrim { inset-inline-start: calc(var(--dock-w) + var(--dock-gap) + 8px); background: rgba(18, 19, 26, .14); }
html[data-ui="c"].dark .c-mega-root .c-scrim { background: rgba(0, 0, 0, .45); }
html[data-ui="c"] .c-mega {
  --cw: 220px; position: absolute; z-index: 1; bottom: 16px; inset-inline-start: calc(var(--dock-w) + var(--dock-gap) + 14px);
  width: min(calc(var(--cols) * var(--cw) + 48px), calc(100vw - var(--dock-w) - var(--dock-gap) - 44px)); min-width: 720px;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-radius: 28px; box-shadow: var(--sh-lg);
  opacity: 0; transform: translateX(-10px) scale(.985); transform-origin: left bottom; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
html[data-ui="c"][dir="rtl"] .c-mega { transform: translateX(10px) scale(.985); transform-origin: right bottom; }
html[data-ui="c"] .c-mega-root.on .c-mega { opacity: 1; transform: none; }
html[data-ui="c"] .c-mega::after { content: ''; position: absolute; inset-inline-start: -8px; bottom: var(--arr, 110px); width: 18px; height: 18px; background: var(--surface); transform: rotate(45deg); border-radius: 3px; }
html[data-ui="c"] .c-mega-top { display: flex; align-items: center; gap: 12px; padding: 18px 22px 10px; }
html[data-ui="c"] .c-mega-ttl { flex: 1; min-width: 0; font-size: var(--fs-4, 17px); font-weight: 700; color: var(--ink); }
html[data-ui="c"] .c-mega:focus { outline: none; }
html[data-ui="c"] .c-mega-q { flex: 1; min-width: 0; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: var(--r-pill); background: var(--sunk); color: var(--muted); cursor: text; }
html[data-ui="c"] .c-mega-q:focus-within { box-shadow: 0 0 0 2px var(--brand); }
html[data-ui="c"] .c-mega-q svg { width: 18px; height: 18px; flex: none; }
html[data-ui="c"] .c-mega-q input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: none; color: var(--ink); font: 400 var(--fs-5) var(--font-c); -webkit-appearance: none; appearance: none; }
html[data-ui="c"] .c-mega-q input::-webkit-search-cancel-button { display: none; }
html[data-ui="c"] .c-mega-q input::placeholder { color: var(--muted); }
html[data-ui="c"] .c-mega-q kbd { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: 500 12px var(--font-c); }
html[data-ui="c"] .c-mega-lnk { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px; border-radius: 12px; color: var(--brand-ink); font: 500 var(--fs-6) var(--font-c); text-decoration: none !important; white-space: nowrap; }
html[data-ui="c"] .c-mega-lnk:hover { background: var(--brand-tint); }
html[data-ui="c"] .c-mega-lnk svg { width: 17px; height: 17px; }
/* قرار المالك 2026-11-22: كل شيء في «المزيد» — عمود لكل قسم (≥1280)، الصفحة الرئيسية سطر عريض وفروعها تحتها أصغر ومزاحة بخط إرشاد */
html[data-ui="c"] .c-mega-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); align-items: start; padding: 4px 12px 12px; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
html[data-ui="c"] .c-mega-sec { break-inside: avoid; padding: 6px 8px 6px; min-width: 0; }
html[data-ui="c"] .c-mega-sec + .c-mega-sec { border-inline-start: 1px solid var(--line2); }
html[data-ui="c"] .c-mega-g { margin-bottom: 4px; }
html[data-ui="c"] .c-mega-subs { list-style: none; margin: 0 0 2px; padding: 0; margin-inline-start: 16px; border-inline-start: 1.5px solid var(--line); }
html[data-ui="c"] .c-mega-s { position: relative; display: flex; align-items: center; break-inside: avoid; }
html[data-ui="c"] .c-mega-sa { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; margin-inline-start: 6px; border-radius: 10px; color: var(--ink2); font: 400 13px/1 var(--font-c); text-decoration: none !important; }
html[data-ui="c"] .c-mega-sa:hover, html[data-ui="c"] .c-mega-sa:focus-visible { background: var(--sunk); color: var(--ink); }
html[data-ui="c"] .c-mega-sa:focus-visible { outline-offset: -2px; }
html[data-ui="c"] .c-mega-sa .l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-mega-sa .c-bd { flex: none; }
html[data-ui="c"] .c-mega-sa.cur, html[data-ui="c"] .c-mega-a.cur .l { color: var(--brand-ink); font-weight: 600; }
html[data-ui="c"] .c-mega-s .c-mega-star { top: 0; width: 30px; height: 30px; }
html[data-ui="c"] .c-mega-s.pin .c-mega-sa { padding-inline-end: 34px; }
html[data-ui="c"] .c-mega-sec[hidden], html[data-ui="c"] .c-mega-r[hidden] { display: none; }
html[data-ui="c"] .c-mega-sec h3 { margin: 0 8px 6px; font: 600 13px/1.2 var(--font-c); color: var(--muted); }
html[data-ui="c"] .c-mega-r { position: relative; display: flex; align-items: center; border-radius: 12px; }
html[data-ui="c"] .c-mega-r:hover, html[data-ui="c"] .c-mega-r:focus-within { background: var(--sunk); }
html[data-ui="c"] .c-mega-a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 8px; border-radius: 12px; color: var(--ink); font: 600 var(--fs-6)/1 var(--font-c); font-size: 14px; text-decoration: none !important; }
html[data-ui="c"] .c-mega-a:focus-visible { outline-offset: -2px; }
html[data-ui="c"] .c-mega-a > svg { width: 18px; height: 18px; flex: none; color: var(--brand-ink); }
html[data-ui="c"] .c-mega-a .l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-mega-a .c-bd { flex: none; }
html[data-ui="c"] .c-mega-star { position: absolute; top: 4px; inset-inline-end: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: transparent; display: grid; place-items: center; cursor: pointer; }
html[data-ui="c"] .c-mega-star svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-mega-r:hover .c-mega-star, html[data-ui="c"] .c-mega-r:focus-within .c-mega-star { color: var(--muted); }
html[data-ui="c"] .c-mega-star:hover, html[data-ui="c"] .c-mega-star:focus-visible { color: var(--brand) !important; background: var(--surface); }
html[data-ui="c"] .c-mega-star.on { color: var(--brand); }
html[data-ui="c"] .c-mega-star.on svg { fill: currentColor; }
/* النجمة فوق طرف الصف: تأخذ مكاناً فقط عند المرور أو إن كانت الصفحة مثبّتة */
html[data-ui="c"] .c-mega-r:hover .c-mega-a, html[data-ui="c"] .c-mega-r:focus-within .c-mega-a, html[data-ui="c"] .c-mega-r.pin .c-mega-a { padding-inline-end: 38px; }
html[data-ui="c"] .c-mega-none { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 22px 26px; color: var(--muted); }
html[data-ui="c"] .c-mega-none[hidden] { display: none; }
html[data-ui="c"] .c-mega-none svg { width: 18px; height: 18px; }
html[data-ui="c"] .c-mega-foot { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-top: 1px solid var(--line2); background: var(--sunk); border-radius: 0 0 28px 28px; flex: none; }
html[data-ui="c"] .c-mega-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
html[data-ui="c"] .c-mega-who .c-more-av .av, html[data-ui="c"] .c-mega-who .c-more-av > * { width: 36px; height: 36px; font-size: 13px; }
html[data-ui="c"] .c-mega-who .c-more-who b { font-size: var(--fs-5); }
html[data-ui="c"] .c-mega-who .c-more-who small { font-size: 12px; }
html[data-ui="c"] .c-mega-it { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; border: 0; border-radius: 12px; background: none; color: var(--ink2); font: 500 var(--fs-6) var(--font-c); text-decoration: none !important; cursor: pointer; white-space: nowrap; }
html[data-ui="c"] button.c-mega-it:hover, html[data-ui="c"] a.c-mega-it:hover { color: var(--ink); }
html[data-ui="c"] .c-mega-it > svg { width: 18px; height: 18px; flex: none; }
html[data-ui="c"] .c-mega-it.bad { color: var(--bad); }
html[data-ui="c"] .c-mega-vr { width: 1px; height: 26px; background: var(--line); flex: none; }
/* 4 أعمدة متدفّقة على الشاشات الأضيق من 1280 (الأقسام تنقسم بين الأعمدة، والصفحة الرئيسية تبقى مع أول فروعها) */
@media (max-width: 1279px) {
  html[data-ui="c"] .c-mega { --cw: 205px; min-width: 0; }
  html[data-ui="c"] .c-mega { width: min(calc(var(--cols-s) * var(--cw) + 48px), calc(100vw - var(--dock-w) - var(--dock-gap) - 44px)); }
  html[data-ui="c"] .c-mega-cols { display: block; column-count: var(--cols-s); column-gap: 0; column-rule: 1px solid var(--line2); }
  html[data-ui="c"] .c-mega-sec + .c-mega-sec { border-inline-start: 0; }
  html[data-ui="c"] .c-mega-g { break-inside: avoid; }
  html[data-ui="c"] .c-mega-sa { height: 28px; }
  html[data-ui="c"] .c-mega-who .c-more-who small { display: none; }
  /* التذييل الأضيق: أيقونات (لها اسم بالتلميح) حتى لا يُقصّ اسم الحساب */
  html[data-ui="c"] .c-mega-it > span:not(.c-lseg) { display: none; }
  /* 3 أعمدة: القسم الطويل ينقسم بين عمودين (العنوان يبقى مع أول صف) فتتوازن الأعمدة ولا تحتاج القائمة تمريراً */
  html[data-ui="c"] .c-mega-sec { break-inside: auto; }
  html[data-ui="c"] .c-mega-sec h3 { break-after: avoid; }
  html[data-ui="c"] .c-mega-r { break-inside: avoid; break-after: avoid; }
  html[data-ui="c"] .c-mega-a { height: 36px; }
}

/* ── «المزيد» على الهاتف: البلاطة والسطر (مشتركة) ── */
html[data-ui="c"] .c-tile3 { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 6px; border-radius: 20px; background: var(--sunk); color: var(--ink); font: 500 13px/1.25 var(--font-c); text-align: center; text-decoration: none !important; }
html[data-ui="c"] .c-tile3:active { background: var(--brand-tint); }
html[data-ui="c"] .c-tile3 > svg { width: 24px; height: 24px; flex: none; color: var(--brand-ink); }
html[data-ui="c"] .c-tile3 > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[data-ui="c"] .c-tile3 .c-bd { position: absolute; top: 8px; inset-inline-end: 8px; }
html[data-ui="c"] .c-rows3 { display: grid; gap: 2px; }
html[data-ui="c"] .c-row3 { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 4px 12px; border: 0; border-radius: 16px; background: none; color: var(--ink); font: 500 var(--fs-5) var(--font-c); text-align: start; text-decoration: none !important; cursor: pointer; }
html[data-ui="c"] .c-row3:not(div):active { background: var(--sunk); }
html[data-ui="c"] .c-row3 > svg { width: 20px; height: 20px; flex: none; color: var(--brand-ink); }
html[data-ui="c"] .c-row3 > span:not(.c-lseg) { flex: 1; min-width: 0; }
html[data-ui="c"] .c-row3 .go { width: 18px; height: 18px; color: var(--muted); }
html[data-ui="c"][dir="rtl"] .c-row3 .go { transform: scaleX(-1); }
html[data-ui="c"] .c-row3.bad, html[data-ui="c"] .c-row3.bad > svg { color: var(--bad); }
html[data-ui="c"] .c-row3 + .c-row3 { background-image: linear-gradient(var(--line2), var(--line2)); background-size: calc(100% - 24px) 1px; background-position: center top; background-repeat: no-repeat; }
/* ── «المزيد» على الهاتف: ورقة تمتد خلف الشريط السفلي الذي يبقى ظاهراً وقابلاً للمس فوقها («المزيد» يغلقها) ── */
html[data-ui="c"] .c-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html[data-ui="c"] .c-sheet.c-mb { padding: 10px 16px calc(var(--mb-bar, 72px) + 12px); }
html[data-ui="c"] .c-sheet.c-mb:focus { outline: 0; }
html[data-ui="c"] .c-sheet.c-mb .c-grab { margin-bottom: 10px; }
@media (max-width: 760px) {
  html[data-ui="c"].c-mb-open .tabbar.c-tabbar { z-index: 460; box-shadow: 0 -1px 0 var(--line2); }
}
html[data-ui="c"] .c-tabbar .c-tab-more { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
html[data-ui="c"] .c-tabbar .c-tab-more.open { color: var(--brand-ink); background: var(--brand-tint); }
html[data-ui="c"] .c-tabbar .c-tab-more.open span { color: var(--brand-ink) !important; font-weight: 600; }
html[data-ui="c"] .c-mb .go { width: 18px; height: 18px; flex: none; color: var(--muted); }
html[data-ui="c"][dir="rtl"] .c-mb .go, html[data-ui="c"][dir="rtl"] .c-mb-crumb .sep { transform: scaleX(-1); }
html[data-ui="c"]:not([dir="rtl"]) .c-mb .bk { transform: scaleX(-1); }
/* سطر «حسابي»: الصورة والاسم (يفتح صفحات الحساب داخل الورقة) + الوضع الداكن واللغة بلمسة */
html[data-ui="c"] .c-mb-me { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; }
html[data-ui="c"] .c-mb-acct { flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 4px; border: 0; border-radius: 18px; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
html[data-ui="c"] .c-mb-acct:active { background: var(--sunk); }
html[data-ui="c"] .c-mb-acct .c-more-av .av, html[data-ui="c"] .c-mb-acct .c-more-av > * { width: 44px; height: 44px; }
html[data-ui="c"] .c-mb-q { width: 44px; height: 44px; flex: none; }
html[data-ui="c"] .c-mb-q .tm-sun { display: none; }
html[data-ui="c"].dark .c-mb-q .tm-moon { display: none; }
html[data-ui="c"].dark .c-mb-q .tm-sun { display: block; }
html[data-ui="c"] .c-mb-lang { width: auto; height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink2); font: 600 13px/1 var(--font-c); cursor: pointer; }
html[data-ui="c"] .c-mb-lang svg { width: 18px; height: 18px; }
/* تلميح أول مرة فقط */
html[data-ui="c"] .c-mb-hint { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 4px 4px 4px 12px; border-radius: 16px; background: var(--brand-tint); color: var(--ink); font: 500 13px/1.45 var(--font-c); }
html[data-ui="c"][dir="rtl"] .c-mb-hint { padding: 4px 12px 4px 4px; }
html[data-ui="c"] .c-mb-hint > svg { width: 18px; height: 18px; flex: none; color: var(--brand-ink); }
html[data-ui="c"] .c-mb-hint > span { flex: 1; min-width: 0; }
html[data-ui="c"] .c-mb-hx { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
html[data-ui="c"] .c-mb-hx svg { width: 18px; height: 18px; }
/* ── «المزيد» على الهاتف مثل الكمبيوتر (قرار المالك 2026-11-23: «خلي مزيد الهاتف مشابهة لمزيد الكمبيوتر أكثر») ──
   أقسام الكمبيوتر نفسها: عنوان القسم، الصفحة الرئيسية سطراً (أيقونة، اسم، شارة) وتحتها فروعها رقائق تلتفّ (44px)، فكل وجهة بلمسة.
   الورقة تتمرّر، وأسفلها شريط ثابت فوق الشريط السفلي: «المفضّلة» ثم فهرس الأقسام. */
html[data-ui="c"] .c-sheet.c-md:has(.c-md-foot) { padding-bottom: 0; }
html[data-ui="c"] .c-md-list { display: grid; padding-bottom: 8px; }
/* تصميم ج (المالك 2026-11-23: «ج. قائمة بتنفتح»): كل قسم مجموعة أسطر مثل إعدادات الآيفون — سطر 52px (أيقونة في مربع ذهبي فاتح، اسم، شارة،
   سهم)، والصفحة ذات الفروع تنفتح تحتها أسطراً 44px (سهم لأسفل يدور) بدل رقائق تلتفّ */
html[data-ui="c"] .c-md-sec { padding: 6px 0 10px; }
html[data-ui="c"] .c-md-sec h3 { margin: 6px 6px 8px; font: 600 12px/1.2 var(--font-c); color: var(--muted); letter-spacing: .02em; }
html[data-ui="c"] .c-md-grp { border-radius: 16px; background: var(--bg); overflow: hidden; }
html[data-ui="c"] .c-md-g + .c-md-g { border-top: 1px solid var(--line2); }
html[data-ui="c"] .c-md-a { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 0; background: none; color: var(--ink); font: 600 15px/1.25 var(--font-c); text-align: start; text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html[data-ui="c"] .c-md-a:active { background: var(--sunk); }
html[data-ui="c"] .c-md-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .c-md-ic svg { width: 18px; height: 18px; }
html[data-ui="c"] .c-md-a .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="c"] .c-md-a .go { width: 16px; height: 16px; flex: none; color: var(--muted); opacity: .7; }
html[data-ui="c"][dir="rtl"] .c-md-a .go { transform: scaleX(-1); }
html[data-ui="c"] .c-md-a .dn { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .2s var(--ease); }
html[data-ui="c"] .c-md-g.open > .c-md-a.x { background: var(--brand-tint); }
html[data-ui="c"] .c-md-g.open > .c-md-a.x .dn { transform: rotate(180deg); color: var(--brand-ink); }
html[data-ui="c"] .c-md-a .c-bd, html[data-ui="c"] .c-md-c .c-bd { position: static; flex: none; }
html[data-ui="c"] .c-md-a.cur .l { color: var(--brand-ink); }
html[data-ui="c"] .c-md-a.cur .c-md-ic { background: var(--brand); color: var(--on-brand); }
html[data-ui="c"] .c-md-cs { display: none; padding: 2px 0 4px; margin: 0; background: var(--surface); box-shadow: inset 0 1px 0 var(--line2); }
html[data-ui="c"] .c-md-g.open > .c-md-cs { display: grid; }
html[data-ui="c"] .c-md-c { min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; padding-block: 0; padding-inline: 56px 14px; border: 0; border-radius: 0; background: none; color: var(--ink2); font: 500 14px/1.3 var(--font-c); text-align: start; text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html[data-ui="c"] .c-md-c > span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="c"] .c-md-c:active { background: var(--sunk); }
html[data-ui="c"] .c-md-c.cur { color: var(--brand-ink); font-weight: 600; }
html[data-ui="c"] .c-md-c.cur::before { content: ""; width: 6px; height: 6px; margin-inline-start: -14px; border-radius: 50%; background: var(--brand); flex: none; }
html[data-ui="c"] .c-md-eh { margin: 0 4px 6px; font-size: 12px; line-height: 1.5; color: var(--muted); }
html[data-ui="c"] .c-md-list.ed .c-md-c { gap: 8px; padding-inline-start: 50px; }
html[data-ui="c"] .c-md-a.on, html[data-ui="c"] .c-md-list.ed .c-md-c.on { background: var(--brand-tint); }
html[data-ui="c"] .c-md-st { display: grid; place-items: center; width: 20px; height: 20px; flex: none; color: var(--muted); font-style: normal; }
html[data-ui="c"] .c-md-st svg { width: 18px; height: 18px; }
html[data-ui="c"] .c-md-st.on { color: var(--brand); }
html[data-ui="c"] .c-md-st.on svg { fill: currentColor; }
/* الشريط الثابت أسفل الورقة (قرب الإبهام): «المفضّلة» ثم فهرس الأقسام؛ يمتد خلف الشريط السفلي الذي يبقى فوقه */
html[data-ui="c"] .c-md-foot { position: sticky; bottom: 0; z-index: 2; margin: 0 -16px; padding: 8px 16px calc(var(--mb-bar, 72px) + 6px); background: var(--surface); box-shadow: 0 -1px 0 var(--line2); }
html[data-ui="c"] .c-md-fav { display: flex; align-items: center; gap: 6px; min-width: 0; }
html[data-ui="c"] .c-md-fl { display: grid; place-items: center; width: 22px; flex: none; color: var(--brand); }
html[data-ui="c"] .c-md-fl svg { width: 18px; height: 18px; fill: currentColor; }
html[data-ui="c"] .c-md-fav .c-mb-chips { flex: 1; min-width: 0; }
html[data-ui="c"] .c-md .c-mb-chip { height: 44px; padding: 0 14px; font-size: 14px; }
html[data-ui="c"] .c-md-fav .c-mb-ed { margin: 0; flex: none; }
html[data-ui="c"] .c-md-ix { display: flex; gap: 2px; margin: 8px 0 0; padding: 3px; border-radius: var(--r-pill); background: var(--sunk); overflow-x: auto; scrollbar-width: none; }
html[data-ui="c"] .c-md-ix::-webkit-scrollbar { display: none; }
html[data-ui="c"] .c-md-ix button { flex: 1 0 auto; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: 600 13px/1 var(--font-c); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html[data-ui="c"] .c-md-ix button.on { background: var(--surface); color: var(--brand-ink); box-shadow: 0 1px 3px rgba(18, 19, 26, .12); }
/* «المفضّلة» (الهاتف): رقائق تلتفّ أفقياً بالتمرير، «تعديل / تم» 44px */
html[data-ui="c"] .c-mb-ed { min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--brand-ink); font: 600 14px/1 var(--font-c); cursor: pointer; }
html[data-ui="c"] .c-mb-chips { display: flex; gap: 8px; margin: 0 -2px; padding: 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
html[data-ui="c"] .c-mb-chips::-webkit-scrollbar { display: none; }
html[data-ui="c"] .c-mb-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--ink); font: 600 14px/1 var(--font-c); white-space: nowrap; text-decoration: none !important; cursor: pointer; scroll-snap-align: start; }
html[data-ui="c"] .c-mb-chip > svg { width: 18px; height: 18px; flex: none; color: var(--brand-ink); }
html[data-ui="c"] .c-mb-chip .c-bd { position: static; }
html[data-ui="c"] .c-mb-chip.ed { background: var(--sunk); }
html[data-ui="c"] .c-mb-chip.ed .rm { width: 16px; height: 16px; color: var(--muted); }
html[data-ui="c"] .c-mb-chip.add { background: none; border: 1.5px dashed var(--line); color: var(--ink2); font-weight: 500; }
/* «حسابي» داخل الورقة: مسار، اسم، صفوف صفحات الحساب، «رجوع» */
html[data-ui="c"] .c-mb-crumb { display: flex; align-items: center; gap: 2px; margin: -10px 0 0; font: 500 13px/1 var(--font-c); color: var(--muted); }
html[data-ui="c"] .c-mb-crumb button { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
html[data-ui="c"] .c-mb-crumb .sep { width: 14px; height: 14px; }
html[data-ui="c"] .c-mb-crumb b { padding: 0 6px; color: var(--ink); font-weight: 600; }
html[data-ui="c"] .c-mb-sh { display: flex; align-items: center; gap: 12px; margin: 0 4px 12px; }
html[data-ui="c"] .c-mb-sh .c-more-who b { outline: 0; }
html[data-ui="c"] .c-mb-foot { display: flex; gap: 10px; margin-top: 14px; }
html[data-ui="c"] .c-mb-foot .c-btn { min-width: 0; }
html[data-ui="c"] .c-mb-back { flex: 0 0 auto; min-width: 108px; }
html[data-ui="c"] .c-mb-back.w { flex: 1; }
html[data-ui="c"] .c-recent:focus { outline: 0; }
html[data-ui="c"] .c-mb-foot svg { width: 20px; height: 20px; flex: none; }
/* الانتقال بين المستويين: انزلاق قصير داخل الورقة (للأمام من جهة نهاية السطر) */
@keyframes c-mb-in { from { opacity: 0; transform: translateX(var(--mb-dx)); } to { opacity: 1; transform: none; } }
html[data-ui="c"] .c-mb-body.in-f { --mb-dx: 32px; animation: c-mb-in .24s var(--ease) both; }
html[data-ui="c"] .c-mb-body.in-b { --mb-dx: -32px; animation: c-mb-in .24s var(--ease) both; }
html[data-ui="c"][dir="rtl"] .c-mb-body.in-f { --mb-dx: -32px; }
html[data-ui="c"][dir="rtl"] .c-mb-body.in-b { --mb-dx: 32px; }
@media (prefers-reduced-motion: reduce) { html[data-ui="c"] .c-mb-body.in-f, html[data-ui="c"] .c-mb-body.in-b { animation: none; } }
/* الشاشات القصيرة (iPhone SE): رأس أصغر وأسطر أقصر، والأهداف تبقى 44px */
@media (max-height: 760px) {
  html[data-ui="c"] .c-mb-crumb { display: none; }
  html[data-ui="c"] .c-mb-me { padding-bottom: 2px; }
  html[data-ui="c"] .c-sheet.c-mb .c-grab { margin-bottom: 6px; }
  html[data-ui="c"] .c-mb-acct { min-height: 48px; }
  html[data-ui="c"] .c-mb-acct .c-more-av .av, html[data-ui="c"] .c-mb-acct .c-more-av > * { width: 40px; height: 40px; }
  html[data-ui="c"] .c-md-a { min-height: 48px; font-size: 14px; }
  html[data-ui="c"] .c-md-ic { width: 28px; height: 28px; border-radius: 9px; }
  html[data-ui="c"] .c-md-c { padding-inline-start: 52px; font-size: 13px; }
  html[data-ui="c"] .c-md-foot { padding-top: 6px; }
  html[data-ui="c"] .c-md-ix { margin-top: 4px; }
  html[data-ui="c"] .c-mb-sh { margin-bottom: 10px; }
  html[data-ui="c"] .c-mb-foot { margin-top: 10px; }
}
/* «آخر الصفحات»: ضغط مطوّل على «المزيد» — قائمة صغيرة فوق الزر (أحدث صفحة أقرب للإبهام) */
html[data-ui="c"] .c-recent-root .c-scrim { background: rgba(18, 19, 26, .18); }
html[data-ui="c"].dark .c-recent-root .c-scrim { background: rgba(0, 0, 0, .45); }
html[data-ui="c"] .c-recent { position: absolute; bottom: var(--rb, 96px); inset-inline-end: 12px; z-index: 1; width: min(264px, calc(100vw - 24px)); display: grid; gap: 2px; padding: 8px; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-lg); transform-origin: bottom; transform: translateY(8px) scale(.97); opacity: 0; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
html[data-ui="c"] .c-recent-root.on .c-recent { transform: none; opacity: 1; }
html[data-ui="c"] .c-recent h4 { display: flex; align-items: center; gap: 6px; margin: 4px 8px 4px; font: 600 13px/1.2 var(--font-c); color: var(--muted); }
html[data-ui="c"] .c-recent h4 svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-rc-it { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: 600 15px/1.2 var(--font-c); text-align: start; text-decoration: none !important; cursor: pointer; }
html[data-ui="c"] .c-rc-it > svg { width: 20px; height: 20px; flex: none; color: var(--brand-ink); }
html[data-ui="c"] .c-rc-it.hot, html[data-ui="c"] .c-rc-it:active { background: var(--brand-tint); }
html[data-ui="c"] .c-rc-it.all { margin-top: 4px; box-shadow: 0 -1px 0 var(--line2); border-radius: 0 0 14px 14px; color: var(--brand-ink); }
html[data-ui="c"] .c-rc-none { margin: 4px 12px 8px; font-size: 13px; color: var(--muted); }

/* لوحة المفاتيح على الآيفون: سفاري لا يقصّر الصفحة، فالأوراق الثابتة (ورقة، نافذة، «ما الذي لا يناسبكم؟») كانت تبقى خلف لوحة المفاتيح
   ويختفي الحقل المكتوب فيه وزر الإرسال. حين تُفتح (body.kb-open من pinBottomBar) تتبع الطبقة الجزء المرئي من الشاشة (--vvt/--vvh) */
@media (max-width: 760px) {
  html[data-ui="c"] body.kb-open .c-layer, html[data-ui="c"] body.kb-open .cr-sheet { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }
  html[data-ui="c"] body.kb-open .c-layer .c-sheet, html[data-ui="c"] body.kb-open .c-modal, html[data-ui="c"] body.kb-open .cr-sh-in { max-height: calc(var(--vvh, 100vh) - 8px); scroll-padding-bottom: 96px; }
}

/* ── المبيعات على الهاتف (تدقيق الهاتف q-1): شريط واحد للمندوب «الأرقام · المحتملون · المتابعات · العروض» بالتبويب الصحيح نشطاً؛
   «أدائي» و«جدول الأسعار» من الشريط السفلي/المزيد، ولا يظهر الشريط في صفحاتهما ولا داخل منشئ المستند (وضع المهمة) ── */
html[data-ui="c"] .hub-tabs .hs { display: none; }
@media (max-width: 767px) {
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs .hl { display: none; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs .hs { display: inline; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs { display: flex; gap: 0; padding: 4px; margin: 2px 0 6px; overflow: visible; background: var(--sunk); border-radius: 16px; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 6px; justify-content: center; background: none; box-shadow: none; border-radius: 12px; color: var(--muted); font-size: var(--fs-6); }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a svg, html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a .ndot { display: none; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh); }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a[href="#/sales/contacts"] { order: 1; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a[href="#/sales/pipeline"] { order: 2; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a[href="#/sales/follow"] { order: 3; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a[href="#/contracts"] { order: 4; }
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a[href="#/sales/stats"],
  html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] .hub-tabs a[href="#/pricing"],
  html[data-ui="c"][data-persona="sales"] .hub-slot:has(.hub-head[data-hub="sales"] a.on[href="#/sales/stats"]),
  html[data-ui="c"][data-persona="sales"] .hub-slot:has(.hub-head[data-hub="sales"] a.on[href="#/pricing"]) { display: none; }
}

/* ── الاجتماعات على الهاتف (تدقيق الهاتف m-1..m-4): «اجتماع جديد» واضح، «طلب اجتماع مع الإدارة» بطاقة أسفل القائمة،
   فلتر أقرب، «إلى تقويمي» زر أيقونة، ونموذج «اجتماع جديد» بحقل في السطر وشرائح 44px ── */
html[data-ui="c"] .mt-askcard { display: none; }
@media (max-width: 767px) {
  html[data-ui="c"] .page-head:has(~ .mt-scope) > div:first-child p { display: none; }
  html[data-ui="c"] .page-head:has(~ .mt-scope) .actions [data-ask] { display: none; }
  html[data-ui="c"] .page-head:has(~ .mt-scope) .actions [data-new] { opacity: 1; filter: none; }
  html[data-ui="c"] .mt-scope { margin: 0 0 8px; }
  html[data-ui="c"] .mt-filter { margin: 0 0 10px; }
  html[data-ui="c"] .mt-filter .seg button { min-height: 40px; }
  html[data-ui="c"] .mt-acts [data-addcal] .cal-lbl { display: none; }
  html[data-ui="c"] .mt-acts [data-addcal] { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; background: var(--sunk); color: var(--ink); border: 0; box-shadow: none; }
  html[data-ui="c"] .mt-askcard { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 14px 16px; border-radius: 20px; background: var(--sunk); }
  html[data-ui="c"] .mt-askcard > svg { width: 22px; height: 22px; color: var(--brand-ink); flex: none; }
  html[data-ui="c"] .mt-askcard > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
  html[data-ui="c"] .mt-askcard small { color: var(--muted); font-size: var(--fs-6); }
  html[data-ui="c"] .mt-askcard .c-btn { min-height: 44px; flex: none; }
  html[data-ui="c"] .mf-when { grid-template-columns: minmax(0, 1fr); }
  html[data-ui="c"] .mf-chips button { height: 44px; padding: 0 14px; font-size: var(--fs-6); }
  html[data-ui="c"] .mf-kinds { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  html[data-ui="c"] .mf-kinds button { min-height: 56px; padding: 10px; }
  html[data-ui="c"] .mf-all { min-height: 44px; }
}
@media (max-width: 767px) {
  /* «اجتماع جديد» في سطر «القادمة/السابقة» نفسه بدل سطر كامل وحده */
  html[data-ui="c"] .page-head:has(+ .mt-scope) { position: relative; height: 1px; min-height: 0; margin: 0 0 -1px; padding: 0; overflow: visible; }
  html[data-ui="c"] .page-head:has(+ .mt-scope) > div:first-child { display: none; }
  html[data-ui="c"] .page-head:has(+ .mt-scope) .actions { position: absolute; top: 0; inset-inline-end: 0; width: auto; margin: 0; z-index: 2; }
  html[data-ui="c"] .page-head:has(+ .mt-scope) .actions [data-new] { width: auto; min-height: 44px; height: 44px; padding-inline: 16px; }
  html[data-ui="c"] .page-head:has(+ .mt-scope) + .mt-scope { max-width: calc(100% - 150px); }
}

/* ── المحادثات على الهاتف (تدقيق الهاتف ch-1..ch-4): الصف المحدد بلون العلامة الخافت في الفاتح والداكن (كان رمادياً فاتحاً
   بنص باهت في الداكن)، القاعدة سطر صغير، «محادثة جديدة» 44px، والردود السريعة 40px ── */
@media (max-width: 767px) {
  html[data-ui="c"] .hb-it { background: var(--surface); border-color: var(--line2, var(--line)); color: var(--ink); transition: none; }
  html[data-ui="c"] .hb-it.on, html[data-ui="c"] .hb-it:active { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
  html[data-ui="c"] .hb-it.unread { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
  html[data-ui="c"] .hb-it .hb-r1 b { color: var(--ink); }
  html[data-ui="c"] .hb-it .hb-r2, html[data-ui="c"] .hb-it .hb-r2 span, html[data-ui="c"] .hb-it .hb-r1 small { color: var(--ink2); }
  html[data-ui="c"] .hb-it.unread .hb-r2 span { color: var(--ink); }
  html[data-ui="c"] .hb-policy { padding: 8px 12px; gap: 8px; align-items: center; border-radius: 14px; }
  html[data-ui="c"] .hb-policy svg { width: 16px; height: 16px; flex: none; }
  html[data-ui="c"] .hb-policy span { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
  html[data-ui="c"] .hb-policy b { font-size: var(--fs-6); }
  html[data-ui="c"] .hb-policy small { display: none; }
  html[data-ui="c"] .hb-newb, html[data-ui="c"] .hb-sh [data-new] { width: 44px; height: 44px; min-width: 44px; }
  html[data-ui="c"] .hc-quick button { min-height: 40px; padding-inline: 14px; }
}
@media (max-width: 767px) and (hover: hover) { html[data-ui="c"] .hb-it:hover { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); } }
/* ═════════ فحص الهاتف 2026-11 — الإطار (phone-c.js): الشريط العلوي المتقلّص، تبويبات القسم الملتصقة، «المزيد» في الشريط،
   ورقة «+» حسب الصفحة، الورقة السفلية، ورقة الفلاتر، ملء الشاشة للنماذج، شريط الأفعال، الإشعارات، البحث بملء الشاشة ═════════ */
/* «المزيد» آخر الشريط السفلي (القرار 1) — زر بنفس شكل التبويبات */
html[data-ui="c"] .c-tabbar .c-tab-more { font: inherit; }
@media (max-width: 760px) {
  html[data-ui="c"] .c-tabbar .c-tab-more { font: 500 12px/1.3 var(--font-c); }
  html[data-ui="c"] .c-tabbar .c-tab-more.active, html[data-ui="c"] .c-tabbar .c-tab-more.open { color: var(--brand-ink); font-weight: 600; }
  /* الشريط العلوي: عنوان كبير عند الفتح، وسطر واحد 52px بعد التمرير (العنوان بجانب الأزرار، بلا الشعار) — الهامش يعوّض الفرق فلا يقفز المحتوى */
  html[data-ui="c"].c-tb-small .shell .topbar, html[data-ui="c"].c-tb-small .cp-shell .topbar {
    margin-bottom: var(--c-tb-comp, 0px); min-height: 0; row-gap: 0; padding-top: calc(env(safe-area-inset-top) + 4px); padding-bottom: 4px; flex-wrap: nowrap;
    box-shadow: 0 1px 0 var(--line); background: color-mix(in srgb, var(--bg) 96%, transparent);
  }
  html[data-ui="c"].c-tb-small .topbar .c-tb-logo { display: none !important; }
  html[data-ui="c"].c-tb-small .shell .topbar #page-title, html[data-ui="c"].c-tb-small .cp-shell .topbar .cp-title { order: 2; flex: 1 1 0; padding-top: 0; font-size: var(--fs-4) !important; cursor: pointer; }
  html[data-ui="c"].c-tb-small .topbar .cp-tpill .tp-n { height: 22px; min-width: 22px; font-size: 12px; line-height: 22px; padding: 0 7px; }
  html[data-ui="c"].c-tb-small .cp-shell .topbar .cp-title .cp-h > small { display: none; }
  /* تبويبات القسم (المهام/الداشبورد/قائمتي…): شريط ملتصق تحت الشريط العلوي بخط تحت التبويب النشط بدل حبّات تكرّر العنوان */
  html[data-ui="c"]:has(.shell .hub-slot > .hub-head) { --c-hub-h: var(--c-hub-real, 48px); }
  html[data-ui="c"] .shell .hub-slot:not(:empty) { position: sticky; top: var(--c-top-h); z-index: 29; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); }
  html[data-ui="c"] .shell .hub-head { padding: 0; }
  html[data-ui="c"] .shell .hub-tabs { gap: 0; padding: 0 8px; border-bottom: 1px solid var(--line); scroll-padding-inline: 24px; }
  html[data-ui="c"] .shell .hub-tabs a, html[data-ui="c"] .shell .hub-tabs a.on { height: 46px; min-height: 46px; padding: 0 12px; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--muted); font: 500 15px var(--font-c); border-bottom: 3px solid transparent; }
  html[data-ui="c"] .shell .hub-tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
  html[data-ui="c"] .shell .hub-tabs a svg { display: none; }
  html[data-ui="c"] .shell .hub-tabs a .count { background: var(--sunk); color: var(--ink2); border: 0; }
  html[data-ui="c"] .shell .hub-slot + .content { padding-top: 10px; }
  /* سهولة الوصول (تقرير 2026-11-22، المشكلة 5): تبويبات القسم تلتفّ على سطرين بدل السحب الأفقي — «العمل عن بعد»، «نشاط الموظفين»، «جدول الأسعار»
     ظاهرة بلا سحب. السطر 40px والخط تحت التبويب النشط كما هو. «الإعدادات» تبقى كما هي (قرار المالك: صفحات الإعدادات لا تتغيّر). */
  html[data-ui="c"] .shell .hub-head:not([data-hub="settings"]) .hub-tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; padding: 0 4px; }
  html[data-ui="c"] .shell .hub-head:not([data-hub="settings"]) .hub-tabs a, html[data-ui="c"] .shell .hub-head:not([data-hub="settings"]) .hub-tabs a.on { height: 40px; min-height: 40px; padding: 0 10px; flex: 0 0 auto; }
  /* المهام بخمسة تبويبات (مع التدريب): شبكة متساوية 3 + 2 بدل سطر رابع يتيم («داشبورد التدريب» وحده) */
  html[data-ui="c"] .shell .hub-head[data-hub="work"] .hub-tabs:has(> a:nth-child(5):last-child) { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 4px; }
  html[data-ui="c"] .shell .hub-head[data-hub="work"] .hub-tabs:has(> a:nth-child(5):last-child) > a { grid-column: span 2; justify-content: center; min-width: 0; padding: 0 6px; }
  html[data-ui="c"] .shell .hub-head[data-hub="work"] .hub-tabs:has(> a:nth-child(5):last-child) > a:nth-child(n+4) { grid-column: span 3; }
  html[data-ui="c"] .shell .hub-head[data-hub="work"] .hub-tabs:has(> a:nth-child(5):last-child) > a > span:not(.count) { overflow: hidden; text-overflow: ellipsis; }
  /* المحاسبة: التبويبات شبكة من أربعة أعمدة (سطران) بدل شريط يُسحب أفقياً */
  html[data-ui="c"] .shell .mc-scope nav.mc-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  html[data-ui="c"] .shell .mc-scope nav.mc-tabs > * { min-width: 0; min-height: 40px; padding: 0 6px; justify-content: center; }
  html[data-ui="c"] .shell .mc-scope nav.mc-tabs > * { text-align: center; line-height: 1.2; white-space: normal; }
  /* صف تبويبات ملتصق داخل أي صفحة (stickyTabs) */
  html[data-ui="c"] .c-stabs { position: sticky; top: var(--c-head-h); z-index: 28; margin-inline: -16px; padding-inline: 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); }
}

/* ورقة سفلية موحّدة (bottomSheet) — جانبية على الكمبيوتر */
html[data-ui="c"] .c-bs-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
html[data-ui="c"] .c-bs-t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
html[data-ui="c"] .c-bs-t b { font-size: var(--fs-3); font-weight: 600; }
html[data-ui="c"] .c-bs-t small { font-size: var(--fs-6); color: var(--muted); margin-top: 2px; }
html[data-ui="c"] .c-bs-f { position: sticky; bottom: -24px; display: flex; gap: 10px; padding: 14px 0 0; margin-top: 16px; background: var(--surface); }
html[data-ui="c"] .c-bs-f .c-btn { flex: 1 1 auto; min-width: 0; }
@media (max-width: 760px) {
  html[data-ui="c"] .c-sheet.c-bs.tall { height: 90vh; max-height: 90vh; }
  html[data-ui="c"] .c-bs-f { bottom: calc(-20px - env(safe-area-inset-bottom)); padding-bottom: calc(10px + env(safe-area-inset-bottom)); margin-bottom: calc(-1 * env(safe-area-inset-bottom)); }
}

/* ورقة الفلاتر (filterSheet) */
html[data-ui="c"] .c-fs-clear { border: 0; background: none; color: var(--brand-ink); font: 600 var(--fs-5) var(--font-c); min-height: 44px; padding: 0 8px; cursor: pointer; }
html[data-ui="c"] .c-fs-clear:empty, html[data-ui="c"] .c-fs-clear[hidden] { display: none; }
html[data-ui="c"] .c-fs-g { margin: 0 0 18px; }
html[data-ui="c"] .c-fs-gh { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
html[data-ui="c"] .c-fs-gh b { font-size: var(--fs-5); font-weight: 600; }
html[data-ui="c"] .c-fs-gh small { font-size: var(--fs-6); color: var(--muted); }
html[data-ui="c"] .c-fs-chips, html[data-ui="c"] .c-fs-views { display: flex; flex-wrap: wrap; gap: 8px; }
html[data-ui="c"] .c-fs-views { margin-bottom: 16px; }
html[data-ui="c"] .c-fs-chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink2); font: 500 var(--fs-5) var(--font-c); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
html[data-ui="c"] .c-fs-chip svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-fs-chip .ck { display: none; }
html[data-ui="c"] .c-fs-chip em { font-style: normal; font-size: 12px; min-width: 22px; height: 22px; line-height: 22px; border-radius: 11px; background: var(--sunk); color: var(--ink2); text-align: center; padding: 0 6px; }
html[data-ui="c"] .c-fs-chip.on { background: var(--brand-tint); box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-ink); font-weight: 600; }
html[data-ui="c"] .c-fs-chip.on .ck { display: block; }
html[data-ui="c"] .c-fs-seg { display: flex; width: 100%; }
html[data-ui="c"] .c-fs-seg > button { flex: 1; justify-content: center; min-height: 44px; }
html[data-ui="c"] .c-fs-row { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); font-size: var(--fs-5); cursor: pointer; }
html[data-ui="c"] .c-fs-row > span:first-child { flex: 1; font-weight: 600; }
html[data-ui="c"] .c-fs-sel { position: relative; display: inline-flex; align-items: center; gap: 4px; color: var(--brand-ink); max-width: 60%; }
html[data-ui="c"] .c-fs-sel b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-fs-sel svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
html[data-ui="c"][dir="rtl"] .c-fs-sel svg { transform: scaleX(-1); }
html[data-ui="c"] .c-fs-sel select { position: absolute; inset: -12px -8px; opacity: 0; cursor: pointer; font-size: 16px; }
html[data-ui="c"] .c-fs-tg input { position: absolute; opacity: 0; pointer-events: none; }
html[data-ui="c"] .c-fs-tg .c-sw, html[data-ui="c"].dark .c-fs-tg .c-sw { background: var(--line); }
html[data-ui="c"] .c-fs-tg .c-sw::after, html[data-ui="c"].dark .c-fs-tg .c-sw::after { inset-inline-start: 3px; }
html[data-ui="c"] .c-fs-tg input:checked + .c-sw { background: var(--brand); }
html[data-ui="c"] .c-fs-tg input:checked + .c-sw::after { inset-inline-start: 21px; }
html[data-ui="c"] .c-fs-tg input:focus-visible + .c-sw { outline: 2px solid var(--brand); outline-offset: 2px; }
html[data-ui="c"] .c-fs-save { display: flex; gap: 8px; margin: 6px 0 4px; }
html[data-ui="c"] .c-fs-save[hidden] { display: none; }
html[data-ui="c"] .c-fs-save .c-input { flex: 1; min-width: 0; height: 44px; }
html[data-ui="c"] .c-fsheet .c-bs-f [data-fs-apply] { flex: 1.4 1 auto; }
/* ورقة الفلاتر كنافذة منبثقة تحت زرها على الكمبيوتر (filterSheet({ anchor })) — الهاتف لا يتغيّر */
@media (min-width: 761px) {
  html[data-ui="c"] .c-fs-pop .c-scrim { background: transparent; }
  html[data-ui="c"] .c-fs-pop .c-sheet.c-bs { inset: auto; width: min(520px, calc(100vw - 32px)); padding: 16px 18px 16px; border-radius: var(--r-card); box-shadow: var(--sh-lg), 0 0 0 1px var(--line); transform: translateY(-6px) scale(.98); opacity: 0; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
  html[data-ui="c"] .c-fs-pop.on .c-sheet.c-bs { transform: none; opacity: 1; }
  html[data-ui="c"] .c-fs-pop .c-sheet.c-bs:focus { outline: 0; }
  html[data-ui="c"] .c-fs-pop .c-bs-h { margin-bottom: 10px; }
  html[data-ui="c"] .c-fs-pop .c-bs-t b { font-size: var(--fs-4); }
  html[data-ui="c"] .c-fs-pop .c-fs-g { margin-bottom: 14px; }
  html[data-ui="c"] .c-fs-pop .c-fs-gh { margin-bottom: 8px; }
  html[data-ui="c"] .c-fs-pop .c-fs-chip { min-height: 36px; padding: 0 12px; font-size: 14px; }
  html[data-ui="c"] .c-fs-pop .c-fs-chips { gap: 6px; }
  html[data-ui="c"] .c-fs-pop .c-bs-f { bottom: -16px; padding-top: 12px; margin-top: 10px; }
  html[data-ui="c"] .c-fs-pop .c-bs-f .c-btn { height: 44px; }
  html[data-ui="c"] .c-fs-pop .c-bs-x { width: 36px; height: 36px; }
}
/* زر الفلاتر بالعدد + رقائق الفلاتر النشطة القابلة للإزالة */
html[data-ui="c"] .c-fbtn.on { box-shadow: inset 0 0 0 1.5px var(--brand), var(--sh); color: var(--brand-ink); }
html[data-ui="c"] .c-fchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
html[data-ui="c"] .c-fchips::-webkit-scrollbar { display: none; }
html[data-ui="c"] .c-fchip { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-ink); font: 600 14px var(--font-c); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; position: relative; }
html[data-ui="c"] .c-fchip::before { content: ''; position: absolute; inset: -4px 0; } /* منطقة لمس 44px */
html[data-ui="c"] .c-fchip svg { width: 14px; height: 14px; }

/* وضع ملء الشاشة (enterFullScreen / fullScreenForm): لا شريط سفلي ولا «+» */
html[data-ui="c"].c-fs .c-tabbar, html[data-ui="c"].c-fs .cp-tabbar, html[data-ui="c"].c-fs .c-plus { display: none !important; }
html[data-ui="c"] .c-fsf-root .c-scrim { opacity: 1; }
html[data-ui="c"] .c-fsf { position: absolute; z-index: 1; inset: 6vh 50% auto auto; transform: translateX(50%); width: min(640px, calc(100vw - 32px)); max-height: 88vh; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--r-sheet); box-shadow: var(--sh-lg); overflow: hidden; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
html[data-ui="c"][dir="rtl"] .c-fsf { inset: 6vh auto auto 50%; transform: translateX(-50%); }
html[data-ui="c"] .c-layer.on .c-fsf { opacity: 1; }
html[data-ui="c"] .c-fsf-h { flex: none; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; min-height: 56px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
html[data-ui="c"] .c-fsf-t { text-align: center; font-size: var(--fs-4); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-fsf-x { background: none; }
html[data-ui="c"] .c-fsf-save { justify-self: end; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--brand-ink); font: 600 var(--fs-5) var(--font-c); cursor: pointer; }
html[data-ui="c"] .c-fsf-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
html[data-ui="c"] .c-fsf-bar { flex: none; padding: 10px 16px 14px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .25); }
html[data-ui="c"] .c-fsf-st { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-6); color: var(--muted); margin-bottom: 8px; }
html[data-ui="c"] .c-fsf-st:empty { display: none; }
html[data-ui="c"] .c-fsf-aside { color: var(--ink); font-weight: 600; }
html[data-ui="c"] .c-fsf-acts { display: flex; gap: 10px; }
html[data-ui="c"] .c-fsf-acts .c-btn { flex: 1 1 0; min-width: 0; height: 52px; }
html[data-ui="c"] .c-fsf-acts .c-btn-p { flex-grow: 1.3; }
@media (max-width: 760px) {
  html[data-ui="c"] .c-fsf, html[data-ui="c"][dir="rtl"] .c-fsf { inset: 0; transform: translateY(16px); width: auto; max-height: none; height: var(--vvh, 100dvh); border-radius: 0; box-shadow: none; transition: opacity var(--t-fast) var(--ease), transform var(--t-sheet) var(--ease); }
  html[data-ui="c"] .c-layer.on .c-fsf { transform: none; }
  html[data-ui="c"] .c-fsf-h { padding-top: calc(env(safe-area-inset-top) + 6px); }
  html[data-ui="c"] .c-fsf-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  html[data-ui="c"] body.kb-open .c-fsf-bar { padding-bottom: 10px; }
}
/* شريط أفعال ثابت أسفل صفحة تفاصيل (actionBar) — فوق الشريط السفلي على الهاتف */
html[data-ui="c"] .c-abar { position: sticky; bottom: 16px; z-index: 20; display: flex; gap: 10px; padding: 10px; margin-top: 16px; background: var(--surface); border-radius: var(--r-pill); box-shadow: var(--sh-lg); }
html[data-ui="c"] .c-abar > .c-btn { flex: 1 1 0; min-width: 0; }
@media (max-width: 760px) {
  html[data-ui="c"] .c-abar { bottom: calc(var(--tabbar-h, 76px) + env(safe-area-inset-bottom) + 8px); border-radius: 22px; }
  html[data-ui="c"].c-fs .c-abar { bottom: calc(8px + env(safe-area-inset-bottom)); }
}

/* «+» على الهاتف: شبكة 3 أعمدة قرب الإبهام — «في هذه الصفحة» ثم «سريع» ثم المسودات */
html[data-ui="c"] .c-create3 .c-ct-h { margin: 6px 2px 10px; font-size: var(--fs-5); font-weight: 600; }
html[data-ui="c"] .c-create3 .c-ct-h small { font-weight: 400; color: var(--muted); }
html[data-ui="c"] .c-create3 .c-bs-h + .c-ct-grid { margin-top: 4px; }
html[data-ui="c"] .c-ct-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
/* فحص الهاتف 2026-11-23: ورقة «إنشاء» بأربعة أو سبعة أفعال كانت تترك فعلاً وحيداً في سطره (3+1) — أربعة أعمدة لهذه الأعداد */
html[data-ui="c"] .c-ct-grid:has(> :nth-child(4):last-child), html[data-ui="c"] .c-ct-grid:has(> :nth-child(7):last-child), html[data-ui="c"] .c-ct-grid:has(> :nth-child(8):last-child), html[data-ui="c"] .c-ct-grid:has(> :nth-child(10):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
html[data-ui="c"] .c-ct { min-height: 96px; padding: 12px 6px 10px; border: 0; border-radius: 20px; background: var(--sunk); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font: inherit; transition: transform var(--t-fast) var(--ease); }
html[data-ui="c"] .c-ct:active { transform: scale(.97); }
html[data-ui="c"] .c-ct-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--brand-ink); box-shadow: var(--sh); }
html[data-ui="c"] .c-ct-ic svg { width: 22px; height: 22px; }
html[data-ui="c"] .c-ct b { font-size: 14px; font-weight: 600; line-height: 1.3; }
html[data-ui="c"] .c-ct small { font-size: 12px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-ct.here { background: var(--brand-tint); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
html[data-ui="c"] .c-ct.here b { color: var(--brand-ink); }
html[data-ui="c"] .c-ct-drafts[hidden] { display: none; }
html[data-ui="c"] .c-ct-dr { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); text-align: start; text-decoration: none !important; font: inherit; cursor: pointer; }
html[data-ui="c"] .c-ct-dr .c-li-t { flex: 1; min-width: 0; display: grid; }
html[data-ui="c"] .c-ct-dr .c-li-t small { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { html[data-ui="c"] .c-sheet.c-create3 { padding-bottom: calc(16px + env(safe-area-inset-bottom)); } }

/* الإشعارات على الهاتف (notif-c.js) */
html[data-ui="c"] .c-nf-all { min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink); font: 600 14px var(--font-c); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
html[data-ui="c"] .c-nf-all svg { width: 16px; height: 16px; }
html[data-ui="c"] .c-nf .c-bs-x { display: none; }
html[data-ui="c"] .c-nf-seg { display: flex; width: 100%; margin-bottom: 6px; }
html[data-ui="c"] .c-nf-seg > button { flex: 1; justify-content: center; min-height: 44px; padding: 0 8px; }
html[data-ui="c"] .c-nf-seg em { font-style: normal; min-width: 22px; height: 22px; line-height: 22px; padding: 0 6px; border-radius: 11px; background: var(--sunk); color: var(--ink2); font-size: 12px; text-align: center; }
html[data-ui="c"] .c-nf-seg em.bad { background: #d92d20; color: #fff; }
html[data-ui="c"] .c-nf-seg em[hidden] { display: none; }
html[data-ui="c"] .c-nf-h { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
html[data-ui="c"] .c-nf-more { border: 0; background: none; color: var(--brand-ink); font: 600 14px var(--font-c); min-height: 44px; padding: 0 4px; cursor: pointer; }
html[data-ui="c"] .c-nf-more:empty { display: none; }
html[data-ui="c"] .c-nf-it { display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; list-style: none; }
html[data-ui="c"] .c-nf-it::-webkit-details-marker { display: none; }
html[data-ui="c"] .c-nf-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sunk); color: var(--ink2); }
html[data-ui="c"] .c-nf-ic svg { width: 20px; height: 20px; }
html[data-ui="c"] .c-nf-ic.blue { background: #e8f0fe; color: #2563eb; }
html[data-ui="c"] .c-nf-ic.green { background: #e7f6ee; color: #0f9960; }
html[data-ui="c"] .c-nf-ic.gold { background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .c-nf-ic.violet { background: #f0edfb; color: #6d5bd0; }
html[data-ui="c"].dark .c-nf-ic.blue, html[data-ui="c"].dark .c-nf-ic.green, html[data-ui="c"].dark .c-nf-ic.violet { background: var(--sunk); }
html[data-ui="c"] .c-nf-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
html[data-ui="c"] .c-nf-tx > b { font-size: 15px; font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[data-ui="c"] .c-nf-it.unread .c-nf-tx > b { font-weight: 600; }
html[data-ui="c"] .c-nf-it.unread, html[data-ui="c"] .c-nf-it.dec { background: none; }
html[data-ui="c"] .c-bs:focus, html[data-ui="c"] .c-create3:focus, html[data-ui="c"] .c-fsf:focus { outline: 0; }
html[data-ui="c"] .c-nf-tx > small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ui="c"] .c-nf-dot { flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--brand); }
html[data-ui="c"] .c-nf-acts { display: flex; gap: 8px; margin-top: 8px; }
html[data-ui="c"] .c-nf-acts .c-btn { height: 44px; min-width: 96px; }
html[data-ui="c"] .c-nf-grp > summary { cursor: pointer; }
html[data-ui="c"] .c-nf-grp .c-nf-chev { width: 18px; height: 18px; margin-top: 12px; color: var(--muted); transition: transform var(--t-fast) var(--ease); }
html[data-ui="c"] .c-nf-grp[open] .c-nf-chev { transform: rotate(180deg); }
html[data-ui="c"] .c-nf-grp > .c-nf-it { padding-inline-start: 20px; }
html[data-ui="c"] .c-nf-foot { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px 0 4px; color: var(--brand-ink); font-weight: 600; min-height: 44px; }
html[data-ui="c"] .c-nf-foot svg { width: 18px; height: 18px; flex: none; }

/* البحث على الهاتف: شاشة كاملة بحقل كبير و«إلغاء»، رقائق نوع النتيجة بالأعداد، وعمليات البحث الأخيرة */
html[data-ui="c"] .qs-esc .t, html[data-ui="c"] .qs-types { display: none; }
@media (max-width: 760px) {
  html[data-ui="c"] .qs-root { padding: 0; background: var(--bg); backdrop-filter: none; }
  html[data-ui="c"] .qs { width: 100%; max-height: none; height: var(--vvh, 100dvh); border-radius: 0; box-shadow: none; background: var(--bg); }
  html[data-ui="c"] .qs-in { padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; gap: 8px; border: 0; box-shadow: none !important; }
  html[data-ui="c"] .qs-in > svg { display: none; }
  html[data-ui="c"] .qs-in input, html[data-ui="c"] .qs-in input:focus { height: 48px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface) !important; box-shadow: var(--sh) !important; font-size: 17px; }
  html[data-ui="c"] .qs-esc { border: 0; background: none; padding: 0 4px; min-height: 44px; min-width: 44px; font: 600 var(--fs-5) var(--font-c); color: var(--brand-ink); }
  html[data-ui="c"] .qs-esc .k { display: none; }
  html[data-ui="c"] .qs-esc .t { display: inline; }
  html[data-ui="c"] .qs-types { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 16px 10px; flex: none; }
  html[data-ui="c"] .qs-types::-webkit-scrollbar { display: none; }
  html[data-ui="c"] .qs-types:empty { display: none; }
  html[data-ui="c"] .qs-types button { flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh); color: var(--ink2); font: 500 14px var(--font-c); display: inline-flex; align-items: center; gap: 6px; }
  html[data-ui="c"] .qs-types button.on { background: var(--brand); color: var(--on-brand); box-shadow: none; }
  html[data-ui="c"] .qs-types em { font-style: normal; font-size: 12px; opacity: .8; }
  html[data-ui="c"] .qs-list { padding: 0 8px calc(16px + env(safe-area-inset-bottom)); }
  html[data-ui="c"] .qs-h { font-size: 13px; padding: 14px 10px 6px; }
  html[data-ui="c"] .qs-r { min-height: 52px; border-radius: 14px; padding: 8px 10px; font-size: 15px; }
  html[data-ui="c"] .qs-r.on { box-shadow: none; background: transparent; }
  html[data-ui="c"] .qs-lg { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
  html[data-ui="c"] .qs-r > svg { width: 20px; height: 20px; }
}

/* «تعديل الشريط السفلي»: الخانات 22px داخل صفوف 52px (كانت 13px) */
html[data-ui="c"] .tb-pick input[type="checkbox"] { width: 22px; height: 22px; flex: none; }
html[data-ui="c"] .tb-pick label { min-height: 52px; }

/* القرار 9 لتطبيق الموظفين أيضاً: نفس شريط «فعّل الإشعارات» الصغير (منسوخ من c-client.css لأن البوابة وحدها تحمّل ذلك الملف) */
html[data-ui="c"] .np-bar { position: fixed; z-index: 250; inset-inline: auto 24px; bottom: 24px; width: min(420px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--r-tile); background: var(--surface); color: var(--ink); box-shadow: 0 12px 34px -14px rgba(0, 0, 0, .35), 0 0 0 1px var(--line2); font-family: var(--font-c); transform: translateY(16px); opacity: 0; transition: transform .25s var(--ease), opacity .25s; }
html[data-ui="c"] .np-bar.in { transform: none; opacity: 1; }
html[data-ui="c"] .np-bar .np-ic { width: 36px; height: 36px; margin: 0; border-radius: 12px; flex: none; background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .np-bar .np-ic svg { width: 18px; height: 18px; }
html[data-ui="c"] .np-bar .np-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
html[data-ui="c"] .np-bar .np-tx b { font: 600 var(--fs-6)/1.3 var(--font-c); }
html[data-ui="c"] .np-bar .np-tx small { font-size: 12px; color: var(--muted); }
html[data-ui="c"] .np-bar .np-tx small b { font-size: 12px; color: var(--ink2); }
html[data-ui="c"] .np-bar .np-go { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font: 600 var(--fs-6)/1 var(--font-c); cursor: pointer; }
html[data-ui="c"] .np-bar .np-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
html[data-ui="c"] .np-bar .np-x svg { width: 18px; height: 18px; }
html[data-ui="c"] body:has(.c-layer.on) .np-bar, html[data-ui="c"] body.cp-chat-full .np-bar { display: none; }
@media (max-width: 760px) { html[data-ui="c"] .np-bar { inset-inline: 12px; width: auto; bottom: calc(var(--tabbar-h) + 4px + env(safe-area-inset-bottom)); } }
html[data-ui="c"].c-fs .np-bar { display: none; }
/* فحص الهاتف المدمج: شريط «فعّل الإشعارات» (z 250) كان يغطي أزرار الصفحة السفلية — زر «بدء الدوام» العائم، شريط أفعال المهمة،
   زر «رسالة جديدة»، الأشرطة الملتصقة في المال، زر مراجعة العميل، ومنشئ العرض. يختفي ما دامت الصفحة تعرض واحداً منها، ويعود في الصفحة التالية */
@media (max-width: 760px) {
  html[data-ui="c"] body:has(.cs-attfab) .np-bar { display: none; }
  html[data-ui="c"] body:has(.tdp-bar) .np-bar { display: none; }
  html[data-ui="c"] body:has(.em-fab) .np-bar { display: none; }
  html[data-ui="c"] body:has(.ph-stick) .np-bar { display: none; }
  html[data-ui="c"] body:has(.cpw-cta) .np-bar { display: none; }
  html[data-ui="c"].ucw-task .np-bar { display: none; }
}

/* التحقق بخطوتين على الهاتف (S16): زر «افتح في تطبيق المصادقة» والرمز مطوي؛ الدخول: زر إظهار كلمة المرور 44px (S17) */
html[data-ui="c"] .login-box .tf-open { display: flex; align-items: center; justify-content: center; text-decoration: none !important; margin: 4px 0 10px; }
html[data-ui="c"] .login-box .tf-or { margin: 6px 0 4px; color: var(--muted); }
html[data-ui="c"] .login-box .tf-qr { margin: 8px 0 14px; text-align: center; }
html[data-ui="c"] .login-box .tf-qr summary { min-height: 44px; display: inline-flex; align-items: center; color: var(--brand-ink); font-weight: 600; cursor: pointer; }
html[data-ui="c"] .login-box .pw-eye { width: 44px; }
html[data-ui="c"] .tf-copy { min-height: 44px; }
html[data-ui="c"] .login-lang button { min-height: 44px; }
html[data-ui="c"] .c-nf-h { min-height: 44px; margin-bottom: 0; }

/* rep-pay 2026-11 (هاتف المندوب): أهداف لمس 44px — فلتر الاجتماعات وبحث المحادثات */
@media (max-width: 767px) {
  html[data-ui="c"] .mt-filter .seg button { min-height: 44px; height: 44px; }
  html[data-ui="c"] .hb-search { height: 44px; }
  html[data-ui="c"] .hb-search input { align-self: stretch; height: 100%; }
}
/* ═════════ فحص الوميض (2026-11-22): فتح النوافذ والأوراق بلا وميض ولا قفزات ═════════ */
/* النافذة (modal): الخلفية المعتمة تظهر وحدها والنافذة تتحرك فوقها معتمة — كانت الطبقة كلها تتلاشى مع النافذة فيظهر النموذج شفافاً فوق الصفحة
   (نص الصفحة يُقرأ من خلال الحقول) وعلى الهاتف كان الشريط السفلي ظاهراً عبرها. handoff = تأتي بعد ورقة تُغلق: الخلفية موجودة فلا تومض */
@keyframes c-bg-in { from { background-color: transparent; backdrop-filter: none; } }
@keyframes c-sheet-up { from { transform: translateY(100%); } }
html[data-ui="c"] .modal-root { animation: c-bg-in .15s ease; }
html[data-ui="c"] .modal-root.handoff { animation: none; }
@media (max-width: 760px) {
  /* الهاتف: النافذة ورقة سفلية تنزلق من الأسفل كباقي أوراق النمط C (بلا شفافية)، وارتفاعها من الشاشة الظاهرة فعلاً (dvh) لا خلف شريط Safari */
  html[data-ui="c"] .modal-root > .modal { animation: c-sheet-up var(--t-sheet) var(--ease); max-height: 94vh; max-height: 94dvh; }
  html[data-ui="c"] .modal-root > .modal:focus { outline: none; }
}
@media (prefers-reduced-motion: reduce) { html[data-ui="c"] .modal-root, html[data-ui="c"] .modal-root > .modal { animation: none; } }
/* تحديث داخل نفس الصفحة: المحتوى الحالي يبقى، ويخفت قليلاً فقط إن طال التحميل (> 300ms) */
html[data-ui="c"] #main.c-rf > * { opacity: .55; transition: opacity .2s; pointer-events: none; }
/* المنتقيات (تاريخ/وقت): اللمس يذهب للوجه المرسوم لا للحقل النصي المخفي — كان التركيز على الحقل المخفي على الآيفون يُظهر شريط لوحة المفاتيح
   (^ v ✓) ويحرّك الصفحة لإظهار الحقل بعد أن تُرسم القائمة، فتظهر القائمة في مكان خاطئ. الحقل يبقى للوحة المفاتيح (Tab) والتحقق */
html[data-ui="c"] .picker-native { pointer-events: none; }
/* الكمبيوتر: قفل التمرير تحت الأوراق (overflow: hidden على html) يُخفي شريط التمرير فتنزاح الصفحة كلها بعرضه ثم تعود عند الإغلاق — المساحة محجوزة دائماً */
@media (min-width: 761px) { html[data-ui="c"] { scrollbar-gutter: stable; } }
/* ── «تخصيص القائمة» (قرار المالك 2026-11-22): الصفحات الرئيسية لكل دور — صفوف بدل جدول، وكل مفتاح باسمه ── */
html[data-ui="c"] .mz2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
html[data-ui="c"] .mz2-r { color: var(--brand-ink); }
html[data-ui="c"] .mz2-lead { margin: -4px 0 12px; font-size: 13px; line-height: 1.6; color: var(--muted); }
html[data-ui="c"] .mz2-list { display: grid; gap: 0; }
html[data-ui="c"] .mz2-row { display: grid; grid-template-columns: 96px 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line2); }
html[data-ui="c"] .mz2-row.off .mz2-ic, html[data-ui="c"] .mz2-row.off .mz2-t { opacity: .45; }
html[data-ui="c"] .mz2-row.drag { opacity: .5; }
html[data-ui="c"] .mz2-row.mz2-over { box-shadow: inset 0 2px 0 var(--brand); }
html[data-ui="c"] .mz2-mv { display: flex; align-items: center; gap: 4px; }
html[data-ui="c"] .mz2-grip { display: grid; place-items: center; width: 24px; height: 36px; color: var(--muted); cursor: grab; touch-action: none; }
html[data-ui="c"] .mz2-grip svg { width: 18px; height: 18px; }
html[data-ui="c"] .mz2-ar { width: 32px; height: 32px; }
html[data-ui="c"] .mz2-ar svg { width: 16px; height: 16px; }
html[data-ui="c"] .mz2-ar:disabled { opacity: .3; cursor: default; }
html[data-ui="c"] .mz2-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-ink); }
html[data-ui="c"] .mz2-ic svg { width: 20px; height: 20px; }
html[data-ui="c"] .mz2-t { min-width: 0; display: grid; gap: 6px; }
html[data-ui="c"] .mz2-t > b { font: 600 var(--fs-5)/1.3 var(--font-c); color: var(--ink); }
html[data-ui="c"] .mz2-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-ui="c"] .mz2-tc { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font: 500 12px var(--font-c); cursor: pointer; white-space: nowrap; }
html[data-ui="c"] .mz2-tc.on { background: var(--brand-tint); color: var(--brand-ink); border-color: var(--brand-line); }
html[data-ui="c"] .mz2-tc.ro { cursor: default; background: var(--sunk); border-color: transparent; color: var(--ink2); }
html[data-ui="c"] .mz2-ctl { display: flex; align-items: center; gap: 14px; }
html[data-ui="c"] .mz2-sec { display: grid; gap: 2px; }
html[data-ui="c"] .mz2-sec > span { font-size: 12px; color: var(--muted); }
html[data-ui="c"] .mz2-sec select.input { height: 36px; min-height: 0; padding-block: 0; width: 150px; font-size: 13px; }
html[data-ui="c"] .mz2-fixed { min-width: 92px; font-size: 12px; color: var(--muted); white-space: nowrap; }
html[data-ui="c"] .mz2-vis { display: inline-flex; align-items: center; gap: 8px; min-width: 92px; height: 36px; padding: 0; border: 0; background: none; color: var(--ink); font: 500 13px var(--font-c); cursor: pointer; }
html[data-ui="c"] .mz2-sw { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; background: var(--line); transition: background var(--t-fast) var(--ease); }
html[data-ui="c"] .mz2-sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start var(--t-fast) var(--ease); }
html[data-ui="c"] .mz2-vis[aria-checked="true"] .mz2-sw { background: var(--ok, #0f7a4a); }
html[data-ui="c"] .mz2-vis[aria-checked="true"] .mz2-sw::after { inset-inline-start: 21px; }
html[data-ui="c"] .mz2-vis[aria-checked="false"] > span { color: var(--muted); }
html[data-ui="c"] .mz2-vis:focus-visible .mz2-sw { outline: 2px solid var(--brand); outline-offset: 2px; }
html[data-ui="c"] .mz2-side { display: grid; gap: 12px; position: sticky; top: calc(var(--c-top-h, 80px) + 12px); }
html[data-ui="c"] .mz2-ph { margin: 10px 0 4px; font: 600 12px var(--font-c); color: var(--muted); }
html[data-ui="c"] .mz2-pi { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 13px; color: var(--ink); }
html[data-ui="c"] .mz2-pi svg { width: 18px; height: 18px; color: var(--brand-ink); flex: none; }
@media (max-width: 1100px) {
  html[data-ui="c"] .mz2-grid { grid-template-columns: minmax(0, 1fr); }
  html[data-ui="c"] .mz2-side { position: static; }
}
@media (max-width: 760px) {
  html[data-ui="c"] .mz2-head .actions { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  html[data-ui="c"] .mz2-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "ic t t" "ctl ctl mv"; gap: 10px 8px; padding: 14px 0; }
  html[data-ui="c"] .mz2-ic { grid-area: ic; }
  html[data-ui="c"] .mz2-t { grid-area: t; }
  html[data-ui="c"] .mz2-ctl { grid-area: ctl; gap: 10px; min-width: 0; }
  html[data-ui="c"] .mz2-mv { grid-area: mv; justify-content: flex-end; }
  html[data-ui="c"] .mz2-sec > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html[data-ui="c"] .mz2-sec select.input { height: 44px; width: 116px; }
  html[data-ui="c"] .mz2-vis { height: 44px; min-width: 0; }
  html[data-ui="c"] .mz2-ar { width: 44px; height: 44px; }
  html[data-ui="c"] .mz2-grip { display: none; }
}
/* المندوب على الكمبيوتر (قرار المالك، دراسة واجهة المندوب): لا شريط تبويبات «المبيعات» فوق الصفحات — الشريط الجانبي يكفي (الهاتف كما هو) */
@media (min-width: 768px) { html[data-ui="c"][data-persona="sales"] .hub-head[data-hub="sales"] { display: none; } }

/* البحث ⌘K (سهولة الوصول): تلميح الأسماء القديمة في طرف التذييل */
html[data-ui="c"] .qs-ft .qs-old { margin-inline-start: auto; }

/* سهولة الوصول (المشكلة 10): مسار «أين أنا» فوق عنوان الصفحة على الكمبيوتر — «الفريق › الحضور › لوحة اليوم»، القسم والصفحة روابط. الهاتف بلا مسار (عنوانه المختصر كما هو) */
html[data-ui="c"] .topbar .tp-crumb { display: none; }
@media (min-width: 761px) {
  html[data-ui="c"] .shell .topbar #page-title .tp-crumb { display: flex; align-items: center; gap: 4px; margin: 0 0 2px; font: 500 13px/1.35 var(--font-c); color: var(--muted); white-space: nowrap; overflow: hidden; }
  html[data-ui="c"] .shell .topbar #page-title .tp-crumb a { color: inherit; text-decoration: none; border-radius: 6px; }
  html[data-ui="c"] .shell .topbar #page-title .tp-crumb a:hover, html[data-ui="c"] .shell .topbar #page-title .tp-crumb a:focus-visible { color: var(--brand-ink); text-decoration: underline; }
  html[data-ui="c"] .shell .topbar #page-title .tp-crumb svg.tp-crc { flex: none; width: 14px; height: 14px; opacity: .6; }
  html[data-ui="c"][dir="rtl"] .shell .topbar #page-title .tp-crumb svg.tp-crc { transform: scaleX(-1); }
}

/* سهولة الوصول (المشكلة 6): على الهاتف «المحادثات» بلمسة من الشريط العلوي (بجانب الجرس، بعدد غير المقروء) حين لا تكون في الشريط السفلي —
   الشريط السفلي يبقى بقرار المالك (وجهتان + «+» + وجهة + «المزيد»)؛ و«+» تحته كلمة «جديد» مثل باقي الأزرار (القرار 5) */
html[data-ui="c"] .topbar .tb-chat { display: none; }
@media (max-width: 760px) {
  html[data-ui="c"] .topbar .tb-chat { display: inline-grid; place-items: center; position: relative; order: 2; margin-inline-start: 8px; color: var(--ink); text-decoration: none !important; }
  html[data-ui="c"] .topbar .tb-chat .dot:not([hidden]) { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d92d20; color: #fff; font: 600 12px/20px var(--font-c); text-align: center; border: 2px solid var(--bg); }
  html[data-ui="c"] .c-tabbar .c-plus { position: relative; }
  html[data-ui="c"] .c-tabbar .c-plus .c-plus-l { position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%); font: 500 12px/1.3 var(--font-c); color: var(--muted); white-space: nowrap; pointer-events: none; }
  html[data-ui="c"] .c-tabbar .c-plus.on .c-plus-l { color: var(--brand-ink); }
}

/* ═════════ فحص الهاتف الشامل (2026-11-23): إصلاحات مشتركة ═════════ */
@media (max-width: 760px) {
  /* 1) صفوف التبويبات الملتفّة: لا عنصر وحيد في سطره — phone-c balanceWrap يحوّلها شبكة أعمدة متساوية */
  html[data-ui="c"] .c-bal { display: grid !important; grid-template-columns: repeat(var(--bal-cols, 3), minmax(0, 1fr)); justify-content: stretch; }
  html[data-ui="c"] .c-bal > * { min-width: 0; justify-content: center; text-align: center; }
  html[data-ui="c"] .c-bal > * > span:not(.count):not(.ndot):not([class*="badge"]) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html[data-ui="c"] .shell .hub-head .hub-tabs.c-bal a { padding: 0 6px; }
  /* 2) عنوان الصفحة يكرّر تبويب القسم المفتوح فوقه مباشرة («طلباتي» تحت «طلباتي») */
  html[data-ui="c"] .page-head h2.dup-hub, html[data-ui="c"] #main > h2.dup-hub { display: none; }
  html[data-ui="c"] .page-head:has(> div:first-child > h2.dup-hub:only-child) > div:first-child { display: none; }
  /* 3) زر رأس الصفحة («طلب إجازة»، «متدرب جديد»، «طلب شراء»…) كان بعرض الشاشة وحده — زر مضغوط في بداية السطر */
  html[data-ui="c"] .page-head .actions { justify-content: flex-start; }
  html[data-ui="c"] .page-head .actions > .btn { flex: 0 1 auto; padding-inline: 18px; }
  html[data-ui="c"] .page-head .actions > .btn-primary:only-child, html[data-ui="c"] .page-head .actions > .btn-primary:last-child { min-height: 46px; }
  /* 5) بطاقات الأرقام (strip) بعمودين: الأيقونة الجانبية كانت تدفع المبلغ فينكسر «1,262.50 / د.أ» على سطرين — بلا أيقونة، والمبلغ سطر واحد */
  html[data-ui="c"] .strip > * > .ic { display: none; }
  html[data-ui="c"] .strip .value { white-space: nowrap; font-size: 19px; }
  html[data-ui="c"] .strip > * > div { min-width: 0; }
  /* 6) ثلاث بطاقات أرقام (.grid.g-3 من .card.stat — رصيد المغادرات…) كانت عموداً واحداً بارتفاع ~130px لكل بطاقة — صف واحد مضغوط */
  html[data-ui="c"] .grid.g-3:has(> .card.stat:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  html[data-ui="c"] .grid.g-3:has(> .card.stat:nth-child(3):last-child) > .card.stat { padding: 12px 10px; gap: 0; }
  html[data-ui="c"] .grid.g-3:has(> .card.stat:nth-child(3):last-child) > .card.stat .ic { display: none; }
  html[data-ui="c"] .grid.g-3:has(> .card.stat:nth-child(3):last-child) > .card.stat .label { font-size: 12px; line-height: 1.3; }
  html[data-ui="c"] .grid.g-3:has(> .card.stat:nth-child(3):last-child) > .card.stat .value { font-size: 18px; margin-top: 4px; white-space: nowrap; }
  html[data-ui="c"] .grid.g-3:has(> .card.stat:nth-child(3):last-child) > .card.stat .hint { font-size: 12px; line-height: 1.35; }
  /* 7) أزرار أيقونات صغيرة (30px) فوق بطاقات «أصول الهوية» — مساحة لمس 44px دون تغيير شكلها */
  html[data-ui="c"] .bk-act { position: relative; }
  html[data-ui="c"] .bk-act::after { content: ''; position: absolute; inset: -7px; }
}
/* 4) العدد ملتصق باسم الفلتر («الكل21»، «نشطة15») — مسافة ثابتة بين الاسم والعدد */
html[data-ui="c"] .seg button > em, html[data-ui="c"] .co-filter em { margin-inline-start: 6px; }

/* ═════════ الهاتف بالعرض (أفقي) والأجهزة اللوحية (طلب المالك 2026-11-23) ═════════
   كان الآيفون أفقياً (844–932×390) يأخذ تخطيط الكمبيوتر بلا أي تنقّل: قاعدة الشريط الجانبي القديم (app.css: max-width 960px → visibility: hidden)
   كانت تخفي الدوك لكل عرض بين 761 و960 (ومنه الآيباد عمودياً 820). القرار: من 761px فأكثر يبقى الدوك ظاهراً دائماً؛
   وعلى الشاشات القصيرة (ارتفاع ≤ 500px = هاتف أفقي) دوك مضغوط بعرض 68px يتمرّر عمودياً، ورأس صفحة مضغوط غير ملتصق للحبّات،
   ومسافات آمنة يميناً ويساراً (النتوء ومؤشر الرجوع للرئيسية)، والأوراق والنوافذ بارتفاع الشاشة مع جسم يتمرّر. */
@media (min-width: 761px) { html[data-ui="c"] .shell > .sidebar.c-dock { visibility: visible; } }
@media (min-width: 761px) and (max-height: 500px) {
  html[data-ui="c"] { --dock-w: 68px; --dock-gap: 8px; --sa-dock: env(safe-area-inset-right, 0px); --sa-far: env(safe-area-inset-left, 0px); }
  html[data-ui="c"][dir="ltr"] { --sa-dock: env(safe-area-inset-left, 0px); --sa-far: env(safe-area-inset-right, 0px); }
  html[data-ui="c"] .c-dock { inset-inline-start: calc(var(--dock-gap) + var(--sa-dock)); top: max(var(--dock-gap), env(safe-area-inset-top, 0px)); bottom: max(var(--dock-gap), env(safe-area-inset-bottom, 0px)); --dock-oh: 150px; padding: 8px 0; gap: 2px; border-radius: 22px; }
  html[data-ui="c"] .c-dock-nav { gap: 2px; }
  html[data-ui="c"] .c-dock-logo, html[data-ui="c"] .c-dock-logo:has(.c-dock-mk) { width: 52px; height: 44px; margin-bottom: 0; }
  html[data-ui="c"] .c-dock-logo img, html[data-ui="c"] .c-dock-logo img.c-dock-mk { width: 42px; height: 30px; }
  html[data-ui="c"] .c-dock-new { width: 48px; height: 40px; margin-bottom: 4px; border-radius: 14px; }
  html[data-ui="c"] .c-dock-new .lb { display: none; }
  html[data-ui="c"] .c-dock-it { width: 60px; min-height: 44px; padding: 4px 0; gap: 1px; border-radius: 14px; font-size: 12px; }
  html[data-ui="c"] .c-dock-it svg { width: 19px; height: 19px; }
  html[data-ui="c"] .c-dock-it .lb { max-width: 58px; -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; display: block; }
  html[data-ui="c"] .c-dock-it .c-bd, html[data-ui="c"] .c-dock-it .ndot { top: 0; inset-inline-start: 34px; }
  html[data-ui="c"] .c-dock-me .avatar { width: 34px; height: 34px; font-size: 12px; }
  html[data-ui="c"] .shell .main { margin-inline-start: calc(var(--dock-w) + var(--dock-gap) * 2 + var(--sa-dock)) !important; }
  html[data-ui="c"] .shell .topbar { padding: max(6px, env(safe-area-inset-top, 0px)) calc(16px + var(--sa-far)) 6px 12px; gap: 8px; }
  html[data-ui="c"][dir="rtl"] .shell .topbar { padding-left: calc(16px + var(--sa-far)); padding-right: 12px; }
  html[data-ui="c"][dir="ltr"] .shell .topbar { padding-right: calc(16px + var(--sa-far)); padding-left: 12px; }
  html[data-ui="c"] .shell .topbar h1, html[data-ui="c"] .shell .topbar #page-title { font-size: var(--fs-3) !important; }
  html[data-ui="c"] .shell .topbar .icon-btn, html[data-ui="c"] .shell .topbar .back-btn, html[data-ui="c"] .shell .topbar .tb-quick { width: 40px; height: 40px; }
  html[data-ui="c"] .shell .topbar .tb-avatar .avatar, html[data-ui="c"] .shell .topbar .c-me .avatar { width: 36px; height: 36px; }
  /* الحبّات تمرّ مع الصفحة (لا تلتصق) كي يبقى للمحتوى أكثر من نصف الارتفاع */
  html[data-ui="c"]:has(.hub-slot > .hub-head) { --c-hub-h: 0px; }
  html[data-ui="c"] .hub-slot { position: static; backdrop-filter: none; }
  html[data-ui="c"] .hub-tabs { padding: 2px 0 4px; }
  html[data-ui="c"] .hub-tabs a { height: 38px; }
  html[data-ui="c"] .shell .content { padding-top: 8px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  html[data-ui="c"][dir="rtl"] .shell .content { padding-left: calc(16px + var(--sa-far)); }
  html[data-ui="c"][dir="ltr"] .shell .content { padding-right: calc(16px + var(--sa-far)); }
  /* الأوراق والنوافذ: بارتفاع الشاشة القصيرة، والجسم يتمرّر */
  html[data-ui="c"] .c-sheet { top: max(8px, env(safe-area-inset-top, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px)); padding: 14px 18px 16px; }
  html[data-ui="c"] .c-modal, html[data-ui="c"] .modal-root > .modal { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  html[data-ui="c"] .modal-root > .modal { overflow-y: auto; }
  html[data-ui="c"] .c-fsf { inset-block: 8px auto; max-height: calc(100dvh - 16px); }
  html[data-ui="c"] .c-create-root.pop .c-sheet { top: 8px; max-height: calc(100dvh - 16px); }
  html[data-ui="c"] .toasts { bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
}

/* الهاتف أفقياً بعرض ≤ 760px (آيفون SE 667×375): الرأس والشريط السفلي كانا يأخذان 174px من 375 — رأس بسطر واحد بلا الشعار، وشريط سفلي أقصر،
   ومسافات آمنة يميناً ويساراً للنتوء */
@media (max-width: 760px) and (max-height: 500px) {
  html[data-ui="c"] .shell .topbar { min-height: 0; padding: max(4px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); flex-wrap: nowrap; }
  html[data-ui="c"] .shell .topbar .c-tb-logo { display: none; }
  html[data-ui="c"] .shell .topbar h1, html[data-ui="c"] .shell .topbar #page-title { order: 2; flex: 1 1 0; padding-top: 0; font-size: var(--fs-4) !important; }
  html[data-ui="c"] .shell .topbar .icon-btn, html[data-ui="c"] .shell .topbar .back-btn, html[data-ui="c"] .shell .topbar .tb-avatar .avatar { width: 40px; height: 40px; }
  html[data-ui="c"] .tabbar.c-tabbar { min-height: 52px; padding: 4px max(10px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); }
  html[data-ui="c"] .c-tabbar .c-tab { min-height: 44px; flex-direction: row; gap: 6px; }
  html[data-ui="c"] .c-tabbar .c-tab svg { width: 20px; height: 20px; }
  html[data-ui="c"] .c-tabbar .c-plus { width: 48px; height: 48px; margin-top: -14px; }
  html[data-ui="c"] .c-tabbar .c-plus .c-plus-l { display: none; }
  html[data-ui="c"] .shell .content { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  html[data-ui="c"] .toasts { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* طلب المالك (2026-11-23، الكمبيوتر داكن): تحت حبّات القسم (الموظفون · المتدربون · الحضور…) كانت رقائق الصفحة المارّة تحتها تظهر «نصف مخفية»
   — خلفية الرأس وحبّات القسم كانت شبه شفافة (92%) بلا حدّ سفلي. الآن: خلفية كاملة، وخط وظل خفيف تحت آخر طبقة ملتصقة متى مرّ المحتوى تحتها */
@media (min-width: 761px) {
  html[data-ui="c"] .shell .topbar, html[data-ui="c"] .hub-slot:not(:empty) { background: var(--bg); }
  html[data-ui="c"].c-scrolled .hub-slot:not(:empty) { box-shadow: 0 1px 0 var(--line), 0 10px 18px -16px rgba(0, 0, 0, .45); }
  html[data-ui="c"].c-scrolled:not(:has(.hub-slot > .hub-head)) .shell .topbar { box-shadow: 0 1px 0 var(--line), 0 10px 18px -16px rgba(0, 0, 0, .45); }
}
/* تدقيق CSS (أهداف لمس متبقية على الهاتف بعد مسح الهاتف): روابط وأزرار نصية وشرائح صغيرة (17–30px) — مساحة نقر ≥44px دون تغيير شكلها */
@media (max-width: 767px) {
  html[data-ui="c"] .mt-was { padding-block: 15px; margin-block: -15px; }
  html[data-ui="c"] .td-ccard .td-cc-t { padding-block: 11px; margin-block: -11px; }
  html[data-ui="c"] .cw-more-l { padding-block: 12px; margin-block: -4px -12px; }
  html[data-ui="c"] .am-link { padding-block: 12px; margin-block: -12px; }
  html[data-ui="c"] .am-h a { display: inline-flex; align-items: center; flex: none; white-space: nowrap; padding-block: 14px; margin-block: -14px; }
  html[data-ui="c"] .ml-pfc .tx .t { padding-block: 12px; margin-block: -12px; }
  html[data-ui="c"] .calp-cal .calp-grab::after { inset: -13px 25%; }
  html[data-ui="c"] .sal-qchip, html[data-ui="c"] button.fchip, html[data-ui="c"] .chip > button[data-rm-comp] { position: relative; }
  html[data-ui="c"] .sal-qchip::after { content: ''; position: absolute; inset: -7px 0; }
  html[data-ui="c"] button.fchip::after { content: ''; position: absolute; inset: -11px 0; }
  html[data-ui="c"] .chip > button[data-rm-comp]::after { content: ''; position: absolute; inset: -15px -19px; }
  html[data-ui="c"] .cr-ver::after { content: ''; position: absolute; inset: -7px -2px; }
}

/* ═════════ الكمبيوتر (1024px فأكثر): كثافة جداول القوائم ورؤوس أعمدة لاصقة — desk-fit.js يضع dk-dense / dk-fit / dk-clip (دراسة الكمبيوتر A1/A2) ═════════ */
@media (min-width: 1024px) {
  html[data-ui="c"] .shell table.dk-dense > tbody > tr > td { padding-block: 6px; }
  html[data-ui="c"] .shell table.dk-dense > thead > tr > th { padding-block: 9px; }
  html[data-ui="c"] .shell table.dk-dense > tbody > tr > td .btn, html[data-ui="c"] .shell table.dk-dense > tbody > tr > td .c-btn { min-height: 34px; height: auto; padding-block: 4px; font-size: var(--fs-6); }
  html[data-ui="c"] .shell table.dk-dense > tbody > tr > td .icon-btn, html[data-ui="c"] .shell table.dk-dense > tbody > tr > td .btn.icon { width: 34px; height: 34px; min-height: 34px; padding: 0; }
  html[data-ui="c"] .shell table.dk-dense > tbody > tr > td .avatar:not(.lg) { width: 34px; height: 34px; font-size: 13px; }
  html[data-ui="c"] .shell .dk-fit { overflow: visible; }
  html[data-ui="c"] .shell .c-card.flush.dk-clip { overflow: clip; }
  html[data-ui="c"] .shell .dk-fit > table > thead > tr > th { position: sticky; top: var(--dk-top, var(--c-head-h, 0px)); z-index: 3; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line2); }
}

/* عنوان صفحة التفاصيل باسم العنصر نفسه (اسم الشركة، عنوان المستند) على الكمبيوتر: أصغر قليلاً ويلتف لسطرين بدل القصّ */
@media (min-width: 761px) {
  html[data-ui="c"] .shell .topbar #page-title.tp-own { font-size: var(--fs-2); line-height: 1.25; }
  html[data-ui="c"] .shell .topbar #page-title.tp-own .cp-tpill .tp-tx { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ═════════ ضبط النص (text-fit) ═════════
   الأصل في الخط نفسه: مقاييس Readex Pro صارت موزونة للعربية (fonts.css)، فكل زر وشريحة وتبويب وشارة يتوسّط نصه العربي دون قاعدة لكل مكوّن.
   هنا ما لا تحلّه المقاييس وحدها:
   1) تسميات السطر الواحد المقصوصة بـ overflow:hidden وارتفاع سطرها أقل من ~1.5 كانت تقصّ ذيول «ع ج ي م» من الأسفل والهمزة والشدّة من الأعلى.
      القصّ الأفقي (والنقاط «…») يبقى، والعمودي يُفتح: overflow-x: clip + overflow-y: visible — لا يتغيّر أي ارتفاع. min-width: 0 لأن clip لا يصفّر
      الحد الأدنى التلقائي لعناصر flex كما يفعل hidden. المتصفح الذي لا يعرف clip يتجاهل السطر ويبقى على hidden كما كان.
      لإضافة تسمية جديدة مقصوصة: أضف محدِّدها إلى هذه القائمة بدل تكبير ارتفاع سطرها. عنوان التفاصيل ذو السطرين (.tp-own) مستثنى. */
html[data-ui="c"] .c-tabbar .c-tab > span, html[data-ui="c"] .c-mega-a > .l, html[data-ui="c"] .c-mega-sa > .l, html[data-ui="c"] .c-md-a > .l,
html[data-ui="c"] .c-more-who > b, html[data-ui="c"] .topbar h1:not(.tp-own) .cp-tpill .tp-tx > b, html[data-ui="c"] .topbar h1 > .tp-crumb, html[data-ui="c"] .cp-title .cp-h > b,
html[data-ui="c"] .cp-title .cp-h > small, html[data-ui="c"] .fk-qa-l, html[data-ui="c"] .fk-rc > span, html[data-ui="c"] .hub-tabs > a > span,
html[data-ui="c"] .em-mseg > a > span, html[data-ui="c"] .ml-top3 .tx, html[data-ui="c"] .calp-tx > small, html[data-ui="c"] .calp-mt > b,
html[data-ui="c"] .calp-scope > b, html[data-ui="c"] .cd-sh small, html[data-ui="c"] .picker-text, html[data-ui="c"] .nm-act .c-btn > span,
html[data-ui="c"] .mw-t > span, html[data-ui="c"] .cs-pipe-mini small, html[data-ui="c"] .cs-col > h4, html[data-ui="c"] .c-li-t > b,
html[data-ui="c"] .cr-tt > b, html[data-ui="c"] .cr-tt > small, html[data-ui="c"] .cs-nn-s, html[data-ui="c"] .fi-s.small,
html[data-ui="c"] .topbar h1:not(.tp-own) .cp-tpill .tp-tx, html[data-ui="c"] .ml-now-t {
  overflow-x: clip !important; overflow-y: visible !important; min-width: 0;
}
/* عنوان الصفحة في الشريط العلوي: سطر واحد (nowrap) يقصّه الشريط أفقياً؛ ذيل الياء في «قائمتي / يحتاجني» كان يُقصّ من الأسفل */
html[data-ui="c"] .topbar > h1 { overflow-x: clip; overflow-y: visible; }
/* 2) التسميات المحدودة بسطرين (-webkit-line-clamp يحتاج overflow:hidden): حشوة عمودية يعوّضها هامش سالب بالمقدار نفسه، فيتّسع صندوق القصّ
      ولا يتحرك شيء. الأسفل أقل من الأعلى كي لا يظهر رأس السطر الثالث المخفي. */
html[data-ui="c"] .c-dock-it .lb, html[data-ui="c"] .c-kst small, html[data-ui="c"] .nm-title, html[data-ui="c"] .calp-tx > b, html[data-ui="c"] .cs-paystrip-t > small, html[data-ui="c"] .cs-nn > b {
  box-sizing: content-box; padding-block: .3em .13em; margin-block: -.3em -.13em;
}
/* 3) مبدّل اللغة: «ع» المفردة كلها ذيل (حبرها من ‎+0.46em‎ إلى ‎−0.46em‎ حول خط الأساس) فمركزها أدنى من مركز «EN» بثلث ارتفاع الخط.
      تُرفع بمقدار ثابت بالـ em — الخط مثبّت على 'Readex Pro' كي يصحّ المقدار نفسه في الواجهتين. */
html[data-ui="c"] .lang-switch button[data-lang-set="ar"] { font-family: 'Readex Pro', var(--font-c); padding-bottom: .58em; }
html[data-ui="c"] .ns-lang[data-lang-set="ar"] b, html[data-ui="c"] .c-mb-lang[data-lang-set="ar"] b, html[data-ui="c"] .c-tile[data-lang-set="ar"] .c-tile-tx {
  font-family: 'Readex Pro', var(--font-c); position: relative; top: -.29em;
}
/* «عربي» في مبدّلات الكلمتين: ذيل الياء العميق ينزل بمركز الكلمة عن «EN / English» المجاورة */
html[data-ui="c"] .c-lseg button[data-lang-set="ar"], html[data-ui="c"] .pc-seg button[data-lang-set="ar"] { padding-bottom: 2px; }
/* 4) بطاقة القرار على الهاتف: «أعد للتعديل» كانت تُقطع داخل زرّها مع أن الصف يتّسع — حشوة أفقية أضيق للزرّين */
@media (max-width: 760px) {
  html[data-ui="c"] .nm-act .nm-yes { padding-inline: 16px; }
  html[data-ui="c"] .nm-act .nm-no { padding-inline: 10px; }
}

/* الهاتف بالعرض (ارتفاع ≤500): الأزرار المنفردة لا تمتد بعرض الشاشة كلها — بعرض نصّها مثل الوضع الطولي (جولة التلميع، البند 13) */
@media (max-height: 500px) and (orientation: landscape) {
  html[data-ui="c"] .pr-act > .btn, html[data-ui="c"] .cd-foot > .c-btn, html[data-ui="c"] .cs-att-act > .c-btn,
  html[data-ui="c"] .upr-q-cta > .btn, html[data-ui="c"] .cw-sal .c-card > a.c-btn, html[data-ui="c"] .m-collapsed > .m-toggle,
  html[data-ui="c"] .co-mine-all, html[data-ui="c"] .nm-act > a.c-btn, html[data-ui="c"] .page-head > .btn-primary,
  html[data-ui="c"] .ucv-acts-h > .c-btn, html[data-ui="c"] .cs-next > .c-btn, html[data-ui="c"] .cs-day-foot > .c-btn,
  html[data-ui="c"] .cph-rh > .c-btn, html[data-ui="c"] .cpt .c-only-phone > .c-btn {
    width: auto; min-width: 160px; max-width: 100%; flex: 0 0 auto; align-self: flex-start; justify-self: start; margin-inline-end: auto;
  }
}

/* الشاشات العريضة مع الشريط السفلي (قرار المالك 28/11، S1/S2): حبّات القسم داخل سطر العنوان — رأس واحد لاصق */
@media (min-width: 1360px) {
  html[data-ui="c"].c-hub-in { --c-hub-h: 0px !important; }
  html[data-ui="c"].c-hub-in .topbar > .hub-slot { position: static; top: auto; flex: 1 1 auto; min-width: 0; margin-inline: 20px 12px; background: none; backdrop-filter: none; box-shadow: none; border: 0; z-index: auto; }
  html[data-ui="c"].c-hub-in .topbar > .hub-slot .hub-head { padding: 0; display: flex; align-items: center; justify-content: flex-start; min-width: 0; }
  html[data-ui="c"].c-hub-in .topbar > .hub-slot .hub-tabs { margin: 0; padding: 0; flex-wrap: nowrap; justify-content: flex-start; overflow: hidden; min-width: 0; }
  html[data-ui="c"].c-hub-in .topbar > .hub-slot .hub-tabs a svg { display: none; }
  html[data-ui="c"].c-hub-in .topbar > :has(#page-title) { flex: none; }
  html[data-ui="c"].c-hub-in .topbar #page-title { overflow: visible; text-overflow: clip; }
  html[data-ui="c"].c-hub-in .topbar .tb-quick { width: auto; min-width: 0; }
  html[data-ui="c"].c-hub-in .topbar .tb-quick > span { display: none; }
}

/* زر «عرض الكل / عرض المزيد / عرض البقية / عرض أقل» — شكل واحد في كل النظام (طلب المالك 28/11):
   شريط بعرض البطاقة، خلفية هادئة، نص ذهبي، العدد، وسهم يدلّ على الفتح (يدور عند «عرض أقل») */
html[data-ui="c"] .co-more,
html[data-ui="c"] .tdb-all,
html[data-ui="c"] .act-more,
html[data-ui="c"] .atp-more,
html[data-ui="c"] .cw-more-l,
html[data-ui="c"] .cs-more > .c-btn,
html[data-ui="c"] .co-act2 .act-more, html[data-ui="c"] .fl-more .act-more, html[data-ui="c"] .co-pane .act-more {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin: 8px 0 0; padding: 0 16px;
  border: 0; border-radius: 12px; background: var(--sunk); color: var(--brand-ink); font: inherit; font-size: var(--fs-6); font-weight: 600;
  text-decoration: none !important; cursor: pointer; box-shadow: none; transition: background .15s;
}
html[data-ui="c"] .co-more:hover, html[data-ui="c"] .tdb-all:hover, html[data-ui="c"] .act-more:hover, html[data-ui="c"] .atp-more:hover, html[data-ui="c"] .cw-more-l:hover, html[data-ui="c"] .cs-more > .c-btn:hover { background: color-mix(in srgb, var(--brand) 12%, var(--sunk)); text-decoration: none !important; }
html[data-ui="c"] .co-more > svg, html[data-ui="c"] .tdb-all > svg, html[data-ui="c"] .act-more > svg, html[data-ui="c"] .atp-more > svg, html[data-ui="c"] .cw-more-l > svg, html[data-ui="c"] .cs-more > .c-btn > svg { display: none; }
html[data-ui="c"] .co-more::after, html[data-ui="c"] .tdb-all::after, html[data-ui="c"] .act-more::after, html[data-ui="c"] .atp-more::after, html[data-ui="c"] .cw-more-l::after, html[data-ui="c"] .cs-more > .c-btn::after {
  content: ""; width: 7px; height: 7px; flex: none; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
html[data-ui="c"] .act-tl.open .act-more::after, html[data-ui="c"] .fl-more.open .act-more::after { transform: translateY(2px) rotate(-135deg); }
html[data-ui="c"] .co-act2 .act-more { width: calc(100% - 36px); margin: 4px 18px 12px; }
html[data-ui="c"] .co-more[hidden], html[data-ui="c"] .tdb-all[hidden], html[data-ui="c"] .act-more[hidden], html[data-ui="c"] .atp-more[hidden], html[data-ui="c"] .cw-more-l[hidden] { display: none; }

/* عارض الملفات (file-viewer.js) — شاشة كاملة: شريط علوي (✕ · النوع · الاسم والحجم)، المحتوى، وزر «تنزيل الملف» كبير في الأسفل */
html[data-ui="c"].fv-open { overflow: hidden; }
html[data-ui="c"] .fv { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: #16171b; color: #f5f5f4; animation: fv-in .2s cubic-bezier(.2,.8,.2,1); }
html[data-ui="c"] .fv.out { opacity: 0 !important; transform: translateY(40px) !important; transition: opacity .18s, transform .18s; }
@keyframes fv-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
html[data-ui="c"] .fv-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 12px; background: #1e1f24; border-bottom: 1px solid rgba(255,255,255,.06); }
html[data-ui="c"] .fv-x { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
html[data-ui="c"] .fv-x svg { width: 20px; height: 20px; }
html[data-ui="c"] .fv-type { flex: none; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand, #c89a4b) 22%, transparent); color: var(--brand, #c89a4b); font: 800 12px/1 var(--font-c, inherit); letter-spacing: .04em; }
html[data-ui="c"] .fv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html[data-ui="c"] .fv-t b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
html[data-ui="c"] .fv-t small { font-size: 12px; color: rgba(255,255,255,.55); unicode-bidi: plaintext; text-align: start; }
html[data-ui="c"] .fv-dl { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--brand, #c89a4b); color: #1a1205; font: inherit; font-weight: 700; cursor: pointer; }
html[data-ui="c"] .fv-dl svg { width: 18px; height: 18px; }
html[data-ui="c"] .fv-dl.loading { opacity: .6; pointer-events: none; }
html[data-ui="c"] .fv-dl-top { flex: none; height: 42px; padding: 0 16px; border-radius: 999px; }
html[data-ui="c"] .fv-grab { flex: none; height: 16px; display: grid; place-items: center; }
html[data-ui="c"] .fv-grab::before { content: ""; width: 36px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
html[data-ui="c"] .fv-body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; padding: 4px 12px 16px; }
html[data-ui="c"] .fv-img { max-width: 100%; max-height: calc(100dvh - 190px); margin: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.45); touch-action: pinch-zoom; }
html[data-ui="c"] .fv-media { width: 100%; max-height: calc(100dvh - 200px); margin: auto; background: #000; border-radius: 12px; }
html[data-ui="c"] .fv-pdf { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; padding: 4px 0 8px; }
html[data-ui="c"] .fv-page { background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.45); max-width: 100%; height: auto; }
html[data-ui="c"] .fv-pg { position: absolute; inset-inline-start: 50%; transform: translateX(50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; font: 600 12px/1 var(--font-c, inherit); direction: ltr; pointer-events: none; }
html[data-ui="c"][dir="ltr"] .fv-pg { transform: translateX(-50%); }
html[data-ui="c"] .fv-foot { flex: none; padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px); background: #1e1f24; border-top: 1px solid rgba(255,255,255,.06); }
html[data-ui="c"] .fv-dl-big { width: 100%; height: 52px; border-radius: 16px; font-size: 16px; }
html[data-ui="c"] .fv-load { margin: auto; }
html[data-ui="c"] .fv-card { margin: auto; width: min(360px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 20px; border-radius: 20px; background: rgba(255,255,255,.05); }
html[data-ui="c"] .fv-card b { font-size: 15px; word-break: break-word; }
html[data-ui="c"] .fv-card small { color: rgba(255,255,255,.6); }
html[data-ui="c"] .fv-card p { margin: 4px 0 6px; font-size: 13px; color: rgba(255,255,255,.7); }
html[data-ui="c"] .fv-card audio { width: 100%; }
html[data-ui="c"] .fv-ic { position: relative; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
html[data-ui="c"] .fv-ic svg { width: 30px; height: 30px; }
html[data-ui="c"] .fv-ic.bad { color: #f87171; }
html[data-ui="c"] .fv-ic em { position: absolute; bottom: -6px; inset-inline-end: -8px; font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--brand, #c89a4b); color: #1a1205; }
html[data-ui="c"] .fv-card [data-fv-dl2] { display: none; }
/* الهاتف: زر التنزيل الكبير في الأسفل بدل الصغير في الشريط؛ الكمبيوتر: العكس */
@media (max-width: 760px) { html[data-ui="c"] .fv-dl-top { display: none; } }
@media (min-width: 761px) { html[data-ui="c"] .fv-foot { display: none; } html[data-ui="c"] .fv-pg { bottom: 20px; } html[data-ui="c"] .fv-body { padding-inline: 24px; } }
html[data-ui="c"] .fv-stage { position: relative; flex: 1; min-height: 0; display: flex; }
html[data-ui="c"] .fv-stage > .fv-body { flex: 1; transition: transform .15s; }
html[data-ui="c"] .fv-nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
html[data-ui="c"] .fv-nav svg { width: 22px; height: 22px; }
html[data-ui="c"] .fv-nav.prev { inset-inline-start: 10px; }
html[data-ui="c"] .fv-nav.next { inset-inline-end: 10px; }
html[data-ui="c"] .fv-nav.next svg { transform: scaleX(-1); }
html[data-ui="c"][dir="ltr"] .fv-nav svg { transform: scaleX(-1); }
html[data-ui="c"][dir="ltr"] .fv-nav.next svg { transform: none; }
html[data-ui="c"] .fv-nav[disabled] { opacity: 0; pointer-events: none; }
html[data-ui="c"] .fv-foot { display: flex; align-items: center; gap: 12px; }
html[data-ui="c"] .fv-n { flex: none; min-width: 56px; text-align: center; font: 600 13px/1 var(--font-c, inherit); color: rgba(255,255,255,.7); direction: ltr; }
html[data-ui="c"] .fv-dl-big { flex: 1; }
html[data-ui="c"] .fv-body.zoom { align-items: flex-start; justify-content: flex-start; }
html[data-ui="c"] .fv-body.zoom .fv-img { max-width: none; max-height: none; width: 220%; margin: 0; border-radius: 0; cursor: zoom-out; }
html[data-ui="c"] .fv-img { cursor: zoom-in; }
html[data-ui="c"] .fv-retry { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; margin-top: 6px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
html[data-ui="c"] .fv-retry svg { width: 16px; height: 16px; }
@media (max-width: 760px) { html[data-ui="c"] .fv-nav { display: none; } html[data-ui="c"] .fv-foot { display: flex; } }
@media (min-width: 761px) { html[data-ui="c"] .fv-foot { display: none; } }
