/* ==========================================================================
   Oaisis Pay — نظام التصميم
   --------------------------------------------------------------------------
   - كل لون وقياس متغيّر على :root؛ الوضع الداكن يعيد تعريف المتغيرات فقط.
   - خصائص منطقية (inline-start/end) لا left/right: الواجهة نفسها تعمل
     بالعربية (RTL) والإنجليزية (LTR) بلا ملف تجاوزات.
   - لا سمات style في الصفحات: سياسة CSP تمنعها. العرض الديناميكي (أشرطة
     التقدم) عبر <meter> و<progress>.
   ========================================================================== */

/* خط الشعار وحده — لاتيني بوزن واحد، لا يُستخدم لأي نص آخر */
@font-face {
    font-family: "Ventura";
    src: url("../fonts/ventura.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
    --font-logo: "Ventura", Georgia, serif;

    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #f1f4f8;
    --surface-3: #e8edf3;
    --border: #e1e7ef;
    --border-strong: #cbd5e1;

    --text: #0f1b2d;
    --text-2: #475569;
    --text-3: #7a889c;

    --brand: #00b074;
    --brand-strong: #00875a;
    --brand-ink: #ffffff;
    --brand-soft: #e5f6ef;
    --brand-soft-ink: #03643f;

    --navy: #0f2a44;

    --success: #03855a;
    --success-soft: #e5f6ef;
    --warning: #9a5b00;
    --warning-soft: #fdf3e1;
    --danger: #c42b2b;
    --danger-soft: #fdecec;
    --info: #1d5fd1;
    --info-soft: #e8f0fd;

    --focus: 0 0 0 3px rgba(0, 176, 116, 0.35);
    --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
    --shadow: 0 1px 3px rgba(15, 27, 45, 0.06), 0 6px 16px rgba(15, 27, 45, 0.05);
    --shadow-lg: 0 18px 48px rgba(15, 27, 45, 0.16);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --sidebar: 264px;
    --topbar: 68px;

    --hero-from: #0f2a44;
    --hero-to: #0a4f3a;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0a111d;
    --surface: #111b2b;
    --surface-2: #162235;
    --surface-3: #1d2b42;
    --border: #22324a;
    --border-strong: #31445f;

    --text: #e9eef6;
    --text-2: #aab6c8;
    --text-3: #7f8ea5;

    --brand: #1cc48b;
    --brand-strong: #1cc48b;
    --brand-ink: #03170f;
    --brand-soft: rgba(28, 196, 139, 0.14);
    --brand-soft-ink: #5fe0b3;

    --success: #3ed69f;
    --success-soft: rgba(62, 214, 159, 0.13);
    --warning: #f0b453;
    --warning-soft: rgba(240, 180, 83, 0.13);
    --danger: #ff7a7a;
    --danger-soft: rgba(255, 122, 122, 0.13);
    --info: #78a7ff;
    --info-soft: rgba(120, 167, 255, 0.13);

    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);

    --hero-from: #10263f;
    --hero-to: #0b3d2e;

    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0a111d;
        --surface: #111b2b;
        --surface-2: #162235;
        --surface-3: #1d2b42;
        --border: #22324a;
        --border-strong: #31445f;
        --text: #e9eef6;
        --text-2: #aab6c8;
        --text-3: #7f8ea5;
        --brand: #1cc48b;
        --brand-strong: #1cc48b;
        --brand-ink: #03170f;
        --brand-soft: rgba(28, 196, 139, 0.14);
        --brand-soft-ink: #5fe0b3;
        --success: #3ed69f;
        --success-soft: rgba(62, 214, 159, 0.13);
        --warning: #f0b453;
        --warning-soft: rgba(240, 180, 83, 0.13);
        --danger: #ff7a7a;
        --danger-soft: rgba(255, 122, 122, 0.13);
        --info: #78a7ff;
        --info-soft: rgba(120, 167, 255, 0.13);
        --shadow-sm: none;
        --shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
        --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
        --hero-from: #10263f;
        --hero-to: #0b3d2e;
        color-scheme: dark;
    }
}

/* --------------------------------------------------------------------------
   الأساس
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    /* القائمة الجانبية المخفية خارج الشاشة على الجوال لا توسّع الصفحة */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; color: var(--text); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }

a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

.num, .money, .mono, td.num, .tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* الأرقام والمراجع والرموز تُعرض من اليسار لليمين حتى داخل نص عربي */
/*
 | بلا display: تغيير العرض كان يُخرج <td class="ltr"> من تخطيط الجدول فتنزاح
 | الأعمدة. ولا يوضع على الخلايا نفسها: direction على الخلية يقلب text-align:end.
 | الخلية تحمل <span class="ltr"> بداخلها.
 */
.ltr { direction: ltr; unicode-bidi: isolate; }
/* كتلة LTR داخل صفحة عربية تتبع محاذاة الصفحة لا محاذاة اتجاهها */
[dir="rtl"] .ltr.d-block, [dir="rtl"] div.ltr, [dir="rtl"] p.ltr { text-align: right; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.92em; letter-spacing: 0.02em; }

.muted { color: var(--text-2); }
.subtle { color: var(--text-3); font-size: 0.875rem; }
.small { font-size: 0.8125rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.mt-2 { margin-block-start: 8px; } .mt-4 { margin-block-start: 16px; } .mt-6 { margin-block-start: 24px; }
.hidden { display: none !important; }
.d-block { display: block; }
.justify-center { justify-content: center; }
.icon.d-inline { display: inline-block; vertical-align: -3px; }
pre { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); white-space: pre-wrap; word-break: break-word; max-width: 420px; }
details > summary { cursor: pointer; }
.mx-auto { margin-inline: auto; }
.list-title { display: block; }

.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }

