/* ==========================================================================
   Play Cards storefront v2 — "النيون الحي"
   Deep-space bg + living aurora · electric violet ↔ cyan energy ·
   gold reserved for money · Cairo numerals
   ========================================================================== */

[hidden] { display: none !important; }

:root {
  --bg: #07091a;
  --panel: rgba(22, 26, 54, 0.72);
  --panel-solid: #161a36;
  --panel-2: #1d2246;
  --line: rgba(139, 132, 255, 0.16);
  --line-strong: rgba(139, 132, 255, 0.35);
  --violet: #8b5cff;
  --cyan: #22d3ee;
  --magenta: #e553ff;
  --gold: #ffc247;
  --gold-deep: #ff9d1f;
  --mint: #34e3a1;
  --danger: #ff5d7a;
  --text: #f2f3ff;
  --muted: #9aa0c7;
  --radius: 20px;
  --font-display: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Tajawal", sans-serif;
  --font-num: "Cairo", "IBM Plex Sans Arabic", sans-serif;
  --grad-brand: linear-gradient(120deg, var(--violet), var(--cyan));
  --grad-hot: linear-gradient(120deg, var(--magenta), var(--violet) 55%, var(--cyan));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: 90px;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ---------- living aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; filter: blur(70px) saturate(1.3); }

.aurora i {
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 340px;
  min-height: 340px;
  border-radius: 50%;
  opacity: 0.55;
  animation: drift 26s ease-in-out infinite alternate;
}

.aurora i:nth-child(1) { background: radial-gradient(circle, var(--violet), transparent 65%); top: -14%; inset-inline-start: -8%; }
.aurora i:nth-child(2) { background: radial-gradient(circle, var(--cyan), transparent 65%); top: 24%; inset-inline-end: -14%; animation-delay: -9s; animation-duration: 32s; }
.aurora i:nth-child(3) { background: radial-gradient(circle, var(--magenta), transparent 68%); bottom: -18%; inset-inline-start: 22%; opacity: 0.35; animation-delay: -18s; animation-duration: 38s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vw, 5vh) scale(1.18); }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px clamp(14px, 4vw, 28px);
  background: rgba(7, 9, 26, 0.66);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-hot);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 0 22px rgba(139, 92, 255, 0.55);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-actions { display: flex; align-items: center; gap: 8px; }

/* language menu */
.lang-wrap { position: relative; }

.lang-btn {
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
  padding: 0 12px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 130px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 60;
}

.lang-menu button {
  display: block;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-align: start;
}
.lang-menu button:hover { background: rgba(139, 92, 255, 0.15); }

.wallet-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  border: 1px solid rgba(255, 194, 71, 0.45);
  background: linear-gradient(120deg, rgba(255, 194, 71, 0.16), rgba(255, 157, 31, 0.06));
  color: var(--gold);
  border-radius: 12px;
  padding: 0 6px 0 13px;
  box-shadow: 0 0 18px rgba(255, 194, 71, 0.15);
}

.wallet-pill strong { font-family: var(--font-num); font-size: 14px; direction: ltr; }
.wallet-pill.shake { animation: shake 0.4s ease; }

.wallet-plus {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a1208;
  font-weight: 800;
}

@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(4px)} 75%{transform:translateX(-4px)} }

/* ---------- shell + hero ---------- */
.shell { max-width: 1100px; margin: 0 auto; padding: 8px clamp(14px, 4vw, 28px) 30px; }

.hero { text-align: center; padding: 26px 0 8px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.35;
}

.hero-title em {
  font-style: normal;
  background: var(--grad-hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(139, 92, 255, 0.5));
}

.hero-sub { color: var(--muted); font-size: 13.5px; font-weight: 500; margin-top: 6px; }

.search-wrap { margin: 18px auto 6px; max-width: 620px; position: relative; }

.search-input {
  width: 100%;
  height: 54px;
  border-radius: 17px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 0 20px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2), 0 0 30px rgba(34, 211, 238, 0.15); }

/* ---------- categories ---------- */
.cats-rail { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 14px; scrollbar-width: none; }
.cats-rail::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 17px 8px 10px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cat-chip img, .cat-chip .cat-ph {
  width: 27px; height: 27px; border-radius: 50%; object-fit: cover;
  background: var(--grad-brand);
}

.cat-chip:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.cat-chip.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(93, 118, 255, 0.45);
}

/* ---------- sections ---------- */
.section-row { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 14px; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.section-count { color: var(--muted); font-size: 12px; font-weight: 700; }

.ghost-btn {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 11px; padding: 6px 15px; font-size: 12px; font-weight: 700;
  transition: color 0.15s, border-color 0.15s;
}
.ghost-btn:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- product cards: glass + neon frame ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 13px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 17px; } }

.pcard {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 0;
  text-align: start;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* neon frame sweep on hover */
.pcard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-hot);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.pcard:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 34px rgba(139, 92, 255, 0.18); }
.pcard:hover::after { opacity: 1; }

/* golden card chip — the Play Cards signature */
.pcard::before {
  content: "";
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  width: 23px;
  height: 17px;
  border-radius: 4.5px;
  background:
    linear-gradient(90deg, transparent 44%, rgba(0,0,0,.35) 44%, rgba(0,0,0,.35) 56%, transparent 56%),
    linear-gradient(0deg, transparent 40%, rgba(0,0,0,.35) 40%, rgba(0,0,0,.35) 60%, transparent 60%),
    linear-gradient(135deg, var(--gold), var(--gold-deep));
  z-index: 2;
  box-shadow: 0 0 12px rgba(255, 194, 71, 0.4);
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.pcard-media {
  width: 100%;
  aspect-ratio: 9.625 / 11; /* cut exactly on his photo stock: 9.625W x 11H */
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(150px 100px at 50% 115%, rgba(139, 92, 255, 0.4), transparent 70%),
    linear-gradient(160deg, var(--panel-2), var(--panel-solid));
}

/* whole image always visible — no cropping, whatever its proportions */
.pcard-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s ease; }
.pcard:hover .pcard-media img { transform: scale(1.06); }

