/* =========================================================
   آيبال — متجر الاشتراكات (الواجهة + معالج الشراء + الفاتورة)
   الاتجاه البصري: «ورق وبرقوق» — خلفية كريمية دافئة، حبر بنفسجي عميق،
   ومربعات الشعار المائلة كعنصر هندسي متكرر. لون الهوية = معنى، البرتقالي = فعل.
   ========================================================= */

:root {
    --ib-primary: #70267b;
    --ib-primary-dark: #592e5e;
    --ib-ink: #2a0f2e;
    --ib-deep: #3d1742;
    --ib-orange: #f8a531;
    --ib-orange-dark: #d98a17;
    --ib-magenta: #aa3990;
    --ib-lavender: #d6b0d3;
    --ib-lavender-soft: #f1e4f0;
    --ib-cream: #fbf8f4;
    --ib-bg: #fbf8f4;
    --ib-surface: #ffffff;
    --ib-surface-2: #f8f3f7;
    --ib-border: #ece2ea;
    --ib-text: #2a0f2e;
    --ib-muted: #7b6a7d;
    --ib-success: #0f9d6b;
    --ib-success-bg: #e4f5ee;
    --ib-danger: #c62828;
    --ib-danger-bg: #fdecec;
    --ib-warning-bg: #fef3e2;
    --ib-radius: 22px;
    --ib-shadow: 0 1px 2px rgba(42, 15, 46, .05), 0 18px 40px -24px rgba(42, 15, 46, .28);
    --ib-shadow-lg: 0 2px 4px rgba(42, 15, 46, .05), 0 30px 60px -30px rgba(42, 15, 46, .45);
    --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--ib-bg); color: var(--ib-text);
    font-weight: 500; line-height: 1.7; min-height: 100vh;
    -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; display: block; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: "tnum" 1; }
::selection { background: rgba(248, 165, 49, .35); }
:focus-visible { outline: 3px solid rgba(248, 165, 49, .7); outline-offset: 2px; border-radius: 8px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* مربع الهوية المائل — يُعاد استخدامه */
.sq { display: inline-block; border-radius: 22%; transform: rotate(18deg); flex-shrink: 0; }

/* ============================ Topbar ============================ */
.topbar { position: sticky; top: 0; z-index: 60; background: rgba(251, 248, 244, .82);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.topbar.scrolled { border-bottom-color: var(--ib-border); background: rgba(251, 248, 244, .94); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.topbar-logo img { height: 40px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-help { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ib-primary);
    padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--ib-border); background: var(--ib-surface); }
.topbar-help:hover { border-color: var(--ib-lavender); }
.secure-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ib-success); }

/* ============================ Buttons ============================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 16px;
    font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap;
    transition: transform .2s var(--ease), filter .2s, box-shadow .2s, background .2s, border-color .2s; border: 1.5px solid transparent; }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--ib-primary); color: #fff; box-shadow: 0 12px 24px -14px rgba(112, 38, 123, .9); }
.btn-primary:hover { background: var(--ib-primary-dark); transform: translateY(-2px); }
.btn-orange { background: var(--ib-orange); color: var(--ib-ink); box-shadow: 0 12px 24px -14px rgba(217, 138, 23, 1); }
.btn-orange:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-ghost { background: var(--ib-surface); border-color: var(--ib-border); color: var(--ib-ink); }
.btn-ghost:hover { border-color: var(--ib-lavender); transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--ib-ink); }
.btn-light:hover { transform: translateY(-2px); }
.btn-lg { padding: 17px 30px; font-size: 17px; border-radius: 18px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn-link { color: var(--ib-primary); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn-link:disabled { color: var(--ib-muted); cursor: default; }

/* ============================ صفحة الدفع (الباقات) ============================ */
.pay-page { padding: 42px 0 10px; }
.pay-head { text-align: center; margin-bottom: 38px; }
.pay-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; letter-spacing: -.02em; line-height: 1.25; color: var(--ib-ink); }
.pay-head p { color: var(--ib-muted); font-size: 16.5px; margin-top: 6px; }
.pay-trust { display: flex; justify-content: center; gap: 12px 28px; flex-wrap: wrap; margin-top: 34px; }
.pay-trust div { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ib-muted); }
.pay-trust svg { color: var(--ib-success); }