/* --------------------------------------------------------------------------
   الهيكل
   -------------------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; overflow-x: clip; }

.sidebar {
    position: sticky; inset-block-start: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px 14px;
    background: var(--surface);
    border-inline-end: 1px solid var(--border);
    overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand) 0%, #0a8f63 100%);
    color: #fff; font-weight: 800; font-size: 18px;
}
.brand-name { font-family: var(--font-logo); font-weight: 400; font-size: 1.25rem; }
.brand-name span { color: var(--brand); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 14px 12px 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--text-2); font-weight: 500; text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 600; }
.nav a .count { margin-inline-start: auto; }

.sidebar-foot { margin-block-start: auto; padding-block-start: 12px; border-block-start: 1px solid var(--border); }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    position: sticky; inset-block-start: 0; z-index: 20;
    height: var(--topbar);
    display: flex; align-items: center; gap: 12px;
    padding-inline: 28px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    border-block-end: 1px solid var(--border);
}
.topbar-title { font-weight: 700; font-size: 1.05rem; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

.content { width: 100%; max-width: 1320px; margin-inline: auto; padding: 28px; display: flex; flex-direction: column; gap: 24px; }
.content-narrow { max-width: 720px; }

.topbar .menu-toggle { display: none; }
.scrim { display: none; }

.bottom-nav { display: none; }

/* --------------------------------------------------------------------------
   الأزرار
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 18px;
    border: 1px solid transparent; border-radius: 10px;
    font: inherit; font-weight: 600; font-size: 0.9375rem;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
    background: var(--brand-strong); color: var(--brand-ink);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); filter: none; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); filter: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.8125rem; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-icon:hover { background: var(--surface-2); color: var(--text); filter: none; }

/* --------------------------------------------------------------------------
   البطاقات
   -------------------------------------------------------------------------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-body { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-block-end: 1px solid var(--border); }
.card-head h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.card-foot { padding: 14px 22px; border-block-start: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-flush .list-item:last-child { border-block-end: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--text-2); margin-block-start: 4px; }

/* بطاقة الرصيد الرئيسية */
.hero {
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 26px;
    color: #eaf6f1;
    background: radial-gradient(120% 140% at 100% 0%, rgba(28, 196, 139, 0.35) 0%, transparent 55%),
                linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
    box-shadow: var(--shadow-lg);
}
.hero h2, .hero .hero-amount { color: #fff; }
.hero-label { font-size: 0.8125rem; opacity: 0.75; }
.hero-amount { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.01em; margin-block: 6px 2px; }
.hero-amount .cur { font-size: 1rem; font-weight: 600; opacity: 0.8; margin-inline-start: 6px; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.8125rem; opacity: 0.85; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-block-start: 22px; }
.hero .btn { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.18); }
.hero .btn:hover { background: rgba(255, 255, 255, 0.22); }
.hero .btn-primary-light { background: #fff; color: #0b3d2e; }
.hero .btn-primary-light:hover { background: #effaf5; }

/* بطاقات المحافظ */
.wallets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.wallet {
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    color: inherit; text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}
.wallet:hover { border-color: var(--brand); text-decoration: none; }
.wallet.is-empty { border-style: dashed; background: transparent; }
.wallet-balance { font-size: 1.25rem; font-weight: 700; }

.cur-chip {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-grid; place-items: center; flex: none;
    font-weight: 700; font-size: 0.72rem; line-height: 1; letter-spacing: -0.02em; color: #fff;
}
.cur-SYP { background: #0a8f63; }
.cur-USD { background: #1d5fd1; }
.cur-EUR { background: #7b3fd6; }

/* إحصاءات */
.stat { padding: 18px 20px; }
.stat-label { color: var(--text-2); font-size: 0.8125rem; display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 1.6rem; font-weight: 700; margin-block-start: 6px; }

/* --------------------------------------------------------------------------
   القوائم والجداول
   -------------------------------------------------------------------------- */

.list-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 22px;
    border-block-end: 1px solid var(--border);
    color: inherit; text-decoration: none;
}
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-icon {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    background: var(--surface-2); color: var(--text-2);
}
.list-icon.in { background: var(--success-soft); color: var(--success); }
.list-icon.out { background: var(--surface-3); color: var(--text); }
.list-title { font-weight: 600; }
.list-end { margin-inline-start: auto; text-align: end; }
.amount-in { color: var(--success); font-weight: 700; }
.amount-out { color: var(--text); font-weight: 700; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
    text-align: start; font-weight: 600; color: var(--text-3);
    font-size: 0.75rem; letter-spacing: 0.03em;
    padding: 12px 16px; border-block-end: 1px solid var(--border);
    background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 13px 16px; border-block-end: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-block-end: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .end { text-align: end; }
.table a.row, a.row { color: inherit; text-decoration: none; }
.table a.row:hover .list-title { text-decoration: underline; }

.dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 10px 20px; margin: 0; }
.dl dt { color: var(--text-2); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-block-end: 1px dashed var(--border); }
.kv:last-child { border-block-end: 0; }
.kv-total { font-weight: 700; font-size: 1.05rem; border-block-start: 1px solid var(--border-strong); border-block-end: 0; padding-block-start: 14px; }

/* --------------------------------------------------------------------------
   الشارات والتنبيهات
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; line-height: 1.5;
    background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand-soft-ink); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--radius);
    border: 1px solid transparent; font-size: 0.9rem;
}
.alert .icon { margin-block-start: 2px; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-body { flex: 1; }
.alert-body strong { display: block; margin-block-end: 2px; }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: 0.7; }

.flash-stack { display: flex; flex-direction: column; gap: 10px; }

/* --------------------------------------------------------------------------
   النماذج
   -------------------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.label { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.hint { font-size: 0.8125rem; color: var(--text-3); }
.error { font-size: 0.8125rem; color: var(--danger); display: flex; gap: 6px; align-items: flex-start; }

.input, .select, .textarea {
    width: 100%;
    min-height: 46px; padding: 10px 14px;
    font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.select {
    appearance: none;
    padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a889c' stroke-width='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-size: 18px;
    background-position: left 12px center;
}
[dir="ltr"] .select { background-position: right 12px center; }
.input-lg { min-height: 58px; font-size: 1.35rem; font-weight: 600; }
.input-code { letter-spacing: 0.5em; text-align: center; font-size: 1.4rem; font-weight: 700; direction: ltr; }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .select { width: auto; flex: none; border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start: 0; background-color: var(--surface-2); font-weight: 600; }
.input-affix { position: relative; }
.input-affix .input { padding-inline-end: 44px; }
.input-affix .affix-btn { position: absolute; inset-inline-end: 6px; inset-block-start: 50%; transform: translateY(-50%); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-strong); flex: none; }

.file-drop {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 26px; text-align: center; cursor: pointer;
    border: 2px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--surface-2); color: var(--text-2);
}
.file-drop:hover, .file-drop:focus-within { border-color: var(--brand); color: var(--text); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.segmented { display: inline-flex; align-self: flex-start; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.segmented a, .segmented button {
    padding: 7px 14px; border-radius: 9px; border: 0; background: transparent;
    color: var(--text-2); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.segmented a:hover, .segmented button:hover { color: var(--text); text-decoration: none; }
.segmented [aria-current="true"], .segmented [aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 160px; }

/* --------------------------------------------------------------------------
   التقدّم والمستويات
   -------------------------------------------------------------------------- */

meter, progress { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: var(--surface-3); appearance: none; -webkit-appearance: none; }
meter::-webkit-meter-bar { background: var(--surface-3); border: 0; border-radius: 99px; height: 8px; }
meter::-webkit-meter-optimum-value { background: var(--brand); border-radius: 99px; }
meter::-webkit-meter-suboptimum-value { background: var(--warning); border-radius: 99px; }
meter::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 99px; }
meter::-moz-meter-bar { background: var(--brand); border-radius: 99px; }
meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warning); }
meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }
progress::-webkit-progress-bar { background: var(--surface-3); }
progress::-webkit-progress-value { background: var(--brand); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--brand); border-radius: 99px; }

.tiers { display: flex; flex-direction: column; gap: 0; }
.tier { display: flex; gap: 14px; padding-block: 14px; position: relative; }
.tier + .tier { border-block-start: 1px solid var(--border); }
.tier-dot {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: var(--surface-3); color: var(--text-3); font-weight: 700; font-size: 0.8125rem;
}
.tier.is-done .tier-dot { background: var(--brand); color: var(--brand-ink); }
.tier.is-current .tier-dot { background: var(--brand-soft); color: var(--brand-soft-ink); box-shadow: 0 0 0 2px var(--brand); }
.tier-caps { display: flex; gap: 6px; flex-wrap: wrap; margin-block-start: 8px; }

.limit { display: flex; flex-direction: column; gap: 6px; }
.limit + .limit, .limit-line + .limit { padding-block-start: 14px; border-block-start: 1px dashed var(--border); }
.limit-line { padding-block-end: 4px; }
.empty.compact { padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-3); }
.card-head h2.row { gap: 10px; }
.card-head h2 .list-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-soft-ink); }

/* --------------------------------------------------------------------------
   الإيصال والمعاينة
   -------------------------------------------------------------------------- */

.receipt { max-width: 560px; width: 100%; margin-inline: auto; }
.receipt-head { text-align: center; padding: 28px 24px 18px; }
.receipt-icon {
    width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 14px;
    display: grid; place-items: center;
    background: var(--success-soft); color: var(--success);
}
.receipt-icon .icon { width: 30px; height: 30px; }
.receipt-amount { font-size: 2rem; font-weight: 700; margin-block: 4px; }
.receipt-body { padding: 6px 24px 22px; }
.party { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.avatar {
    width: 42px; height: 42px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 700;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8125rem; }

.countdown { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.countdown.is-urgent { color: var(--danger); }

.copy { display: inline-flex; align-items: center; gap: 8px; }
.copy-btn { background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); cursor: pointer; padding: 5px 8px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.8125rem; }
.copy-btn:hover { color: var(--text); background: var(--surface-2); }
.copy-btn.is-copied { color: var(--success); border-color: var(--success); }

/* الفواتير */
.section-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--text-2); }
.biller-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.biller {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.1s;
}
.biller:hover { border-color: var(--brand); text-decoration: none; }
.biller-mark {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-soft-ink);
    font-weight: 800; font-size: 1.1rem;
}
.biller-mark.lg { width: 56px; height: 56px; font-size: 1.4rem; border-radius: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-block-end: 1px solid var(--border); border-inline-end: 1px solid var(--border); }
.tile-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 8px 6px; color: inherit; text-decoration: none; }
.tile-main:hover .list-title { text-decoration: underline; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.chip.person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; text-decoration: none; }
[dir="rtl"] .chip.person { padding: 4px 4px 4px 12px; }
.receipt-icon.is-info { background: var(--info-soft); color: var(--info); }
.receipt-icon.is-warning { background: var(--warning-soft); color: var(--warning); }

/* الإشعارات */
.bell { position: relative; }
.bell .dot {
    position: absolute; inset-block-start: 4px; inset-inline-end: 4px;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center;
    background: var(--danger); color: #fff; font-size: 0.6875rem; font-weight: 700;
}
.list-item.is-unread { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.list-item.is-unread .list-title::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-start: 8px; border-radius: 50%; background: var(--brand); vertical-align: middle; }

/* QR */
.qr { display: inline-block; padding: 12px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.qr svg { width: 220px; height: 220px; }

.big-id { font-size: 1.75rem; font-weight: 700; letter-spacing: 0.04em; }

.empty { text-align: center; padding: 42px 20px; color: var(--text-2); }
.empty .list-icon { margin: 0 auto 12px; width: 52px; height: 52px; }
.empty h3 { margin-block-end: 4px; }

.qr-code svg { width: 184px; height: 184px; background: #fff; padding: 10px; border-radius: 12px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }

.doc-preview { width: 100%; max-height: 520px; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }

/* القوائم المنسدلة البسيطة (details/summary) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
    position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px); z-index: 30;
    min-width: 220px; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.dropdown-menu a, .dropdown-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border: 0; border-radius: 8px; background: none;
    color: var(--text); font: inherit; font-size: 0.9rem; text-align: start; cursor: pointer; text-decoration: none;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu hr { border: 0; border-block-start: 1px solid var(--border); margin: 6px 0; }
.dropdown-head { padding: 10px 12px 8px; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
[dir="rtl"] .user-chip { padding: 4px 12px 4px 6px; }

/* ترقيم الصفحات */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 16px; }
.pagination a, .pagination span {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); font-size: 0.875rem; text-decoration: none;
}
.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination [aria-current="page"] { background: var(--brand-strong); color: var(--brand-ink); border-color: transparent; font-weight: 700; }
.pagination .is-disabled { opacity: 0.45; }