.pcard-media .ph {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* one slim line: name at start, price at end */
.pcard-body { padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-body .pcard-name { margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-body .pcard-foot { margin: 0; flex-shrink: 0; }

.pcard-name {
  font-weight: 800;
  font-size: 12px;
  line-height: 1.45;
  min-height: 1.45em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; gap: 6px; }

.price-plate { font-family: var(--font-num); font-weight: 700; font-size: 12.5px; color: var(--gold); direction: ltr; text-shadow: 0 0 14px rgba(255, 194, 71, 0.35); }
.price-plate small { font-size: 8.5px; color: var(--muted); font-family: var(--font-body); display: block; text-align: start; text-shadow: none; }

.instant-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 800; color: var(--mint);
  border: 1px solid rgba(52, 227, 161, 0.45);
  background: rgba(52, 227, 161, 0.1);
  border-radius: 999px; padding: 3px 9px;
  box-shadow: 0 0 12px rgba(52, 227, 161, 0.2);
}

/* ---------- skeletons ---------- */
.card-skel, .cat-skel {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--panel-solid) 40%, var(--panel-2) 50%, var(--panel-solid) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
.card-skel { height: 196px; }
.card-skel.wide { height: 88px; }
.cat-skel { flex: 0 0 auto; width: 112px; height: 43px; border-radius: 999px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 50;
  display: flex; justify-content: center; gap: 64px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 9, 26, 0.8);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.nav-tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; color: var(--muted);
  font-size: 11px; font-weight: 800; transition: color 0.15s ease;
}

.nav-tab svg { width: 23px; height: 23px; }
.nav-tab.active { color: transparent; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; }
.nav-tab.active svg { stroke: var(--cyan); filter: drop-shadow(0 0 9px rgba(34, 211, 238, 0.8)); }

.nav-dot { position: absolute; top: -2px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---------- purchase sheet ---------- */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(3, 4, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}

.sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp 0.3s cubic-bezier(0.2, 0.85, 0.25, 1);
}

@media (min-width: 620px) {
  .sheet-overlay { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line-strong); }
}

@keyframes slideUp { from { transform: translateY(46px); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }

.sheet-close {
  position: absolute; top: 14px; inset-inline-start: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--muted); font-size: 14px; z-index: 2;
}

.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }

.sheet-img {
  width: 66px; height: 66px; border-radius: 17px; object-fit: cover;
  background: var(--grad-brand); flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 23px; color: #fff;
}

.sheet-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.5; }
.sheet-unit { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.sheet-unit b { color: var(--gold); font-family: var(--font-num); direction: ltr; }

.field { margin-bottom: 14px; }
.field-label { display: block; font-size: 12.5px; font-weight: 800; color: var(--muted); margin-bottom: 7px; }

.field-input {
  width: 100%; height: 48px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text); font-size: 15px; font-weight: 700;
  padding: 0 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }

.stepper { display: flex; align-items: stretch; gap: 8px; }
.stepper button {
  width: 48px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--cyan); font-size: 20px; font-weight: 800;
}
.stepper input { flex: 1; text-align: center; font-family: var(--font-num); font-size: 17px; direction: ltr; }
.qty-hint { font-size: 10.5px; color: var(--muted); margin-top: 6px; }

.sheet-total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed var(--line-strong);
  margin-top: 6px; padding-top: 14px;
}
.sheet-total .t-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.sheet-total .t-value {
  font-family: var(--font-num); font-weight: 700; font-size: 25px;
  color: var(--gold); direction: ltr;
  text-shadow: 0 0 18px rgba(255, 194, 71, 0.4);
}

.buy-btn {
  width: 100%; height: 55px; margin-top: 15px;
  border: 0; border-radius: 16px;
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  color: #1a1208;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  box-shadow: 0 12px 30px rgba(255, 173, 40, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
  position: relative; overflow: hidden;
}

.buy-btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sweep 2.6s ease infinite;
}
@keyframes sweep { 60%, 100% { transform: translateX(120%); } }

.buy-btn:active { transform: scale(0.985); }
.buy-btn:disabled { filter: grayscale(0.7); opacity: 0.7; }
.buy-btn:disabled::after { display: none; }

.sheet-error {
  margin-top: 12px;
  border: 1px solid rgba(255, 93, 122, 0.5);
  background: rgba(255, 93, 122, 0.1);
  color: var(--danger);
  border-radius: 13px; padding: 11px 14px;
  font-size: 13px; font-weight: 700;
}

/* ---------- success ---------- */
.success-wrap { text-align: center; padding: 8px 0 4px; }

.success-mark {
  width: 70px; height: 70px; margin: 4px auto 14px;
  border-radius: 50%; display: grid; place-items: center; font-size: 31px;
  background: rgba(52, 227, 161, 0.12);
  border: 2px solid var(--mint);
  color: var(--mint);
  box-shadow: 0 0 34px rgba(52, 227, 161, 0.35);
  animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.success-sub { color: var(--muted); font-size: 12.5px; margin-top: 5px; line-height: 2; }
.success-sub b { color: var(--gold); font-family: var(--font-num); direction: ltr; }

.codes-box {
  margin-top: 16px;
  border: 1px dashed var(--mint);
  border-radius: 15px;
  background: rgba(52, 227, 161, 0.07);
  padding: 13px;
  text-align: start;
}

.codes-title { color: var(--mint); font-weight: 800; font-size: 12.5px; margin-bottom: 9px; }

.code-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 11px; background: var(--bg);
  margin-bottom: 7px; cursor: copy;
  transition: border-color 0.15s; border: 1px solid transparent;
}
.code-row:hover { border-color: var(--mint); }
.code-row:last-child { margin-bottom: 0; }

