/* «الشحن السريع» — dark exchange look: black page, graphite panels, one bright action per screen.
   The accent follows the currency: blue for the Yemeni rial, green for the dollar. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #1c1c1e;
  --panel-2: #242428;
  --panel-3: #2e2e33;
  --line: #343438;
  --text: #f5f7fa;
  --muted: #96969f;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(59, 130, 246, .14);
  --accent-glow: rgba(59, 130, 246, .30);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, .13);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .12);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, .13);
  --step: #22c55e;
  --r-chip: 10px;
  --r-field: 14px;
  --r-card: 20px;
  --r-hero: 28px;
  --font: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
}

:root[data-currency="usd"] {
  --accent: #22c55e;
  --accent-strong: #16a34a;
  --accent-ink: #04210f;
  --accent-soft: rgba(34, 197, 94, .14);
  --accent-glow: rgba(34, 197, 94, .26);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 var(--font);
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-touch-callout: none; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app { position: relative; z-index: 1; width: 100%; }

.network-banner {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  padding: 6px 12px;
  background: #7f1d1d;
  color: #fff;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.network-banner:not([hidden]) + .app .topbar { top: 33px; }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 600px);
  min-height: 62px;
  margin: 0 auto;
  padding: 8px 16px;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.brand-mark { border-radius: 9px; }
.page.centered .brand-mark { margin-bottom: 14px; border-radius: 16px; }
.page.centered .page-title { margin-top: 18px; font-size: 1.3rem; }

.back-button,
.currency-chip,
.icon-button,
.text-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 600;
}
.back-button { padding: 0 16px; }
.back-button::before { content: "›"; margin-left: 6px; font-size: 1.2em; }

.currency-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--text);
}
.currency-chip::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  content: "";
}

/* ---------------------------------------------------------------- page */
.page {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 18px 16px calc(120px + env(safe-area-inset-bottom));
}
.page.centered {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  padding-bottom: 40px;
}

.page-title {
  margin: 6px 0 6px;
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 300;
}
.page-lead { margin: 0 0 20px; color: var(--muted); }

.hero { padding: 26px 2px 22px; }
.hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 11vw, 2.9rem);
  line-height: 1.12;
  font-weight: 300;
  text-shadow: 0 0 34px var(--accent-glow);
}
.hero-lead { margin: 12px 0 0; color: var(--muted); font-size: 1rem; }

/* ---------------------------------------------------------------- stepper */
.stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps), 1fr);
  margin: 4px 0 22px;
  padding: 0;
  list-style: none;
}
.stepper::before,
.stepper::after {
  position: absolute;
  top: 12px;
  right: calc(50% / var(--steps));
  height: 2px;
  border-radius: 2px;
  content: "";
}
.stepper::before { left: calc(50% / var(--steps)); background: var(--line); }
.stepper::after {
  width: calc((100% - 100% / var(--steps)) * var(--at) / (var(--steps) - 1));
  background: var(--step);
  box-shadow: 0 0 10px rgba(34, 197, 94, .6);
}
.stepper-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
}
.stepper-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  font-size: .78rem;
  font-weight: 700;
}
.stepper-item.done .stepper-dot { border-color: var(--step); background: var(--step); color: #03150a; }
.stepper-item.current { color: var(--text); }
.stepper-item.current .stepper-dot {
  border-color: var(--step);
  color: var(--step);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
}

.progress-label { margin: 0 0 6px; color: var(--muted); font-size: .85rem; }
.progress-track { height: 3px; margin-bottom: 20px; border-radius: 3px; background: var(--line); }
.progress-fill { height: 100%; border-radius: 3px; background: var(--step); }

/* ---------------------------------------------------------------- panels */
.card {
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
}
.card.flat { background: var(--panel-2); }
.card-title { margin: 0 0 6px; font-weight: 700; }
.card p { margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }

.status-card {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(160deg, var(--accent-soft), var(--panel) 55%);
}
.status-card .amount-line { margin: 2px 0 10px; font-size: 1.6rem; font-weight: 300; }
.status-card .secondary-button { width: 100%; margin-top: 12px; }

.banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--panel);
  color: var(--text);
  font-size: .94rem;
}
.banner.error { border-color: rgba(251, 113, 133, .4); background: var(--danger-soft); color: #fecdd3; }
.banner.success { border-color: rgba(52, 211, 153, .4); background: var(--success-soft); color: #a7f3d0; }

.demo-code {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-weight: 600;
}

/* ---------------------------------------------------------------- home */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 12px;
}
.tile-wrap { display: flex; flex-direction: column; }

.primary-tile,
.currency-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  min-height: 168px;
  padding: 18px;
  border: 0;
  border-radius: var(--r-hero);
  background: var(--accent);
  color: var(--accent-ink);
  text-align: right;
  box-shadow: 0 14px 40px -12px var(--accent-glow);
  transition: transform .15s ease;
}
.primary-tile:active, .currency-choice:active, .main-button:active { transform: scale(.98); }
.primary-tile.withdraw {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}
.tile-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}
.primary-tile.withdraw .tile-icon { background: var(--accent-soft); color: var(--accent); }
.tile-icon svg, .xswap svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile-name { margin-top: 16px; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.tile-sub { font-size: .8rem; opacity: .78; font-weight: 500; }
.primary-tile:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }
.disabled-note { margin: 8px 4px 0; color: var(--muted); font-size: .82rem; }