/* --------------------------------------------------------------------------
   صفحات الزائر (الدخول والتسجيل والواجهة التعريفية)
   -------------------------------------------------------------------------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside {
    position: relative; overflow: hidden;
    padding: 48px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    color: #e3f3ec;
    background: radial-gradient(90% 80% at 0% 100%, rgba(28, 196, 139, 0.35) 0%, transparent 60%),
                linear-gradient(160deg, #0f2a44 0%, #0a4f3a 100%);
}
.auth-aside h2 { color: #fff; font-size: 2rem; line-height: 1.35; }
.auth-aside .brand { color: #fff; padding: 0; }
.auth-points { display: flex; flex-direction: column; gap: 16px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; }
.auth-point .list-icon { background: rgba(255, 255, 255, 0.1); color: #7ff0c6; }
.auth-point strong { color: #fff; display: block; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-card > p { color: var(--text-2); margin-block: 6px 26px; }
.auth-top { position: absolute; inset-block-start: 20px; inset-inline-end: 24px; display: flex; gap: 8px; }
.auth-main { position: relative; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 0.8125rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }


/* صفحات الأخطاء */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-code { font-size: 4.5rem; font-weight: 800; color: var(--brand); line-height: 1; }

/* --------------------------------------------------------------------------
   الشاشات الصغيرة
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50;
        width: min(300px, 86vw);
        transform: translateX(-100%); transition: transform 0.2s ease;
        box-shadow: var(--shadow-lg);
    }
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(5, 10, 20, 0.45); }
    .topbar .menu-toggle { display: inline-flex; }
    .topbar { padding-inline: 16px; }
    .content { padding: 20px 16px 96px; }
    .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-aside { display: none; }

    .bottom-nav {
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: var(--surface); border-block-start: 1px solid var(--border);
    }
    .bottom-nav a {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: 6px 4px; border-radius: 10px;
        color: var(--text-3); font-size: 0.6875rem; font-weight: 600; text-decoration: none;
    }
    .bottom-nav a[aria-current="page"] { color: var(--brand-strong); }
    .bottom-nav a.send, .bottom-nav a.send[aria-current="page"] { color: var(--brand-ink); }
    .bottom-nav .send .icon { width: 42px; height: 42px; padding: 10px; border-radius: 14px; background: var(--brand-strong); margin-block-start: -18px; box-shadow: var(--shadow-lg); }
}

@media (max-width: 640px) {
    .grid-2, .grid-4, .field-row { grid-template-columns: minmax(0, 1fr); }
    .hero-amount { font-size: 1.85rem; }
    .card-body { padding: 18px; }
    .list-item { padding: 12px 16px; }
    .card-head { padding: 16px; }
    .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
    .dl dd { margin-block-end: 10px; }
    .topbar-title { font-size: 0.95rem; }
    .hide-sm { display: none !important; }
    .page-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
    .sidebar, .topbar, .bottom-nav, .no-print, .hero-actions { display: none !important; }
    .shell { display: block; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ccc; }
}

/* ==========================================================================
   بوابة التجار — صفحة الدفع، QR المحل، الكاشير، الملصق، لوحة التاجر
   ========================================================================== */