.code-value { font-family: var(--font-num); font-weight: 700; font-size: 15px; color: var(--mint); direction: ltr; word-break: break-all; }
.code-copy { border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); border-radius: 9px; font-size: 11px; font-weight: 800; padding: 5px 12px; flex-shrink: 0; }

.pending-note { margin-top: 14px; color: var(--muted); font-size: 12.5px; line-height: 1.9; }

.again-btn {
  margin-top: 16px; width: 100%; height: 47px;
  border-radius: 14px; border: 1px solid var(--violet);
  background: transparent; color: var(--violet);
  font-weight: 800; font-size: 14px;
  transition: background-color 0.15s;
}
.again-btn:hover { background: rgba(139, 92, 255, 0.12); }

/* ---------- orders ---------- */
.orders-list { display: flex; flex-direction: column; gap: 11px; }

.order-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  padding: 13px 15px;
}

.order-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.ocard-name { font-weight: 800; font-size: 13.5px; }
.ocard-meta { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.ocard-price { font-family: var(--font-num); font-weight: 700; color: var(--gold); font-size: 15px; direction: ltr; }

.status-pill { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 4px 12px; }
.status-pill.completed { color: var(--mint); background: rgba(52, 227, 161, 0.12); }
.status-pill.waiting, .status-pill.manual_review { color: var(--gold); background: rgba(255, 194, 71, 0.12); }
.status-pill.sent_to_supplier { color: var(--cyan); background: rgba(34, 211, 238, 0.12); }
.status-pill.rejected, .status-pill.refunded, .status-pill.cancelled { color: var(--danger); background: rgba(255, 93, 122, 0.12); }

.order-codes { margin-top: 10px; }

.empty-state { text-align: center; color: var(--muted); padding: 60px 20px; font-weight: 700; line-height: 2.2; }
.empty-state .big { font-size: 42px; display: block; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 102px; inset-inline: 0; margin: 0 auto;
  width: fit-content; max-width: 88vw; z-index: 99;
  background: var(--panel-solid);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-weight: 800; font-size: 13px;
  border-radius: 999px; padding: 10px 21px;
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 0 26px rgba(52, 227, 161, 0.25);
}
.toast.show { opacity: 1; transform: translateY(0); }

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

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

/* ============ hamburger + drawer ============ */
.menu-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  place-content: center;
  gap: 4.5px;
}
.menu-btn span { width: 17px; height: 2px; border-radius: 2px; background: var(--text); display: block; }

.drawer-overlay {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(3, 4, 12, 0.66);
  backdrop-filter: blur(4px);
}

.drawer {
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-start: 0;
  width: min(320px, 84vw);
  background: var(--panel-solid);
  border-inline-end: 1px solid var(--line-strong);
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: drawerIn 0.26s cubic-bezier(0.2, 0.85, 0.25, 1);
}
@keyframes drawerIn { from { transform: translateX(var(--drawer-from, 30px)); opacity: 0.5; } to { transform: none; opacity: 1; } }
[dir="rtl"] .drawer { --drawer-from: 30px; }
[dir="ltr"] .drawer { --drawer-from: -30px; }

.drawer-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-avatar {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad-hot);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 19px; color: #fff;
}
.drawer-user { font-weight: 800; font-size: 14px; }
.drawer-balance { font-family: var(--font-num); color: var(--gold); font-size: 13px; direction: ltr; text-align: start; }
.drawer-x { position: static; margin-inline-start: auto; }

.drawer-nav { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; }
.drawer-nav button {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 13px;
  border: 0; border-radius: 13px;
  background: none; color: var(--text);
  font-weight: 800; font-size: 14px;
  text-align: start;
  transition: background-color 0.14s;
}
.drawer-nav button:hover { background: rgba(139, 92, 255, 0.12); }
.drawer-nav button.active { background: var(--grad-brand); color: #fff; }

.drawer-sep { height: 1px; background: var(--line); margin: 4px 0 12px; }

.drawer-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 13px; font-weight: 800; font-size: 13px; color: var(--muted); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 12px; padding: 7px 14px; }
.seg button.active { background: var(--grad-brand); color: #fff; }

/* ============ wallet view ============ */
.wallet-hero {
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(300px 140px at 50% -30%, rgba(255, 194, 71, 0.22), transparent 70%),
    var(--panel);
  backdrop-filter: blur(10px);
  padding: 26px 18px 22px;
  margin-bottom: 20px;
}
.wallet-hero-label { color: var(--muted); font-size: 12px; font-weight: 800; }
.wallet-hero-value {
  font-family: var(--font-num); font-weight: 700; font-size: 38px;
  color: var(--gold); direction: ltr;
  text-shadow: 0 0 26px rgba(255, 194, 71, 0.4);
  margin: 6px 0 14px;
}
.wallet-add { max-width: 260px; margin: 0 auto; height: 46px; font-size: 14px; }

.tx-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tx-type { font-weight: 800; font-size: 13px; }
.tx-meta { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.tx-amount { font-family: var(--font-num); font-weight: 700; font-size: 15px; direction: ltr; }
.tx-amount.pos { color: var(--mint); }
.tx-amount.neg { color: var(--danger); }
.tx-after { color: var(--muted); font-size: 10px; direction: ltr; text-align: end; }

/* ============ deposit view ============ */
.pay-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  padding: 15px 16px;
  margin-bottom: 11px;
  color: var(--text);
  text-align: start;
}
.pay-card.dev { border-color: rgba(52, 227, 161, 0.5); box-shadow: 0 0 22px rgba(52, 227, 161, 0.12); }
.pay-card.soon { opacity: 0.55; cursor: not-allowed; }
.pay-icon { font-size: 26px; }
.pay-body b { display: block; font-size: 14px; }
.pay-body small { color: var(--muted); font-size: 11px; }

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
  --bg: #eef0fa;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-solid: #ffffff;
  --panel-2: #f1f2fb;
  --line: rgba(90, 80, 200, 0.14);
  --line-strong: rgba(90, 80, 200, 0.3);
  --text: #191c33;
  --muted: #6b7195;
}

