/* ملفى — تنسيقات الواجهة (مطابقة DESIGN.md) */
:root {
  /* رموز الهوية المعتمدة (حزمة التصميم V1 — design/README.md، اتجاه «ي» وشعار «القوس») */
  --ink-dark: #1B1714; --ink: #1B1714; --paper: #F6F1E8; --copper: #B5532E; --copper-text: #9A431F;
  --copper-dark: #D8703F; --muted: #6B635A; --muted-2: #6B635A; --muted-dark: #A39482; --line: #D9D0C2;
  --line-strong: #D9D0C2; --line-soft: #E2DACE; --body: #3D352E; --dark-2: #2A2521; --dark-track: #3A342E;
  --dark-line: #3A342E; --notice: #F3E3D6; --sand: #EFE8DC; --cream: #F6F1E8; --on-copper: #FFF7EE;
  --disabled-text: #8A7C6C; --ok-text: #2F6B3A; --danger: #A3261B; --sale: #A3261B; --gx: 20px;
  /* خط واحد للهوية كلها (README: IBM Plex Sans Arabic لكل شيء) — أُسقط Reem Kufi وAref Ruqaa */
  --f-ui: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --f-head: var(--f-ui);
  --f-logo: var(--f-ui);
  /* حواف المناطق الآمنة (النتوء، مؤشر الشاشة الرئيسية). في تطبيق أندرويد يحقن الغلاف قيمًا صحيحة
     في --safe-area-inset-* لأن WebView الأقدم من 140 يعيد env() صفرًا؛ نأخذ الأكبر منهما */
  --sa-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --sa-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  --sa-left: max(env(safe-area-inset-left, 0px), var(--safe-area-inset-left, 0px));
  --sa-right: max(env(safe-area-inset-right, 0px), var(--safe-area-inset-right, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); }
body { font-family: var(--f-ui); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-tap-highlight-color: transparent; overflow-x: hidden; padding-left: var(--sa-left); padding-right: var(--sa-right); }
body.dark-page { background: var(--ink-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
/* حقول الإدخال 16px على الأقل (أصغر منها يكبّر iOS الصفحة عند التركيز) — الأحجام الأكبر في .input */
input, select, textarea { font-size: max(16px, 1em); }
/* عناصر التحكم فقط: بلا وميض لمس ولا تحديد نص ولا قائمة الضغط المطوّل؛ بقية النصوص قابلة للتحديد والنسخ */
button, .btn, .chip, .tab, .utab, .switch, .tb-btn, .act, .mi, [role="button"], [role="tab"], [role="switch"], label[for] {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.native a[href] { -webkit-touch-callout: none; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { cursor: not-allowed; }
a { color: var(--copper-text); text-decoration: none; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.num, .tab-nums { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- الإقلاع والشعار ---------- */
.boot { min-height: 100dvh; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); }
/* الشعار «القوس»: الكلمة بخط الهوية ثقيلًا، وتحتها قوس بالبرتقالي المحروق (design/assets/logo-*.png) */
.logo { display: inline-flex; flex-direction: column; align-items: center; }
.logo-word { font-family: var(--f-logo); font-weight: 700; font-size: 58px; line-height: 1.1; padding-bottom: 10px; letter-spacing: -.01em; }
.logo-arc { display: block; width: 138px; height: 24px; border: 7px solid var(--copper); border-top: none; border-radius: 0 0 120px 120px / 0 0 46px 46px; }
.logo.sm .logo-word { font-size: 26px; padding-bottom: 4px; }
.logo.sm .logo-arc { width: 60px; height: 11px; border-width: 3.5px; }
.logo.light .logo-word { color: var(--ink); }
.logo.light .logo-arc { border-color: var(--copper); }
.dark .logo-word, .boot.dark .logo-word { color: var(--cream); }
.dark .logo-arc { border-color: var(--copper-dark); }

/* ---------- الشاشة والهيكل ---------- */
#app { min-height: 100dvh; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); padding-bottom: var(--sa-bottom); }
.screen.dark { background: var(--ink-dark); color: var(--cream); }
.shell .screen { min-height: 0; flex: 1; }
.spacer { flex: 1; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(8px + var(--sa-top)) var(--gx) 2px; font-size: 13px; color: #736658; min-height: 48px; }
.dark .topbar { color: var(--muted-dark); }
.tb-btn { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: inherit; font-size: 13px; padding: 0 2px; }
.tb-btn:hover { color: var(--ink); }
.dark .tb-btn:hover { color: var(--cream); }
.tb-badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; background: var(--copper); color: var(--on-copper); font-size: 12px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.head { padding: 8px var(--gx) 14px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.head.plain { border-bottom: 0; }
.dark .head { border-color: var(--dark-track); }
.head h1, .h1 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 26px; line-height: 1.35; color: var(--ink); }
.dark .head h1, .dark .h1 { color: var(--cream); font-size: 28px; }
.head .sub { flex-basis: 100%; font-size: 14px; color: var(--muted); line-height: 1.7; margin-top: -8px; }
.head .aside { font-size: 13px; color: var(--muted); }
.head .aside.link, .link { color: var(--copper-text); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.link:hover { text-decoration: underline; }
.dark .link { color: var(--copper-dark); }
.pad { padding-inline: var(--gx); }
.section { padding: 22px var(--gx); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.section.tight { padding-block: 16px; gap: 6px; }
.section:last-child { border-bottom: 0; }
.label { font-size: 13px; color: var(--muted); }
.dark .label { color: var(--muted-dark); }
.cap { padding: 16px var(--gx) 6px; font-size: 13px; color: var(--muted); }
.text { font-size: 15px; color: var(--body); line-height: 1.8; text-wrap: pretty; }
.text-sm { font-size: 14px; color: var(--muted); line-height: 1.8; }
.dark .text-sm { color: var(--muted-dark); }
.actions { padding: 16px var(--gx) calc(30px + var(--sa-bottom)); display: flex; flex-direction: column; gap: 12px; }
.actions.row { flex-direction: row; gap: 10px; }
.actions.sticky { position: sticky; bottom: 0; background: var(--paper); z-index: 5; }
.dark .actions.sticky { background: var(--ink-dark); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; } .gap-22 { gap: 22px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.copper { color: var(--copper-text); }
.dark .copper, .copper-dark { color: var(--copper-dark); }

/* ---------- الأزرار ---------- */
.btn { position: relative; width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 19px; font-weight: 600; border: 0; border-radius: 0; text-align: center; padding: 0 16px; transition: background-color .15s, color .15s; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-copper { background: var(--copper); color: var(--on-copper); font-weight: 700; font-size: 20px; }
.btn-copper:hover:not(:disabled) { background: #A04A28; }
.btn-light { background: var(--cream); color: var(--ink-dark); }
.btn-light:hover:not(:disabled) { background: #fff; }
.btn-dark { background: var(--ink-dark); color: var(--cream); }
.btn-secondary { height: 48px; border: 1.5px solid var(--ink); color: var(--ink); font-size: 17px; font-weight: 400; background: transparent; }
.btn-secondary:hover:not(:disabled) { background: var(--sand); }
.dark .btn-secondary { border-color: var(--cream); color: var(--cream); }
.dark .btn-secondary:hover:not(:disabled) { background: var(--dark-2); }
.btn-secondary.tall { height: 56px; }
.btn-text { height: 48px; font-size: 16px; font-weight: 400; color: var(--muted); background: transparent; }
.btn-text:hover:not(:disabled) { color: var(--ink); text-decoration: underline; }
.dark .btn-text { color: var(--muted-dark); }
.dark .btn-text:hover:not(:disabled) { color: var(--cream); }
.btn-narrow { width: 120px; flex: none; }
.btn-sm { height: 48px; font-size: 16px; }
.btn:disabled:not(.is-loading) { background: var(--line-strong); color: var(--disabled-text); border-color: var(--line-strong); }
.btn-text:disabled:not(.is-loading), .btn-secondary:disabled:not(.is-loading) { background: transparent; color: var(--disabled-text); }
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-color: var(--spin, #F6F1E8) var(--spin, #F6F1E8) transparent transparent; animation: spin .7s linear infinite; }
.btn-secondary.is-loading::after, .btn-text.is-loading::after { --spin: var(--ink); }
.btn-light.is-loading::after { --spin: var(--ink-dark); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- الحقول ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 13px; color: var(--muted); }
.input { width: 100%; border: 0; border-bottom: 2px solid var(--line-strong); background: transparent; padding: 4px 0 8px; font-size: 20px; color: var(--ink); border-radius: 0; outline: none; font-variant-numeric: tabular-nums; }
.input::placeholder { color: var(--disabled-text); }
.input:focus { border-bottom-color: var(--ink); }
.input.xl { font-size: 30px; letter-spacing: .04em; padding-bottom: 10px; }
.input.lg { font-size: 22px; }
.input.md { font-size: 17px; }
.input.hero { font-size: 48px; font-weight: 700; padding-bottom: 6px; }
textarea.input { resize: vertical; min-height: 84px; font-size: 17px; line-height: 1.7; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 8px 55%, 14px 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 26px; cursor: pointer; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--copper-text); }
.field.invalid > label, .field.invalid > .label { color: var(--copper-text); }
.field.invalid .input, .field.invalid .affix { border-bottom-color: var(--copper-text); }
.dark .field > label { color: var(--muted-dark); }
.dark .input { color: var(--cream); border-bottom-color: var(--dark-line); }
.dark .input:focus { border-bottom-color: var(--cream); }
.dark .input::placeholder { color: #6E6052; }
.dark .field .hint { color: var(--muted-dark); }
.dark .field .err, .dark .field.invalid > label { color: var(--copper-dark); }
.dark .field.invalid .input { border-bottom-color: var(--copper-dark); }
.affix { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--line-strong); }
.affix:focus-within { border-bottom-color: var(--ink); }
.affix.accent { border-bottom-color: var(--copper); }
.affix .input { border-bottom: 0; }
.affix .unit { font-size: 18px; color: var(--muted); white-space: nowrap; }
.affix.hero-affix .unit { font-size: 19px; color: var(--body); }
.dropzone { height: 130px; background: repeating-linear-gradient(135deg, #E6DCCB 0 8px, #DED3C2 8px 16px); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; overflow: hidden; border: 2px solid transparent; }
.dropzone.over { border-color: var(--ink); }
.dropzone span { font-size: 13px; color: var(--body); background: var(--paper); padding: 5px 9px; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* مفتاح */
.switch { width: 56px; height: 30px; flex: none; background: var(--line-strong); display: flex; align-items: center; justify-content: flex-end; padding: 3px; transition: background-color .15s; }
.switch::before { content: ''; width: 24px; height: 24px; background: var(--paper); }
.switch[aria-checked="true"] { background: var(--copper); justify-content: flex-start; }
.switch[aria-checked="true"]::before { background: var(--on-copper); }
.switch:disabled { opacity: .5; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; }
.switch-row .t { font-size: 17px; color: var(--ink); }
.switch-row .d { font-size: 13px; color: var(--muted); }

/* رقائق */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); color: var(--muted); padding: 7px 14px; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--muted); }
.chip.on { border: 2px solid var(--ink); padding: 6px 13px; color: var(--ink); font-weight: 600; }
.chip.lg { padding: 10px 16px; font-size: 15px; min-height: 46px; }
.chip.lg.on { padding: 9px 15px; }
.chip .count { font-size: 12px; color: var(--muted); font-weight: 400; }
.chip-bar { padding: 14px var(--gx); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }

/* تبويبات أفقية (الدليل) */
/* التبويب بحشوة أفقية لا بفراغ بينه وبين جاره: التسمية القصيرة («منح»، «الكل») كانت 22px فقط فيصعب لمسها.
   والحاوية تسحب الحشوة نفسها من طرفيها ليبقى أول تبويب محاذيًا لهامش الشاشة. */
.utabs { display: flex; gap: 4px; padding: 0 calc(var(--gx) - 12px); border-bottom: 1px solid var(--line); font-size: 15px; overflow-x: auto; scrollbar-width: none; }
.utabs::-webkit-scrollbar { display: none; }
.utab { color: var(--muted); padding: 10px 12px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: 46px; text-align: center; }
.utab.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--copper); }

/* بحث */
.search { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--line-strong); }
.search:focus-within { border-bottom-color: var(--ink); }
.search .input { border: 0; font-size: 16px; padding: 8px 0; }
.search svg { flex: none; color: var(--muted); }
.search .clear { min-width: 44px; min-height: 40px; color: var(--muted); font-size: 13px; }

/* ---------- القوائم ---------- */
.list { padding: 0 var(--gx); }
.row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); text-align: start; color: var(--ink); }
.list > .row:last-child { border-bottom: 0; }
.list.lined > .row:last-child { border-bottom: 1px solid var(--line-soft); }
button.row:hover, a.row:hover { background: linear-gradient(var(--sand), var(--sand)) no-repeat; background-size: calc(100% + 2 * var(--gx)) 100%; background-position: center; }
.row .main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.row .t { font-size: 16px; color: var(--ink); }
.row .t.lg { font-size: 18px; }
.row .t.xl { font-size: 19px; font-weight: 600; }
.row .d { font-size: 13px; color: var(--muted); line-height: 1.6; }
.row .n { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .n.neg { color: var(--copper-text); }
.row .n.mute { color: var(--muted); }
.row .act { font-size: 14px; color: var(--copper-text); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; padding-inline: 4px; }
.row .act:hover { text-decoration: underline; }
.row.dim { opacity: .6; }
.row.hl { background: var(--sand); }
.row.canceled .t, .row.canceled .n { text-decoration: line-through; color: var(--muted); }
.tag { font-size: 12px; padding: 1px 8px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.tag.copper { border-color: var(--copper-text); color: var(--copper-text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; margin-top: 7px; }
.dot.on { background: var(--copper); }
.kv { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; gap: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--body); }
.kv b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.more { display: flex; justify-content: center; padding: 10px var(--gx) 20px; }

/* ---------- القوس ---------- */
.arc { --p: 0; --size: 96px; --inner: 70px; --fill: var(--copper); --track: var(--line); --bg: var(--paper); position: relative; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--fill) 0turn calc(var(--p) * 1turn), var(--track) calc(var(--p) * 1turn) 1turn); transition: --p .6s; }
.arc-in { width: var(--inner); height: var(--inner); border-radius: 50%; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; text-align: center; }
.arc.hero { --size: min(250px, 64vw); --inner: calc(var(--size) * .784); }
.arc.hero .arc-in b { font-size: calc(var(--size) * .304); }
.arc.hero .arc-in span { font-size: 15px; color: var(--muted); font-weight: 400; margin-top: 6px; }
.arc.solid { --size: 56px; background: conic-gradient(var(--copper) 0turn calc(var(--p) * 1turn), var(--line) calc(var(--p) * 1turn) 1turn); }
.arc.solid.off { background: conic-gradient(#8A7C6C 0turn calc(var(--p) * 1turn), var(--line) calc(var(--p) * 1turn) 1turn); }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

/* بطاقة العتبة */
/* صف الرصيد: هوية V1 تجعله صفًّا ورقيًا بفاصل رفيع لا بطاقة داكنة */
.tcard { background: var(--paper); color: var(--ink); padding: 14px var(--gx); display: flex; align-items: center; gap: 16px; text-align: start; width: 100%; border-bottom: 1px solid var(--line); }
.tcard .main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tcard .name { font-size: 16px; font-weight: 700; }
.tcard .msg { font-size: 14px; color: var(--muted); line-height: 1.6; }
.tcard .msg.accent { color: var(--copper-text); }
button.tcard:hover, a.tcard:hover { background: var(--sand); }
button.tcard:hover .arc, a.tcard:hover .arc { --bg: var(--sand); }
.stat3 .label { font-size: 13px; }
.triple .v.copper-dark { color: var(--copper-dark); }
.cards { display: grid; }

/* أقسام الرئيسية: عنوان القسم + شريط بطاقات أفقي */
.sect { padding: 20px 0 4px; display: flex; flex-direction: column; gap: 12px; }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-inline: var(--gx); }
.sect-head h2 { font-size: 19px; font-weight: 600; }
.sect-head .more { font-size: 14px; color: var(--copper-text); min-height: 44px; display: inline-flex; align-items: center; }
.dark .sect-head .more { color: var(--copper-dark); }
.sect-head .cnt { font-size: 13px; color: var(--muted); }
.sect .lede { font-size: 15px; line-height: 1.9; color: var(--muted); max-width: 460px; }
.dark .sect-head .cnt { color: var(--muted-dark); }
/* التمرير الأفقي يبدأ وينتهي عند هامش الصفحة في الاتجاهين (RTL وLTR) */
.rail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-inline: var(--gx); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
.bcard { width: 232px; border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; text-align: start; color: var(--ink); }
.dark .bcard { border-color: var(--dark-line); background: var(--dark-2); color: var(--cream); }
.bcard .pic { height: 104px; background: var(--sand); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.dark .bcard .pic { background: var(--dark-track); }
.bcard .pic img { width: 100%; height: 100%; object-fit: cover; }
.bcard .pic .mark { font-family: var(--f-head); font-size: 22px; color: var(--muted); }
.bcard .km { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; background: var(--paper); color: var(--ink); font-size: 12px; padding: 2px 8px; border: 1px solid var(--line-strong); }
.bcard .body { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.bcard .nm { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard .sb { font-size: 13px; color: var(--muted); line-height: 1.6; }
.dark .bcard .sb { color: var(--muted-dark); }
a.bcard:hover { border-color: var(--muted); }

/* بنر إعلان البراند في رئيسية العميل — موسوم «إعلان» دائمًا */
.ad { position: relative; width: min(84vw, 520px); aspect-ratio: 16 / 7; overflow: hidden; display: flex; align-items: flex-end; background: var(--ink-dark); color: var(--cream); }
.ad img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* الصورة يرفعها البراند وقد تكون فاتحة: الحجاب يبدأ أغمق ويمتد أعلى، ومعه ظل خفيف للنص — وإلا اختفى العنوان على صورة بيضاء */
.ad .txt { position: relative; width: 100%; padding: 14px; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, .62) 45%, rgba(0, 0, 0, .22) 80%, rgba(0, 0, 0, 0)); }
.ad .h { font-size: 19px; font-weight: 600; line-height: 1.4; }
.ad .p { font-size: 14px; line-height: 1.6; opacity: .92; }
.ad .flag { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; font-size: 11px; padding: 2px 8px; background: rgba(0, 0, 0, .58); color: #fff; }
a.ad:hover .h { text-decoration: underline; }

/* بطاقة عرض البراند — شارة الخصم حمراء في الزاوية كما طلب المستخدم (2026-09-27) */
.ocard { width: 212px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: flex; flex-direction: column; text-align: start; }
.dark .ocard { border-color: var(--dark-line); background: var(--dark-2); color: var(--cream); }
.ocard .pic { position: relative; height: 122px; overflow: hidden; background: var(--sand); display: flex; align-items: center; justify-content: center; }
.dark .ocard .pic { background: var(--dark-track); }
.ocard .pic img { width: 100%; height: 100%; object-fit: cover; }
.ocard .pic .mark { font-family: var(--f-head); font-size: 22px; color: var(--muted); }
.ocard .off { position: absolute; inset-block-start: 0; inset-inline-start: 0; background: var(--sale); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; }
.ocard .km { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; background: var(--paper); color: var(--ink); font-size: 12px; padding: 2px 8px; border: 1px solid var(--line-strong); }
.ocard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.ocard .nm { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard .br { font-size: 12px; color: var(--muted); }
.dark .ocard .br { color: var(--muted-dark); }
.ocard .pr { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ocard .pr .new { font-size: 16px; font-weight: 600; }
.ocard .pr .old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.dark .ocard .pr .old { color: var(--muted-dark); }
a.ocard:hover { border-color: var(--muted); }

/* دوائر «عروض المحلات» — حلقة برتقالية 2px = عرض لم يُفتح، ورمادية 1px = فُتح (حزمة التصميم V1) */
.ocirc { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 86px; text-align: center; color: var(--ink); }
.ocirc .ring { width: 62px; height: 62px; border-radius: 50%; border: 1px solid #BDB3A5; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--sand); }
.ocirc.unseen .ring { border: 2px solid var(--copper); }
.ocirc .ring img { width: 100%; height: 100%; object-fit: cover; }
.ocirc .ring .mark { font-size: 20px; font-weight: 700; color: var(--muted); }
/* سطران: اسم البراند وحده لا يسع سطرًا بعرض الدائرة (كان يُقصّ إلى «عرو…») */
.ocirc .cap { font-size: 11px; line-height: 1.35; color: var(--muted); width: 100%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ocirc.unseen .cap { color: var(--ink); font-weight: 600; }

/* لوحة بسطح داكن */
.darkpanel { background: var(--ink-dark); color: var(--cream); padding: 18px var(--gx); }
.darkpanel .label, .darkpanel .text-sm { color: var(--muted-dark); }
.darkbox { background: var(--ink-dark); color: var(--cream); padding: 14px; font-size: 16px; line-height: 1.7; }
.triple { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.triple .v { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat3 { display: flex; justify-content: space-between; gap: 12px; padding: 16px var(--gx); border-bottom: 1px solid var(--line); }
.stat3 .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* تنبيه */
.notice { background: var(--notice); border-right: 4px solid var(--copper); padding: 14px; font-size: 15px; color: var(--body); line-height: 1.8; }
.notice b, .notice .title { color: var(--ink); font-size: 17px; font-weight: 600; display: block; margin-bottom: 4px; }
.notice .actions-inline { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.m-g { margin: 18px var(--gx) 0; }

/* الخطط */
.plans { display: flex; flex-direction: column; }
.plan { border: 1px solid var(--line-strong); border-top: none; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-align: start; width: 100%; color: var(--ink); position: relative; }
.plan:first-child { border-top: 1px solid var(--line-strong); }
.plan.on { border: 2px solid var(--ink); margin-top: -1px; padding: 15px; }
.plan:first-child.on { margin-top: 0; }
.plan .name { font-size: 20px; font-weight: 600; }
.plan .price { font-size: 15px; color: var(--body); }
.plan .price b { font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan .feat { font-size: 15px; color: var(--body); line-height: 1.8; }
.plan.free { background: var(--sand); cursor: default; }
.plan.free .name { font-size: 17px; }
.plan.free .feat { font-size: 14px; }
.plan .current { position: absolute; top: 12px; left: 14px; }

/* الرسوم */
.bars-branch { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.bars-branch .bn { width: 72px; font-size: 15px; flex: none; }
.bars-branch .track { flex: 1; height: 14px; display: flex; gap: 2px; }
.bars-branch .g { background: var(--ink); }
.bars-branch .r { background: var(--copper); }
.bars-branch .vals { font-size: 12px; color: var(--muted); width: 88px; text-align: left; font-variant-numeric: tabular-nums; flex: none; }
.chart { height: 150px; display: flex; align-items: flex-end; gap: 5px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; position: relative; }
.chart .col .g { background: var(--ink); }
.chart .col .r { background: var(--copper); }
.chart .col:hover .g { background: #000; }
.chart-months { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding-top: 8px; }
.chart-tip { font-size: 13px; color: var(--muted); min-height: 20px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-left: 6px; vertical-align: middle; }

/* ---------- التبويبات والتنقّل ---------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.shell.dark-shell { background: var(--ink-dark); }
.shell > .screen { order: 1; }
.navrail { order: 2; position: sticky; bottom: 0; z-index: 20; display: flex; background: var(--paper); border-top: 1px solid var(--ink); padding-bottom: var(--sa-bottom); }
.dark-shell .navrail { background: var(--ink-dark); border-top-color: var(--dark-track); }
.client-shell:not(.dark-shell) .navrail { border-top-color: var(--line); }
.navrail .brand, .navrail .nav-foot { display: none; }
.navrail .tabs { display: flex; flex: 1; }
.tab { flex: 1; padding: 15px 0; text-align: center; font-size: 15px; color: var(--muted); border-top: 3px solid transparent; margin-top: -1px; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.on { font-weight: 600; color: var(--ink); border-top-color: var(--copper); }
.dark-shell .tab { color: var(--muted-dark); }
.dark-shell .tab:hover, .dark-shell .tab.on { color: var(--cream); }
.dark-shell .tab.on { border-top-color: var(--copper-dark); }
.shell.nav-sub .navrail { display: none; }

/* قائمة منسدلة */
.menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 240px; background: var(--paper); border: 1px solid var(--ink); z-index: 60; display: flex; flex-direction: column; padding: 6px 0; color: var(--ink); }
.menu .mi { padding: 12px 16px; font-size: 15px; text-align: start; min-height: 46px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.menu .mi:hover { background: var(--sand); }
.menu .mi.on { font-weight: 600; }
.menu .mi.on::after { content: '✓'; color: var(--copper); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu .mcap { padding: 8px 16px 2px; font-size: 12px; color: var(--muted); }

/* ---------- النوافذ والإشعارات ---------- */
.overlay { position: fixed; inset: 0; background: #191512CC; z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { width: 100%; max-height: 92dvh; overflow-y: auto; background: var(--paper); color: var(--ink); padding: 24px var(--gx) calc(30px + var(--sa-bottom)); display: flex; flex-direction: column; gap: 14px; animation: rise .2s ease-out; }
.sheet h2 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 24px; line-height: 1.4; }
.sheet .sheet-x { position: absolute; }
.sheet .text { font-size: 16px; }
.sheet .kvline { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; display: flex; justify-content: space-between; font-size: 16px; }
.sheet .kvline b { font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet .foot { font-size: 14px; color: var(--muted); line-height: 1.7; }
.sheet.dark { background: var(--ink-dark); color: var(--cream); }
@keyframes rise { from { transform: translateY(24px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; left: 0; right: 0; bottom: calc(76px + var(--sa-bottom)); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 var(--gx); pointer-events: none; }
.toast { pointer-events: auto; width: 100%; max-width: 520px; background: var(--ink-dark); color: var(--cream); padding: 12px 14px; font-size: 15px; line-height: 1.7; display: flex; justify-content: space-between; align-items: center; gap: 12px; animation: rise .2s ease-out; }
.toast.error { background: var(--copper-text); color: var(--on-copper); }
.toast button { color: var(--copper-dark); font-weight: 600; min-height: 36px; white-space: nowrap; }
.toast.error button { color: var(--on-copper); text-decoration: underline; }
.offline-bar { background: var(--ink-dark); color: var(--cream); padding: 12px var(--gx); font-size: 15px; line-height: 1.7; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dark .offline-bar { background: var(--dark-2); }

/* الحالات */
.state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 30px 34px; text-align: center; }
.state .title { font-family: var(--f-head); font-size: 24px; line-height: 1.5; color: var(--ink); }
.dark .state .title { color: var(--cream); }
.state .text { font-size: 16px; line-height: 1.9; max-width: 460px; }
.dark .state .text { color: var(--cream); }
.state .actions-c { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.lock-ring { width: 110px; height: 110px; border: 12px solid var(--copper); border-top-color: var(--line); border-radius: 50%; }
.err-ring { width: 110px; height: 110px; border: 12px dashed var(--line-strong); border-radius: 50%; }
.lockwrap { position: relative; flex: 1; display: flex; flex-direction: column; }
.lockwrap .ghost { opacity: .25; pointer-events: none; padding: 18px var(--gx); }
.lockwrap .lock { position: absolute; inset: 0; background: #EFE7DAF2; }
.sk { background: var(--line); animation: pulse 1.2s ease-in-out infinite; }
.dark .sk { background: var(--dark-track); }
.sk-ring { width: 88px; height: 88px; border-radius: 50%; border: 12px solid var(--line); flex: none; animation: pulse 1.2s ease-in-out infinite; }
.sk-line { height: 14px; }
@keyframes pulse { 50% { opacity: .45; } }
.loading-line { padding: 22px var(--gx); display: flex; flex-direction: column; gap: 14px; }
.loading-cap { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); padding: 30px; }
.paper-loading .loading-cap { color: var(--muted); }

/* الكاشير */
.cash-grid { display: flex; flex-direction: column; flex: 1; }
.preview-card { margin: 26px var(--gx) 0; background: var(--ink-dark); color: var(--cream); padding: 20px; display: flex; align-items: center; gap: 18px; }
.preview-card .big { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.preview-card .label, .preview-card .text-sm { color: var(--muted-dark); }
.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 30px; text-align: center; }
.result .plus { font-size: 44px; font-weight: 700; line-height: 1; color: var(--copper); font-variant-numeric: tabular-nums; }
.result .who { font-size: 18px; line-height: 1.8; }
.result .who span { color: var(--muted); }
.result .tip { border-top: 1px solid var(--dark-track); padding-top: 16px; font-size: 17px; line-height: 1.7; }
.check { width: 150px; height: 150px; border-radius: 50%; background: var(--copper); display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 700; color: var(--on-copper); }
.check.sm { width: 96px; height: 96px; font-size: 44px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-row .btn { width: auto; flex: 1 1 140px; height: 50px; }
.gap-16 { gap: 16px; }
.code-box { font-size: 52px; font-weight: 700; letter-spacing: .18em; font-variant-numeric: tabular-nums; text-align: center; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.otp { letter-spacing: .5em; text-align: center; font-size: 30px; }

/* بطاقة المؤسسة (العتبة) */
.carousel { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 20px 30px; text-align: center; }
.slide .msg { font-size: 19px; line-height: 1.7; text-wrap: pretty; }
.slide .hint { font-size: 14px; color: var(--copper-text); }
.card-meta { margin: 0 30px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--dark-track); padding-top: 12px; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; justify-content: center; padding: 8px 0 4px; align-items: center; }
.pager button.pg { width: 44px; height: 32px; display: flex; align-items: center; justify-content: center; }
.pager button.pg span { width: 26px; height: 3px; background: var(--dark-track); display: block; }
.pager button.pg.on span { background: var(--copper); }
.pager .arrow { display: none; min-width: 44px; min-height: 44px; color: var(--muted); font-size: 20px; }
.pager .arrow:hover:not(:disabled) { color: var(--cream); }
.pager .arrow:disabled { opacity: .3; }

/* الدليل */
.thumb { width: 72px; height: 72px; flex: none; background: repeating-linear-gradient(135deg, #E6DCCB 0 6px, #DED3C2 6px 12px); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover { height: 170px; background: repeating-linear-gradient(135deg, #E6DCCB 0 8px, #DED3C2 8px 16px); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* الخطوات */
.steps { display: flex; gap: 4px; }
.steps span { flex: 1; height: 4px; background: var(--line-strong); }
.steps span.on { background: var(--copper); }

/* الدخول */
.login { flex: 1; display: flex; flex-direction: column; }
.login-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px 22px; }
.login-hero .tagline { font-size: 16px; color: var(--muted); padding-top: 18px; text-align: center; line-height: 1.8; max-width: 290px; text-wrap: pretty; }
.login-form { padding: 0 var(--gx) calc(30px + var(--sa-bottom)); display: flex; flex-direction: column; gap: 16px; }
.login-form .input { font-size: 24px; letter-spacing: .05em; border-bottom-color: var(--cream); }
.role-tabs { display: flex; border: 1px solid var(--dark-track); }
.role-tab { flex: 1; min-height: 46px; font-size: 16px; color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; }
.role-tab:hover { color: var(--cream); }
.role-tab.on { background: var(--cream); color: var(--ink-dark); font-weight: 600; }
.login-links { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.login-links button { min-height: 44px; color: var(--muted); }
.login-links button:hover { color: var(--cream); }
/* ---------- إضافات ---------- */
.dark .notice { background: var(--dark-2); color: var(--cream); border-right-color: var(--copper-dark); }
.dark .notice .title, .dark .notice b, .dark .notice strong { color: var(--cream); }
.notice strong { font-weight: 700; font-size: 18px; }
.sheet-actions { display: flex; gap: 10px; padding-top: 4px; }
.sheet-actions .grow { flex: 1; }
.field.invalid .hint { display: none; }
.nav-foot a { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; color: var(--muted); }
.dark-shell .nav-foot a { color: var(--muted-dark); }
.plan:disabled { opacity: .55; }
.row.sel { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--sand); padding-inline: 12px; }
.row .check-mark { color: var(--copper); font-size: 20px; font-weight: 700; }
.rpick { width: 100%; padding: 16px; border: 1px solid var(--line-strong); border-top: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: start; color: var(--ink); }
.rpick:first-child { border-top: 1px solid var(--line-strong); }
.rpick.on { border: 2px solid var(--ink); padding: 15px; }
.rpick:disabled { opacity: .55; }
.rpick .nm { font-size: 19px; }
.rpick.on .nm { font-weight: 600; }
.check.sm { width: 110px; height: 110px; font-size: 48px; }
.dark .text { color: var(--cream); }
.darkpanel.flex { display: flex; align-items: center; gap: 18px; justify-content: space-between; }
.darkpanel .big { font-size: 20px; font-weight: 600; }

/* ---------- الشبكات ---------- */
.grid { display: grid; grid-template-columns: 1fr; }

/* ---------- الحاسوب ---------- */
@media (min-width: 900px) {
  :root { --gx: clamp(28px, 3.2vw, 56px); }
  .shell { flex-direction: row; }
  .shell > .screen { order: 2; min-height: 100dvh; min-width: 0; }
  .navrail, .shell.nav-sub .navrail { order: 1; display: flex; flex-direction: column; position: sticky; top: 0; bottom: auto; height: 100dvh; width: clamp(200px, 18vw, 260px); flex: none; border-top: 0; border-left: 1px solid var(--ink); padding: 26px 0 22px; }
  .dark-shell .navrail { border-left-color: var(--dark-track); }
  .client-shell:not(.dark-shell) .navrail { border-left-color: var(--line); }
  .navrail .brand { display: flex; flex-direction: column; gap: 6px; padding: 0 22px 26px; align-items: flex-start; }
  .navrail .brand .org { font-size: 13px; color: var(--muted); }
  .dark-shell .navrail .brand .org { color: var(--muted-dark); }
  .navrail .tabs { flex-direction: column; flex: none; }
  .tab { justify-content: flex-start; padding: 0 22px; border-top: 0; margin: 0; border-right: 3px solid transparent; min-height: 50px; }
  .tab.on { border-right-color: var(--copper); }
  .dark-shell .tab.on { border-right-color: var(--copper-dark); }
  .navrail .nav-foot { display: flex; flex-direction: column; margin-top: auto; padding: 0 22px; gap: 4px; }
  .navrail .nav-foot button { text-align: start; min-height: 44px; font-size: 14px; color: var(--muted); }
  .dark-shell .navrail .nav-foot button { color: var(--muted-dark); }
  .navrail .nav-foot button:hover { color: var(--ink); }
  .dark-shell .navrail .nav-foot button:hover { color: var(--cream); }

  .head h1, .h1 { font-size: 30px; }
  .toasts { bottom: 24px; }
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; border: 1px solid var(--ink); padding: 28px 30px 30px; }
  .actions.sticky { position: static; }
  .actions.row-lg { flex-direction: row; }
  .actions.row-lg > .btn { flex: 1; }
  .actions.narrow, .form-narrow { max-width: 640px; }

  .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gx); }
  .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gx); }
  .cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
  .list.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gx); }
  .list.cols > .row:last-child { border-bottom: 1px solid var(--line-soft); }
  .dash { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .dash > .dash-a { border-left: 1px solid var(--line); }
  .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .plan, .plan:first-child { border: 1px solid var(--line-strong); }
  .plan.on, .plan:first-child.on { border: 2px solid var(--ink); margin: 0; }
  .chart { height: 240px; }

  .login.split { flex-direction: row; }
  .login.split .login-hero { border-left: 1px solid var(--dark-track); }
  .login.split .login-hero .logo-word { font-size: 110px; }
  .login.split .login-hero .logo-arc { width: 300px; height: 74px; border-width: 10px; }
  .login.split .login-hero .tagline { font-size: 20px; max-width: 420px; }
  .login.split .login-side { flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .login.split .login-form { width: 100%; max-width: 520px; margin: 0 auto; padding-bottom: 30px; }

  .cash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .cash-grid .cash-side { position: sticky; top: 0; padding-bottom: 30px; }
  .preview-card { margin-top: 24px; }
  .result { gap: 26px; }
  .pager .arrow { display: inline-flex; align-items: center; justify-content: center; }
  .slide .msg { font-size: 22px; }
  .cover { height: 260px; }
}
@media (min-width: 1400px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- الدخول الحقيقي: فاصل «أو» وزر Google ---------- */
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--dark-track); }
.btn-google { gap: 12px; }
.btn-google svg { flex: none; background: #fff; padding: 2px; }
.login-form .input.otp { letter-spacing: .3em; }
.check-in { width: 22px; height: 22px; flex: none; accent-color: var(--ink); cursor: pointer; }

/* تحقق الأمان (Cloudflare Turnstile): غير مرئي حتى يطلب Cloudflare تفاعلًا */
.captcha-box{position:fixed;left:50%;transform:translateX(-50%);bottom:24px;z-index:200;width:max-content;max-width:calc(100vw - 32px);box-sizing:border-box;padding:14px;border-radius:0;background:var(--paper);color:var(--ink);box-shadow:0 12px 40px rgba(0,0,0,.25);visibility:hidden;display:flex;flex-direction:column;align-items:center;gap:10px}
.captcha-box.show{visibility:visible}
.captcha-title{font-size:14px;text-align:center}
/* ---------------- صفحة المؤسسة بهويتها ---------------- */
.brand-hero { --brand: var(--ink-dark); position: relative; }
.brand-hero .cover { border-bottom: 4px solid var(--brand); }
.brand-id { display: flex; align-items: flex-end; gap: 14px; padding: 0 var(--gx) 12px; margin-top: -40px; position: relative; }
.brand-logo { width: 84px; height: 84px; flex: none; background: var(--paper); border: 3px solid var(--paper); box-shadow: 0 1px 0 var(--line); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-logo span { font-family: var(--f-head); font-size: 36px; color: var(--paper); background: var(--brand, var(--ink-dark)); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.brand-logo.lg { width: 108px; height: 108px; }
.brand-name { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 26px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.brand-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px var(--gx) 14px; }
.brand-actions .btn { flex: 1 1 200px; width: auto; }
.btn-brand { background: var(--brand, var(--ink-dark)); color: #fff; flex-direction: column; gap: 0; line-height: 1.3; }
.btn-brand:hover:not(:disabled) { filter: brightness(1.1); }
.btn-brand .via { font-size: 12px; font-weight: 400; opacity: .8; direction: ltr; }
.public-page { --brand: var(--ink-dark); }
.public-page[dir="ltr"] .notice { border-right: 0; border-left: 4px solid var(--copper); }
.map-frame { margin: 12px var(--gx) 0; border: 1px solid var(--line); aspect-ratio: 16 / 10; max-height: 360px; background: var(--sand, #EDE4D6); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.branch-row.on .t { font-weight: 600; }
.open-now { color: var(--ok-text) !important; }

/* حكم على نسبة ما يعود للعميل في قواعد النقاط والمكافآت */
.verdict { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.7; margin-top: 8px; }
.verdict .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 7px; background: var(--ok-text); }
.verdict.warn .dot, .verdict.danger .dot { background: var(--copper-text); }
.verdict.note .dot { background: var(--muted-2); }
.verdict b { font-weight: 600; color: var(--ok-text); }
.verdict.warn b, .verdict.danger b { color: var(--copper-text); }
.verdict.note b { color: var(--body); }
.verdict span { color: var(--muted); }
.closed-now { color: var(--copper-text) !important; }
details.hours { margin-top: 6px; font-size: 14px; }
details.hours summary { cursor: pointer; color: var(--copper-text); min-height: 32px; display: inline-flex; align-items: center; }
details.hours .kv { padding: 6px 0; font-size: 14px; }
.wallet-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px var(--gx) 0; }
.btn-wallet { flex: 1 1 240px; width: auto; height: 52px; background: #111; color: #fff; font-size: 16px; }
.btn-wallet.alt { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.stars { display: flex; gap: 6px; direction: ltr; justify-content: flex-end; }
.star { width: 48px; height: 48px; font-size: 30px; color: var(--line-strong); line-height: 1; }
.star.on { color: var(--copper); }
.stars-sm { color: var(--copper); letter-spacing: 1px; }
.reply { width: 100%; background: var(--notice); border-right: 3px solid var(--ink); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.8; }
.fb-row.unread .t { font-weight: 600; }
.fb-row.unread { border-right: 3px solid var(--copper); padding-right: 10px; }
.ai-card { border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ai-card b { font-size: 17px; color: var(--ink); }
.ai-card .tag { align-self: flex-start; }
.ai-card .act { align-self: flex-start; }
.swatch { width: 40px; height: 40px; border: 2px solid transparent; outline: 1px solid var(--line); position: relative; }
.swatch.on { border-color: var(--paper); outline: 3px solid var(--ink); }
.swatch.custom { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.logo-drop { width: 140px; height: 140px; }
.hours-edit { display: flex; flex-direction: column; gap: 8px; }
.hrow { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.hday { width: 96px; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; font-size: 15px; }
.hivs { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.hiv { display: flex; align-items: center; gap: 6px; }
.hiv .input { width: 118px; font-size: 16px; padding-bottom: 4px; }

/* ---------------- ملصق QR ---------------- */
.poster-wrap { display: flex; justify-content: center; padding: 20px var(--gx); }
.poster { --brand: var(--ink-dark); background: #fff; color: #191512; border: 1px solid var(--line); width: 100%; max-width: 420px; aspect-ratio: 1 / 1.414; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 20px 16px; text-align: center; border-top: 14px solid var(--brand); }
.poster.card { max-width: 300px; }
.poster.poster { max-width: 520px; }
.poster-top { display: flex; align-items: center; gap: 12px; }
.poster-logo { width: 64px; height: 64px; object-fit: cover; }
.poster-logo.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-family: var(--f-head); font-size: 30px; }
.poster-name { display: flex; flex-direction: column; font-family: var(--f-head); font-size: 22px; line-height: 1.3; }
.poster-title { display: flex; flex-direction: column; font-size: 20px; font-weight: 700; color: var(--brand); line-height: 1.4; }
.poster-qr { width: 62%; aspect-ratio: 1; }
.poster-qr svg { width: 100%; height: 100%; display: block; }
.poster-steps, .poster-reward { display: flex; flex-direction: column; font-size: 15px; line-height: 1.6; }
.poster-reward { color: #6B6055; font-size: 14px; }
.poster-url { font-size: 12px; color: #6B6055; word-break: break-all; }
.poster-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6B6055; }
.poster.card .poster-title { font-size: 16px; } .poster.card .poster-name { font-size: 17px; } .poster.card .poster-logo { width: 48px; height: 48px; }

@media print {
  body { background: #fff !important; }
  .navrail, .topbar, .no-print, .offline-bar, .toasts, #layer { display: none !important; }
  .shell { display: block !important; }
  .screen { min-height: 0 !important; background: #fff !important; }
  .poster-wrap { padding: 0 !important; }
  .poster { border: 0; border-top: 14px solid var(--brand); max-width: none !important; width: 100% !important; height: 100vh; aspect-ratio: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .poster.card .poster-name { font-size: 14pt; }
}
@page { margin: 10mm; }
html[data-print="card"] { --print-size: A6; }
.brand-id > .stack { padding-top: 46px; }

/* زر محفظة Google الرسمي: لا يُغيَّر لونه ولا شكله (إرشادات علامة Google)، هامش 8 بكسل وارتفاع 48 */
.wallet-official { background: none; border: 0; padding: 8px; min-height: 64px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.wallet-official img { height: 48px; width: auto; display: block; }
.wallet-official:disabled, .wallet-official.is-loading { opacity: .6; }
.wallet-row .wallet-official { flex: 0 0 auto; }

/* ---------- أهداف اللمس: 48×48 على الأقل (Android 48dp، ويتجاوز حد iOS البالغ 44pt) — DESIGN.md ---------- */
.tb-btn, .link, .head .aside.link, .chip, .chip.lg, .utab, .search .clear, .row .act, .menu .mi, .toast button, .role-tab,
.login-links button, .nav-foot a, .navrail .nav-foot button, .pager .arrow, details.hours summary, .hday { min-height: 48px; }
.search .clear, .pager .arrow { min-width: 48px; }
.swatch { width: 48px; height: 48px; }
/* المفتاح والترقيم يبقيان بحجمهما المرسوم، ومساحة اللمس تمتد حولهما دون أن تتداخل مع جيرانهما */
.switch, .pager button.pg { position: relative; }
.switch::after { content: ''; position: absolute; inset: -9px -4px; }
.pager button.pg::after { content: ''; position: absolute; inset: -8px -2px; }
/* العناصر الثابتة أسفل الشاشة فوق مؤشر الشاشة الرئيسية */
.captcha-box { bottom: calc(24px + var(--sa-bottom)); }
/* ---------- الإنجليزية (اتجاه من اليسار) — عكس الخصائص المادية المكتوبة للعربية ---------- */
[dir="ltr"] .notice, [dir="ltr"] .dark .notice { border-right: 0; border-left: 4px solid var(--copper); }
[dir="ltr"] .dark .notice { border-left-color: var(--copper-dark); }
[dir="ltr"] select.input { padding-left: 12px; padding-right: 26px; background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%; }
[dir="ltr"] .plan .current { left: auto; right: 14px; }
[dir="ltr"] .bars-branch .vals { text-align: right; }
[dir="ltr"] .legend i { margin-left: 0; margin-right: 6px; }
[dir="ltr"] .menu { left: auto; right: 0; }
[dir="ltr"] .reply { border-right: 0; border-left: 3px solid var(--ink); }
[dir="ltr"] .fb-row.unread { border-right: 0; padding-right: 0; border-left: 3px solid var(--copper); padding-left: 10px; }
[dir="ltr"] .stars { justify-content: flex-start; }
[dir="ltr"] [dir="ltr"][style*="text-align:right"] { text-align: left !important; }
@media (min-width: 900px) {
  [dir="ltr"] .navrail, [dir="ltr"] .shell.nav-sub .navrail { border-left: 0; border-right: 1px solid var(--ink); }
  [dir="ltr"] .dark-shell .navrail { border-right-color: var(--dark-track); }
  [dir="ltr"] .client-shell:not(.dark-shell) .navrail { border-right-color: var(--line); }
  [dir="ltr"] .tab { border-right: 0; border-left: 3px solid transparent; }
  [dir="ltr"] .tab.on { border-left-color: var(--copper); }
  [dir="ltr"] .dark-shell .tab.on { border-left-color: var(--copper-dark); }
  [dir="ltr"] .dash > .dash-a { border-left: 0; border-right: 1px solid var(--line); }
  [dir="ltr"] .login.split .login-hero { border-left: 0; border-right: 1px solid var(--dark-track); }
}

/* باقات العميل داخل بطاقة البراند الداكنة: نص فاتح (كان داكنًا على خلفية داكنة) */
.screen.dark #pkbox .t { color: var(--cream); }
.screen.dark #pkbox .d { color: var(--muted-dark); }
.screen.dark #pkbox .row { border-color: var(--dark-track); }
