:root {
  --ink: #1b1340;
  --ink-2: #4b4470;
  --muted: #8a84a8;
  --bg: #f4f2ff;
  --card: #ffffff;
  --line: #ebe7fb;
  --p1: #7c3aed;
  --p2: #ec4899;
  --grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #ec4899 100%);
  --amber: #f59e0b;
  --ok: #10b981;
  --ok-soft: #e7f8f1;
  --warn: #d97706;
  --warn-soft: #fff4e0;
  --err: #e11d48;
  --err-soft: #ffe8ee;
  --soft: #efeaff;
  --shadow: 0 10px 30px -12px rgba(76, 29, 149, .25);
  --r: 20px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Cairo", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55; font-size: 15px;
  min-height: 100vh; overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; }
.hidden { display: none !important; }

/* ===== الأزرار والحقول ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 16px; font-weight: 700; font-size: 16px;
  background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(192, 38, 211, .7);
  transition: transform .12s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.block { width: 100%; }
.btn.light { background: rgba(255,255,255,.2); box-shadow: none; backdrop-filter: blur(6px); }
.btn.white { background: #fff; color: var(--p1); box-shadow: none; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input {
  width: 100%; height: 54px; border-radius: 16px; border: 2px solid var(--line); background: #fff;
  padding: 0 16px; font-size: 17px; outline: none; transition: border-color .15s;
}
textarea.input { height: auto; padding: 12px 16px; font-size: 15px; resize: none; }
.input:focus { border-color: var(--p1); }
.input.ltr { direction: ltr; text-align: left; font-weight: 700; letter-spacing: .5px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.alert { border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin-top: 14px; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.info { background: var(--soft); color: var(--p1); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

/* ===== صفحة الترحيب ===== */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.hero {
  position: relative; overflow: hidden; background: var(--grad); color: #fff;
  padding: 22px 20px 90px; border-radius: 0 0 36px 36px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12);
}
.hero::before { width: 320px; height: 320px; top: -140px; left: -110px; }
.hero::after { width: 220px; height: 220px; bottom: -90px; right: -60px; background: rgba(245,158,11,.25); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; position: relative; z-index: 1; }
.brand .coin {
  width: 38px; height: 38px; border-radius: 12px; background: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
}
.hero-inner { position: relative; z-index: 1; max-width: 560px; margin: 36px auto 0; text-align: center; }
.hero h1 { font-size: 30px; line-height: 1.35; margin: 0; font-weight: 800; }
.hero h1 span { color: #fde68a; }
.hero p { opacity: .9; margin: 12px 0 0; font-size: 16px; }
.login-box { margin: 26px auto 0; background: #fff; border-radius: 22px; padding: 18px; max-width: 360px; color: var(--ink); box-shadow: var(--shadow); }
.login-box .t { font-weight: 700; margin-bottom: 12px; }
#gbtn { display: flex; justify-content: center; min-height: 44px; }
.login-box .small { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.marquee { margin-top: -54px; position: relative; z-index: 2; overflow: hidden; padding: 8px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: slide 40s linear infinite; }
.marquee img { width: 72px; height: 72px; border-radius: 20px; box-shadow: var(--shadow); background: #fff; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(50%); } }

.section { max-width: 560px; margin: 0 auto; padding: 26px 20px 0; width: 100%; }
.section h2 { font-size: 20px; margin: 0 0 14px; font-weight: 800; }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.step .n { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; }
.step b { display: block; font-size: 16px; }
.step span { color: var(--muted); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-size: 13.5px; font-weight: 600; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 34px 20px 28px; }

/* ===== التطبيق ===== */
.app { max-width: 480px; margin: 0 auto; padding: 0 16px 110px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 2px 14px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar .who { flex: 1; min-width: 0; }
.topbar .who small { color: var(--muted); display: block; font-size: 12.5px; }
.topbar .who b { font-size: 16px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--shadow); }

.balance-card {
  position: relative; overflow: hidden; background: var(--grad); color: #fff; border-radius: 26px; padding: 22px;
  box-shadow: 0 18px 40px -16px rgba(192, 38, 211, .75);
}
.balance-card::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.12); top: -80px; left: -60px; }
.balance-card .lbl { opacity: .85; font-size: 14px; }
.balance-card .amt { font-size: 40px; font-weight: 800; direction: ltr; text-align: right; line-height: 1.2; margin: 4px 0 16px; }
.balance-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.balance-card .btn { height: 46px; font-size: 15px; }

.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 24px 2px 12px; }
.sec-title h3 { margin: 0; font-size: 17px; font-weight: 800; }
.sec-title small { color: var(--muted); }

.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.app-tile .ic { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; font-weight: 800; color: var(--p1); }
.app-tile .ic img { width: 100%; height: 100%; object-fit: cover; }
.app-tile span { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.app-tile.sel .ic { outline: 3px solid var(--p1); outline-offset: 2px; }

.card { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.page-title { font-size: 22px; font-weight: 800; margin: 18px 2px 4px; }
.page-sub { color: var(--muted); margin: 0 2px 16px; font-size: 14px; }

.picker { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.picker::-webkit-scrollbar { display: none; }
.picker .app-tile { flex: 0 0 70px; }
.picker .app-tile .ic { width: 56px; height: 56px; border-radius: 16px; }

.selected-app { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 16px; padding: 12px; margin-top: 6px; }
.selected-app img, .selected-app .ph { width: 46px; height: 46px; border-radius: 14px; }
.selected-app b { display: block; }
.selected-app small { color: var(--ink-2); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 2px dashed #d9cffb; border-radius: 14px; padding: 8px 8px 8px 14px; margin-top: 10px; }
.copy-row code { font-family: inherit; font-size: 20px; font-weight: 800; direction: ltr; letter-spacing: .5px; }
.copy-btn { background: var(--p1); color: #fff; font-weight: 700; border-radius: 10px; padding: 8px 14px; font-size: 14px; }

.methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.method { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px; text-align: right; font-weight: 700; font-size: 14px; }
.mi { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; overflow: hidden; }
.mi.logo { background: #fff; border: 1px solid var(--line); padding: 5px; }
.mi.logo img { width: 100%; height: 100%; object-fit: contain; }
.mi.logo.full { padding: 0; border: 0; }
.mi.logo.full img { object-fit: cover; }
.mi.logo.crop img { object-fit: cover; object-position: left center; }
.mi.logo.zoom img { transform: scale(1.45); transform-origin: 50% 45%; }  /* سيريتل: الصورة فيها زخرفة، منكبّر على مربع اللوغو */
.method { min-height: 68px; }
.chips.pay .chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; }
.chips.pay .mi { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; font-size: 10px; }
.chips.pay .mi.logo { padding: 3px; }
.method.sel { border-color: var(--p1); background: var(--soft); }
.amount-chips { display: flex; gap: 8px; margin-top: 8px; }
.amount-chips button { background: var(--soft); color: var(--p1); font-weight: 700; border-radius: 99px; padding: 4px 14px; font-size: 13px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 16px; padding: 5px; box-shadow: var(--shadow); margin-bottom: 14px; }
.seg button { height: 42px; border-radius: 12px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--grad); color: #fff; }
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.item .mi { flex: 0 0 46px; width: 46px; height: 46px; }
.item .ic { flex: 0 0 46px; height: 46px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.item .ic img { width: 100%; height: 100%; object-fit: cover; }
.item .mid { flex: 1; min-width: 0; }
.item .mid b { display: block; font-size: 15px; }
.item .mid small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .end { text-align: left; }
.item .end b { display: block; direction: ltr; font-size: 16px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--soft); color: var(--p1); }
.pill.ok, .pill.paid { background: var(--ok-soft); color: var(--ok); }
.pill.pending, .pill.review { background: var(--warn-soft); color: var(--warn); }
.pill.rejected, .pill.failed, .pill.error { background: var(--err-soft); color: var(--err); }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.empty .big { font-size: 40px; }

/* الشريط السفلي */
.tabbar {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px;
  background: #fff; border-radius: 24px; box-shadow: 0 14px 40px -12px rgba(27, 19, 64, .35);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; z-index: 20;
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 16px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--p1); background: var(--soft); }

/* نافذة سفلية */
.sheet-bg { position: fixed; inset: 0; background: rgba(27, 19, 64, .45); z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 480px; z-index: 31;
  background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 18px 26px; transition: transform .25s ease; max-height: 88vh; overflow-y: auto;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: #d6d0ee; margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; gap: 14px; }
.sheet-head img, .sheet-head .ph { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow); }
.sheet-head b { font-size: 20px; display: block; }
.badge-rate { display: inline-block; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 12.5px; border-radius: 99px; padding: 2px 10px; }
.how { white-space: pre-wrap; background: #fff; border-radius: 16px; padding: 14px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }

/* نجاح */
.success { text-align: center; padding: 10px 0 4px; }
.success .check { width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; animation: pop .4s ease; }
.success .amt { font-size: 34px; font-weight: 800; color: var(--ok); direction: ltr; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 80% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

.toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -80px); background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 18px; font-weight: 700; z-index: 50; transition: transform .25s; }
.toast.show { transform: translate(-50%, 0); }
.ph { background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }

@media (min-width: 700px) {
  .hero { padding-bottom: 110px; }
  .hero h1 { font-size: 40px; }
}

.conv { margin-top: 10px; background: var(--ok-soft); color: var(--ok); border-radius: 14px; padding: 10px 14px; font-weight: 600; }
.conv b { font-size: 18px; }
.conv small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12px; }

.mgroup + .mgroup { margin-top: 18px; }
.mg-title { font-weight: 800; font-size: 15px; margin: 0 2px 10px; }
.mg-title small { display: block; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.method .mn { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spd { font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 0 8px; width: max-content; }
.spd.instant { background: var(--ok-soft); color: var(--ok); }
.spd.manual { background: var(--warn-soft); color: var(--warn); }