[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .aurora { opacity: 0.5; filter: blur(80px) saturate(1.1); }
[data-theme="light"] .topbar { background: rgba(238, 240, 250, 0.75); }
[data-theme="light"] .bottom-nav { background: rgba(238, 240, 250, 0.85); }
[data-theme="light"] .sheet-overlay { background: rgba(30, 32, 60, 0.35); }
[data-theme="light"] .drawer-overlay { background: rgba(30, 32, 60, 0.35); }
[data-theme="light"] .code-row { background: var(--panel-2); }
[data-theme="light"] .menu-btn span { background: var(--text); }

/* ============ banners ============ */
.banners { position: relative; border-radius: 20px; overflow: hidden; margin: 6px 0 4px; border: 1px solid var(--line-strong); }
.banners-track { display: flex; transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.3, 1); }
.banners-track img { width: 100%; flex: 0 0 100%; aspect-ratio: 3 / 1; object-fit: cover; display: block; }
.banners-dots { position: absolute; bottom: 9px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.banners-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: all 0.2s; }
.banners-dots i.active { background: var(--gold); width: 18px; border-radius: 6px; }

/* ============ bestsellers rail ============ */
.section-title.flame { color: var(--gold); }
.best-rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.best-rail::-webkit-scrollbar { display: none; }
.best-rail .pcard { flex: 0 0 150px; }
.best-rail .pcard-media { height: 104px; }
.best-rail .pcard-name { font-size: 11px; min-height: 1.45em; }
.best-rail .price-plate { font-size: 11.5px; }
.best-rail .pcard-foot { margin-top: 4px; }

/* ============ favorites heart ============ */
.fav-btn {
  position: absolute;
  top: 9px;
  inset-inline-end: 9px;
  z-index: 3;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 12, 28, 0.55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  color: var(--muted);
  transition: color 0.15s, transform 0.15s, border-color 0.15s;
}
.fav-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn.active { color: var(--magenta); border-color: var(--magenta); }
.fav-btn.active svg { fill: var(--magenta); }
.fav-btn:active { transform: scale(1.25); }
[data-theme="light"] .fav-btn { background: rgba(255,255,255,0.7); }

/* ============ drawer icons + socials ============ */
.drawer-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; flex-shrink: 0; }
.drawer-nav button.active svg { stroke: #fff; }

.social-row { display: flex; justify-content: center; gap: 14px; padding: 16px 0 4px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.social-row a:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

/* ============ order detail sheet (reference style) ============ */
.odt-status { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.odt-status-label { color: var(--muted); font-weight: 800; font-size: 13px; }
.odt-response { color: var(--gold); font-size: 11px; font-weight: 700; margin-bottom: 14px; }

.odt-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 15px;
  margin-bottom: 9px;
}
.odt-label { color: var(--muted); font-weight: 800; font-size: 12px; flex-shrink: 0; }
.odt-value { font-weight: 700; font-size: 13px; direction: ltr; text-align: end; word-break: break-all; cursor: copy; }
.odt-value.gold { color: var(--gold); font-family: var(--font-num); }

.odt-reply {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  border-radius: 15px;
  padding: 13px 15px;
  margin-top: 4px;
}
.odt-reply-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.odt-reply-title { color: var(--gold); font-weight: 800; font-size: 13px; }
.odt-reply-text { font-size: 13px; line-height: 1.9; }

/* ============ security ============ */
.sec-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  padding: 17px;
  margin-bottom: 13px;
}
.sec-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sec-note { color: var(--muted); font-size: 11.5px; line-height: 1.9; margin-bottom: 10px; }
.sec-secret {
  font-family: var(--font-num); font-size: 15px; letter-spacing: 2px;
  color: var(--cyan); background: var(--bg);
  border: 1px dashed var(--cyan); border-radius: 11px;
  padding: 11px; text-align: center; direction: ltr; cursor: copy; margin: 10px 0;
}
.sec-badge-on { color: var(--mint); font-weight: 800; font-size: 12px; }
.sec-badge-off { color: var(--muted); font-weight: 800; font-size: 12px; }

/* ============ purchase confirmation layer ============ */
.confirm-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--panel-solid);
  border-radius: inherit;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: slideUp 0.24s cubic-bezier(0.2, 0.85, 0.25, 1);
}

.confirm-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; text-align: center; }
.confirm-note { color: var(--muted); font-size: 12px; text-align: center; margin: 5px 0 16px; }

.confirm-total {
  border-color: rgba(255, 194, 71, 0.4);
  background: rgba(255, 194, 71, 0.06);
  margin-top: 12px;
}
.confirm-total .odt-value { font-size: 19px; }

.confirm-layer .buy-btn { margin-top: 16px; }
.confirm-layer .again-btn { margin-top: 10px; }

/* reply image attachment */
.odt-reply-image { display: block; margin-top: 12px; border-radius: 13px; overflow: hidden; border: 1px solid var(--line-strong); }
.odt-reply-image img { width: 100%; max-height: 340px; object-fit: contain; background: var(--bg); display: block; }

