/* ============================================================================
   Admin-Dashboard — طبقة التصميم الحديثة (الحزمة 35 · البند 13)
   منقولة من منصّة Domains (الحزمة 206) ومترجمة إلى رموز Admin. تُحمَّل بعد styles.css.
   اختيارات المالك (2026-10-25): القوائم «كبسولة» · المؤشّرات داخل الهيرو · حركة «هادئة» ·
   الجداول تناوب خفيف + توسيط · الرسوم ApexCharts · أيقونات بحاوية خفيفة من لونها.
   قواعد: كل لون من الرموز (--*) · لا `inset` اختصاراً في القواعد البنيوية (§3-ب رقم 4) ·
   كل حركة تُلغى مع prefers-reduced-motion · لا حركة دائمة.
   ============================================================================ */
:root {
  --d1: 120ms; --d2: 200ms; --d3: 320ms;
  --ease: cubic-bezier(.215, .61, .355, 1);
  --scrim: rgba(18, 16, 20, .46);
  --z-pop: 9000;
  --zebra: color-mix(in srgb, var(--ink) 2.6%, transparent);
}
:root[data-theme="dark"] { --zebra: color-mix(in srgb, #fff 2.8%, transparent); }

/* ---------------- أيقونات المؤشّرات والفقرات: حاوية خفيفة من لونها ---------------- */
.ad-ic {
  border-radius: 10px;
  background: color-mix(in srgb, var(--ic-c) 13%, transparent);
  padding: 5px;
}
.ad-ic.sm { border-radius: 8px; padding: 4px; }
.ad-ic.lg { border-radius: 12px; padding: 6px; width: 38px; height: 38px; }
.ad-ic svg.ic { filter: none; stroke-width: var(--ic-sw); }
:root[data-theme="dark"] .ad-ic { background: color-mix(in srgb, var(--ic-c) 20%, transparent); }
:root[data-theme="dark"] .ad-ic svg.ic { filter: none; }
.nav-leaf .ad-ic, #navSide .ad-ic { padding: 4px; }

/* ---------------- بطاقات المؤشّرات داخل الهيرو ---------------- */
.ad-m { display: flex; align-items: center; gap: 10px; transition: transform var(--d2) var(--ease), box-shadow var(--d2) var(--ease); }
.ad-m .v { font-variant-numeric: tabular-nums; }
.ad-m:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(20, 16, 12, .28); }

/* ---------------- رقاقة الفرق ▲▼ (M.chip) و✓ الحفظ (M.done) ---------------- */
.dchip { display: inline-flex; align-items: center; margin-inline-start: 6px; padding: 0 7px; border-radius: 999px;
  font: 700 11px/18px var(--font-latin); vertical-align: middle; white-space: nowrap; }
.dchip.up { background: var(--good-bg); color: var(--good); }
.dchip.down { background: var(--bad-bg); color: var(--bad); }
.m-done { position: relative; color: transparent !important; background: var(--good) !important; border-color: var(--good) !important; }
.m-ck { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; color: #fff;
  fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

/* ---------------- القوائم المنسدلة: الحقل المغلق «كبسولة» ---------------- */
select:not([multiple]):not([size]):not(.company-switch), .field select {
  border-radius: 999px; min-height: 42px; padding-inline-start: 16px; padding-inline-end: 40px;
  background-color: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20, 16, 12, .05); font-weight: 600;
  /* السهم: دائرة نحاسية خفيفة على الجهة المنتهية (يحلّ محلّ السهم الكلاسيكي) */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='11' fill='%23B8603C' fill-opacity='.13'/><path d='m8 10.5 4 4 4-4' fill='none' stroke='%23B8603C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 22px; background-position: left 9px center;
}
:root[data-theme="dark"] select:not([multiple]):not([size]):not(.company-switch), :root[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='11' fill='%23D07C52' fill-opacity='.2'/><path d='m8 10.5 4 4 4-4' fill='none' stroke='%23D07C52' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
:root[dir="ltr"] select:not([multiple]):not([size]):not(.company-switch), :root[dir="ltr"] .field select { background-position: right 9px center; }
select:not([multiple]):not([size]):not(.company-switch):hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
select[aria-expanded="true"] { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }

/* ---------------- المنبثقة والصفيحة (ui-select.js — D.uiPop) ---------------- */
.uip { position: fixed; z-index: var(--z-pop); display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 2px 6px rgba(20, 16, 12, .06), 0 18px 40px -12px rgba(20, 16, 12, .28);
  overflow: hidden; animation: uipIn var(--d2) var(--ease); font-family: var(--font-ar); }
:root[data-theme="dark"] .uip { box-shadow: 0 18px 44px -10px rgba(0, 0, 0, .65); }
.uip.up { animation-name: uipUpIn; }
.uip-b { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: auto; }
@keyframes uipIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes uipUpIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.uip-ov { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: var(--z-pop); display: flex; align-items: flex-end;
  background: var(--scrim); animation: uipFade var(--d2) backwards; transition: opacity var(--d2); }
@keyframes uipFade { from { opacity: 0; } }
.uip-ov.out { opacity: 0; }
.uip.sheet { position: relative; width: 100%; max-height: 82vh; border-radius: 20px 20px 0 0; border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px); animation: uipSheet var(--d3) var(--ease); transition: transform var(--d2) var(--ease); }
.uip.sheet.out { transform: translateY(100%); }
@keyframes uipSheet { from { transform: translateY(100%); } }
.uip-grab { display: block; flex: none; width: 42px; height: 4px; margin: 9px auto 4px; border-radius: 999px; background: var(--faint); touch-action: none; }
.uip-h { flex: none; padding: 4px 16px 10px; border-bottom: 1px solid var(--line); font-weight: 700; text-align: center; touch-action: none; }
.uis-q { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.uis-q svg.ic { width: 16px; height: 16px; flex: none; }
.uip .uis-q input, .uip .uis-q input:focus { flex: 1; min-width: 0; min-height: 34px; padding: 2px 4px; border: 0; background: transparent; box-shadow: none; outline: none; color: var(--ink); font: inherit; }
.uis-ls { flex: 1; min-height: 0; overflow: auto; padding: 5px; outline: none; }
.uis-g { padding: 8px 12px 4px; font-size: 11px; font-weight: 800; color: var(--muted); }
.uis-o { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 6px 11px; border-inline-start: 3px solid transparent;
  border-radius: 9px; font-size: 13.5px; color: var(--ink); cursor: pointer; transition: background-color var(--d1); }
.uis-o > span:not(.uis-ic) { flex: 1; min-width: 0; }
.uis-o.hi { background: var(--surface-2); }
.uis-o.on { color: var(--accent-strong); font-weight: 700; background: var(--accent-soft); border-inline-start-color: var(--accent); }
:root[data-theme="dark"] .uis-o.on { color: var(--accent); }
.uis-o svg.ic { width: 16px; height: 16px; flex: none; }
.uis-o.dis { opacity: .45; cursor: not-allowed; }
.uis-o.sep { min-height: 0; height: 9px; padding: 0; margin: 2px 8px 6px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 0; color: transparent; opacity: 1; }
.uis-o.new { color: var(--accent-strong); font-weight: 700; }
:root[data-theme="dark"] .uis-o.new { color: var(--accent); }
.uis-o.new .uis-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft-2); }
.uis-o.new .uis-ic svg.ic { width: 13px; height: 13px; }
.uis-o mark { border-radius: 3px; color: inherit; background: color-mix(in srgb, var(--warn) 30%, transparent); }
.uis-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--dc, var(--muted)); }
.uis-none { padding: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.uip.sheet .uis-o { min-height: 48px; font-size: 15px; }
.uip.sheet .uis-q input { min-height: 42px; }

/* ---------------- الجداول: تناوب خفيف جداً + كل خلية في الوسط (قاعدة المالك) ---------------- */
table.tbl tbody tr:not(.tbl-total):nth-child(even) td { background: var(--zebra); }
table.tbl th, table.tbl td { text-align: center; vertical-align: middle; }
table.tbl tbody tr:not(.tbl-total):hover td { background: var(--accent-soft); }

/* ---------------- الرسوم (ApexCharts) ---------------- */
.ui35-apex { width: 100%; direction: ltr; }
.ui35-apex .apexcharts-tooltip { font-family: var(--font-ar) !important; border-radius: 10px !important; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .3) !important; }
.ui35-apex .apexcharts-text { font-family: var(--font-latin) !important; }

