/* ════════════════════════════════════════════════════════════
   TradeFlow — Design Polish Layer (additive, loaded last)
   يحسّن الاتساق البصري دون استبدال التصميم القائم.
   يستخدم متغيّرات الموقع نفسها مع قيم احتياطية.
   ════════════════════════════════════════════════════════════ */

/* ── Smooth, consistent transitions ── */
.kpi-card,.chart-card,.card,.kc,
.btn-p,.btn-s,.btn-d,.btn-pri,.btn-gst,.btn-sm,.btn-dng,.btn-sb{
  transition: transform .18s cubic-bezier(.22,.61,.36,1),
              box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

/* ── Cards & KPI: subtle lift on hover ── */
.kpi-card:hover,.chart-card:hover,.card:hover,.kc:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg, 0 14px 34px rgba(0,0,0,.45));
  border-color: var(--b2, rgba(99,102,241,.22));
}

/* ── KPI cards: rounded + animated accent hairline ── */
.kpi-card,.kc{ border-radius:16px; position:relative; overflow:hidden; }
.kpi-card::before,.kc::before{
  content:''; position:absolute; left:0; right:0; top:0; height:2px;
  background:linear-gradient(90deg,var(--ac,#6366f1),var(--pu,#8b5cf6));
  opacity:0; transition:opacity .2s ease;
}
.kpi-card:hover::before,.kc:hover::before{ opacity:.95; }

/* ── Numeric alignment everywhere it matters ── */
.kpi-val,.kval,.up-sv,.mono,.bdg,.badge{ font-variant-numeric:tabular-nums; }
.kpi-val,.kval{ letter-spacing:-.01em; }

/* ── Buttons: press feedback + crisper hover ── */
.btn-p:active,.btn-s:active,.btn-d:active,
.btn-pri:active,.btn-gst:active,.btn-sm:active,.btn-dng:active{ transform:translateY(1px); }

/* ── Inputs / selects: clear focus ring ── */
.ctrl:focus,.inp:focus,.sel:focus,
.up-card input:focus,
input.finput:focus{
  outline:none;
  border-color:var(--ac,#6366f1) !important;
  box-shadow:0 0 0 3px var(--ac-glow, rgba(99,102,241,.22));
}

/* ── Tables: zebra + hover + sticky header ── */
.tbl-wrap table tbody tr:nth-child(even),
.tsc table tbody tr:nth-child(even){ background:rgba(148,163,184,.05); }
.tbl-wrap table tbody tr,
.tsc table tbody tr{ transition:background .12s ease; }
.tbl-wrap table tbody tr:hover,
.tsc table tbody tr:hover{ background:var(--ac-glow, rgba(99,102,241,.16)); }
.tbl-wrap thead th,
.tsc thead th{
  position:sticky; top:0; z-index:3;
  background:var(--bg3,#11151f);
}

/* ── Section headers ── */
.sec-hdr,.sh{ letter-spacing:-.01em; }

/* ── Badges: pill shape ── */
.bdg,.badge{ border-radius:999px; }

/* ── Modals: backdrop blur + entrance animation ── */
.overlay,.ovl{ backdrop-filter:blur(6px) saturate(1.05); -webkit-backdrop-filter:blur(6px) saturate(1.05); }
.overlay.on .modal,
.ovl.open .mdl{ animation:tfPop .26s cubic-bezier(.34,1.56,.64,1); }
@keyframes tfPop{ from{opacity:0; transform:translateY(10px) scale(.98);} to{opacity:1; transform:none;} }

/* ── Cleaner custom scrollbars ── */
.tsc::-webkit-scrollbar,.tbl-wrap::-webkit-scrollbar,
.up-card::-webkit-scrollbar,[style*="overflow-y:auto"]::-webkit-scrollbar{ width:8px; height:8px; }
.tsc::-webkit-scrollbar-thumb,.tbl-wrap::-webkit-scrollbar-thumb,
[style*="overflow-y:auto"]::-webkit-scrollbar-thumb{ background:var(--b2, rgba(99,102,241,.22)); border-radius:8px; }
.tsc::-webkit-scrollbar-track,.tbl-wrap::-webkit-scrollbar-track{ background:transparent; }

/* ── Sidebar nav items: smoother active/hover ── */
.sb-item,.sb-itm{ transition:background .15s ease, color .15s ease; }

/* ── Respect reduced-motion preference ── */
@media (prefers-reduced-motion: reduce){
  .kpi-card,.chart-card,.card,.kc{ transition:none; }
  .kpi-card:hover,.chart-card:hover,.card:hover,.kc:hover{ transform:none; }
  .overlay.on .modal,.ovl.open .mdl{ animation:none; }
}


/* ════════════════════════════════════════════════════════════
   POLISH v2 — Global visual refresh (additive)
   تحسينات عامة على شكل الموقع بالكامل: خلفيات، عناوين، أزرار،
   شريط تمرير، انتقالات صفحات، حالات فارغة، هيكل أوضح.
   ════════════════════════════════════════════════════════════ */

/* ── Page background: subtle depth ── */
body{
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(139,92,246,.07), transparent 60%),
    radial-gradient(900px 450px at -10% 110%, rgba(99,102,241,.06), transparent 60%),
    var(--bg,#0a0e17);
  background-attachment:fixed;
}
html.light body{
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(139,92,246,.05), transparent 60%),
    radial-gradient(900px 450px at -10% 110%, rgba(99,102,241,.05), transparent 60%),
    var(--bg,#fafbfc);
}

/* ── Page switch: gentle fade/slide ── */
.page.on{ animation:tfPageIn .28s var(--ease-out, ease) both; }
@keyframes tfPageIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

/* ── Section headers: accent hairline ── */
.sec-hdr{
  position:relative; padding-bottom:10px; margin-bottom:18px;
}
.sec-hdr::after{
  content:''; position:absolute; bottom:0; inset-inline-start:0;
  width:44px; height:3px; border-radius:99px;
  background:linear-gradient(90deg,var(--ac,#6366f1),var(--pu,#8b5cf6));
}

/* ── Global scrollbar (whole document) ── */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:rgba(99,102,241,.28); border-radius:10px; border:2px solid transparent; background-clip:content-box; }
::-webkit-scrollbar-thumb:hover{ background:rgba(99,102,241,.45); background-clip:content-box; border:2px solid transparent; }
::-webkit-scrollbar-track{ background:transparent; }
*{ scrollbar-width:thin; scrollbar-color:rgba(99,102,241,.35) transparent; }

/* ── Text selection ── */
::selection{ background:rgba(99,102,241,.35); color:#fff; }

/* ── Cards: soft inner top highlight ── */
.chart-card,.card,.kpi-card,.kc{
  box-shadow:var(--shadow-sm, 0 1px 2px rgba(0,0,0,.3)), inset 0 1px 0 rgba(255,255,255,.03);
}

/* ── Sidebar: active item accent bar ── */
.sb-item{ position:relative; border-radius:10px; }
.sb-item.on::before{
  content:''; position:absolute; inset-inline-start:-6px; top:20%; bottom:20%;
  width:3px; border-radius:99px;
  background:linear-gradient(180deg,var(--ac,#6366f1),var(--pu,#8b5cf6));
}

/* ── Buttons: consistent radius + subtle sheen on primary ── */
.btn,.btn-p,.btn-s,.btn-d,.btn-pri,.btn-sm{ border-radius:10px; }
.btn-p,.btn-pri{ background-image:linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0)); }

/* ── Empty states ── */
.nw-empty, .empty, .no-data{
  text-align:center; padding:36px 16px; color:var(--mu,#94a3b8);
  font-size:13px; font-weight:600;
}

/* ── Toast: slightly richer ── */
.toast-wrap .toast, .toast{ border-radius:12px; backdrop-filter:blur(8px); }

/* ════════════════════════════════════════════════════════════
   ECONOMIC NEWS PAGE (OneUp Trader rules)
   ════════════════════════════════════════════════════════════ */
.nw-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin-bottom:14px;
}
.nw-sub{ font-size:12.5px; color:var(--mu,#94a3b8); font-weight:600; max-width:560px; }
.nw-head-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.nw-meta{ font-size:11px; color:var(--mu2,#64748b); font-weight:700; }

/* Live status banner */
.nw-status{
  border-radius:14px; padding:14px 18px; font-size:14px; font-weight:800;
  margin-bottom:10px; border:1px solid transparent; letter-spacing:.01em;
  display:flex; align-items:center; gap:8px;
  font-variant-numeric:tabular-nums;
}
.nw-st-safe{ background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.30); color:var(--gn,#10b981); }
.nw-st-eval{ background:rgba(99,102,241,.10); border-color:rgba(99,102,241,.30); color:var(--ac-light,#818cf8); }
.nw-st-warn{ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.38); color:var(--go,#f59e0b);
  animation:nwPulse 1.4s ease-in-out infinite; }
.nw-st-flat{ background:rgba(239,68,68,.14); border-color:rgba(239,68,68,.5); color:var(--rd,#ef4444);
  animation:nwPulse .9s ease-in-out infinite; }
@keyframes nwPulse{ 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0);} 50%{box-shadow:0 0 0 5px rgba(239,68,68,.10);} }

.nw-next{ font-size:12.5px; color:var(--tx2,#cbd5e1); margin:0 2px 14px; font-weight:600; }
.nw-next-lbl{ color:var(--mu,#94a3b8); }
.nw-next-cd{ font-family:var(--mono,monospace); color:var(--ac-light,#818cf8); font-weight:800; margin-inline-start:6px; }
.nw-err{
  background:rgba(245,158,11,.10); border:1px solid rgba(245,158,11,.30);
  color:var(--go,#f59e0b); border-radius:12px; padding:10px 14px;
  font-size:12px; font-weight:700; margin-bottom:12px;
}

/* Rule explainer card */
.nw-rule-card{ margin-bottom:14px; }
.nw-rule-hdr{ display:flex; align-items:center; gap:8px; font-size:14px; margin-bottom:6px; }
.nw-rule-body{ font-size:13px; line-height:1.75; color:var(--tx2,#cbd5e1); margin:0; }

/* Controls */
.nw-controls{
  display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end; margin-bottom:14px;
}
.nw-controls label{ display:flex; flex-direction:column; gap:5px; font-size:11px; font-weight:800; color:var(--mu,#94a3b8); }
.nw-controls .ctrl{ min-width:150px; }
.nw-controls input.ctrl{ min-width:70px; }

/* Events list */
.nw-week-hdr{
  padding:12px 18px; font-size:12px; font-weight:900; letter-spacing:.06em;
  text-transform:uppercase; color:var(--mu,#94a3b8);
  border-bottom:1px solid var(--b,rgba(99,102,241,.10));
  background:rgba(99,102,241,.04);
}
.nw-list{ max-height:60vh; overflow-y:auto; }
.nw-day{
  padding:9px 18px; font-size:11.5px; font-weight:900; color:var(--ac-light,#818cf8);
  background:rgba(99,102,241,.06); border-block:1px solid var(--b,rgba(99,102,241,.10));
  position:sticky; top:0; z-index:2; backdrop-filter:blur(6px);
}
.nw-row{
  display:flex; align-items:center; gap:12px; padding:11px 18px;
  border-bottom:1px solid rgba(148,163,184,.07); font-size:13px;
  transition:background .15s ease;
  flex-wrap:wrap;
}
.nw-row:hover{ background:rgba(99,102,241,.06); }
.nw-row.nw-past{ opacity:.45; }
.nw-row.nw-active{
  background:rgba(239,68,68,.10);
  border-inline-start:3px solid var(--rd,#ef4444);
}
.nw-time{
  font-family:var(--mono,monospace); font-weight:800; font-size:12.5px;
  color:var(--tx,#f1f5f9); min-width:62px; font-variant-numeric:tabular-nums;
}
.nw-imp{
  font-size:10px; font-weight:900; padding:3px 9px; border-radius:99px;
  letter-spacing:.04em; white-space:nowrap;
}
.nw-high{ background:rgba(239,68,68,.16); color:var(--rd-light,#f87171); border:1px solid rgba(239,68,68,.35); }
.nw-med { background:rgba(245,158,11,.15); color:var(--go-light,#fbbf24); border:1px solid rgba(245,158,11,.32); }
.nw-low { background:rgba(148,163,184,.12); color:var(--mu,#94a3b8); border:1px solid rgba(148,163,184,.22); }
.nw-hol { background:rgba(99,102,241,.12); color:var(--ac-light,#818cf8); border:1px solid rgba(99,102,241,.28); }
.nw-cur{
  font-size:10.5px; font-weight:900; color:var(--mu,#94a3b8);
  background:rgba(148,163,184,.10); border-radius:6px; padding:2px 7px;
}
.nw-title{ flex:1; min-width:180px; font-weight:700; color:var(--tx,#f1f5f9); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.nw-flat-tag{
  font-size:9.5px; font-weight:900; color:var(--rd-light,#f87171);
  background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.3);
  border-radius:99px; padding:2px 8px; white-space:nowrap;
}
.nw-nums{ display:flex; gap:12px; font-size:11px; color:var(--tx2,#cbd5e1); font-variant-numeric:tabular-nums; }
.nw-nums i{ font-style:normal; color:var(--mu2,#64748b); font-weight:800; margin-inline-end:4px; font-size:10px; }

/* Loading skeletons */
.nw-skel{
  height:44px; margin:10px 18px; border-radius:10px;
  background:linear-gradient(90deg, rgba(148,163,184,.07) 25%, rgba(148,163,184,.14) 50%, rgba(148,163,184,.07) 75%);
  background-size:200% 100%; animation:nwShimmer 1.2s linear infinite;
}
@keyframes nwShimmer{ from{background-position:200% 0;} to{background-position:-200% 0;} }

/* Light theme adjustments */
html.light .nw-time,html.light .nw-title{ color:var(--tx,#0f172a); }
html.light .nw-day{ background:rgba(99,102,241,.07); }
html.light .nw-week-hdr{ background:rgba(99,102,241,.05); }

/* Mobile */
@media (max-width:640px){
  .nw-controls .ctrl{ min-width:120px; }
  .nw-row{ gap:8px; padding:10px 12px; }
  .nw-time{ min-width:52px; }
  .nw-list{ max-height:none; }
  .nw-status{ font-size:12.5px; padding:12px 14px; }
}

@media (prefers-reduced-motion: reduce){
  .page.on{ animation:none; }
  .nw-st-warn,.nw-st-flat{ animation:none; }
  .nw-skel{ animation:none; }
}


/* ════════════════════════════════════════════════════════════════
   POLISH v3 — Unified Design System (all pages, additive)
   طبقة تصميم موحّدة بأعلى معيار لكل الموقع:
   الواجهة الخارجية · تسجيل الدخول · الدفع · لوحة المستخدم · الأدمن
   ════════════════════════════════════════════════════════════════ */

/* ═══ 1) FOUNDATION — typography, accessibility, motion ═══ */
html{ scroll-behavior:smooth; }
body{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,.hero-h,.sec-h,.cta-h,.lp-h,.sh,.sec-hdr,.card-title{
  letter-spacing:-.02em;
  text-wrap:balance;
}
p,.hero-sub,.sec-sub,.lp-sub,.card-sub{ text-wrap:pretty; }

/* Keyboard focus ring — visible, consistent, never on mouse click */
:focus{ outline:none; }
:focus-visible{
  outline:2px solid var(--ac,#6366f1);
  outline-offset:2px;
  border-radius:6px;
}

/* Images & icons never overflow */
img,svg{ max-width:100%; height:auto; }

/* ═══ 2) LANDING PAGE (index.html) ═══ */

/* Navbar: frosted glass (landing top nav only) */
nav#nav{
  backdrop-filter:blur(14px) saturate(1.2);
  -webkit-backdrop-filter:blur(14px) saturate(1.2);
}

/* Hero: buttons glow (heading gradient already handled by the page itself) */
.hero-btns .btn-p, .cta-btns .btn-p{
  box-shadow:0 10px 30px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
.hero-btns .btn-p:hover, .cta-btns .btn-p:hover{
  box-shadow:0 16px 40px rgba(99,102,241,.5), inset 0 1px 0 rgba(255,255,255,.25);
  transform:translateY(-2px);
}

/* Section tag pills */
.sec-tag, .lp-badge{
  border-radius:999px;
  background:linear-gradient(135deg, rgba(99,102,241,.14), rgba(139,92,246,.12));
  border:1px solid rgba(99,102,241,.28);
  letter-spacing:.08em;
}

/* Feature cards */
.si{ position:relative; overflow:hidden; border-radius:18px;
  transition:transform .22s var(--ease-out,ease), box-shadow .22s ease, border-color .22s ease; }
.si::before{
  content:''; position:absolute; inset-inline-start:0; right:0; left:0; top:0; height:2px;
  background:linear-gradient(90deg,var(--ac,#6366f1),var(--pu,#8b5cf6));
  opacity:0; transition:opacity .2s ease;
}
.si:hover{ transform:translateY(-5px); box-shadow:var(--shadow-lg,0 14px 34px rgba(0,0,0,.45)); border-color:rgba(99,102,241,.3); }
.si:hover::before{ opacity:1; }

/* Pricing cards */
.pcard{ border-radius:20px; position:relative;
  transition:transform .22s var(--ease-out,ease), box-shadow .22s ease, border-color .22s ease; }
.pcard:hover{ transform:translateY(-6px); box-shadow:0 22px 50px rgba(0,0,0,.5); }
html.light .pcard:hover{ box-shadow:0 22px 50px rgba(15,23,42,.14); }
.pbadge{ border-radius:999px; letter-spacing:.06em; }
.pprice,.pbig{ font-variant-numeric:tabular-nums; letter-spacing:-.02em; }

/* Testimonials */
.tcard{ border-radius:18px; transition:transform .2s var(--ease-out,ease), box-shadow .2s ease; }
.tcard:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md,0 4px 12px rgba(0,0,0,.35)); }
.tav{ box-shadow:0 0 0 3px rgba(99,102,241,.25); }

/* Live ticker strip */
.ticker{ border-block:1px solid rgba(99,102,241,.14); }
.t-item{ font-variant-numeric:tabular-nums; }

/* Video frame */
.vid-frame{ border-radius:20px; box-shadow:0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(99,102,241,.18); }
.play{ transition:transform .2s var(--ease-spring,ease); }
.play:hover{ transform:scale(1.08); }

/* CTA section */
.cta-sec{ position:relative; }
.cta-h{ letter-spacing:-.025em; }

/* Footer links */
.fl a, .flinks a{ transition:color .15s ease, opacity .15s ease; }
.fl a:hover, .flinks a:hover{ color:var(--ac-light,#818cf8); }

/* Mobile menu */
.mob-menu{ backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }
.mob-link{ border-radius:10px; transition:background .15s ease; }
.mob-link:hover{ background:rgba(99,102,241,.10); }

/* ═══ 3) LOGIN PAGE (login.html) ═══ */
.auth-card{
  border-radius:22px;
  box-shadow:0 24px 64px rgba(0,0,0,.45), 0 0 0 1px rgba(99,102,241,.12), inset 0 1px 0 rgba(255,255,255,.04);
}
html.light .auth-card{ box-shadow:0 24px 64px rgba(15,23,42,.10), 0 0 0 1px rgba(99,102,241,.14); }

.finput{
  border-radius:12px;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.finput:hover{ border-color:rgba(99,102,241,.35); }
.flabel{ letter-spacing:.02em; }

.btn-auth{
  border-radius:12px;
  background-image:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  box-shadow:0 8px 24px rgba(99,102,241,.30), inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .16s var(--ease-out,ease), box-shadow .16s ease, filter .16s ease;
}
.btn-auth:hover{ transform:translateY(-2px); box-shadow:0 14px 34px rgba(99,102,241,.45); filter:brightness(1.05); }
.btn-auth:active{ transform:translateY(0); }

.auth-tabs{ border-radius:12px; }
.tab-btn{ border-radius:10px; transition:background .18s ease, color .18s ease, box-shadow .18s ease; }

.plan-opt{ border-radius:14px; transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.plan-opt:hover{ transform:translateY(-2px); border-color:rgba(99,102,241,.4); }

.lp-stat-n{ font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.lp-feat{ transition:transform .18s ease; }
.lp-feat:hover{ transform:translateX(4px); }
html[dir="rtl"] .lp-feat:hover{ transform:translateX(-4px); }

/* ═══ 4) PAYMENT PAGE (payment.html) ═══ */
.pay-box, .plan-card{ border-radius:18px; }
.net-card{
  border-radius:14px; cursor:pointer;
  transition:transform .16s var(--ease-out,ease), border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.net-card:hover{ transform:translateY(-3px); border-color:rgba(99,102,241,.45); box-shadow:0 10px 26px rgba(0,0,0,.35); }

.step-num{
  transition:background .2s ease, box-shadow .2s ease, color .2s ease;
  font-variant-numeric:tabular-nums;
}
.wallet-addr, .hash-input{
  font-family:var(--mono,'JetBrains Mono',monospace);
  font-variant-ligatures:none; letter-spacing:.01em;
}
.wallet-box{ border-radius:14px; }
.copy-btn{ border-radius:10px; transition:transform .14s ease, background .14s ease; }
.copy-btn:active{ transform:scale(.94); }
.qr-wrap{ border-radius:16px; box-shadow:0 12px 32px rgba(0,0,0,.35); }
.timer-val{ font-family:var(--mono,monospace); font-variant-numeric:tabular-nums; }
.status-box{ border-radius:16px; }
.btn-main{
  border-radius:12px;
  background-image:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  box-shadow:0 8px 24px rgba(99,102,241,.28), inset 0 1px 0 rgba(255,255,255,.16);
  transition:transform .16s ease, box-shadow .16s ease;
}
.btn-main:hover{ transform:translateY(-2px); box-shadow:0 14px 32px rgba(99,102,241,.42); }
.btn-sec{ border-radius:12px; transition:border-color .15s ease, background .15s ease; }
.warn-box{ border-radius:14px; }

/* ═══ 5) ADMIN PANEL (admin.html) ═══ */

/* Sidebar items: accent bar + hover */
.sb-i{ position:relative; border-radius:10px; transition:background .15s ease, color .15s ease; }
.sb-i.on::before, .sb-i.active::before{
  content:''; position:absolute; inset-inline-start:-6px; top:22%; bottom:22%;
  width:3px; border-radius:99px;
  background:linear-gradient(180deg,var(--ac,#6366f1),var(--pu,#8b5cf6));
}

/* KPI tiles */
.kc{ border-radius:16px; }
.kv{ font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.kl,.klbl{ letter-spacing:.05em; }

/* Cards */
.card-hdr{ letter-spacing:-.01em; }

/* Inputs & selects */
.inp,.sel{
  border-radius:10px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.inp:hover,.sel:hover{ border-color:rgba(99,102,241,.35); }

/* Tables: refined rows */
.tsc table{ border-collapse:separate; border-spacing:0; }
.tsc td,.tsc th{ transition:background .12s ease; }
.tb-r{ transition:background .12s ease; }
.tb-r:hover{ background:rgba(99,102,241,.08); }

/* Modals */
.mdl{ border-radius:18px; box-shadow:0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(99,102,241,.14); }
.mdl-h{ letter-spacing:-.01em; }

/* Messages center */
.lb-item,.mi-t{ border-radius:12px; transition:background .14s ease, transform .14s ease; }
.lb-item:hover{ transform:translateY(-2px); }
.msg-inp{ border-radius:12px; }
.bbl-t{ border-radius:14px 14px 14px 4px; }
html[dir="rtl"] .bbl-t{ border-radius:14px 14px 4px 14px; }

/* Pills, badges, quick buttons */
.adm-pill,.sb-bdg,.net-tag{ border-radius:999px; font-variant-numeric:tabular-nums; }
.dd-qbtn{ border-radius:9px; transition:transform .13s ease, background .13s ease; }
.dd-qbtn:hover{ transform:translateY(-1px); }
.ico-btn{ border-radius:10px; transition:background .14s ease, transform .14s ease; }
.ico-btn:active{ transform:scale(.92); }

/* Empty state */
.empty-state{ opacity:.85; }

/* ═══ 6) DASHBOARD EXTRAS ═══ */
.topbar{ backdrop-filter:blur(12px) saturate(1.15); -webkit-backdrop-filter:blur(12px) saturate(1.15); }
#banner{ border-radius:0 0 14px 14px; }
.chart-card{ border-radius:16px; }
.kpi-val{ letter-spacing:-.02em; }

/* ═══ 7) SHARED COMPONENTS ═══ */

/* Toast: unified across all pages */
.toast-wrap .toast{
  box-shadow:0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(99,102,241,.12);
}
.toast-close{ transition:transform .13s ease, opacity .13s ease; }
.toast-close:hover{ transform:rotate(90deg); }

/* Language dropdowns */
.lang-menu,.lang-menu-sb,.ld-menu{
  border-radius:14px;
  box-shadow:0 20px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(99,102,241,.15);
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
}
.lang-opt,.lang-opt-sb,.lo{ border-radius:9px; transition:background .13s ease; }

/* Theme toggle button */
.theme-btn{ transition:transform .18s var(--ease-spring,ease), background .18s ease; }
.theme-btn:hover{ transform:rotate(-12deg) scale(1.06); }

/* Skeleton shimmer available everywhere */
.skel{
  border-radius:10px;
  background:linear-gradient(90deg, rgba(148,163,184,.07) 25%, rgba(148,163,184,.15) 50%, rgba(148,163,184,.07) 75%);
  background-size:200% 100%; animation:nwShimmer 1.2s linear infinite;
}

/* ═══ 8) LIGHT THEME REFINEMENTS ═══ */
html.light ::-webkit-scrollbar-thumb{ background:rgba(99,102,241,.30); background-clip:content-box; border:2px solid transparent; }
html.light ::selection{ background:rgba(99,102,241,.22); color:#0f172a; }
html.light .chart-card,html.light .card,html.light .kpi-card,html.light .kc{
  box-shadow:0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
}
html.light .kpi-card:hover,html.light .chart-card:hover,html.light .card:hover,html.light .kc:hover{
  box-shadow:0 14px 34px rgba(15,23,42,.12);
}
html.light .mdl{ box-shadow:0 32px 80px rgba(15,23,42,.18), 0 0 0 1px rgba(99,102,241,.14); }

/* ═══ 9) MOTION & PRINT ═══ */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .si,.pcard,.tcard,.net-card,.plan-opt,.lp-feat,.btn-auth,.btn-main,
  .play,.theme-btn,.lb-item,.dd-qbtn,.ico-btn{ transition:none; }
  .si:hover,.pcard:hover,.tcard:hover,.net-card:hover,.plan-opt:hover,
  .lp-feat:hover,.btn-auth:hover,.btn-main:hover,.lb-item:hover{ transform:none; }
  .skel{ animation:none; }
}
@media print{
  .sidebar,.sb,.topbar,.toast-wrap,#banner,.nw-status{ display:none !important; }
  body{ background:#fff !important; color:#000; }
  .chart-card,.card{ box-shadow:none !important; border:1px solid #ddd; }
}


/* ════════════════════════════════════════════════════════════════
   POLISH v4 — Contrast & Legibility Fixes (site-wide)
   إصلاح تداخل الألوان: نصوص غير ظاهرة داخل القوائم المنسدلة،
   حقول الإدخال، الملء التلقائي، والـ placeholders — في الوضعين.
   ════════════════════════════════════════════════════════════════ */

/* ── 1) Native controls follow the theme ──
   Fixes: white-on-white text inside <select> dropdown lists,
   invisible date-picker icons, native checkbox/radio colors. */
:root{ color-scheme:dark; }
html.light{ color-scheme:light; }

/* ── 2) Dropdown options: explicit, theme-correct colors ──
   (covers .ctrl / .sel / .finput / any bare <select> everywhere) */
select, select.ctrl, select.sel, select.finput{
  color:var(--tx, var(--txt, #f1f5f9));
}
option, optgroup{
  background:var(--bg3, #11151f);
  color:var(--tx, var(--txt, #f1f5f9));
  font-weight:600;
}
option:disabled{ color:var(--mu2,#64748b); }
html.light option, html.light optgroup{
  background:#ffffff;
  color:#0f172a;
}
html.light select, html.light select.ctrl,
html.light select.sel, html.light select.finput{
  color:#0f172a;
}

/* ── 3) Chrome/Safari autofill: was yellow/white bg + light text ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill{
  -webkit-box-shadow:0 0 0 1000px var(--bg3,#11151f) inset !important;
  box-shadow:0 0 0 1000px var(--bg3,#11151f) inset !important;
  -webkit-text-fill-color:var(--tx, var(--txt, #f1f5f9)) !important;
  caret-color:var(--tx, var(--txt, #f1f5f9));
  transition:background-color 9999s ease-in-out 0s;
}
html.light input:-webkit-autofill,
html.light input:-webkit-autofill:hover,
html.light input:-webkit-autofill:focus,
html.light textarea:-webkit-autofill{
  -webkit-box-shadow:0 0 0 1000px #ffffff inset !important;
  box-shadow:0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color:#0f172a !important;
  caret-color:#0f172a;
}

/* ── 4) Placeholders: always visible, both themes ── */
::placeholder{ color:var(--mu,#94a3b8) !important; opacity:1; }
html.light ::placeholder{ color:#64748b !important; opacity:1; }

/* ── 5) Date/time/number inputs: text + icons legible on dark ── */
input[type="date"], input[type="time"], input[type="datetime-local"],
input[type="month"], input[type="number"]{
  color:var(--tx, var(--txt, #f1f5f9));
}
html.light input[type="date"], html.light input[type="time"],
html.light input[type="datetime-local"], html.light input[type="month"],
html.light input[type="number"]{
  color:#0f172a;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator{
  filter:invert(.75) sepia(.1) saturate(2) hue-rotate(200deg);
  cursor:pointer;
}
html.light input[type="date"]::-webkit-calendar-picker-indicator,
html.light input[type="time"]::-webkit-calendar-picker-indicator{
  filter:none;
}

/* ── 6) Disabled fields: dim but still readable ── */
input:disabled, select:disabled, textarea:disabled, button:disabled{
  opacity:.55;
  -webkit-text-fill-color:currentColor;
}

/* ── 7) Textareas inherit the same guarantees ── */
textarea{ color:var(--tx, var(--txt, #f1f5f9)); }
html.light textarea{ color:#0f172a; }

/* ── News: futures instrument chips (which contracts the event moves) ── */
.nw-syms{ display:inline-flex; gap:4px; flex-wrap:wrap; align-items:center; }
.nw-sym{
  font-style:normal; font-family:var(--mono,'JetBrains Mono',monospace);
  font-size:9.5px; font-weight:800; letter-spacing:.02em;
  color:var(--ac-light,#818cf8); background:rgba(99,102,241,.10);
  border:1px solid rgba(99,102,241,.26); border-radius:6px; padding:1.5px 6px;
  font-variant-numeric:tabular-nums;
}
.nw-sym-all{
  color:var(--go-light,#fbbf24); background:rgba(245,158,11,.10);
  border-color:rgba(245,158,11,.30);
}
html.light .nw-sym{ color:var(--ac,#6366f1); }
html.light .nw-sym-all{ color:#b45309; }