.currency-choice {
  min-height: 130px;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.secondary-button {
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--panel);
  font-weight: 600;
}

.link-button,
.inline-link,
.small-link {
  display: inline-block;
  min-height: 40px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.inline-link { margin-left: 14px; }
.inline-link:disabled { color: var(--muted); }
.small-link.danger { color: var(--danger); font-size: .88rem; }
.link-button {
  display: block;
  margin: 10px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--panel);
  text-align: center;
}

.topbar-tools { display: flex; align-items: center; gap: 8px; }
.help-button { display: grid; place-items: center; width: 42px; padding: 0; color: var(--accent); }
.help-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- forms */
.field { margin: 0 0 18px; }
.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.input,
.textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--panel-2);
  color: var(--text);
  font-size: 1.1rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: #5f5f68; }
.xinput.input::placeholder { font-size: 1.1rem; }
.input:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input.invalid, .textarea.invalid { border-color: var(--danger); }
.textarea { min-height: 130px; resize: vertical; font-size: 1rem; line-height: 1.6; }
.helper, .field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: .82rem; }
.field-error { margin: 6px 2px 0; color: var(--danger); font-size: .86rem; font-weight: 600; }
.field-error:empty { margin: 0; }

/* exchange widget: what you send, where it lands */
.xcard {
  position: relative;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
  background: var(--panel);
}
.xpanel {
  padding: 12px 14px 14px;
  border-radius: var(--r-card);
  background: var(--panel-2);
}
.xlabel { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.xrow { display: flex; align-items: center; gap: 10px; }
.xinput.input {
  flex: 1 1 auto;
  text-align: right;
  width: auto;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  font-weight: 300;
  box-shadow: none;
}
.xinput.input:focus { box-shadow: none; }
.xinput.input.invalid { color: var(--danger); }
.xpanel:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
.xcur {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--panel-3);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.xcur::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}
.xswap {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -12px auto;
  border: 4px solid var(--panel);
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--accent);
}
.xswap svg { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 4px 2px; }
.chip {
  padding: 5px 10px;
  border-radius: var(--r-chip);
  background: var(--panel-2);
  color: var(--muted);
  font-size: .78rem;
}
.chip b { color: var(--text); font-weight: 600; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--panel);
  cursor: pointer;
  font-weight: 600;
  transition: border-color .15s ease, background .15s ease;
}
.choice-card::after {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid var(--line);
  border-radius: 50%;
  content: "";
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { display: flex; flex-direction: column; }
.choice-card small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.choice-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-card.selected::after { border: 5px solid var(--accent); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-card.unavailable { opacity: .4; cursor: not-allowed; }

/* bottom action */
.action-bar {
  position: fixed;
  z-index: 25;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #000 62%, rgba(0, 0, 0, 0));
}
.main-button {
  display: block;
  width: min(100%, 568px);
  min-height: 58px;
  margin: 0 auto;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.08rem;
  font-weight: 700;
  box-shadow: 0 12px 34px -10px var(--accent-glow);
  transition: transform .15s ease, background .15s ease;
}
.main-button:hover { background: var(--accent-strong); }
.main-button:disabled { background: var(--panel-3); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.main-button.danger { background: var(--danger); color: #2a0610; }

/* ---------------------------------------------------------------- deposit */
.account-confirmed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: .88rem;
  font-weight: 600;
}
.instruction-label { display: block; color: var(--muted); font-size: .82rem; }
.transfer-amount {
  margin: 2px 0 10px;
  font-size: clamp(2rem, 9vw, 2.5rem);
  font-weight: 300;
  line-height: 1.2;
}
.instruction-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  margin-top: 14px;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line);
}
.instruction-row .instruction-label { grid-column: 1 / -1; }
.wallet-number { font-size: 1.45rem; font-weight: 600; letter-spacing: .04em; direction: ltr; text-align: right; }
.copy-row { display: flex; gap: 8px; }
.copy-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .88rem;
  font-weight: 600;
}
.fixed-rate { border-style: dashed; }
.fixed-rate p { font-size: .92rem; }