/* ============ تأكيد الشراء — الإيصال الذهبي ============ */
.confirm-layer { display: block; overflow: visible; }
.confirm-title { font-size: 20px; letter-spacing: 0.3px; }
.confirm-note { margin-bottom: 18px; }

.receipt {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(165deg, var(--panel-2), var(--panel-solid) 70%);
  padding: 18px 18px 20px;
  margin-bottom: 18px;
}

/* golden neon frame */
.receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(140deg, var(--gold), rgba(255,194,71,0.15) 40%, rgba(139,92,255,0.35) 75%, var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.receipt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.receipt-img {
  width: 52px; height: 52px; border-radius: 15px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px rgba(0,0,0,0.4);
}
.receipt-ph {
  display: grid; place-items: center;
  background: var(--grad-brand);
  font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #fff;
}

.receipt-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.5; flex: 1; }

.receipt-qty {
  font-family: var(--font-num); font-weight: 700; font-size: 13px;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  direction: ltr;
}

.receipt-lines { display: flex; flex-direction: column; }

.receipt-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(139, 132, 255, 0.09);
}
.receipt-line:last-child { border-bottom: 0; }

.rl-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.4px; }
.rl-value { font-family: var(--font-num); font-weight: 700; font-size: 13.5px; direction: ltr; word-break: break-all; text-align: end; }

/* perforation tear line with side notches — the ticket moment */
.receipt-tear {
  position: relative;
  height: 0;
  border-top: 2px dashed rgba(255, 194, 71, 0.35);
  margin: 12px -18px 14px;
}
.receipt-tear i {
  position: absolute;
  top: -9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--panel-solid);
  box-shadow: inset 0 0 0 1.2px rgba(255, 194, 71, 0.45);
}
.receipt-tear i:first-child { inset-inline-start: -9px; }
.receipt-tear i:last-child { inset-inline-end: -9px; }

.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; }
.rt-label { color: var(--muted); font-weight: 800; font-size: 12.5px; letter-spacing: 0.5px; }
.rt-value {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 30px;
  color: var(--gold);
  direction: ltr;
  text-shadow: 0 0 22px rgba(255, 194, 71, 0.45);
}