/* ============================ Sections ============================ */
.section { padding: 84px 0; position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-kicker { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 800; color: var(--ib-orange-dark); letter-spacing: .02em; }
.section-kicker .sq { width: 9px; height: 9px; background: var(--ib-orange); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -.02em; line-height: 1.25; margin-top: 10px; color: var(--ib-ink); }
.section-head p { color: var(--ib-muted); font-size: 16.5px; margin-top: 12px; }

/* ============================ Pricing ============================ */
.section-plans { background: linear-gradient(180deg, transparent, #f5eef4 30%, #f5eef4 70%, transparent); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; background: var(--ib-surface); border: 1.5px solid var(--ib-border); border-radius: 28px; padding: 30px 26px 26px;
    display: flex; flex-direction: column; box-shadow: var(--ib-shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.plan:hover { transform: translateY(-6px); box-shadow: var(--ib-shadow-lg); }
.plan-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--ib-lavender-soft); color: var(--ib-primary); }
.plan-name { font-size: 21px; font-weight: 900; margin-top: 18px; }
.plan-desc { font-size: 14px; color: var(--ib-muted); margin-top: 4px; min-height: 48px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.plan-price b { font-size: 54px; font-weight: 900; line-height: 1; letter-spacing: -.03em; font-family: 'Tajawal', sans-serif; }
.plan-price .cur { font-size: 22px; font-weight: 800; }
.plan-price .per { font-size: 14.5px; color: var(--ib-muted); font-weight: 700; }
.plan-equiv { font-size: 13px; font-weight: 700; color: var(--ib-success); margin-top: 8px; min-height: 22px; }
.plan hr { border: 0; border-top: 1px dashed var(--ib-border); margin: 20px 0; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.plan-features li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; font-weight: 600; }
.plan-features .tick { width: 22px; height: 22px; border-radius: 7px; background: var(--ib-lavender-soft); color: var(--ib-primary); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.plan .btn { margin-top: auto; }
.plan-stock { text-align: center; font-size: 12.5px; color: var(--ib-muted); margin-top: 10px; font-weight: 600; min-height: 20px; }
.plan-stock.low { color: var(--ib-orange-dark); }

.plan.featured { background: var(--ib-ink); border-color: var(--ib-ink); color: #fff; transform: translateY(-14px); box-shadow: 0 40px 70px -35px rgba(42, 15, 46, .8); overflow: hidden; }
.plan.featured:hover { transform: translateY(-20px); }
.plan.featured::before { content: ''; position: absolute; width: 220px; height: 220px; inset-inline-end: -80px; top: -90px; border-radius: 40px; transform: rotate(18deg);
    background: linear-gradient(135deg, var(--ib-primary), var(--ib-magenta)); opacity: .55; pointer-events: none; }
.plan.featured > * { position: relative; }
.plan.featured > .plan-badge, .plan.featured > .plan-soldout { position: absolute; }
.plan.featured .plan-icon { background: rgba(255,255,255,.12); color: var(--ib-orange); }
.plan.featured .plan-desc, .plan.featured .plan-price .per, .plan.featured .plan-stock { color: rgba(255,255,255,.72); }
.plan.featured .plan-equiv { color: var(--ib-orange); }
.plan.featured hr { border-top-color: rgba(255,255,255,.16); }
.plan.featured .plan-features .tick { background: var(--ib-orange); color: var(--ib-ink); }
.plan-badge { position: absolute; top: 24px; inset-inline-end: 22px; display: inline-flex; align-items: center; gap: 6px; background: var(--ib-orange); color: var(--ib-ink);
    font-size: 12px; font-weight: 900; padding: 5px 12px; border-radius: 999px; }
.plan.sold-out { opacity: .72; }
.plan.sold-out:hover { transform: none; }
.plan.featured.sold-out { transform: translateY(-14px); }
.plan-soldout { position: absolute; top: 24px; inset-inline-end: 22px; background: var(--ib-danger); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }

/* ============================ Footer ============================ */
.site-footer { border-top: 1px solid var(--ib-border); margin-top: 84px; padding: 34px 0; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ib-muted); }
.site-footer img { height: 32px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ib-primary); }
.site-footer a.devx { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }
.site-footer.slim { margin-top: 40px; }

/* ============================ Load ============================ */
.load-in { animation: loadIn .9s var(--ease) both; }
.load-in.d1 { animation-delay: .08s; } .load-in.d2 { animation-delay: .18s; } .load-in.d3 { animation-delay: .28s; } .load-in.d4 { animation-delay: .38s; }
@keyframes loadIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* =================================================================
   معالج الشراء (Wizard)
   ================================================================= */
.wizard-page { padding: 34px 0 20px; }
.wizard-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.wizard-top h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -.02em; }
.wizard-top .btn-link { color: var(--ib-muted); }
.wizard-top .btn-link:hover { color: var(--ib-primary); }

.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin-bottom: 30px; background: var(--ib-surface); border: 1.5px solid var(--ib-border); border-radius: 22px; padding: 18px 12px; }
.stepper-item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; }
.stepper-item:not(:last-child)::after { content: ''; position: absolute; top: 21px; inset-inline-start: calc(50% + 28px); inset-inline-end: calc(-50% + 28px); height: 3px; border-radius: 3px; background: var(--ib-border); }
.stepper-item.done:not(:last-child)::after { background: var(--ib-primary); }
.stepper-dot { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ib-surface-2); color: var(--ib-muted); border: 1.5px solid var(--ib-border); transition: .3s var(--ease); }
.stepper-item.done .stepper-dot { background: var(--ib-lavender-soft); color: var(--ib-primary); border-color: transparent; }
.stepper-item.current .stepper-dot { background: var(--ib-primary); color: #fff; border-color: var(--ib-primary); box-shadow: 0 0 0 6px rgba(112, 38, 123, .12); transform: rotate(-8deg); }
.stepper-item.current .stepper-dot svg { transform: rotate(8deg); }
.stepper-label { font-size: 13px; font-weight: 800; color: var(--ib-muted); line-height: 1.35; }
.stepper-label small { display: block; font-size: 11px; font-weight: 600; opacity: .8; }
.stepper-item.current .stepper-label { color: var(--ib-ink); }
.stepper-item.done .stepper-label { color: var(--ib-primary); }

.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.panel { background: var(--ib-surface); border: 1.5px solid var(--ib-border); border-radius: 26px; box-shadow: var(--ib-shadow); }
.panel-head { padding: 26px 30px 0; display: flex; gap: 16px; align-items: flex-start; }
.panel-head .ico { width: 50px; height: 50px; border-radius: 16px; background: var(--ib-lavender-soft); color: var(--ib-primary); display: grid; place-items: center; flex-shrink: 0; }
.panel-head .ico.jpay { background: linear-gradient(135deg, #1a9c48, #0c6e30); color: #fff; }
.panel-head .step-of { font-size: 12.5px; font-weight: 800; color: var(--ib-orange-dark); }
.panel-head h2 { font-size: 22px; font-weight: 900; line-height: 1.3; }
.panel-head p { font-size: 14.5px; color: var(--ib-muted); margin-top: 3px; }
.panel-body { padding: 24px 30px 30px; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 30px; border-top: 1px solid var(--ib-border); background: var(--ib-surface-2); border-radius: 0 0 26px 26px; flex-wrap: wrap; }

/* ملخص الطلب الجانبي */
.summary-card { position: sticky; top: 92px; overflow: hidden; }
.summary-hero { position: relative; padding: 22px 22px 20px; background: var(--ib-ink); color: #fff; border-radius: 24px 24px 0 0; overflow: hidden; }
.summary-hero::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 28px; transform: rotate(18deg); inset-inline-end: -40px; top: -50px; background: linear-gradient(135deg, var(--ib-primary), var(--ib-magenta)); opacity: .7; }
.summary-hero > * { position: relative; z-index: 1; }
.summary-hero small { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.65); }
.summary-hero h3 { font-size: 20px; font-weight: 900; margin-top: 2px; }
.summary-hero .price { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.summary-hero .price b { font-size: 36px; font-weight: 900; line-height: 1; }
.summary-hero .price span { font-size: 14px; color: rgba(255,255,255,.7); font-weight: 700; }
.summary-body { padding: 18px 22px 20px; }
.summary-features { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.summary-features li { display: flex; gap: 9px; font-size: 13.5px; font-weight: 600; align-items: flex-start; }
.summary-features li svg { color: var(--ib-primary); flex-shrink: 0; margin-top: 3px; }
.summary-rows { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--ib-border); display: flex; flex-direction: column; gap: 7px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.summary-row span { color: var(--ib-muted); }
.summary-row b { text-align: left; }
.summary-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--ib-lavender-soft); }
.summary-total span { font-weight: 800; }
.summary-total b { font-size: 22px; font-weight: 900; color: var(--ib-primary); }
.summary-trust { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.summary-trust div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ib-muted); font-weight: 600; }
.summary-trust svg { color: var(--ib-success); flex-shrink: 0; }
.summary-toggle { display: none; }

/* الحقول */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 800; color: var(--ib-ink); }
.field label small { color: var(--ib-muted); font-weight: 600; }
.input-wrap { position: relative; }
/* الأيقونة دائماً يمين الحقل (الصفحة RTL). نستخدم خصائص فيزيائية لا منطقية:
   الحقول ذات dir="ltr" (الجوال/البريد) تقلب inline-start إلى اليسار فيقع النص تحت الأيقونة. */