/* ألوان هوية المتجر: لوحة ثابتة (Merchant::PALETTE) — CSP تمنع style="" */
.tone-emerald { --tone: #059669; --tone-2: #047857; --tone-soft: #e6f6ef; --tone-ink: #03543a; }
.tone-teal    { --tone: #0d9488; --tone-2: #0f766e; --tone-soft: #e3f5f3; --tone-ink: #0b4f4a; }
.tone-blue    { --tone: #2563eb; --tone-2: #1d4ed8; --tone-soft: #e8effd; --tone-ink: #1e3a8a; }
.tone-indigo  { --tone: #4f46e5; --tone-2: #4338ca; --tone-soft: #eceafd; --tone-ink: #312e81; }
.tone-violet  { --tone: #7c3aed; --tone-2: #6d28d9; --tone-soft: #f1eafd; --tone-ink: #4c1d95; }
.tone-rose    { --tone: #e11d48; --tone-2: #be123c; --tone-soft: #fde8ed; --tone-ink: #881337; }
.tone-orange  { --tone: #ea580c; --tone-2: #c2410c; --tone-soft: #fdeee4; --tone-ink: #7c2d12; }
.tone-slate   { --tone: #334155; --tone-2: #1e293b; --tone-soft: #eceff3; --tone-ink: #1e293b; }

.merchant-mark {
    width: 52px; height: 52px; border-radius: 16px; flex: none;
    display: grid; place-items: center;
    font-size: 1.4rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--tone, var(--brand)) 0%, var(--tone-2, var(--brand-strong)) 100%);
    box-shadow: 0 6px 16px rgba(15, 27, 45, 0.18);
}
.merchant-mark.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; box-shadow: none; }
.merchant-mark.lg { width: 76px; height: 76px; border-radius: 22px; font-size: 2rem; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-size: 0.8125rem; font-weight: 600; }
.verified .icon { width: 16px; height: 16px; }

/* ---- صفحة الدفع المستضافة ---- */
.pay-page {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 100% -10%, rgba(0, 176, 116, 0.10), transparent 60%),
        radial-gradient(700px 420px at -10% 110%, rgba(15, 42, 68, 0.10), transparent 60%),
        var(--bg);
}
.pay-shell { max-width: 980px; margin-inline: auto; padding: 22px 20px 40px; display: flex; flex-direction: column; gap: 18px; min-height: 100vh; }
.pay-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay-top .actions { display: flex; align-items: center; gap: 6px; }
.secure-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 0.75rem; font-weight: 700; }
.secure-badge .icon { width: 14px; height: 14px; }

.pay-card {
    display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.pay-summary {
    position: relative; overflow: hidden; padding: 30px 30px 26px; color: #fff;
    display: flex; flex-direction: column; gap: 22px;
    background:
        radial-gradient(120% 90% at 110% -10%, rgba(255, 255, 255, 0.22), transparent 55%),
        linear-gradient(160deg, var(--tone) 0%, var(--tone-2) 100%);
}
.pay-summary::after {
    content: ""; position: absolute; inset-block-end: -70px; inset-inline-end: -70px; width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.07); pointer-events: none;
}
.pay-summary .merchant-mark, .store-head .merchant-mark, .pos-top .merchant-mark { background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.pay-merchant { display: flex; align-items: center; gap: 14px; }
.pay-merchant .name { font-size: 1.15rem; font-weight: 700; }
.pay-merchant .meta { font-size: 0.8125rem; opacity: 0.88; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-summary .verified, .store-head .verified, .poster-head .verified { color: #d9fbe9; }
.pay-due-label { font-size: 0.8125rem; opacity: 0.8; }
.pay-due { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
.pay-lines { display: flex; flex-direction: column; gap: 10px; font-size: 0.875rem; border-block-start: 1px solid rgba(255, 255, 255, 0.18); padding-block-start: 16px; margin-block-start: auto; position: relative; z-index: 1; }
.pay-lines .kv-line { display: flex; justify-content: space-between; gap: 12px; }
.pay-lines .kv-line > span:first-child { opacity: 0.75; }
.pay-timer { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-timer.is-urgent { background: rgba(196, 43, 43, 0.85); }

.pay-action { padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.pay-action h2 { font-size: 1.15rem; }
.pay-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 0.8125rem; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; border-block-start: 1px solid var(--border); }
.pay-scan { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.pay-scan .qr-frame { width: 150px; }
.pay-scan ol { margin: 8px 0 0; padding-inline-start: 18px; color: var(--text-2); font-size: 0.875rem; display: grid; gap: 4px; }
.pay-payer { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); }
.pay-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 0.8125rem; }
.pay-foot a { color: var(--text-2); }
.pay-state { text-align: center; padding: 24px 8px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pay-state .receipt-icon { margin: 0; }
.pay-state.is-muted .receipt-icon { background: var(--surface-3); color: var(--text-2); }

/* إطار QR بزوايا — يبدو "قابلاً للمسح" من النظرة الأولى */
.qr-frame { position: relative; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 1px 0 var(--border), 0 10px 30px rgba(15, 27, 45, 0.10); }
.qr-frame svg { display: block; width: 100%; height: auto; }
.qr-frame::before, .qr-frame::after, .qr-corners::before, .qr-corners::after {
    content: ""; position: absolute; width: 26px; height: 26px; border: 4px solid var(--tone, var(--brand-strong));
}
.qr-frame::before { inset-block-start: -2px; inset-inline-start: -2px; border-inline-end: 0; border-block-end: 0; border-start-start-radius: 18px; }
.qr-frame::after { inset-block-start: -2px; inset-inline-end: -2px; border-inline-start: 0; border-block-end: 0; border-start-end-radius: 18px; }
.qr-corners::before { inset-block-end: -2px; inset-inline-start: -2px; border-inline-end: 0; border-block-start: 0; border-end-start-radius: 18px; }
.qr-corners::after { inset-block-end: -2px; inset-inline-end: -2px; border-inline-start: 0; border-block-start: 0; border-end-end-radius: 18px; }
.qr-logo {
    position: absolute; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%);
    width: 21%; aspect-ratio: 1; border-radius: 24%; background: #fff; display: grid; place-items: center;
}
[dir="rtl"] .qr-logo { transform: translate(50%, -50%); }
.qr-logo span { width: 78%; aspect-ratio: 1; border-radius: 24%; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--brand) 0%, var(--navy) 100%); font-size: 1rem; }

/* علامة النجاح المتحركة */
.success-mark { width: 92px; height: 92px; margin-inline: auto; display: block; }
.success-mark circle { fill: var(--success-soft); stroke: var(--success); stroke-width: 2.5; stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw 0.7s ease-out forwards; }
.success-mark path { fill: none; stroke: var(--success); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.4s 0.55s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pop-in { animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(6px); } to { opacity: 1; transform: none; } }

.done-card { max-width: 480px; width: 100%; margin: auto; text-align: center; }
.done-card .receipt-amount { font-size: 2.3rem; }
.redirect-note { color: var(--text-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }

/* ---- صفحة المتجر (QR الثابت) ---- */
.store-page .pay-shell { max-width: 470px; }
.store-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
.store-head { text-align: center; padding: 30px 22px 24px; color: #fff; background: radial-gradient(120% 90% at 110% -10%, rgba(255,255,255,.22), transparent 55%), linear-gradient(160deg, var(--tone) 0%, var(--tone-2) 100%); }
.store-head .merchant-mark { margin: 0 auto 12px; }
.store-head h1 { color: #fff; font-size: 1.35rem; }
.store-head .meta { opacity: 0.85; font-size: 0.875rem; margin-block-start: 4px; }
.store-head .verified { margin-block-start: 8px; }
.store-body { padding: 24px 22px; display: flex; flex-direction: column; gap: 16px; }

.amount-entry { text-align: center; padding: 6px 0 2px; }
.amount-entry label { color: var(--text-2); font-size: 0.875rem; font-weight: 600; }
.amount-entry input {
    width: 100%; border: 0; background: transparent; text-align: center; color: var(--text);
    font: inherit; font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; padding: 6px 0;
    font-variant-numeric: tabular-nums;
}
.amount-entry input:focus { outline: none; }
.amount-entry input::placeholder { color: var(--border-strong); }
.amount-entry .underline { height: 3px; width: 64px; margin: 0 auto; border-radius: 3px; background: var(--tone, var(--brand)); }

.seg-radio { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.seg-radio label { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); font-weight: 600; font-size: 0.875rem; color: var(--text-2); background: var(--surface); }
.seg-radio input:checked + span { background: var(--tone, var(--brand-strong)); border-color: transparent; color: #fff; }
.seg-radio input:focus-visible + span { box-shadow: var(--focus); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches label { cursor: pointer; position: relative; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { display: block; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--tone) 0%, var(--tone-2) 100%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.swatches input:checked + span { outline: 3px solid var(--text); outline-offset: 2px; }
.swatches input:focus-visible + span { box-shadow: var(--focus); }

/* ---- الكاشير ---- */
.pos-screen { max-width: 560px; margin-inline: auto; width: 100%; }
.pos-screen .card { overflow: hidden; }
.pos-top { padding: 22px 24px; text-align: center; color: #fff; background: radial-gradient(120% 90% at 110% -10%, rgba(255,255,255,.2), transparent 55%), linear-gradient(160deg, var(--tone) 0%, var(--tone-2) 100%); }
.pos-top .pay-due { font-size: 2.8rem; }
.pos-top .ref { opacity: 0.85; font-size: 0.875rem; }
.pos-body { padding: 26px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.pos-body .qr-frame { width: min(300px, 76vw); }
.pulse { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.875rem; font-weight: 600; }
.pulse::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(3, 133, 90, 0.5); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(3, 133, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(3, 133, 90, 0); } }

/* حالات المتابعة الحية: [data-poll][data-status] تُظهر [data-when] المطابق */
[data-poll] [data-when] { display: none !important; }
[data-poll][data-status="open"] [data-when~="open"],
[data-poll][data-status="completed"] [data-when~="completed"],
[data-poll][data-status="expired"] [data-when~="expired"],
[data-poll][data-status="cancelled"] [data-when~="cancelled"] { display: flex !important; }

/* ---- لوحة التاجر ---- */
.biz-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: end; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 110px; }
.bars .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 0.6875rem; }
.bars .bar .col { width: 100%; max-width: 28px; height: calc(100% - 20px); display: flex; align-items: flex-end; }
.bars .bar i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: rgba(255, 255, 255, 0.55); min-height: 4px; }
.bars .bar.is-today i { background: #7ef0c3; }
.bars .bar span { opacity: 0.8; }
.h-0 { height: 4px; } .h-5 { height: 5%; } .h-10 { height: 10%; } .h-15 { height: 15%; } .h-20 { height: 20%; }
.h-25 { height: 25%; } .h-30 { height: 30%; } .h-35 { height: 35%; } .h-40 { height: 40%; } .h-45 { height: 45%; }
.h-50 { height: 50%; } .h-55 { height: 55%; } .h-60 { height: 60%; } .h-65 { height: 65%; } .h-70 { height: 70%; }
.h-75 { height: 75%; } .h-80 { height: 80%; } .h-85 { height: 85%; } .h-90 { height: 90%; } .h-95 { height: 95%; } .h-100 { height: 100%; }

.action-tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-tile {
    display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}
.action-tile:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); }
.action-tile .list-icon { background: var(--brand-soft); color: var(--brand-soft-ink); }
.action-tile strong { font-size: 0.95rem; }
.action-tile .subtle { font-size: 0.8125rem; }

.steps { counter-reset: step; display: grid; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step::before {
    counter-increment: step; content: counter(step);
    width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 700; font-size: 0.875rem;
}
.step.is-done::before { content: "\2713"; background: var(--success); color: #fff; }

.ways { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.way { padding: 20px; }
.way .list-icon { background: var(--brand-soft); color: var(--brand-soft-ink); margin-block-end: 12px; }
.way p { color: var(--text-2); font-size: 0.875rem; margin-block-start: 6px; }

.code-block {
    direction: ltr; text-align: left; margin: 0; padding: 16px 18px; border-radius: var(--radius);
    background: #0b1422; color: #d5e2f2; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem; line-height: 1.65; overflow-x: auto; white-space: pre;
}
.code-block .c { color: #7f8ea5; }
.code-block .s { color: #7ee0b1; }
.secret-box { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border-strong); }
.secret-box code { direction: ltr; text-align: left; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.875rem; word-break: break-all; flex: 1; }
details.reveal summary { cursor: pointer; color: var(--brand-strong); font-weight: 600; font-size: 0.875rem; list-style: none; }
details.reveal summary::-webkit-details-marker { display: none; }
details.reveal[open] summary { margin-block-end: 10px; }

/* ---- ملصق QR المحل ---- */
.poster-page { background: var(--surface-2); }
.poster-toolbar { max-width: 540px; margin: 20px auto 0; padding: 0 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.poster {
    max-width: 520px; margin: 18px auto 40px; background: #fff; color: #0f1b2d;
    border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); text-align: center;
}
.poster-head { padding: 26px 28px 74px; color: #fff; background: radial-gradient(120% 90% at 110% -10%, rgba(255,255,255,.22), transparent 55%), linear-gradient(160deg, var(--tone) 0%, var(--tone-2) 100%); }
.poster-head .tag { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 0.8125rem; font-weight: 700; }
.poster-head h1 { color: #fff; font-size: 1.9rem; margin-block-start: 14px; }
.poster-head p { opacity: 0.9; margin-block-start: 4px; }
.poster .qr-frame { width: 300px; max-width: 80%; margin: -56px auto 0; }
.poster-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 26px 26px 8px; }
.poster-steps div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 600; color: #475569; }
.poster-steps .list-icon { background: var(--tone-soft); color: var(--tone); }
.poster-url { font-family: ui-monospace, Menlo, Consolas, monospace; direction: ltr; color: #7a889c; font-size: 0.8125rem; padding: 8px 20px 0; }
.poster-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; margin-block-start: 18px; border-block-start: 1px solid #e1e7ef; font-weight: 700; color: #0f2a44; }
.poster-foot .brand-mark { width: 26px; height: 26px; font-size: 0.85rem; }

@media (max-width: 960px) {
    .pay-card { grid-template-columns: minmax(0, 1fr); }
    .pay-summary { padding: 24px 22px; }
    .pay-due { font-size: 2.2rem; }
    .pay-action { padding: 22px; }
    .desktop-only { display: none !important; }
    .biz-hero { grid-template-columns: minmax(0, 1fr); }
    .action-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ways { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .pay-shell { padding: 14px 12px 28px; }
    .pay-scan { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .amount-entry input { font-size: 2.5rem; }
    .poster-steps { gap: 6px; padding-inline: 14px; }
}
@media print {
    .poster-page { background: #fff; }
    .poster-toolbar { display: none !important; }
    .poster { box-shadow: none; margin: 0 auto; border: 1px solid #ddd; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.pay-top .brand { padding: 0; }
.pay-foot a { display: inline-flex; align-items: center; gap: 4px; }
details.reveal summary { display: inline-flex; align-items: center; gap: 6px; }
.steps-continue { counter-reset: none; }

/* ==========================================================================
   لوحة التاجر — هيكل مستقل: قائمة داكنة في الوضعين، علامة "وضع الأعمال"
   ========================================================================== */

.biz-sidebar {
    background: #0c1626; border-inline-end-color: #1a2a40; color: #c9d4e3;
    --text: #eef3fa; --text-2: #a9b6c9; --text-3: #6f8098; --surface-2: #14233a; --border: #1a2a40;
}
.biz-sidebar .nav a { color: #a9b6c9; }
.biz-sidebar .nav a:hover { background: #14233a; color: #fff; }
.biz-sidebar .nav a[aria-current="page"] { background: color-mix(in srgb, var(--tone) 22%, transparent); color: #fff; box-shadow: inset 3px 0 0 var(--tone); }
[dir="rtl"] .biz-sidebar .nav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--tone); }
.biz-sidebar .nav-label { color: #6f8098; }
.biz-sidebar .avatar { background: #1a2a40; color: #eef3fa; }

.biz-store {
    display: flex; align-items: center; gap: 12px; padding: 12px; margin-block-end: 6px;
    border-radius: 14px; background: #14233a; border: 1px solid #1f324d; color: #fff; text-decoration: none;
}
.biz-store:hover { text-decoration: none; border-color: var(--tone); }
.biz-store .grow { min-width: 0; }
.biz-store-name { display: block; font-weight: 700; }
.biz-store-tag { display: inline-block; margin-block-start: 3px; padding: 1px 8px; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; background: color-mix(in srgb, var(--tone) 30%, transparent); color: #d9fbe9; }

.biz-switch {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
    border: 1px dashed #2a3f5e; color: #c9d4e3; text-decoration: none;
}
.biz-switch:hover { background: #14233a; color: #fff; text-decoration: none; }
.biz-switch .small { color: #6f8098; }

.biz .btn:not(.btn-secondary):not(.btn-ghost):not(.btn-icon):not(.btn-danger):not(.btn-danger-soft) { background: var(--tone); color: #fff; }
.biz .user-chip .merchant-mark { box-shadow: none; }

/* بطاقات المؤشرات */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 18px 20px; }
.kpi .stat-label .icon { color: var(--tone, var(--brand)); }
.kpi .stat-value { font-size: 1.45rem; }
.kpi .delta { font-size: 0.8125rem; color: var(--text-3); margin-block-start: 4px; }

.channel-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.channel-row meter { width: 100%; height: 10px; }
.biz meter::-webkit-meter-optimum-value { background: var(--tone); }
.biz meter::-moz-meter-bar { background: var(--tone); }

.biz-chart { padding: 20px 22px 16px; }
.biz-chart .bars { height: 160px; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; }
.biz-chart .bars .bar i { background: color-mix(in srgb, var(--tone) 45%, transparent); }
.biz-chart .bars .bar.is-today i { background: var(--tone); }
.biz-chart .bars .bar span { color: var(--text-3); font-size: 0.625rem; }

.rank { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; background: var(--surface-2); color: var(--text-2); }

@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .kpi { padding: 14px; }
    .kpi .stat-value { font-size: 1.1rem; }
    .channel-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
    .biz-chart .bars { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .biz-chart .bars .bar:nth-child(-n+7) { display: none; }
}

.biz-entry { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-block-end: 6px; border-radius: 12px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #0f2a44 0%, #0a4f3a 100%); }
.biz-entry:hover { text-decoration: none; filter: brightness(1.08); }
.biz-entry .small { opacity: 0.75; }

.admin-mode { --tone: #1cc48b; --tone-2: #0a8f63; }
.list-end .ltr, .kpi .stat-value .ltr { white-space: nowrap; }

/* ==========================================================================
   المتجر الرقمي
   ========================================================================== */

.product-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.product-card {
    display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
    box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.product-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--tone); }
.product-art {
    position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; color: #fff;
    background: radial-gradient(120% 90% at 110% -10%, rgba(255,255,255,.25), transparent 55%), linear-gradient(150deg, var(--tone) 0%, var(--tone-2) 100%);
}
.product-art span { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; text-shadow: 0 2px 12px rgba(0,0,0,.2); }
.product-art small { position: absolute; inset-block-end: 8px; inset-inline-end: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.22); font-size: .6875rem; font-weight: 700; }
.product-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }

.product-hero { display: flex; align-items: center; gap: 16px; padding: 20px 22px; color: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: radial-gradient(120% 90% at 110% -10%, rgba(255,255,255,.2), transparent 55%), linear-gradient(150deg, var(--tone) 0%, var(--tone-2) 100%); }
.product-hero h1 { color: #fff; font-size: 1.3rem; }
.product-hero p { opacity: .9; }
.product-hero .product-art { width: 120px; flex: none; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.product-hero .product-art span { font-size: 1.8rem; }

.variant-list { display: grid; gap: 8px; }
.variant { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border-strong); cursor: pointer; background: var(--surface); }
.variant input { width: 18px; height: 18px; accent-color: var(--brand-strong); flex: none; }
.variant-body { display: flex; flex-direction: column; flex: 1; }
.variant:has(input:checked) { border-color: var(--brand); box-shadow: var(--focus); }
.variant.is-out { opacity: .5; cursor: not-allowed; }

.code-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border-strong); margin-block-start: 6px; }
.code-box code { flex: 1; direction: ltr; text-align: left; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; word-break: break-all; }
.pre-line { white-space: pre-line; }

@media (max-width: 640px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-hero { flex-direction: column; align-items: flex-start; }
    .product-hero .product-art { width: 100%; }
}

/* ==========================================================================
   المدفوعات (الفواتير + الأكواد الرقمية) — على نمط Papara
   ========================================================================== */

.pay-search {
    display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 54px;
    border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3);
}
.pay-search:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.pay-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--text); min-width: 0; }
.pay-search input:focus { outline: none; }

/* المتكررة: دوائر أفقية تُسحب على الجوال */
.quick-row { display: flex; gap: 14px; overflow-x: auto; padding-block-end: 6px; scroll-snap-type: x proximity; }
.quick-item { flex: none; width: 104px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text); text-decoration: none; scroll-snap-align: start; }
.quick-item:hover { text-decoration: none; }
.quick-item:hover .quick-icon { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 35%, transparent); }
.quick-icon {
    position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
    color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
}
.quick-icon .icon { width: 28px; height: 28px; }
.quick-check { position: absolute; inset-block-end: -2px; inset-inline-end: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; border: 2px solid var(--bg); }
.quick-check .icon { width: 12px; height: 12px; }
.quick-status { font-size: .75rem; font-weight: 700; }
.quick-name { font-size: .8125rem; font-weight: 600; max-width: 100%; }
.quick-item .subtle { max-width: 100%; }

/* بانر البطاقات */
.promo-banner {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; text-decoration: none;
    background: linear-gradient(120deg, #dcecfb 0%, #e9f3fd 100%); color: #0f1b2d;
}
.promo-banner:hover { text-decoration: none; filter: brightness(1.02); }
.promo-banner strong { display: block; font-size: 1rem; }
.promo-banner .d-block { margin-block-start: 6px; text-decoration: underline; font-size: .875rem; display: inline-flex; align-items: center; gap: 4px; }
.promo-art { width: 58px; height: 58px; flex: none; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #e11d48 0%, #7c3aed 100%); box-shadow: 0 8px 20px rgba(124, 58, 237, .3); }
.promo-art .icon { width: 30px; height: 30px; }
:root[data-theme="dark"] .promo-banner { background: linear-gradient(120deg, #17304d 0%, #1b2b45 100%); color: #e9eef6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .promo-banner { background: linear-gradient(120deg, #17304d 0%, #1b2b45 100%); color: #e9eef6; } }

/* قائمة الفئات */
.pay-row {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px; color: var(--text); text-decoration: none;
    border-block-end: 1px solid var(--border);
}
.pay-row:last-child { border-block-end: 0; }
.pay-row:hover { background: var(--surface-2); text-decoration: none; }
.pay-row .list-title { font-size: 1.02rem; }
.pay-row-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.pay-row-icon .icon { width: 24px; height: 24px; }
.pay-row-icon.lg { width: 52px; height: 52px; border-radius: 16px; }
.pay-row-icon.lg .icon { width: 28px; height: 28px; }
:root[data-theme="dark"] .pay-row-icon, :root[data-theme="dark"] .quick-icon { color: color-mix(in srgb, var(--tone) 70%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pay-row-icon, :root:not([data-theme="light"]) .quick-icon { color: color-mix(in srgb, var(--tone) 70%, #fff); } }

/* ==========================================================================
   الصفحة التعريفية (/)
   --------------------------------------------------------------------------
   تتبع المظهر كبقية الموقع. ألوانها الخاصة متغيرات --lp-* على body.lp،
   وفي الداكن تُعاد تعريف رموز التطبيق نفسها بدرجة أعمق.
   ========================================================================== */

body.lp {
    --lp-line: rgba(15, 27, 45, 0.08);
    --lp-line-soft: rgba(15, 27, 45, 0.06);
    --lp-line-2: rgba(15, 27, 45, 0.12);
    --lp-line-3: rgba(15, 27, 45, 0.22);
    --lp-tint: #ffffff;
    --lp-tint-0: rgba(255, 255, 255, 0.7);
    --lp-tint-2: rgba(15, 27, 45, 0.08);
    --lp-grid: rgba(15, 27, 45, 0.05);
    --lp-panel: #ffffff;
    --lp-deep: #f1f4f8;
    --lp-nav: rgba(244, 246, 249, 0.78);
    --lp-glass: rgba(255, 255, 255, 0.78);
    --lp-mint: #03643f;
    --lp-mix: #000000;
    --lp-stroke: rgba(0, 135, 90, 0.5);
    --lp-grad: linear-gradient(100deg, #00a36b 0%, #00875a 45%, #1d5fd1 100%);
    --lp-shadow-c: rgba(15, 27, 45, 0.16);
    --lp-tile-shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 16px 40px -18px rgba(15, 27, 45, 0.18);
    --lp-orb-a: rgba(28, 196, 139, 0.22);
    --lp-orb-b: rgba(29, 95, 209, 0.12);
    --lp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    background: var(--bg);
    color: var(--text);
}

/* الداكن: أعمق من داكن التطبيق — العرض يحتمل سواداً أكثر من شاشة عمل */
:root[data-theme="dark"] body.lp {
    --bg: #05090f;
    --surface: #0b1320;
    --surface-2: #101b2c;
    --surface-3: #16243a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #eef3f9;
    --text-2: #9aabc2;
    --text-3: #71839c;
    --brand: #1cc48b;
    --brand-strong: #1cc48b;
    --brand-ink: #03170f;
    --brand-soft: rgba(28, 196, 139, 0.14);
    --brand-soft-ink: #5fe0b3;
    --success: #3ed69f;
    --success-soft: rgba(62, 214, 159, 0.13);
    --shadow: none;
    --lp-line: rgba(255, 255, 255, 0.08);
    --lp-line-soft: rgba(255, 255, 255, 0.06);
    --lp-line-2: rgba(255, 255, 255, 0.12);
    --lp-line-3: rgba(255, 255, 255, 0.24);
    --lp-tint: rgba(255, 255, 255, 0.045);
    --lp-tint-0: rgba(255, 255, 255, 0.012);
    --lp-tint-2: rgba(255, 255, 255, 0.1);
    --lp-grid: rgba(255, 255, 255, 0.035);
    --lp-panel: #060b13;
    --lp-deep: #060b13;
    --lp-nav: rgba(5, 9, 15, 0.62);
    --lp-glass: rgba(16, 27, 44, 0.62);
    --lp-mint: #5fe0b3;
    --lp-mix: #ffffff;
    --lp-stroke: rgba(143, 245, 207, 0.55);
    --lp-grad: linear-gradient(100deg, #8ff5cf 0%, #1cc48b 45%, #8fd8ff 100%);
    --lp-shadow-c: rgba(0, 0, 0, 0.75);
    --lp-tile-shadow: none;
    --lp-orb-a: rgba(28, 196, 139, 0.32);
    --lp-orb-b: rgba(29, 95, 209, 0.22);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.lp {
        --bg: #05090f;
        --surface: #0b1320;
        --surface-2: #101b2c;
        --surface-3: #16243a;
        --border: rgba(255, 255, 255, 0.08);
        --border-strong: rgba(255, 255, 255, 0.16);
        --text: #eef3f9;
        --text-2: #9aabc2;
        --text-3: #71839c;
        --brand: #1cc48b;
        --brand-strong: #1cc48b;
        --brand-ink: #03170f;
        --brand-soft: rgba(28, 196, 139, 0.14);
        --brand-soft-ink: #5fe0b3;
        --success: #3ed69f;
        --success-soft: rgba(62, 214, 159, 0.13);
        --shadow: none;
        --lp-line: rgba(255, 255, 255, 0.08);
        --lp-line-soft: rgba(255, 255, 255, 0.06);
        --lp-line-2: rgba(255, 255, 255, 0.12);
        --lp-line-3: rgba(255, 255, 255, 0.24);
        --lp-tint: rgba(255, 255, 255, 0.045);
        --lp-tint-0: rgba(255, 255, 255, 0.012);
        --lp-tint-2: rgba(255, 255, 255, 0.1);
        --lp-grid: rgba(255, 255, 255, 0.035);
        --lp-panel: #060b13;
        --lp-deep: #060b13;
        --lp-nav: rgba(5, 9, 15, 0.62);
        --lp-glass: rgba(16, 27, 44, 0.62);
        --lp-mint: #5fe0b3;
        --lp-mix: #ffffff;
        --lp-stroke: rgba(143, 245, 207, 0.55);
        --lp-grad: linear-gradient(100deg, #8ff5cf 0%, #1cc48b 45%, #8fd8ff 100%);
        --lp-shadow-c: rgba(0, 0, 0, 0.75);
        --lp-tile-shadow: none;
        --lp-orb-a: rgba(28, 196, 139, 0.32);
        --lp-orb-b: rgba(29, 95, 209, 0.22);
        color-scheme: dark;
    }
}

.lp-wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 32px; }
.lp h1, .lp h2, .lp h3 { color: var(--text); }

/* الأزرار */
.lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; cursor: pointer;
    color: var(--text); background: transparent; text-decoration: none;
    transition: transform 0.2s var(--lp-ease), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.lp-btn:hover { text-decoration: none; }
.lp-btn-primary {
    color: #03170f;
    background: linear-gradient(180deg, #34e0a3 0%, #16b07a 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 32px -10px rgba(28, 196, 139, 0.75);
}
.lp-btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 18px 40px -10px rgba(28, 196, 139, 0.9); }
.lp-btn-glass { background: var(--lp-tint); border-color: var(--lp-line-2); backdrop-filter: blur(10px); }
.lp-btn-glass:hover { background: var(--lp-tint-2); border-color: var(--lp-line-3); }
.lp-btn-quiet { color: var(--text-2); }
.lp-btn-quiet:hover { color: var(--text); background: var(--lp-line-soft); }
.lp-btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }
.lp-btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.lp-btn-block { width: 100%; }
.lp-btn-icon { width: 36px; padding: 0; }

/* الشريط العلوي */
.lp-nav {
    position: sticky; inset-block-start: 0; z-index: 30;
    background: var(--lp-nav); backdrop-filter: saturate(180%) blur(16px);
    border-block-end: 1px solid var(--lp-line-soft);
}
.lp-nav-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.lp .brand { padding: 0; color: var(--text); }
.lp-links { display: flex; gap: 2px; }
.lp-links a { padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-size: 0.9375rem; font-weight: 500; transition: color 0.2s, background 0.2s; }
.lp-links a:hover { color: var(--text); background: var(--lp-line-soft); text-decoration: none; }
.lp-nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }

/* البطل */
.lp-hero { position: relative; overflow: hidden; padding-block: 104px 128px; }
.lp-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.lp-orb { position: absolute; border-radius: 50%; filter: blur(10px); }
.lp-orb-a { width: 720px; aspect-ratio: 1; inset-block-start: -260px; inset-inline-end: -180px; background: radial-gradient(circle, var(--lp-orb-a) 0%, transparent 65%); }
.lp-orb-b { width: 620px; aspect-ratio: 1; inset-block-end: -320px; inset-inline-start: -200px; background: radial-gradient(circle, var(--lp-orb-b) 0%, transparent 65%); }
.lp-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--lp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--lp-grid) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.lp-ring { position: absolute; width: 860px; aspect-ratio: 1; border-radius: 50%; inset-block-start: 50%; inset-inline-end: -200px; transform: translateY(-50%); border: 1px solid var(--lp-line-soft); }
.lp-ring::after { content: ""; position: absolute; inset: 140px; border-radius: 50%; border: 1px solid rgba(28, 196, 139, 0.14); }

.lp-hero-grid { position: relative; z-index: 1; display: grid; gap: 64px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
.lp-pill {
    display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px;
    font-size: 0.8125rem; color: var(--text-2);
    background: var(--lp-tint); border: 1px solid var(--lp-line-2);
}
.lp-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(28, 196, 139, 0.18), 0 0 14px rgba(28, 196, 139, 0.9); }
.lp-hero h1 { margin-block: 24px 0; font-size: clamp(2.3rem, 4.4vw, 3.6rem); line-height: 1.18; letter-spacing: -0.02em; }
.lp-grad {
    background: var(--lp-grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-hero-lead { margin-block: 24px 36px; max-width: 33em; font-size: 1.2rem; line-height: 1.75; color: var(--text-2); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-currencies { display: flex; align-items: center; gap: 14px; margin-block-start: 40px; }
.lp-chips { display: inline-flex; }
.lp-chips .cur-chip { box-shadow: 0 0 0 3px var(--bg); }
.lp-chips .cur-chip + .cur-chip { margin-inline-start: -8px; }
.lp-currencies-text { color: var(--text-3); font-size: 0.875rem; }

/* الهاتف */
.lp-stage { position: relative; justify-self: center; width: 100%; max-width: 360px; }
.lp-phone {
    padding: 10px; border-radius: 52px;
    background: linear-gradient(160deg, #36445a 0%, #0f1724 38%, #1d2738 100%);
    box-shadow: inset 0 0 0 1px var(--lp-line-2), 0 60px 120px -30px var(--lp-shadow-c), 0 0 120px -20px rgba(28, 196, 139, 0.28);
}
.lp-phone-screen { display: flex; flex-direction: column; gap: 14px; padding: 22px 14px 16px; border-radius: 43px; background: var(--bg); overflow: hidden; }
.lp-app-top { display: flex; align-items: center; gap: 10px; padding-inline: 4px; }
.lp-app-top .brand-mark { width: 34px; height: 34px; font-size: 15px; }
.lp-app-hello { font-size: 0.75rem; color: var(--text-3); line-height: 1.35; }
.lp-app-hello strong { color: var(--text); font-size: 0.9375rem; }
.lp-app-bell { margin-inline-start: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.lp-phone .hero { padding: 20px; border-radius: 24px; box-shadow: none; }
.lp-phone .hero-amount { font-size: 1.7rem; }
.lp-app-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lp-app-actions span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.6875rem; color: var(--text-2); }
.lp-app-actions i { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--lp-line); color: var(--brand); }
.lp-app-list { border-radius: 20px; background: var(--surface); border: 1px solid var(--lp-line); }
.lp-app-list .list-item { padding: 12px 14px; gap: 10px; }
.lp-app-list .list-item:last-child { border-block-end: 0; }
.lp-app-list .list-icon { width: 34px; height: 34px; border-radius: 11px; }
.lp-app-list .list-title { font-size: 0.8125rem; }
.lp-app-list .amount-in, .lp-app-list .amount-out { font-size: 0.8125rem; }

.lp-glass {
    position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-radius: 20px; font-size: 0.8125rem; color: var(--text-3);
    background: var(--lp-glass); border: 1px solid var(--lp-line-2);
    backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 24px 60px -16px var(--lp-shadow-c);
}
.lp-glass strong { color: var(--text); font-size: 0.875rem; }
.lp-glass-a { inset-block-start: 14%; inset-inline-end: -84px; }
.lp-glass-b { inset-block-end: -4%; inset-inline-start: -88px; }
.lp-glass-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }

/* مؤقّت السعر: حلقة مخروطية بربعها الأخير فارغ */
.lp-lock { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) 0 75%, var(--lp-tint-2) 0); }
.lp-lock span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); font-size: 0.75rem; font-weight: 700; }

/* شريط القدرات المتحرك */
.lp-marquee {
    overflow: hidden; padding-block: 26px; border-block: 1px solid var(--lp-line-soft); background: var(--lp-tint-0);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.lp-marquee-track { direction: ltr; display: flex; align-items: center; gap: 32px; width: max-content; animation: lp-marquee 48s linear infinite; }
.lp-marquee-track span { direction: rtl; white-space: nowrap; font-size: 1.125rem; font-weight: 600; color: var(--text-2); }
.lp-marquee-track i { width: 10px; height: 10px; flex: none; border-radius: 50%; border: 2px solid var(--brand); }
@keyframes lp-marquee { to { transform: translateX(-50%); } }

/* الأقسام */
.lp-section { position: relative; padding-block: 128px; }
.lp-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.lp-head h2, .lp-section h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.2; letter-spacing: -0.015em; }
.lp-head p { margin-block-start: 18px; font-size: 1.125rem; color: var(--text-2); }
.lp-eyebrow {
    display: inline-flex; margin-block-end: 20px; padding: 5px 14px; border-radius: 999px;
    font-size: 0.8125rem; font-weight: 700; color: var(--lp-mint);
    background: rgba(28, 196, 139, 0.08); border: 1px solid rgba(28, 196, 139, 0.22);
}
.lp-lead { margin-block: 20px 36px; font-size: 1.125rem; line-height: 1.75; color: var(--text-2); }

/* شبكة بنتو */
.lp-bento { display: grid; gap: 18px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.lp-tile {
    position: relative; overflow: hidden; grid-column: span 2; padding: 30px; border-radius: 28px;
    background: linear-gradient(180deg, var(--lp-tint) 0%, var(--lp-tint-0) 100%);
    border: 1px solid var(--lp-line); box-shadow: var(--lp-tile-shadow);
    transition: border-color 0.3s, transform 0.3s var(--lp-ease);
}
.lp-tile::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px circle at 100% 0%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 62%);
}
[dir="rtl"] .lp-tile::before { background: radial-gradient(420px circle at 0% 0%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 62%); }
.lp-tile > * { position: relative; }
.lp-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 45%, transparent); }
.lp-tile-wide { grid-column: span 4; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.lp-tile-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: color-mix(in srgb, var(--tone) 65%, var(--lp-mix)); background: color-mix(in srgb, var(--tone) 20%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); }
.lp-tile h3 { margin-block: 22px 10px; font-size: 1.3rem; }
.lp-tile p { color: var(--text-2); font-size: 0.975rem; line-height: 1.7; }
.lp-mini { margin-block-start: 28px; }
.lp-tile-wide .lp-mini { margin: 0; }
.lp-mini-transfer { padding: 18px; border-radius: 22px; background: var(--lp-panel); border: 1px solid var(--lp-line); box-shadow: 0 30px 60px -20px var(--lp-shadow-c); }
.lp-mini-transfer .party { margin-block-end: 6px; }
.lp-mini-transfer .kv { font-size: 0.875rem; }
.lp-mini-transfer .lp-btn { margin-block-start: 14px; }
.lp-fx { display: flex; align-items: center; gap: 10px; }
.lp-fx-line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--lp-line-3) 0 6px, transparent 6px 12px); }
.lp-billers { display: flex; gap: 10px; }
.lp-billers span { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: color-mix(in srgb, var(--tone) 70%, var(--lp-mix)); background: color-mix(in srgb, var(--tone) 18%, transparent); }
.lp-cards { position: relative; height: 92px; }
.lp-cards span {
    position: absolute; inset-block-start: 6px; width: 108px; height: 70px; border-radius: 14px;
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.35rem;
    background: radial-gradient(120% 90% at 110% -10%, rgba(255, 255, 255, 0.28), transparent 55%), linear-gradient(150deg, var(--tone) 0%, var(--tone-2) 100%);
    box-shadow: 0 16px 30px -10px var(--lp-shadow-c);
}
.lp-cards span:nth-child(1) { inset-inline-start: 0; transform: rotate(-9deg); }
.lp-cards span:nth-child(2) { inset-inline-start: 62px; inset-block-start: -4px; z-index: 3; }
.lp-cards span:nth-child(3) { inset-inline-start: 124px; transform: rotate(9deg); z-index: 2; }
.lp-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--lp-panel); border: 1px solid var(--lp-line); color: var(--text-2); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.8125rem; }

/* البيان */
.lp-statement { text-align: center; border-block: 1px solid var(--lp-line-soft); background: radial-gradient(800px 400px at 50% 0%, rgba(28, 196, 139, 0.1), transparent 70%); }
.lp-big { margin: 0; font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--text); }
.lp-big-sub { max-width: 760px; margin: 28px auto 80px; font-size: 1.2rem; line-height: 1.8; color: var(--text-2); }
.lp-pillars {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; text-align: start;
    border-radius: 28px; overflow: hidden; background: var(--lp-line); border: 1px solid var(--lp-line);
}
.lp-pillar { padding: 34px 30px; background: var(--lp-panel); }
.lp-pillar > .icon { width: 28px; height: 28px; color: var(--brand); }
.lp-pillar h3 { margin-block: 22px 10px; font-size: 1.125rem; }
.lp-pillar p { color: var(--text-2); font-size: 0.9375rem; line-height: 1.7; }

/* التجار والنقد */
.lp-split { display: grid; gap: 80px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.lp-business { background: radial-gradient(700px 500px at 0% 50%, rgba(28, 196, 139, 0.12), transparent 70%); }
.lp-list { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.lp-list li { display: flex; gap: 16px; align-items: flex-start; color: var(--text-2); line-height: 1.7; }
.lp-list li > .icon { flex: none; width: 44px; height: 44px; padding: 11px; border-radius: 14px; color: var(--lp-mint); background: rgba(28, 196, 139, 0.1); border: 1px solid rgba(28, 196, 139, 0.2); }
.lp-list strong { display: block; color: var(--text); font-size: 1.0625rem; }

.lp-biz-stage { position: relative; min-height: 470px; }
.lp-dash {
    position: relative; width: 82%; padding: 24px; border-radius: 26px;
    background: var(--lp-glass); border: 1px solid var(--lp-line-2); backdrop-filter: blur(16px);
    box-shadow: 0 40px 80px -24px var(--lp-shadow-c);
}
.lp-dash-head { display: flex; align-items: center; gap: 12px; }
.lp-dash-kpi { margin-block: 22px 18px; color: var(--text-3); font-size: 0.8125rem; }
.lp-dash-num { display: block; margin-block-start: 4px; color: var(--text); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.01em; }
.lp-bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.lp-bars i { flex: 1; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, rgba(28, 196, 139, 0.55), rgba(28, 196, 139, 0.12)); }
.lp-bars i:nth-child(1) { height: 34%; } .lp-bars i:nth-child(2) { height: 48%; } .lp-bars i:nth-child(3) { height: 40%; }
.lp-bars i:nth-child(4) { height: 62%; } .lp-bars i:nth-child(5) { height: 55%; } .lp-bars i:nth-child(6) { height: 70%; }
.lp-bars i:nth-child(7) { height: 58%; } .lp-bars i:nth-child(8) { height: 76%; } .lp-bars i:nth-child(9) { height: 66%; }
.lp-bars i:nth-child(10) { height: 84%; } .lp-bars i:nth-child(11) { height: 72%; }
.lp-bars i:nth-child(12) { height: 96%; background: linear-gradient(180deg, #34e0a3, #16b07a); box-shadow: 0 0 24px rgba(28, 196, 139, 0.6); }

.lp-poster {
    position: absolute; z-index: 2; inset-block-end: 0; inset-inline-end: 0; width: 230px;
    display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 24px;
    background: #fff; color: #0f1b2d; transform: rotate(-4deg);
    box-shadow: 0 40px 80px -20px var(--lp-shadow-c);
}
[dir="rtl"] .lp-poster { transform: rotate(4deg); }
.lp-poster .qr-frame { box-shadow: none; padding: 8px; }
.lp-poster-foot { display: flex; align-items: center; justify-content: center; gap: 8px; }
.lp-poster-foot .brand-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 0.8rem; }
.lp-poster-foot .brand-name { color: #0f1b2d; font-size: 1rem; }
.lp-poster-foot .brand-name span { color: #00875a; }

.lp-cash-stage { display: grid; place-items: center; }
.lp-code-card {
    width: 100%; max-width: 420px; padding: 28px; border-radius: 28px; color: var(--text-2);
    background: linear-gradient(180deg, var(--lp-tint), var(--lp-tint-0));
    border: 1px solid var(--lp-line-2); box-shadow: 0 40px 80px -24px var(--lp-shadow-c), 0 0 100px -30px rgba(28, 196, 139, 0.35);
}
.lp-digits { display: flex; justify-content: center; align-items: center; gap: 8px; margin-block: 26px; }
.lp-digits span {
    width: 40px; height: 56px; border-radius: 12px; display: grid; place-items: center;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1.6rem; font-weight: 700; color: var(--text);
    background: var(--lp-deep); border: 1px solid var(--lp-line-2);
}
.lp-digits b { width: 10px; }

/* الخطوات */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-steps li { padding: 34px 30px; border-radius: 28px; border: 1px solid var(--lp-line); background: linear-gradient(180deg, var(--lp-tint), var(--lp-tint-0)); box-shadow: var(--lp-tile-shadow); }
.lp-step-num { display: block; font-size: 3.5rem; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--lp-stroke); }
[dir="rtl"] .lp-step-num { text-align: right; }
.lp-steps h3 { margin-block: 26px 10px; font-size: 1.25rem; }
.lp-steps p { color: var(--text-2); line-height: 1.7; }

/* الأسئلة */
.lp-faq-grid { display: grid; gap: 72px; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); align-items: start; }
.lp-faq details { border-block-end: 1px solid var(--lp-line); }
.lp-faq details:first-child { border-block-start: 1px solid var(--lp-line); }
.lp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 24px; font-size: 1.0625rem; font-weight: 600; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
    content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    font-size: 1.25rem; font-weight: 400; color: var(--text-2); border: 1px solid var(--border-strong);
    transition: transform 0.25s var(--lp-ease);
}
.lp-faq details[open] summary::after { transform: rotate(45deg); color: var(--brand); border-color: var(--brand); }
.lp-faq details p { padding-block-end: 24px; max-width: 40em; color: var(--text-2); line-height: 1.8; }

/* الدعوة الأخيرة */
.lp-final {
    position: relative; overflow: hidden; padding-block: 150px; text-align: center;
    border-block-start: 1px solid var(--lp-line-soft);
    background: radial-gradient(700px 420px at 50% 100%, rgba(28, 196, 139, 0.3), transparent 70%);
}
.lp-final-mark .brand-mark {
    width: 72px; height: 72px; margin-inline: auto; border-radius: 20px; font-size: 1.8rem;
    box-shadow: 0 0 0 12px rgba(28, 196, 139, 0.07), 0 0 0 26px rgba(28, 196, 139, 0.035), 0 24px 70px rgba(28, 196, 139, 0.5);
}
.lp-final h2 { margin-block: 44px 14px; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
.lp-final p { margin-block-end: 40px; font-size: 1.15rem; color: var(--text-2); }

/* التذييل */
.lp-foot { border-block-start: 1px solid var(--lp-line-soft); }
.lp-foot-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; padding-block: 56px 36px; }
.lp-foot-brand p { margin-block-start: 12px; color: var(--text-3); font-size: 0.875rem; }
.lp-foot-links { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.lp-foot-links a { color: var(--text-2); font-size: 0.9375rem; }
.lp-foot-links a:hover { color: var(--text); }
.lp-foot-note { padding-block: 22px 36px; border-block-start: 1px solid var(--lp-line-soft); color: var(--text-3); font-size: 0.8125rem; }

/* الظهور عند التمرير — يُفعَّل من app.js فقط (الصنف lp-motion على الجذر) */
.lp-motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--lp-ease), transform 0.9s var(--lp-ease); }
.lp-motion [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .lp-marquee-track { animation: none; }
    .lp-tile, .lp-btn { transition: none; }
}

@media (max-width: 1100px) {
    .lp-links { display: none; }
    .lp-glass-a { inset-inline-end: -24px; }
    .lp-glass-b { inset-inline-start: -24px; }
}
@media (max-width: 960px) {
    .lp-wrap { padding-inline: 20px; }
    .lp-hero { padding-block: 56px 88px; }
    .lp-hero-grid, .lp-split, .lp-faq-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
    .lp-section { padding-block: 88px; }
    .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-tile { grid-column: span 1; }
    .lp-tile-wide { grid-column: span 2; grid-template-columns: minmax(0, 1fr); }
    .lp-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-steps { grid-template-columns: minmax(0, 1fr); }
    .lp-faq-grid { gap: 24px; }
    .lp-final { padding-block: 104px; }
}
@media (max-width: 640px) {
    .lp-bento, .lp-pillars { grid-template-columns: minmax(0, 1fr); }
    .lp-tile, .lp-tile-wide { grid-column: span 1; }
    .lp-glass { display: none; }
    .lp-hero-lead { font-size: 1.05rem; }
    .lp-currencies { flex-wrap: wrap; }
    .lp-biz-stage { min-height: 420px; }
    .lp-dash { width: 100%; }
    .lp-poster { width: 170px; }
    .lp-digits span { width: 32px; height: 48px; font-size: 1.3rem; }
    .lp-nav-inner { gap: 8px; }
}