.file-label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 18px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: var(--r-card);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  text-align: center;
}
.file-label::before { content: "+"; display: block; font-size: 2rem; font-weight: 300; line-height: 1; }
.file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview-image {
  display: block;
  width: 100%;
  max-height: 340px;
  margin: 12px 0 0;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel-2);
}

/* ---------------------------------------------------------------- summary */
.summary-list { margin: 0; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.summary-row:last-child { border-bottom: 0; }
.summary-row dt { color: var(--muted); }
.summary-row dd { margin: 0; font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.net-amount { font-size: 2.2rem; font-weight: 300; color: var(--accent); }
.warning-line {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--r-field);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: .9rem;
}

/* ---------------------------------------------------------------- tracking */
.request-number {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}
.stage-hero { padding: 26px 18px; border-radius: var(--r-hero); text-align: center; }
.status-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
}
.stage-title { margin: 0 0 6px; font-size: 1.45rem; font-weight: 600; }
.stage-hero p { color: var(--muted); }
.status-pending .status-symbol::after {
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
  animation: pulse 1.8s ease-out infinite;
}
.status-pending .status-symbol:empty::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}
.status-done .status-symbol { background: var(--success-soft); color: var(--success); }
.status-rejected .status-symbol { background: var(--danger-soft); color: var(--danger); }
@keyframes pulse {
  0% { opacity: .9; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.35); }
}

.timeline { margin: 0; padding: 4px 0 0; list-style: none; }
.timeline-item { position: relative; padding: 0 34px 20px 0; color: var(--muted); }
.timeline-item::before {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}
.timeline-item::after {
  position: absolute;
  top: 22px;
  right: 10px;
  bottom: 2px;
  width: 2px;
  background: var(--line);
  content: "";
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::after { display: none; }
.timeline-item.done { color: var(--text); }
.timeline-item.done::before { border-color: var(--step); background: var(--step); }
.timeline-item.done::after { background: var(--step); box-shadow: 0 0 8px rgba(34, 197, 94, .5); }
.timeline-item.current { color: var(--text); font-weight: 700; }
.timeline-item.current::before { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-item.checking { color: var(--warning); }
.timeline-item.checking::before { border-color: var(--warning); }

/* ---------------------------------------------------------------- my requests */
.request-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.request-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--panel);
  text-align: right;
}
.request-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.request-card-main { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 2px; }
.request-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.request-card-amount { font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.request-date { color: var(--muted); font-size: .8rem; }
.request-detail { color: var(--muted); font-size: .86rem; }
.stage-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
}
.stage-badge.done { background: var(--success-soft); color: var(--success); }
.stage-badge.rejected { background: var(--danger-soft); color: var(--danger); }