/* ---------------- ⭐ الحزمة 38 — الخط المتوقّف مؤقتاً + «قائمة المدفوعات» (§9-ك-6) ---------------- */
/* سطر الخط المتوقّف باهت قليلاً في صفحة الخطوط (قرار 5-أ — العلامة `.ad-dim-row` تضعها الصفحة وحدها، فلا يبهت
   سطره في «قائمة المدفوعات» حيث ما زال مستحقّاً) — والشارة نفسها تبقى بكامل لونها */
table.tbl tbody tr:has(.ad-dim-row) td { opacity: .62; }
table.tbl tbody tr:has(.ad-dim-row) td:has(.ad-paused) { opacity: 1; }
.ad-pay-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 4px 2px 12px; }
.ad-pay-tools .field { margin: 0; }
.ad-pay-all { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 700; cursor: pointer; }
.ad-pay-all input, .ad-pay-cb { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
@media (max-width: 640px) { .ad-pay-tools > .btn, .ad-pay-tools > .field { flex: 1 1 100%; } .ad-pay-tools > .spacer { display: none; } }

/* ---------------- ⭐ الحزمة 37 — سجل الموظفين (§9-ل) ---------------- */
/* اسم الموظف في أي جدول: زرّ نصّي يفتح بطاقته — يُعرف بخطّ سفلي منقّط يتلوّن عند المرور */
.ad-emp-link { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline dotted color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 4px;
  transition: color var(--d1) var(--ease); }
.ad-emp-link:hover { color: var(--accent-strong); text-decoration-style: solid; }
:root[data-theme="dark"] .ad-emp-link:hover { color: var(--accent); }
.ad-emp-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* منتقي الموظف: حقل + شارة حالة + مسح، والاقتراحات **تحت الحقل في التدفّق** (لا تطفو فلا تُقصّ داخل النافذة) */
.ad-emp-row { display: flex; align-items: center; gap: 6px; }
.ad-emp-row input { flex: 1 1 auto; min-width: 0; }
.ad-emp-pick.chosen .ad-emp-row input { border-color: color-mix(in srgb, var(--good) 60%, var(--line)); background: var(--good-bg); font-weight: 700; }
.ad-emp-st { flex: none; white-space: nowrap; }
.ad-emp-clr { flex: none; }
.ad-emp-menu { margin-top: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.ad-emp-opt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; min-height: 42px; padding: 8px 12px;
  border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.ad-emp-opt:last-child { border-bottom: 0; }
.ad-emp-opt:hover, .ad-emp-opt.on { background: var(--accent-soft); }
.ad-emp-opt .h { font-size: 11.5px; color: var(--muted); }
.ad-emp-opt .a { font-size: 11px; color: var(--accent-strong); }
.ad-emp-opt.new { color: var(--accent-strong); font-weight: 600; align-items: center; }
:root[data-theme="dark"] .ad-emp-opt.new, :root[data-theme="dark"] .ad-emp-opt .a { color: var(--accent); }
.ad-emp-note { margin-top: 6px; display: block; line-height: 1.8; font-size: 12px; }
.ad-emp-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ad-emp-sug > span { font-weight: 700; }
.ad-emp-chip { padding: 4px 11px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface);
  color: var(--accent-strong); font: inherit; font-size: 12px; cursor: pointer; min-height: 30px; }
.ad-emp-chip:hover { background: var(--accent-soft); }
.ad-emp-newpos { margin-top: 8px; padding: 10px 12px 2px; border: 1px dashed var(--line); border-radius: var(--r); }
/* المناصب في الجدول: رقاقة لكل منصب، والقسم سطر صغير تحته؛ المنتهي باهت مشطوب */
.ad-emp-pos { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; margin: 2px; padding: 3px 10px;
  border-radius: 10px; background: color-mix(in srgb, var(--tone-violet) 11%, transparent); font-size: 12px; font-weight: 700; line-height: 1.5; }
.ad-emp-pos small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.ad-emp-pos.ended { background: var(--track); color: var(--faint); text-decoration: line-through; }
/* البطاقة السريعة */
.ad-emp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ad-emp-head .t { flex: 1 1 auto; min-width: 0; }
.ad-emp-head .n { font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.ad-emp-head .m { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.ad-emp-prow, .ad-emp-irow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line-soft); }
.ad-emp-prow:last-of-type, .ad-emp-irow:last-of-type { border-bottom: 0; }
.ad-emp-prow .l { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ad-emp-prow .d, .ad-emp-irow .d { font-size: 12px; color: var(--muted); }
.ad-emp-prow.ended .l b { color: var(--faint); text-decoration: line-through; }
.ad-emp-alist { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-emp-alias { display: inline-flex; align-items: center; gap: 4px; padding-block: 3px; padding-inline: 11px 4px; border-radius: 999px;
  background: var(--accent-soft); font-size: 12.5px; }
.ad-emp-alias button { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; }
.ad-emp-alias button:hover { background: var(--bad-bg); color: var(--bad); }
.ad-emp-alias button svg.ic { width: 12px; height: 12px; }
.ad-emp-aadd { display: flex; gap: 8px; margin-top: 10px; }
.ad-emp-aadd input { flex: 1 1 auto; min-width: 0; }

/* ⭐ الحزمة 40 — نافذة السيارة: سطر «اسم السيارة في المنصّة» (معاينة حيّة للاسم المشتقّ) بإطار يشبه لوحة السيارة،
   وشارة حالة الوثيقة تحت حقلَي الانتهاء. */
.ad-car-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; padding: 10px 12px;
  border-radius: var(--r); background: var(--accent-soft); font-size: 12.5px; color: var(--muted); }
.ad-car-name svg.ic { color: var(--accent); }
.ad-car-name b { padding: 3px 12px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--surface);
  color: var(--ink); font-size: 13.5px; font-weight: 800; box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--line); }
