/* ═══════════════════════════════════════════════════════════
   KARDO v8 — لمعان، حيوية، شريط الرصيد، البانرات، الإشعارات
   ═══════════════════════════════════════════════════════════ */
:root {
  --gold-1: #e8c48f; --gold-2: #d4a574; --gold-3: #a8793f;
  --glow: 0 0 0 1px rgba(212,165,116,.18), 0 10px 30px -12px rgba(212,165,116,.35);
  --glass: rgba(20, 25, 23, .72);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ─── خلفية حيّة خفيفة ─── */
body::before {
  content: ''; position: fixed; inset: -20% -10% auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 0%, rgba(212,165,116,.14), transparent 70%),
              radial-gradient(50% 40% at 0% 10%, rgba(16,185,129,.06), transparent 70%);
}

/* ─── بطاقات زجاجية ─── */
.card, .list, .table-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), var(--glass);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(212,165,116,.12);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 30px -18px rgba(0,0,0,.6);
}

/* ─── أزرار لامعة ─── */
.btn { transition: transform .15s var(--ease-out), box-shadow .25s, background .25s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3));
  color: #14110b; border: none; box-shadow: var(--glow); font-weight: 700;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.45) 45%, transparent 60%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn-primary:hover::after, .btn-primary:focus-visible::after { transform: translateX(120%); }
.btn-primary:disabled { filter: grayscale(.4); opacity: .6; }
.btn-secondary { border: 1px solid rgba(212,165,116,.22); background: rgba(212,165,116,.06); }

/* ─── عناوين وأرقام ذهبية ─── */
.greet, .gold-text {
  background: linear-gradient(135deg, #f2e6d2 0%, var(--gold-1) 45%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.balance-card { box-shadow: var(--glow); border: 1px solid rgba(212,165,116,.2); }
.balance-value {
  background: linear-gradient(135deg, #f2e6d2, var(--gold-1) 50%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── انتقال الصفحات ─── */
.page-enter { animation: pg-in .45s var(--ease-out) both; }
@keyframes pg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ─── Toast منزلق ─── */
.toast { animation: toast-in .45s var(--ease-out) both; backdrop-filter: blur(12px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ─── Skeleton لامع ─── */
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,.05); border-radius: 10px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(212,165,116,.12), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ─── شريط الرصيد فوق التنقل السفلي ─── */
.bal-dock {
  position: fixed; z-index: 41; left: 12px; right: 12px;
  bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 8px);
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px;
  border-radius: 18px; border: 1px solid rgba(212,165,116,.28);
  background: linear-gradient(135deg, rgba(212,165,116,.16), rgba(20,25,23,.92) 55%);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 12px 32px -10px rgba(0,0,0,.7), 0 0 24px -8px rgba(212,165,116,.35);
  animation: dock-in .5s var(--ease-out) both;
}
.bal-dock[hidden] { display: none; }
@keyframes dock-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.dock-main { flex: 1; display: flex; align-items: baseline; gap: 8px; background: none; border: 0; color: inherit; cursor: pointer; text-align: right; min-width: 0; }
.dock-label { font-size: 11px; color: var(--text-3, #8c8676); }
.dock-val { font-size: 17px; font-weight: 800;
  background: linear-gradient(135deg, #f2e6d2, var(--gold-1) 50%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dock-usd { font-size: 11px; color: var(--text-3, #8c8676); margin-inline-start: auto; }
.dock-add { flex-shrink: 0; border: 0; border-radius: 12px; padding: 9px 14px; font-weight: 800; font-size: 13px; cursor: pointer;
  color: #14110b; background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); box-shadow: var(--glow); }
.dock-add:active { transform: scale(.95); }
@media (max-width: 1023px) {
  .app-content { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 84px) !important; }
}
@media (min-width: 1024px) { .bal-dock { left: auto; right: 24px; bottom: 24px; width: 340px; } }
#barBalance { display: none !important; }

/* ─── البانرات ─── */
.bn-wrap { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid rgba(212,165,116,.15); box-shadow: 0 16px 40px -20px rgba(0,0,0,.8); }
.bn-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bn-track::-webkit-scrollbar { display: none; }
.bn-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 2.2 / 1; display: block; background: #0f1312; }
.bn-slide img { width: 100%; height: 100%; object-fit: cover; }
.bn-title { position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent); }
.bn-dots { position: absolute; bottom: 8px; left: 12px; display: flex; gap: 5px; }
.bn-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.4); transition: width .3s var(--ease-out), background .3s; }
.bn-dots i.on { width: 18px; background: var(--gold-1); }

/* ─── الإشعارات ─── */
#bellBtn { position: relative; }
.bell-dot { position: absolute; top: 2px; left: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--surface, #111), 0 0 12px rgba(229,72,77,.6); animation: pop .4s var(--ease-out); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.notif-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.notif { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.notif.unread { border-color: rgba(212,165,116,.35); background: linear-gradient(135deg, rgba(212,165,116,.1), rgba(255,255,255,.02)); }
.notif-title { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.notif-body { font-size: 12.5px; color: var(--text-2, #b9b2a3); line-height: 1.7; margin-bottom: 4px; }

/* ─── رمز التحقق ─── */
.otp-input { font-size: 26px; letter-spacing: 12px; text-align: center; font-family: var(--font-mono, monospace); font-weight: 700; }

/* ─── بطاقات المنتج: توهج عند اللمس ─── */
.prod-card, .cat-tile { transition: transform .2s var(--ease-out), box-shadow .3s, border-color .3s; }
.prod-card:hover, .cat-tile:hover { box-shadow: var(--glow); }

/* ─── مودال منزلق ─── */
.modal, #modal .modal-sheet { animation: sheet-in .45s var(--ease-out) both; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

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