.empty-state { padding: 36px 16px; color: var(--muted); text-align: center; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 1.6rem;
}

/* ---------------------------------------------------------------- support */
.support-thread { display: grid; gap: 10px; }
.support-msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; }
.support-msg.from-me { justify-self: start; background: var(--panel-3); border-bottom-right-radius: 6px; }
.support-msg.from-us { justify-self: end; background: var(--success-soft); border-bottom-left-radius: 6px; }
.support-who { margin-bottom: 2px; color: var(--muted); font-size: .76rem; }
.support-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- overlays */
.install-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--panel);
  font-size: .9rem;
}
.install-hint button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.install-hint .dismiss-install { width: 40px; padding: 0; background: transparent; color: var(--muted); }

.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  width: min(100%, 520px);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
  background: var(--panel);
}
.modal img { display: block; max-width: 100%; max-height: 60vh; margin: 12px auto; border-radius: 14px; }
.modal-close {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  transform: translateX(50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--text);
  font-weight: 600;
}

.loading { padding: 60px 18px; color: var(--muted); text-align: center; }
.loading::before {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 12px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  content: "";
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.noscript { margin: 30px auto; padding: 16px; text-align: center; }

@media (max-width: 370px) {
  .page { padding-right: 12px; padding-left: 12px; }
  .primary-tile { min-height: 150px; padding: 14px; }
  .tile-name { font-size: 1.3rem; }
  .page-title { font-size: 1.6rem; }
}

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


/* ================================================================ storm & bolt theme
   The animated background (fx.js) sits behind everything; panels are dark glass over it.
   Titles and buttons use Lalezar, cut at an angle like the lightning logos. */
:root {
  --accent: #0ea5ff;
  --accent-strong: #38bdff;
  --accent-ink: #00131f;
  --accent-soft: rgba(14, 165, 255, .14);
  --accent-glow: rgba(14, 165, 255, .45);
  --panel: rgba(16, 18, 23, .86);
  --panel-2: rgba(28, 31, 38, .9);
  --panel-3: #2a2e36;
  --line: rgba(255, 255, 255, .09);
  --display: Lalezar, "IBM Plex Sans Arabic", system-ui, sans-serif;
  --cut: 14px;
}
:root[data-currency="usd"] {
  --accent: #00f5a0;
  --accent-strong: #5dffc4;
  --accent-ink: #00170e;
  --accent-soft: rgba(0, 245, 160, .13);
  --accent-glow: rgba(0, 245, 160, .4);
}
body { background: transparent; }
.fx-canvas { position: fixed; z-index: 0; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
.topbar { background: linear-gradient(to bottom, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); backdrop-filter: none; -webkit-backdrop-filter: none; }

.brand, .hero-title, .page-title, .tile-name, .stage-title, .main-button, .secondary-button,
.currency-choice span, .card-title {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
}
.brand { font-size: 1.35rem; }
.brand-mark { width: 34px; height: auto; border-radius: 0; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.hero { padding: 34px 2px 26px; }
.hero-title { font-size: clamp(2.7rem, 13vw, 3.4rem); line-height: 1.05; text-shadow: 0 0 28px var(--accent-glow), 0 2px 0 #000; }
.hero-lead { color: #c7cfd8; }
.page-title { font-size: 2rem; text-shadow: 0 2px 0 #000; }

/* angled cuts */
.main-button, .secondary-button, .primary-tile, .currency-choice, .copy-button, .chip, .xcur,
.stage-badge, .request-number, .account-confirmed, .back-button, .currency-chip, .help-button {
  border-radius: 4px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.copy-button, .chip, .xcur, .stage-badge, .request-number, .account-confirmed, .back-button, .currency-chip, .help-button { --cut: 8px; }

.main-button {
  position: relative;
  isolation: isolate;
  min-height: 60px;
  border-radius: 0;
  background: linear-gradient(100deg, var(--accent), var(--accent-strong));
  color: var(--accent-ink);
  font-size: 1.45rem;
  box-shadow: none;
  filter: drop-shadow(0 8px 22px var(--accent-glow));
}
.main-button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  background-size: 250% 100%;
  z-index: -1;
  content: "";
  animation: sheen 3.2s ease-in-out infinite;
}
@keyframes sheen { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }
.main-button:disabled { filter: none; }
.main-button:disabled::after { display: none; }

.secondary-button {
  min-height: 56px;
  border: 0;
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 1.2rem;
}

.primary-tile {
  min-height: 176px;
  border-radius: 0;
  --cut: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .28), transparent 45%),
    linear-gradient(160deg, var(--accent-strong), var(--accent));
  box-shadow: none;
  filter: drop-shadow(0 12px 26px var(--accent-glow));
}
.primary-tile.withdraw {
  border: 0;
  background:
    linear-gradient(160deg, var(--accent-soft), transparent 60%),
    var(--panel);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent);
  filter: none;
}
.tile-icon { border-radius: 0; clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); width: 48px; }
.tile-name { font-size: 2rem; }

.card, .xcard, .choice-card, .request-card, .install-hint, .modal {
  background: var(--panel);
  border-color: var(--line);
}
.xpanel { background: var(--panel-2); }
.status-card { background: linear-gradient(160deg, var(--accent-soft), var(--panel) 55%); }

/* currency choice with the lightning logos */
.currency-grid { gap: 14px; }
.currency-choice {
  --cut: 22px;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  padding: 16px 10px;
  border: 0;
  border-radius: 0;
  background: var(--panel) !important;
  color: var(--text) !important;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.currency-choice img { width: 76%; height: auto; transition: transform .25s ease; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6)); }
.currency-choice span { font-size: 1.3rem; }
.currency-choice[data-c="yer"]:hover, .currency-choice[data-c="yer"]:focus-visible { box-shadow: inset 0 0 0 2px #0ea5ff, 0 0 40px -8px #0ea5ff; }
.currency-choice[data-c="usd"]:hover, .currency-choice[data-c="usd"]:focus-visible { box-shadow: inset 0 0 0 2px #00f5a0, 0 0 40px -8px #00f5a0; }
.currency-choice:hover img, .currency-choice:focus-visible img { transform: scale(1.06) rotate(-3deg); }
.page.centered { justify-content: flex-end; padding-bottom: 48px; }

.stepper-item.done .stepper-dot, .stepper-item.current .stepper-dot { border-color: var(--accent); }
.stepper-item.done .stepper-dot { background: var(--accent); color: var(--accent-ink); }
.stepper-item.current .stepper-dot { color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.stepper::after { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }

.action-bar { background: linear-gradient(to top, rgba(0, 0, 0, .92) 60%, rgba(0, 0, 0, 0)); }
@media (prefers-reduced-motion: reduce) { .main-button::after { display: none; } }

/* each wallet lights up in its own official colour when chosen (Kuraimi keeps the currency colour).
   Colours from the wallets' own site or app icon, 21 Nov 2026. A wallet not listed keeps the currency colour. */
.choice-card[data-wallet] { --wc: var(--accent); --wc-soft: var(--accent-soft); }
.choice-card[data-wallet="jaib"] { --wc: #e4122c; --wc-soft: rgba(228, 18, 44, .16); }
.choice-card[data-wallet="qutaibi"],
.choice-card[data-wallet="shilin"] { --wc: #c1dd6c; --wc-soft: rgba(193, 221, 108, .14); }
.choice-card[data-wallet="jawali"] { --wc: #f7921e; --wc-soft: rgba(247, 146, 30, .15); }
.choice-card[data-wallet="onecash"] { --wc: #eb8346; --wc-soft: rgba(235, 131, 70, .15); }
.choice-card[data-wallet].selected {
  border-color: var(--wc);
  background: linear-gradient(160deg, var(--wc-soft), var(--panel) 80%);
  box-shadow: 0 0 0 1px var(--wc), 0 0 26px var(--wc-soft);
}
.choice-card[data-wallet].selected::after { border-color: var(--wc); }
.choice-card[data-wallet]:has(input:focus-visible) { outline-color: var(--wc); }
.choice-card[data-wallet] { transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }

/* the wallet's own logo instead of the round mark */
.choice-card.has-logo { padding-left: 70px; min-height: 70px; }
.choice-card.has-logo::after { display: none; }
.wallet-logo {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 12px;
  object-fit: cover;
  filter: grayscale(.55) brightness(.75);
  opacity: .8;
  transition: filter .2s ease, opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.choice-card.selected .wallet-logo {
  filter: none;
  opacity: 1;
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--wc), 0 6px 22px var(--wc-soft);
}
.choice-card.has-logo.selected::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 46px;
  width: 18px;
  height: 18px;
  margin-top: 8px;
  border: 2px solid #0b0d12;
  border-radius: 50%;
  background: var(--wc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
  content: "";
}
.choice-card.unavailable .wallet-logo { filter: grayscale(1); }

/* ون كاش / شلن: a link to our agent under the wallets */
.staff-card { margin-top: -6px; margin-bottom: 18px; color: inherit; text-decoration: none; border-style: dashed; }
.staff-card .wallet-logo { filter: none; opacity: 1; }
.staff-card:hover, .staff-card:focus-visible { border-color: var(--wc); border-style: solid; outline: none; }
.staff-go { width: 18px; height: 18px; margin-right: auto; fill: none; stroke: var(--wc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.staff-card::after { display: none; }

/* the main button sits right under the last choice and floats at the bottom only when the page is longer
   than the screen (owner, 21 Nov 2026) */
.page { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.action-bar {
  position: sticky;
  right: auto;
  left: auto;
  bottom: 0;
  margin: 10px -16px 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 55%, rgba(0, 0, 0, 0));
}
@media (max-width: 380px) { .action-bar { margin-right: -12px; margin-left: -12px; padding-right: 12px; padding-left: 12px; } }

/* «اشحن مثل آخر مرة» and the ready amounts (21 Nov 2026) */
.repeat-card { width: 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; text-align: right; font: inherit; color: inherit; cursor: pointer; border-color: var(--wc); background: linear-gradient(90deg, var(--wc-soft), var(--panel) 70%); }
.repeat-card::after, .repeat-card::before { display: none; }
.repeat-card.has-logo { padding-left: 14px; min-height: 72px; }
.repeat-card .wallet-logo { position: static; flex: none; margin: 0; filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--wc); }
.repeat-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.repeat-text b { font-size: 1.15rem; }
.repeat-text small { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 4px 0; }
.quick-amount { min-height: 40px; padding: 0 4px; border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.quick-amount.selected { border-color: var(--accent); background: var(--accent-soft); }
.repeat-again { width: 100%; margin: 0 0 12px; }

/* saved accounts and «ليس حسابك؟» (stage 2, 21 Nov 2026) */
.not-mine { display: block; margin: -6px auto 16px; padding: 6px 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.saved-accounts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.saved-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--panel-2); overflow: hidden; }
.saved-chip.selected { border-color: var(--accent); background: var(--accent-soft); }
.saved-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 12px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: right; }
.saved-pick b { font-size: .88rem; }
.saved-pick bdi { color: var(--muted); font-size: .78rem; }
.saved-forget { min-width: 34px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.save-offer .save-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.save-offer .save-custom { display: flex; gap: 8px; margin-top: 8px; }
.save-offer .save-custom .input { flex: 1; min-width: 0; }
.save-offer .save-custom .secondary-button { min-height: 48px; padding: 0 18px; }
.saved-done { margin: 0; font-weight: 600; }