.ad-car-name i { font-style: normal; color: var(--faint); }
.ad-doc-hint { margin-top: 6px; }
.ad-doc-hint:empty { display: none; }
/* شريط «وثائق قريبة الانتهاء» في صفحة السيارات: سطر لكل وثيقة */
.ad-doc-list { display: grid; gap: 5px; margin-top: 8px; }
.ad-doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ad-doc-row .ad-badge { min-width: 128px; justify-content: center; }

/* ⭐ الحزمة 41 — أداة دمج البروفايلين (نافذة الإدارة ← البروفايلات) + شارة «دمج غير مثبَّت» + الإشعار العابر */
.ad-merge { margin-top: 18px; }
.ad-merge-route { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; border-radius: var(--r);
  background: var(--accent-soft); }
.ad-merge-co { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; color: var(--ink); }
.ad-merge-co.src { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.ad-merge-arrow { display: inline-grid; place-items: center; color: var(--accent); }
.ad-merge-arrow svg.ic { width: 20px; height: 20px; transform: scaleX(-1); }
:root[dir="ltr"] .ad-merge-arrow svg.ic { transform: none; }
.ad-merge-provs { margin-inline-start: auto; font-size: 12px; color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ad-merge-cycs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 10px; }
.ad-merge-cyc { min-width: 0; overflow-x: auto; }
.ad-merge-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ad-merge-badge { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 8px; padding: 6px 12px; min-height: 34px;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--warn) 70%, transparent); background: color-mix(in srgb, var(--warn) 22%, transparent);
  color: #F6D9A8; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.ad-merge-badge:hover { background: color-mix(in srgb, var(--warn) 34%, transparent); }