.input-wrap > svg, .input-wrap > i { position: absolute; right: 15px; left: auto; top: 50%; transform: translateY(-50%); color: var(--ib-muted); pointer-events: none;
    transition: color .25s, transform .35s var(--ease); z-index: 1; }
.input-wrap .input { padding-right: 46px; padding-left: 16px; }
.input-wrap:focus-within > svg { color: var(--ib-primary); transform: translateY(-50%) scale(1.12); }
.input, select.input, textarea.input {
    width: 100%; padding: 14px 16px; border-radius: 15px; border: 1.5px solid var(--ib-border); background: var(--ib-surface-2);
    font: inherit; font-size: 16px; color: var(--ib-ink); outline: none; transition: border-color .2s, background .2s, box-shadow .2s; appearance: none;
}
textarea.input { resize: vertical; min-height: 92px; line-height: 1.7; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b6a7d' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 16px center; padding-left: 42px; }
.input:hover { border-color: #e0d0de; }
.input:focus { border-color: var(--ib-primary); background: #fff; box-shadow: 0 0 0 4px rgba(112, 38, 123, .1); }
.input::placeholder { color: #b7a3b8; }
.input.is-invalid { border-color: var(--ib-danger); background: #fffafa; }
/* الأرقام والبريد تُكتب يساراً-ليميناً لكن تبقى محاذاتها يمين الحقل بجانب الأيقونة */
input[dir="ltr"].input { text-align: right; unicode-bidi: plaintext; }
input[dir="ltr"].input::placeholder { text-align: right; }
.field-error { font-size: 13px; color: var(--ib-danger); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hint { font-size: 13px; color: var(--ib-muted); }

/* الصفوف الستة: شبكة 3×2 (و2×3 على الجوال) */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.chips .chip span { display: flex; width: 100%; }
@media (max-width: 520px) { .chips { grid-template-columns: repeat(2, 1fr); } }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 13px; border: 1.5px solid var(--ib-border); background: var(--ib-surface);
    font-size: 14px; font-weight: 700; cursor: pointer; transition: .18s; user-select: none; }
.chip span::before { content: ''; width: 9px; height: 9px; border-radius: 3px; transform: rotate(18deg); background: var(--ib-border); transition: .18s; }
.chip span:hover { border-color: var(--ib-lavender); }
.chip input:checked + span { background: var(--ib-primary); border-color: var(--ib-primary); color: #fff; }
.chip input:checked + span::before { background: var(--ib-orange); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(248, 165, 49, .55); }

/* تنبيهات */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 15px; font-size: 14.5px; font-weight: 600; margin-bottom: 20px; }
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice-danger { background: var(--ib-danger-bg); color: #9f1d1d; }
.notice-success { background: var(--ib-success-bg); color: #0a6b45; }
.notice-warning { background: var(--ib-warning-bg); color: #8a5510; }
.notice-info { background: var(--ib-lavender-soft); color: var(--ib-primary-dark); }

/* الدفع */
.wallet-field .input { font-size: 22px; font-weight: 700; letter-spacing: .06em; padding-top: 16px; padding-bottom: 16px; }
.otp-input { width: 100%; max-width: 320px; display: block; margin: 0 auto; text-align: center; direction: ltr; font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 700; letter-spacing: .45em; padding: 16px 12px 16px calc(12px + .45em); border: 2px solid var(--ib-border); border-radius: 20px; background: var(--ib-surface-2); color: var(--ib-ink); outline: none; transition: .2s; }
.otp-input:focus { border-color: var(--ib-primary); background: #fff; box-shadow: 0 0 0 5px rgba(112, 38, 123, .1); }
.otp-input::placeholder { color: #d8c8d6; }
.otp-boxes { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.otp-boxes input { width: 58px; height: 66px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 700; color: var(--ib-ink);
    border: 1.5px solid var(--ib-border); border-radius: 16px; background: var(--ib-surface-2); outline: none; transition: .18s; }
.otp-boxes input:focus { border-color: var(--ib-primary); background: #fff; box-shadow: 0 0 0 4px rgba(112, 38, 123, .1); transform: translateY(-2px); }
.otp-boxes input.filled { border-color: var(--ib-primary); background: #fff; }
.otp-sent-to { text-align: center; font-size: 15px; color: var(--ib-muted); margin-bottom: 22px; }
.otp-sent-to b { color: var(--ib-ink); }
.timer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13.5px; color: var(--ib-muted); gap: 10px; flex-wrap: wrap; }
.amount-lock { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-radius: 18px; border: 1.5px dashed var(--ib-lavender); margin-bottom: 22px; }
.amount-lock span { font-size: 14px; font-weight: 700; color: var(--ib-muted); display: flex; gap: 8px; align-items: center; }
.amount-lock b { font-size: 26px; font-weight: 900; color: var(--ib-primary); }

/* الاستلام */
.deliver { text-align: center; }
.deliver-icon { position: relative; width: 92px; height: 92px; margin: 4px auto 18px; display: grid; place-items: center; color: #fff; }
.deliver-icon::before { content: ''; position: absolute; inset: 0; border-radius: 30px; background: linear-gradient(135deg, var(--ib-success), #0a7a4f); transform: rotate(18deg);
    box-shadow: 0 18px 34px -16px rgba(15, 157, 107, .9); animation: pop .6s cubic-bezier(.2,.9,.3,1.4) both; }
.deliver-icon svg { position: relative; animation: pop .6s .15s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes pop { from { transform: scale(.4) rotate(0); opacity: 0; } to { opacity: 1; } }
.deliver h2 { font-size: clamp(24px, 3.2vw, 30px); font-weight: 900; }
.deliver > p { color: var(--ib-muted); font-size: 15.5px; margin-top: 6px; }
.code-ticket { position: relative; margin: 26px 0 22px; border-radius: 24px; background: var(--ib-ink); color: #fff; padding: 26px 24px; overflow: hidden; text-align: center; }
.code-ticket::before, .code-ticket::after { content: ''; position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--ib-surface); transform: translateY(-50%); }
.code-ticket::before { right: -13px; } .code-ticket::after { left: -13px; }
.code-ticket .sq-a { position: absolute; width: 90px; height: 90px; border-radius: 22px; transform: rotate(18deg); inset-inline-end: -30px; bottom: -40px; background: linear-gradient(135deg, var(--ib-primary), var(--ib-magenta)); opacity: .8; }
.code-ticket .sq-b { position: absolute; width: 26px; height: 26px; border-radius: 7px; transform: rotate(18deg); inset-inline-start: 34px; top: 22px; background: var(--ib-orange); }
.code-ticket small { position: relative; font-size: 13px; color: rgba(255,255,255,.7); font-weight: 700; }
.code-value { position: relative; font-size: clamp(22px, 5vw, 34px); font-weight: 700; letter-spacing: .08em; direction: ltr; margin: 8px 0 16px; word-break: break-all; }
.copy-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--ib-orange); color: var(--ib-ink); padding: 10px 20px; border-radius: 13px; font-weight: 800; font-size: 14.5px; transition: transform .2s; }
.copy-btn:hover { transform: translateY(-2px); }
.deliver-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deliver-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; text-align: start; }
.deliver-meta div { background: var(--ib-surface-2); border: 1px solid var(--ib-border); border-radius: 16px; padding: 13px 14px; }
.deliver-meta small { display: block; font-size: 12px; color: var(--ib-muted); font-weight: 700; }
.deliver-meta b { font-size: 14px; }
.deliver-note { display: flex; gap: 10px; align-items: flex-start; text-align: start; margin-top: 18px; padding: 14px 16px; border-radius: 15px; background: var(--ib-warning-bg); color: #8a5510; font-size: 14px; font-weight: 600; }
.deliver-note svg { flex-shrink: 0; margin-top: 2px; }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-state h2 { font-size: 24px; font-weight: 900; margin: 14px 0 6px; }
.empty-state p { color: var(--ib-muted); margin-bottom: 22px; }

/* ============================ Responsive ============================ */
@media (max-width: 1020px) {
    .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 18px; }
    .plan.featured, .plan.featured:hover, .plan.featured.sold-out { transform: none; }
    .plan.featured { order: -1; }
    .pay-page { padding-top: 26px; }
    .pay-head { margin-bottom: 30px; }
    .wizard { grid-template-columns: 1fr; }
    .summary-card { position: static; order: -1; }
    .summary-card .summary-body { display: none; }
    .summary-card.open .summary-body { display: block; }
    .summary-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; margin-top: 12px; }
    .summary-hero { border-radius: 24px; }
    .summary-card.open .summary-hero { border-radius: 24px 24px 0 0; }
}
@media (max-width: 760px) {
    .topbar .container { height: 64px; }
    .topbar-logo img { height: 34px; }
    .topbar-help span, .secure-badge span { display: none; }
    .section { padding: 60px 0; }
    .site-footer .container { flex-direction: column; text-align: center; }

    .stepper { padding: 14px 6px; border-radius: 18px; }
    .stepper-dot { width: 36px; height: 36px; border-radius: 11px; }
    .stepper-dot svg { width: 17px; height: 17px; }
    .stepper-item:not(:last-child)::after { top: 17px; inset-inline-start: calc(50% + 22px); inset-inline-end: calc(-50% + 22px); }
    .stepper-label { font-size: 11px; }
    .stepper-label small { display: none; }
    .panel-head { padding: 20px 18px 0; }
    .panel-head .ico { width: 44px; height: 44px; }
    .panel-head h2 { font-size: 19px; }
    .panel-body { padding: 20px 18px 22px; }
    .panel-foot { padding: 16px 18px; }
    .panel-foot .btn { flex: 1; }
    .form-grid { grid-template-columns: 1fr; }
    .otp-boxes { gap: 7px; }
    .otp-boxes input { width: 46px; height: 58px; font-size: 24px; }
    .deliver-actions, .deliver-meta { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .stepper-label { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

.plan-fee { font-size: 12px; font-weight: 700; color: var(--ib-muted); margin-top: 2px; }
.plan.featured .plan-fee { color: rgba(255,255,255,.65); }

/* ملاحظة عمولة جوال باي (عندما يتحمّلها الزبون) */
.fee-note { display: flex; gap: 12px; align-items: flex-start; margin: -8px 0 22px; padding: 14px 16px; border-radius: 16px;
    background: var(--ib-warning-bg); border: 1px solid rgba(217, 138, 23, .28); color: #6b4410; animation: noticeIn .55s var(--ease) both; }
.fee-note-ico { width: 34px; height: 34px; border-radius: 11px; background: var(--ib-orange); color: var(--ib-ink); display: grid; place-items: center; flex-shrink: 0; }
.fee-note p { font-size: 14px; font-weight: 600; line-height: 1.85; }
.fee-note b { color: var(--ib-ink); }
.summary-fee { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--ib-orange-dark); text-align: center; }
.chip.is-locked span { opacity: .45; cursor: not-allowed; }
.chip.is-locked span:hover { border-color: var(--ib-border); }

/* ===== كوبون الخصم في صفحة الدفع ===== */
.coupon-box { margin: 12px 0 4px; }
.coupon-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--ib-primary);
    padding: 10px 14px; border-radius: 13px; border: 1.5px dashed var(--ib-lavender); background: var(--ib-surface); width: 100%; }
.coupon-toggle:hover { border-color: var(--ib-primary); background: var(--ib-lavender-soft); }
.coupon-box .coupon-fields { display: none; gap: 10px; margin-top: 2px; }
.coupon-box.open .coupon-toggle { display: none; }
.coupon-box.open .coupon-fields { display: flex; }
.coupon-fields .input { flex: 1; min-width: 0; text-align: center; letter-spacing: .06em; }
.coupon-fields .btn { white-space: nowrap; padding: 14px 20px; }
.amount-lock.discount-row b { color: var(--ib-success); }
.amount-lock.total-row { border-style: solid; border-color: var(--ib-primary); }
.coupon-remove { margin: 8px 0 2px; font-size: 13px; color: var(--ib-danger); }