[data-theme="light"] .receipt { background: linear-gradient(165deg, #fff, var(--panel-2)); }
[data-theme="light"] .receipt-tear i { background: #fff; }

/* ============ scrollbars: themed everywhere, no more white bars ============ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 255, 0.35) transparent;
}

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 255, 0.35);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 255, 0.6); }

/* the purchase sheet hides its bar entirely — content breathes */
.sheet { scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }

.sheet-close { z-index: 10; }

[data-theme="light"] * { scrollbar-color: rgba(90, 80, 200, 0.3) transparent; }
[data-theme="light"] *::-webkit-scrollbar-thumb { background: rgba(90, 80, 200, 0.3); }

/* ============ order notifications (bottom right) ============ */
.notif-stack {
  position: fixed;
  right: 14px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(310px, calc(100vw - 28px));
}

.notif {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--panel-solid);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  padding: 11px 13px;
  cursor: pointer;
  animation: notifIn 0.3s cubic-bezier(0.2, 0.85, 0.25, 1);
}
@keyframes notifIn { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

.notif-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.notif-dot.completed { background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.notif-dot.rejected, .notif-dot.refunded { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.notif-dot.other { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 800; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-sub { color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notif-x { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px; flex-shrink: 0; }

/* ============ live support chat ============ */
.chat-bubble {
  position: fixed;
  left: 14px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 69;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(139, 92, 255, 0.45);
  transition: transform 0.15s;
}
.chat-bubble:active { transform: scale(0.92); }
.chat-bubble svg { width: 24px; height: 24px; }

.chat-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 19px; height: 19px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center;
  padding: 0 5px;
  box-shadow: 0 0 0 2px var(--bg);
}

.chat-panel {
  position: fixed;
  left: 14px;
  bottom: calc(148px + env(safe-area-inset-bottom));
  z-index: 71;
  width: min(330px, calc(100vw - 28px));
  height: min(440px, 62vh);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.24s cubic-bezier(0.2, 0.85, 0.25, 1);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.chat-online { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px var(--mint); }
.chat-x { position: static; margin-inline-start: auto; width: 30px; height: 30px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.chat-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.8;
  word-break: break-word;
  animation: msgIn 0.2s ease;
}
@keyframes msgIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

.chat-msg.customer {
  align-self: flex-start;
  background: var(--grad-brand);
  color: #fff;
  border-bottom-inline-start-radius: 5px;
}
.chat-msg.agent {
  align-self: flex-end;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-inline-end-radius: 5px;
}
.chat-time { display: block; font-size: 9.5px; opacity: 0.65; margin-top: 4px; direction: ltr; text-align: end; }

.chat-greeting { color: var(--muted); font-size: 12px; text-align: center; line-height: 2; padding: 20px 10px; }

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 11px;
  border-top: 1px solid var(--line);
}
.chat-input-row input {
  flex: 1;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-family: var(--font-body);
}
.chat-input-row input:focus { outline: none; border-color: var(--primary); }

.chat-send {
  width: 42px; height: 42px;
  border-radius: 13px;
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
}
.chat-send svg { width: 18px; height: 18px; transform: scaleX(-1); }
[dir="ltr"] .chat-send svg { transform: none; }
.chat-send:disabled { opacity: 0.5; }

[data-theme="light"] .notif { box-shadow: 0 14px 34px rgba(40, 40, 90, 0.18); }
[data-theme="light"] .chat-panel { box-shadow: 0 24px 60px rgba(40, 40, 90, 0.22); }

/* ============ auth ============ */
.auth-card {
  max-width: 420px;
  margin: 8px auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  padding: 22px 20px;
}

.auth-tabs { display: flex; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 20px; }
.auth-tab { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 13px; padding: 11px; font-family: var(--font-body); }
.auth-tab.active { background: var(--grad-brand); color: #fff; }

.auth-form { display: flex; flex-direction: column; }
.auth-submit { height: 48px; font-size: 14px; margin-top: 6px; }

.auth-done { text-align: center; color: var(--muted); font-size: 13px; line-height: 2.1; padding: 18px 6px; }
.auth-done .big { font-size: 40px; display: block; margin-bottom: 10px; }

.drawer-login-cta {
  border: 0; background: none; padding: 0;
  color: var(--cyan); font-weight: 800; font-size: 12px;
  text-align: start; cursor: pointer;
  font-family: var(--font-body);
}

.drawer-logout {
  width: 100%;
  border: 1px solid rgba(255, 92, 122, 0.35);
  background: rgba(255, 92, 122, 0.07);
  color: var(--danger);
  border-radius: 13px;
  padding: 11px;
  font-weight: 800;
  font-size: 13px;
  margin: 2px 0 12px;
  font-family: var(--font-body);
}

/* ============ pending review — the premium wait ============ */
.pending-badge {
  width: 76px; height: 76px;
  margin: 6px auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold);
  background: radial-gradient(circle at 50% 35%, rgba(255, 194, 71, 0.16), transparent 70%);
  position: relative;
}
.pending-badge::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  padding: 1.4px;
  background: conic-gradient(from 0deg, var(--gold), rgba(139,92,255,0.5), rgba(255,194,71,0.15), var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinRing 5s linear infinite;
}
@keyframes spinRing { to { transform: rotate(360deg); } }
.pending-badge svg { width: 32px; height: 32px; animation: hourFlip 3.2s ease-in-out infinite; }
@keyframes hourFlip { 0%, 78% { transform: rotate(0); } 90%, 100% { transform: rotate(180deg); } }

.pending-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
}
.pending-body { max-width: 300px; margin: 0 auto 22px; }

.pending-steps { display: flex; align-items: center; justify-content: center; gap: 7px; }
.pstep { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 66px; }
.pstep i {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-style: normal; font-weight: 800;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  background: var(--panel-2);
}
.pstep span { font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; }

.pstep.done i { border-color: var(--mint); color: var(--mint); background: rgba(52, 227, 161, 0.1); }
.pstep.done span { color: var(--mint); }

.pstep.current i { border-color: var(--gold); background: rgba(255, 194, 71, 0.12); position: relative; }
.pstep.current i::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulseDot 1.4s ease-in-out infinite;
}
@keyframes pulseDot { 50% { transform: scale(1.6); opacity: 0.5; } }
.pstep.current span { color: var(--gold); }

.pstep-line { width: 26px; height: 1.5px; background: var(--line-strong); margin-bottom: 18px; }
.pstep-line.done { background: var(--mint); }

.forgot-link {
  border: 0; background: none;
  color: var(--cyan);
  font-weight: 800; font-size: 12px;
  font-family: var(--font-body);
  margin-top: 12px;
  cursor: pointer;
}
a.pay-card { text-decoration: none; }

/* ============ customer API page ============ */
.api-token-box {
  border: 1px dashed var(--mint);
  color: var(--mint);
  border-radius: 12px;
  padding: 11px 13px;
  font-family: var(--font-num);
  font-size: 13px;
  direction: ltr;
  text-align: center;
  word-break: break-all;
  cursor: copy;
  background: rgba(52, 227, 161, 0.05);
}

.api-ips { resize: vertical; text-align: center; font-family: var(--font-num); min-height: 96px; }

.mx-like-check { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 13px; cursor: pointer; }
.mx-like-check input { width: 17px; height: 17px; accent-color: var(--primary); }

.api-red-warn {
  background: rgba(255, 92, 122, 0.12);
  border: 1px solid rgba(255, 92, 122, 0.35);
  color: var(--danger);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 2;
  margin: 12px 0 16px;
}

/* ============ player-ID validation ============ */
.validate-row { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; flex-wrap: wrap; }

.validate-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.07);
  color: var(--cyan);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  transition: background-color 0.15s, transform 0.12s;
}
.validate-btn:hover { background: rgba(34, 211, 238, 0.14); }
.validate-btn:active { transform: scale(0.96); }
.validate-btn:disabled { opacity: 0.55; }
.validate-btn svg { width: 13px; height: 13px; }

.validate-result { font-size: 12px; font-weight: 800; }
.validate-result.ok { color: var(--mint); }
.validate-result.bad { color: var(--danger); }

.validate-pending { color: var(--muted); font-size: 12px; }
.validate-name { color: var(--mint) !important; font-family: var(--font-body) !important; font-weight: 800; }
.validate-bad { color: var(--gold) !important; font-size: 11.5px !important; font-family: var(--font-body) !important; }

.cat-chip.cat-back { border-style: dashed; color: var(--cyan); }
.cat-chip.cat-back .cat-ph { display: grid; place-items: center; font-size: 13px; background: rgba(34, 211, 238, 0.12); }

.tx-method { display: inline-flex; align-items: center; gap: 5px; background: rgba(139, 92, 255, 0.12); color: var(--violet, #a78bfa); font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.tx-method img { width: 14px; height: 14px; border-radius: 4px; object-fit: cover; }
.tx-unpaid { background: rgba(245, 166, 35, 0.15); color: #f5a623; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.tx-reason { font-size: 12px; color: var(--text); opacity: 0.85; margin: 3px 0 1px; }

/* live payment methods on deposit page */
.pm-live { cursor: pointer; flex-wrap: wrap; }
.pm-live .pay-icon img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.pm-chev { margin-inline-start: auto; color: var(--muted, #8b8fa8); transition: transform 0.2s; }
.pm-live.open .pm-chev { transform: rotate(180deg); }
.pm-details { width: 100%; border-top: 1px dashed rgba(255,255,255,0.08); margin-top: 10px; padding-top: 10px; font-size: 12.5px; }
.pm-desc { white-space: pre-line; line-height: 1.7; }
.pm-facts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted, #8b8fa8); }
.pm-facts b { color: inherit; font-family: "Cairo", sans-serif; }
.pm-reqs { margin-top: 8px; color: var(--muted, #8b8fa8); }
.pm-after { margin-top: 10px; background: rgba(34, 211, 238, 0.08); color: var(--cyan, #22d3ee); border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 700; }

/* deposit request form + status badges + time filters */
.dr-sheet { max-width: 460px; }
.dr-desc { white-space: pre-line; line-height: 1.8; font-size: 13px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.dr-attach {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px dashed rgba(139, 92, 255, 0.45);
  background: rgba(139, 92, 255, 0.06);
  color: #a78bfa; font-weight: 800; font-size: 13px;
  border-radius: 14px; padding: 18px; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.dr-attach:hover { border-color: #a78bfa; background: rgba(139, 92, 255, 0.1); }
.dr-attach-icon { font-size: 18px; }
.dr-preview { position: relative; display: inline-block; }
.dr-preview img { max-width: 100%; max-height: 220px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); display: block; }
.dr-preview-x {
  position: absolute; top: 8px; inset-inline-end: 8px;
  width: 28px; height: 28px; border-radius: 999px; border: 0;
  background: rgba(0,0,0,0.65); color: #fff; cursor: pointer; font-size: 13px;
}
.dr-sheet .buy-btn { width: 100%; margin-top: 6px; }
.dr-sheet .field { margin-bottom: 13px; }
.dr-badge { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.dr-badge.ok { background: rgba(16,185,129,.15); color: #10b981; }
.dr-badge.no { background: rgba(239,68,68,.15); color: #ef4444; }
.dr-badge.wait { background: rgba(245,166,35,.15); color: #f5a623; }
.sheet-error-slot { margin-top: 8px; }
.tf-host { margin-bottom: 12px; }
.tf-row { display: flex; gap: 7px; flex-wrap: wrap; }
.tf-chip { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: var(--muted, #8b8fa8); border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; }
.tf-chip.active { background: rgba(139,92,255,.16); color: #a78bfa; border-color: rgba(139,92,255,.4); }
.tf-custom { display: flex; gap: 8px; align-items: center; margin-top: 8px; color: var(--muted, #8b8fa8); font-size: 12px; flex-wrap: wrap; }
.tf-custom input[type="date"] { border-radius: 9px; height: 34px; }

/* ===== zero browser-default controls: every ✕ is ours ===== */
.sheet-x {
  width: 32px; height: 32px; flex-shrink: 0;
  margin-inline-start: auto;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted, #8b8fa8);
  border-radius: 999px; cursor: pointer;
  font-size: 13px; font-family: inherit; line-height: 1;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}
.sheet-x:hover { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.sheet-x:active { transform: scale(0.92); }

/* ==================== wallet page (v16.5 layout) ==================== */
.wl-profit {
  background: linear-gradient(90deg, #06b6d4, #1e3a8a);
  color: #fff; font-weight: 800; font-size: 15px;
  border-radius: 14px; padding: 16px 22px; margin-bottom: 16px;
  display: flex; justify-content: center;
}
.wl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.wl-card {
  border-radius: 14px; padding: 14px 10px; text-align: center; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.wl-card sup { font-size: 9px; font-weight: 800; opacity: 0.85; }
.wl-card strong { font-size: 16.5px; font-family: "Cairo", sans-serif; direction: ltr; }
.wl-card span { font-size: 11.5px; font-weight: 800; opacity: 0.92; }
.wl-card.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.wl-card.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.wl-card.purple { background: linear-gradient(135deg, #a855f7, #9333ea); }
.wl-card.yellow { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.wl-card.lime { background: linear-gradient(135deg, #84cc16, #65a30d); }
.wl-card.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.wl-dates { display: flex; gap: 10px; align-items: flex-end; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.wl-dates label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 800; color: var(--muted, #8b8fa8); }
.wl-dates input[type="date"] { border-radius: 999px; height: 42px; padding: 0 18px; min-width: 190px; }
.wl-search {
  width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; font-size: 16px;
}
.wl-search:active { transform: scale(0.94); }

.wl-typebar { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.wl-type {
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
  color: var(--muted, #8b8fa8); border-radius: 999px; padding: 7px 14px;
  font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.wl-type b { font-family: "Cairo", sans-serif; font-size: 11px; opacity: 0.7; }
.wl-type b.on { color: #f5a623; opacity: 1; }
.wl-type.active { background: rgba(139, 92, 255, 0.16); color: #a78bfa; border-color: rgba(139, 92, 255, 0.4); }

.wl-total-row { display: flex; justify-content: flex-start; margin-bottom: 12px; }
.wl-total {
  border: 1.5px solid #f5a623; color: #f5a623; font-weight: 800; font-size: 13px;
  border-radius: 999px; padding: 7px 18px; direction: ltr; font-family: "Cairo", sans-serif;
}
.wl-total:empty { display: none; }

.wl-row { display: flex; align-items: center; gap: 12px; }
.wl-ico {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 999px;
  display: grid; place-items: center; font-size: 16px; font-weight: 900;
}
.wl-ico.in { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.wl-ico.out { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.wl-main { flex: 1; min-width: 0; }
.wl-title { font-weight: 800; font-size: 13.5px; }
.wl-amounts { text-align: end; }
.wl-beforeafter { font-size: 10.5px; color: var(--muted, #8b8fa8); direction: ltr; font-family: "Cairo", sans-serif; }
.wl-beforeafter s { color: rgba(239, 68, 68, 0.8); }
.wl-beforeafter b { color: #22c55e; }


/* ===== date inputs: fully themed, nothing native-looking ===== */
input[type="date"] {
  color-scheme: dark;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text, #eef0ff);
  border-radius: 999px;
  height: 40px; padding: 0 16px;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
}
input[type="date"]:focus { border-color: var(--cyan, #22d3ee); outline: none; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }

/* the generic تخصيص row now wears the wallet's polished outfit */
.tf-custom {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px; padding: 12px 16px; margin-top: 10px;
}
.tf-custom label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 800; color: var(--muted, #8b8fa8); }
.tf-apply {
  width: 42px; height: 42px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #8b5cff, #6d3ef0);
  color: #fff; font-size: 15px; display: grid; place-items: center;
  transition: transform 0.12s, filter 0.15s;
}
.tf-apply:hover { filter: brightness(1.12); }
.tf-apply:active { transform: scale(0.93); }
.wl-profit:empty, .wl-profit[hidden] { display: none; }

/* hard-lock the family on wallet rows — no inherited surprises */
.wl-title, .tx-reason, .tx-type { font-family: inherit; }
.tx-meta, .tx-after { font-family: inherit; direction: ltr; }
.wl-cards { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); max-width: 480px; margin-inline: auto; margin-bottom: 18px; }


/* reference-matched: Roboto (the panel font from the reference screenshot) */
.wl-amounts .tx-amount {
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  font-weight: 700; font-size: 15px; color: var(--text, #eef0ff);
  direction: ltr; letter-spacing: 0.2px;
}
.wl-beforeafter {
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  font-size: 11.5px; direction: ltr; margin-top: 2px; font-weight: 500;
}
.wl-beforeafter s { color: #ef4444; opacity: 0.9; }   /* OLD balance — struck */
.wl-beforeafter b { color: #22c55e; font-weight: 700; } /* NEW balance — current */
.wl-row .tx-meta { font-family: Roboto, "Segoe UI", Arial, sans-serif; font-size: 10.5px; }

/* automatic delivery badge on the card image */
.pcard-media { position: relative; }
.auto-badge {
  position: absolute !important; top: 8px; inset-inline-start: 8px; z-index: 3;
  white-space: nowrap; line-height: 1.5; pointer-events: none;
  font-size: 9.5px; font-weight: 800; color: #ffd34d;
  background: rgba(10, 10, 20, 0.72); border: 1px solid rgba(255, 211, 77, 0.5);
  border-radius: 999px; padding: 3px 9px; backdrop-filter: blur(4px);
}


/* account number line in the drawer — the deposit reference */
.drawer-account { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.drawer-account .acc-num { font-family: var(--font-num, monospace); font-size: 15.5px; font-weight: 800; color: var(--gold); letter-spacing: 0.5px; }

/* profile sheet */
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
.avatar-cell { display: grid; place-items: center; padding: 8px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; background: var(--panel-2); }
.avatar-cell.selected { border-color: var(--primary); box-shadow: 0 0 14px rgba(139, 92, 255, 0.45); }
.profile-big-avatar { display: grid; place-items: center; margin: 4px auto 10px; }
.profile-rows .odt-row { padding: 9px 0; }

/* hide-price mode on the order sheet */
.prices-hidden .odt-price-row { display: none !important; }

/* ==================== نظام الوكلاء (إدارة الزبائن) ==================== */
.agent-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.agent-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; text-align: center; }
.agent-stat span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 800; margin-bottom: 5px; }
.agent-stat b { font-family: var(--font-display); font-size: 17px; }
.agent-stat b.mint { color: var(--mint); }
.agent-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.agent-invite-code { direction: ltr; word-break: break-all; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; flex: 1; min-width: 180px; color: var(--text); }
.agent-cust { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; margin-bottom: 9px; }
.agent-cust-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.agent-cust-name b { font-size: 14px; }
.agent-cust-name .acc { color: var(--muted); font-size: 11.5px; margin-inline-start: 5px; }
.agent-cust-name .bal { color: var(--muted); font-size: 12px; margin-top: 3px; }
.agent-cust-name .bal b { color: var(--text); }
.agent-pct-input { width: 74px; height: 36px; text-align: center; }
.agent-topup { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 9px; }
.agent-topup[hidden] { display: none; }
.agent-topup .field-input { flex: 1; min-width: 130px; }
.agent-invite-note { border: 1px solid rgba(52, 227, 161, 0.4); background: rgba(52, 227, 161, 0.1); color: var(--text); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; text-align: center; font-weight: 700; }
@media (max-width: 560px) { .agent-stats { grid-template-columns: 1fr; } }

/* ==================== التحقق برمز الهاتف + شروط كلمة السر ==================== */
.otp-code-row { display: flex; gap: 8px; align-items: center; }
.otp-code-row .field-input { flex: 1 1 auto; min-width: 0; width: auto; }
.otp-code-row .buy-btn, .otp-code-row .again-btn { width: auto; flex: 0 0 auto; white-space: nowrap; }
.otp-code-row .again-btn[style*="flex:1"], .otp-code-row .again-btn[id="regSendCode"], .otp-code-row .again-btn[id="fpSend"] { flex: 1 1 auto; }
.otp-verified { color: var(--mint); font-weight: 800; }
.pw-rules { list-style: none; padding: 0; margin: 2px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; }
.pw-rules li { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pw-rules li::before { content: "✕"; color: var(--danger); font-weight: 800; font-size: 10px; }
.pw-rules li.ok { color: var(--text); }
.pw-rules li.ok::before { content: "✓"; color: var(--mint); }
@media (max-width: 420px) { .pw-rules { grid-template-columns: 1fr; } }