.ad-merge-badge:focus-visible { outline: 2px solid var(--warn); outline-offset: 2px; }
@media (max-width: 560px) { .ad-merge-badge span { display: none; } .ad-merge-badge { padding: 6px 9px; } }
.ad-toasts { position: fixed; inset-inline: 0; bottom: 18px; z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.ad-toast { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; max-width: min(560px, 100%); padding: 11px 16px;
  border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.18);
  font-size: 13.5px; font-weight: 600; line-height: 1.6; }
.ad-toast .pb { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--good); transform-origin: right; }
:root[dir="ltr"] .ad-toast .pb { transform-origin: left; }

@media (prefers-reduced-motion: reduce) {
  .uip, .uip.sheet, .uip-ov { animation: none !important; transition: none !important; }
  .ad-m { transition: none !important; }
  .ad-m:hover { transform: none; }
  .ad-emp-link { transition: none !important; }
}

/* ⭐ الحزمة 42 — نافذة التحكّم بالتقارير: إعدادات + «خريطة الصفحات» (R1-أ) · سطر الفقرة (R2-أ) · المجال (R3-أ) · الاتجاه (12A-أ).
   الصفحات المصغّرة «ورق» أبيض في الوضعين — هي صورة المستند المطبوع لا سطح من الواجهة. */
.rp42-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.rp42-grid.one { grid-template-columns: minmax(0, 1fr); }
.rp42-left { min-width: 0; }
.rp42-map { position: sticky; top: 0; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 30px; }
.rp42-map h4 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: center; color: var(--ink); }
.rp42-map .sub { font-size: 12px; color: var(--muted); margin: 2px 0 14px; min-height: 18px; }
.rp42-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
.rp42-pages.land { grid-template-columns: minmax(0, 1fr); }
.rp42-pg { aspect-ratio: 210 / 297; background: #fff; border-radius: 4px; padding: 7px; display: flex; flex-direction: column; gap: 4px; position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 18px -8px rgba(30, 28, 31, .30); }
.rp42-pages.land .rp42-pg { aspect-ratio: 297 / 210; }
.rp42-pg .hd { height: 10px; border-radius: 2px; background: #1E1C1F; box-shadow: inset 0 -2px 0 #B8603C; flex: none; }
.rp42-pg .rg { height: 5px; border-radius: 2px; background: rgba(184, 96, 60, .22); flex: none; }
.rp42-pg .blk { flex: none; border-radius: 3px; font-size: 9px; font-weight: 700; line-height: 1.35; padding: 2px 5px; color: #3a3530; background: #F5F1EA;
  border-inline-start: 3px solid var(--tc, #B8603C); overflow: hidden; min-height: 4px; }
.rp42-pg .blk.ttl { background: #EDE6DD; color: #1E1C1F; }
.rp42-pg .no { position: absolute; bottom: -21px; inset-inline: 0; text-align: center; font-size: 11px; color: var(--muted); font-family: var(--font-latin); }
.rp42-pg.brk::after { content: ""; position: absolute; top: -9px; inset-inline: 0; border-top: 2px dashed #B8603C; }
.rp42-msg { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); padding: 18px 6px; text-align: center; line-height: 1.8; }
.rp42-msg.warn { color: var(--bad); font-weight: 700; }
.rp42-hint { font-size: 12px; color: var(--muted); margin: -4px 0 8px; }
.rp42-secs { display: flex; flex-direction: column; gap: 6px; position: relative; }
.rp42-item { display: flex; flex-direction: column; gap: 6px; }
.rp42-sec { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.rp42-sec.off .t { color: var(--faint); }
.rp42-sec .h { color: var(--faint); display: inline-grid; place-items: center; cursor: grab; min-width: 32px; min-height: 32px; border-radius: 8px; touch-action: none; }
.rp42-sec .h:hover { color: var(--accent); background: var(--accent-soft); }
.rp42-sec .h.fixed { cursor: default; opacity: .55; }
.rp42-sec .h.fixed:hover { background: none; color: var(--faint); }
.rp42-sec .t { flex: 1; min-width: 140px; font-weight: 700; font-size: 13.5px; display: flex; gap: 8px; align-items: center; color: var(--ink); }
.rp42-pb { border: 1px dashed var(--line); border-radius: 999px; padding: 4px 12px; min-height: 32px; font: inherit; font-size: 12px; color: var(--muted); background: none;
  display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; cursor: pointer; }
.rp42-pb:hover { border-color: var(--accent); color: var(--accent); }
.rp42-pb.on { border-style: solid; border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.rp42-cut { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 800; color: var(--accent-strong); margin: 2px 4px 0; }
.rp42-cut::before, .rp42-cut::after { content: ""; flex: 1; border-top: 2px dashed var(--accent); opacity: .6; }
.rp42-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rp42-chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; min-height: 34px; font: inherit; font-size: 12.5px; font-weight: 700;
  background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.rp42-chip:hover { border-color: var(--accent); }
.rp42-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rp42-span { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 4px; padding: 8px 12px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); line-height: 1.7; }
.rp42-span b { color: var(--ink); }
.rp42-or { display: flex; gap: 10px; flex-wrap: wrap; }
.rp42-o { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 14px 8px 12px; min-height: 44px;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.rp42-o.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rp42-o i { display: block; width: 17px; height: 24px; background: #fff; border: 1.5px solid #9a9089; border-radius: 2px; box-shadow: inset 0 3px 0 #1E1C1F; }
.rp42-o i.land { width: 24px; height: 17px; }
.rp42-o.on i { border-color: var(--accent); }
.rp42-chip:focus-visible, .rp42-pb:focus-visible, .rp42-o:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) {
  .rp42-grid { grid-template-columns: minmax(0, 1fr); }
  .rp42-map { position: static; }
}
/* التاريخ بعد نصّ عربي يُعزَل اتجاهه (قاعدة bidi W2 تقلب مقاطعه «25-09-2026») */
.rp42-span .mono { unicode-bidi: isolate; direction: ltr; }

/* ⭐ الحزمة 45: مكافئ الدولار تحت مبلغ الليرة في جدول الاستضافة الخارجية */
.ad-fx-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* ============================================================
   ⭐ الحزمة 46 — «وضع المنصّة» (V1-أ · R2-أ · W1-أ) + النسخة الاحتياطية (public/platform.js · README §7-هـ · §7-و)
   ============================================================ */
:root { --ad-lock-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F1C7B2' stroke-width='2.6' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.ad-ltr { unicode-bidi: isolate; direction: ltr; display: inline-block; }
/* الختم في الشريط الفحمي — ثابت الألوان لأن الشريط فحمي في الوضعين (§1) */
.topbar .spacer.ad-has-stamp { display: flex; align-items: center; justify-content: center; min-width: 0; }
.ad-ro-stamp { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 12px; border: 1.5px solid #C97B59; border-radius: 9px;
  color: #F1C7B2; font-weight: 800; font-size: 13.5px; line-height: 1; white-space: nowrap; background: rgba(184,96,60,.14);
  box-shadow: 0 0 0 3px #1E1C1F, 0 0 0 4.5px rgba(201,123,89,.55); transform: rotate(-1.6deg); }
.ad-ro-stamp .ic { width: 16px; height: 16px; }
.ad-ro-stamp i { width: 1px; height: 14px; background: rgba(241,199,178,.45); }
.ad-ro-stamp small { font-size: 12px; font-weight: 700; color: #D9B6A4; }
/* شريط الإعلان أعلى كل صفحة */
.ad-ro-band { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 10px 16px; margin: 0 0 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 3px 0 var(--accent); font-size: 13px; color: var(--ink-soft); }
.ad-ro-band b { color: var(--ink); }
.ad-ro-band .tx { flex: 1; min-width: 0; display: grid; gap: 7px; line-height: 1.8; }
.ad-ro-band .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-ro-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; font-weight: 700;
  color: var(--ink); background: var(--surface-2); overflow-wrap: anywhere; }
.ad-ro-chip .ic { width: 14px; height: 14px; color: var(--accent); flex: none; }
/* تلميح الزرّ المقفل (R2-أ) */
.ad-ro-tip { position: absolute; z-index: 9999; background: #1E1C1F; color: #F0EDEB; font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 9px;
  box-shadow: 0 8px 22px rgba(0,0,0,.25); display: flex; gap: 7px; align-items: center; max-width: calc(100vw - 16px); pointer-events: none; }
.ad-ro-tip .ic { width: 14px; height: 14px; color: #E9A585; flex: none; }
/* شاشة الدخول */
.ad-login-stamp { display: flex; justify-content: center; margin: 0 0 14px; }
.ad-login-stamp .ad-ro-stamp { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px rgba(201,123,89,.55); color: var(--accent-strong); background: var(--accent-soft); }
.ad-login-stamp .ad-ro-stamp small { color: var(--accent-strong); }
.ad-login-stamp .ad-ro-stamp i { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.ad-login-note { margin: 0 0 14px; border-radius: 14px; padding: 10px 12px; font-size: 12.5px; line-height: 1.8; display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.ad-login-note.rec { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ad-login-note > .ic { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }
/* ⚙ صندوق «وضع المنصّة» (W1-أ) */
.ad-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 2px 0 12px; }
.ad-mode { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 12px 11px; background: var(--surface); text-align: start; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-height: 44px; }
.ad-mode:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ad-mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-mode .h { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 14px; }
.ad-mode .d { font-size: 12px; color: var(--muted); line-height: 1.7; }
.ad-mode .r { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); margin-inline-start: auto; flex: none; display: grid; place-items: center; }
.ad-mode.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-mode.on .r { border-color: var(--accent); }
.ad-mode.on .r::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ad-mode.danger.on { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent); }
.ad-mode.danger.on .r { border-color: var(--bad); }
.ad-mode.danger.on .r::after { background: var(--bad); }
.ad-mode-cur { font-size: 10.5px; }
.ad-mode-state { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.ad-mode-p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.ad-mode-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ad-mode-msg { font-size: 12.5px; color: var(--muted); }
.ad-mode-warn { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--warn); margin: 8px 0 0; line-height: 1.7; }
.ad-ok { display: inline-flex; gap: 5px; align-items: center; color: var(--good); font-weight: 700; flex-wrap: wrap; }
.ad-bad { display: inline-flex; gap: 5px; align-items: center; color: var(--bad); font-weight: 700; }
.ad-derived { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: 12px; padding: 9px 12px; background: var(--surface-2); font-size: 13px; margin-top: 4px; }
.ad-derived .u { font: 700 13px "Segoe UI", Consolas, monospace; direction: ltr; unicode-bidi: isolate; flex: 1; min-width: 0; overflow-wrap: anywhere; text-align: left; color: var(--ink); }
.ad-derived .lb { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ad-derived .btn { min-height: 34px; padding: 4px 12px; font-size: 12.5px; }
.ad-restore .u { font-weight: 600; font-size: 12px; }
.ad-paths { margin: 8px 0 0; font-size: 12px; color: var(--muted); display: grid; gap: 3px; }
.ad-paths .u { font: 600 12px "Segoe UI", Consolas, monospace; direction: ltr; unicode-bidi: isolate; color: var(--ink-soft); overflow-wrap: anywhere; }
/* تأكيد النقل (W3-أ) */
.ad-conseq { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 9px; }
.ad-conseq li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.8; }
.ad-conseq li .ad-ic { flex: none; }
.ad-conseq .ad-ltr { overflow-wrap: anywhere; }
.ad-type-confirm { font-weight: 800; font-size: 18px; text-align: center; }
.ad-invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 16%, transparent); }
@media (max-width: 760px) {
  .ad-modes { grid-template-columns: minmax(0, 1fr); }
  /* الشريط العلوي ضيّق على الهاتف (منتقي البروفايل والأزرار) ⇒ الختم يغيب منه، والشريط أعلى الصفحة يحمل الإعلان كاملاً */
  .topbar .ad-ro-stamp { display: none; }
  .ad-login-stamp .ad-ro-stamp { padding: 4px 10px; font-size: 12.5px; }
  .ad-ro-band { padding: 10px 12px; }
  .ad-ro-band > .btn { width: 100%; justify-content: center; }
}
