/* ============================================================
   ForexBro — Dashboard / Admin visual redesign
   Modeled after Corelytics + Fobework references:
   - Bold over-sized numbers
   - Icons in colored rounded containers (top-right of cards)
   - Glassy gradient surfaces with soft outer glow
   - Calm dark palette with gold/green/red accents
   - Mobile-first sizing
   Loaded LAST so rules win without !important spam.
   ============================================================ */

/* ─────────── Layout breathing room ─────────── */
.content { padding: 28px 32px !important; }
@media (max-width: 768px) { .content { padding: 18px 14px !important; } }

/* ─────────── Page heading ─────────── */
.page-header { margin-bottom: 22px; }
.page-title {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  background: linear-gradient(180deg, #ffffff 0%, #c9d1e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 768px){ .page-title { font-size: 22px; } }

/* ─────────── HERO CARD — refined ─────────── */
.fb-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(26, 32, 52, 0.8) 0%, rgba(15, 19, 32, 0.9) 100%),
    radial-gradient(circle at top right, rgba(255, 184, 0, 0.12), transparent 60%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 32px 30px;
  margin-bottom: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.22);
}
.fb-hero::before {
  content: "";
  position: absolute;
  top: -120px;
  inset-inline-end: -120px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.22) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}
.fb-hero::after {
  content: "";
  position: absolute;
  bottom: -120px;
  inset-inline-start: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 135, 0.10) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}
.fb-hero-greet {
  font-size: 13px;
  color: rgba(216, 225, 255, 0.65);
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}
.fb-hero-name {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #c0c8de 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fb-hero-sub {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(216, 225, 255, 0.62);
  max-width: 540px;
}
@media (max-width: 768px) {
  .fb-hero { padding: 22px 18px; border-radius: 16px; }
  .fb-hero-name { font-size: 22px; }
  .fb-hero-sub { font-size: 13px; }
}

/* Subscription quick-card (right side of hero) */
#dashHeroSubInfo {
  position: relative;
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.18);
  border-radius: 14px;
  padding: 14px 18px;
  min-width: 200px !important;
  text-align: start !important;
  z-index: 1;
}
#dashHeroPlanName {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif !important;
  font-size: 24px !important;
  letter-spacing: -0.5px !important;
}
#dashHeroManageSub {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FF8A00 100%) !important;
  color: #04060d !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(255, 184, 0, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#dashHeroManageSub:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 184, 0, 0.45); }

/* Hero pills row */
.fb-hero-meta { margin-top: 18px; gap: 8px; flex-wrap: wrap; }
.fb-hero-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 7px 14px !important;
  border-radius: 999px !important;
  font-size: 12px;
  color: rgba(216, 225, 255, 0.85);
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.fb-hero-pill.live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green, #00ff87);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.7);
  animation: fb-hero-live-pulse 1.6s ease-in-out infinite;
}
@keyframes fb-hero-live-pulse { 50% { opacity: 0.6; } }

/* ─────────── STAT CARDS GRID ─────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 22px;
}
@media (max-width: 1024px){ .stats-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px){ .stats-grid { grid-template-columns: 1fr !important; } }

.stat-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 35%),
    rgba(20, 25, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 18px !important;
  padding: 22px 22px 20px !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 20px rgba(0, 0, 0, 0.18);
}
.stat-card::after { display: none !important; }
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 184, 0, 0.20) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(255, 184, 0, 0.06);
}

.stat-card-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 14px !important;
  gap: 10px;
}
.stat-card-label {
  font-size: 11px !important;
  color: rgba(216, 225, 255, 0.55) !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  margin: 0 !important;
}
.stat-card-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 184, 0, 0.12);
  color: var(--accent-gold, #ffb800);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.stat-card-icon.green { background: rgba(0, 255, 135, 0.12); color: var(--accent-green, #00ff87); }
.stat-card-icon.red   { background: rgba(255, 59, 92, 0.12); color: var(--accent-red, #ff3b5c); }
.stat-card-icon.blue  { background: rgba(77, 127, 255, 0.14); color: #4d7fff; }
.stat-card-icon.purple{ background: rgba(157, 108, 255, 0.14); color: #9d6cff; }
.stat-card-icon.gold  { background: rgba(255, 184, 0, 0.14); color: var(--accent-gold, #ffb800); }
.stat-card-icon svg { width: 18px !important; height: 18px !important; }

.stat-card-value {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.8px !important;
  color: #ffffff !important;
  margin: 0 !important;
}
.stat-card-value .currency { font-size: 18px; opacity: 0.7; margin-inline-start: 2px; font-weight: 700; }

.stat-card-change {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  font-size: 12px !important;
  font-weight: 600 !important;
  margin-top: 10px !important;
  color: rgba(216, 225, 255, 0.55) !important;
}
.stat-card-change.up   { color: var(--accent-green, #00ff87) !important; }
.stat-card-change.down { color: var(--accent-red, #ff3b5c) !important; }

@media (max-width: 480px){
  .stat-card { padding: 18px !important; border-radius: 14px !important; }
  .stat-card-value { font-size: 26px !important; }
  .stat-card-icon { width: 32px !important; height: 32px !important; }
}

/* ─────────── Decorative sparkline backgrounds on each stat card ─────────── */
/* Inline SVG sparklines via background-image — purely decorative, gives the card "alive" feel
   without needing a chart library. Each card gets a distinct color to match its icon.
   2026-05-19 — sparkline height reduced 70 → 48px and pinned strictly inside the
   card. Previously 70px sparkline + 60px padding caused the bottom 10px of the
   gradient to overflow the card edge, looking like the cards bled into the
   adjacent big chart on the right. */
.stats-grid .stat-card {
  padding-bottom: 56px !important;
  overflow: hidden !important;
  isolation: isolate;
}
.stats-grid .stat-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 48px;
  pointer-events: none;
  opacity: 0.45;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 100%;
  z-index: 0;
}
/* Make sure card body text sits above the decoration */
.stats-grid .stat-card > * { position: relative; z-index: 1; }

/* Card 1 — Active signals (gold) */
.stats-grid .stat-card:nth-child(4n+1)::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0%' stop-color='%23FFB800' stop-opacity='0.45'/><stop offset='100%' stop-color='%23FFB800' stop-opacity='0'/></linearGradient></defs><path d='M0,45 L20,40 L40,42 L60,30 L80,33 L100,22 L120,28 L140,18 L160,24 L180,15 L200,20 L200,60 L0,60 Z' fill='url(%23g)'/><path d='M0,45 L20,40 L40,42 L60,30 L80,33 L100,22 L120,28 L140,18 L160,24 L180,15 L200,20' fill='none' stroke='%23FFB800' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* Card 2 — Win rate (green) */
.stats-grid .stat-card:nth-child(4n+2)::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0%' stop-color='%2300FF87' stop-opacity='0.40'/><stop offset='100%' stop-color='%2300FF87' stop-opacity='0'/></linearGradient></defs><path d='M0,50 L20,42 L40,46 L60,32 L80,36 L100,24 L120,28 L140,16 L160,20 L180,12 L200,8 L200,60 L0,60 Z' fill='url(%23g)'/><path d='M0,50 L20,42 L40,46 L60,32 L80,36 L100,24 L120,28 L140,16 L160,20 L180,12 L200,8' fill='none' stroke='%2300FF87' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* Card 3 — Total pips (blue) */
.stats-grid .stat-card:nth-child(4n+3)::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0%' stop-color='%234D7FFF' stop-opacity='0.42'/><stop offset='100%' stop-color='%234D7FFF' stop-opacity='0'/></linearGradient></defs><path d='M0,38 L18,40 L36,28 L54,32 L72,20 L90,26 L108,18 L126,30 L144,22 L162,32 L180,18 L200,28 L200,60 L0,60 Z' fill='url(%23g)'/><path d='M0,38 L18,40 L36,28 L54,32 L72,20 L90,26 L108,18 L126,30 L144,22 L162,32 L180,18 L200,28' fill='none' stroke='%234D7FFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* Card 4 — Total trades (red) */
.stats-grid .stat-card:nth-child(4n)::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0%' stop-color='%23FF3B5C' stop-opacity='0.38'/><stop offset='100%' stop-color='%23FF3B5C' stop-opacity='0'/></linearGradient></defs><path d='M0,30 L20,28 L40,38 L60,34 L80,42 L100,38 L120,32 L140,40 L160,28 L180,36 L200,24 L200,60 L0,60 Z' fill='url(%23g)'/><path d='M0,30 L20,28 L40,38 L60,34 L80,42 L100,38 L120,32 L140,40 L160,28 L180,36 L200,24' fill='none' stroke='%23FF3B5C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* ─────────── Hero subscription card — circular progress ring around days ─────────── */
#dashHeroSubInfo {
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  gap: 8px;
  padding: 18px 22px !important;
  text-align: center !important;
}
#dashHeroSubInfo > div:first-child {
  align-self: stretch;
  text-align: start;
}

/* Circular progress ring container — wraps the days number */
.fb-hero-ring {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 4px;
}
.fb-hero-ring svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.fb-hero-ring svg .ring-bg { stroke: rgba(255,255,255,0.08); }
.fb-hero-ring svg .ring-fg {
  stroke: url(#ringGrad);
  filter: drop-shadow(0 0 8px rgba(255,184,0,0.35));
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4,0,0.2,1);
}
.fb-hero-ring-num {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 38px !important;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--accent-gold, #ffb800);
  line-height: 1;
}
.fb-hero-ring-lbl {
  position: absolute;
  bottom: 22px;
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(216,225,255,0.5);
  font-weight: 700;
}

/* =================================================================
   OVERVIEW — restructured layout (Corelytics-inspired)
   3 rows: greeting+ring | stats+chart | recent+donut
   ================================================================= */
/* The overview page is now a vertical stack of FOUR clearly-separated
   rows. Earlier the chart sat NEXT TO a 2x2 stats grid, which (a) made
   the chart too narrow and (b) created an awkward L-shaped block that
   read as a single visual mass with the stat cards. The new layout:
     ROW 1: greeting (left) + subscription ring (right)
     ROW 2: 4 stat cards in a single equal row
     ROW 3: performance chart, full width
     ROW 4: latest signals (left) + results donut (right)
   The other half of the fix is *contrast*: cards now have a noticeably
   lighter background than the page so they read as distinct surfaces,
   not just darker patches of the same plane. See `.stat-card` and
   `.ov-greeting-card` overrides below for the elevated treatment. */
.ov-page { display: flex; flex-direction: column; gap: 32px; }

/* ─────────── ROW 1: greeting + subscription ring ─────────── */
.ov-top-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
}
@media (max-width: 900px) { .ov-top-row { grid-template-columns: 1fr; } }

.ov-greeting-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(26, 32, 52, 0.85) 0%, rgba(15, 19, 32, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.22);
}
.ov-greeting-card::before {
  content: ""; position: absolute;
  top: -120px; inset-inline-end: -120px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.22) 0%, transparent 70%);
  filter: blur(50px); pointer-events: none;
}
.ov-greeting-card::after {
  content: ""; position: absolute;
  bottom: -120px; inset-inline-start: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 135, 0.10) 0%, transparent 70%);
  filter: blur(60px); pointer-events: none;
}
.ov-greet-pre {
  position: relative; z-index: 1;
  font-size: 13px;
  color: rgba(216, 225, 255, 0.65);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.ov-greet-name {
  position: relative; z-index: 1;
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #c0c8de 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ov-greet-sub {
  position: relative; z-index: 1;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(216, 225, 255, 0.62);
  max-width: 540px;
}
.ov-greet-pills {
  position: relative; z-index: 1;
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ov-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(216, 225, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.ov-pill.live::before {
  content: ""; width: 7px; height: 7px;
  border-radius: 50%;
  background: #00ff87;
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.7);
  animation: ov-live 1.6s ease-in-out infinite;
}
@keyframes ov-live { 50% { opacity: 0.55; } }

@media (max-width: 768px) {
  .ov-greeting-card { padding: 22px 20px; border-radius: 16px; }
  .ov-greet-name { font-size: 26px; }
  .ov-greet-sub { font-size: 13px; }
}

/* Subscription ring card */
.ov-sub-card {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 184, 0, 0.10) 0%, rgba(255, 184, 0, 0) 55%),
    linear-gradient(180deg, rgba(28, 33, 52, 0.92) 0%, rgba(16, 20, 34, 0.92) 100%);
  border: 1px solid rgba(255, 184, 0, 0.22);
  border-radius: 22px;
  padding: 22px 20px 20px;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 20px 52px rgba(0, 0, 0, 0.28);
  text-align: start;
  min-width: 0;
  overflow: hidden;
}
/* Thin gold accent line across the very top of the card */
.ov-sub-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,184,0,0) 0%, rgba(255,184,0,0.85) 50%, rgba(255,184,0,0) 100%);
}
.ov-sub-card[style*="block"] { display: flex !important; }
.ov-sub-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.ov-sub-head .lbl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(216, 225, 255, 0.62);
  font-weight: 700;
}
/* Small gold dot before the label so it reads as a titled section */
.ov-sub-head .lbl::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-gold, #ffb800);
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.6);
  flex: none;
}
.ov-sub-plan {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-gold, #ffb800);
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.ov-ring {
  position: relative;
  width: 144px; height: 144px;
  margin: 6px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Circular glow that sits BEHIND the ring. Because this element is a perfect
   circle (border-radius:50%), its soft radial light is round — fixing the old
   "square glow" that came from a drop-shadow being clipped to the SVG's square
   viewport box. JS recolours it via the [data-ring-state] attribute. */
.ov-ring::before {
  content: "";
  position: absolute;
  width: 112px; height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0, 255, 135, 0.22) 0%,
    rgba(0, 255, 135, 0.10) 45%,
    rgba(0, 255, 135, 0) 72%);
  filter: blur(4px);
  z-index: 0;
  pointer-events: none;
  transition: background 0.35s ease;
}
.ov-ring svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  overflow: visible;            /* let the stroke glow extend past the box */
  z-index: 1;
}
.ov-ring svg .ring-bg { stroke: rgba(255, 255, 255, 0.07); }
.ov-ring svg .ring-fg {
  /* A tight glow that hugs the stroke itself — now circular because the SVG
     is overflow:visible, so it is no longer clipped to the square viewport. */
  filter: drop-shadow(0 0 5px rgba(0, 255, 135, 0.45));
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}
.ov-ring[data-ring-state="warn"]::before {
  background: radial-gradient(circle, rgba(255,184,0,0.22) 0%, rgba(255,184,0,0.10) 45%, rgba(255,184,0,0) 72%);
}
.ov-ring[data-ring-state="warn"]   svg .ring-fg { filter: drop-shadow(0 0 5px rgba(255, 184, 0, 0.48)); }
.ov-ring[data-ring-state="danger"]::before {
  background: radial-gradient(circle, rgba(255,59,92,0.24) 0%, rgba(255,59,92,0.11) 45%, rgba(255,59,92,0) 72%);
}
.ov-ring[data-ring-state="danger"] svg .ring-fg { filter: drop-shadow(0 0 5px rgba(255, 59, 92, 0.50)); }
.ov-ring-center { position: relative; text-align: center; z-index: 2; }
.ov-ring-center .num {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.ov-ring-center .lbl {
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(216, 225, 255, 0.60);
  font-weight: 700;
}
/* Manage-subscription button: gold, full width, premium feel */
#dashHeroManageSub {
  margin-top: 2px;
  background: linear-gradient(180deg, #ffc62b 0%, #ffb800 100%);
  color: #1a1405;
  font-weight: 800;
  border: none;
  border-radius: 13px;
  padding: 12px 16px;
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#dashHeroManageSub:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255, 184, 0, 0.32);
}

/* ─────────── ROW 2: Stats grid (2x2) + Big chart ─────────── */
/* ROW 2 — 4 stat cards in their OWN row (no more chart sharing this row) */
.ov-stats-grid.stats-grid.ov-stats-4col {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 22px !important;
  margin-bottom: 0 !important;
}
@media (max-width: 1100px) { .ov-stats-grid.stats-grid.ov-stats-4col { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 600px)  { .ov-stats-grid.stats-grid.ov-stats-4col { grid-template-columns: 1fr !important; } }

/* ROW 3 — performance chart now spans the full width on its own */
.ov-chart-card.ov-chart-fullwidth {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.ov-chart-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.ov-chart-pill {
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 184, 0, 0.10);
  color: var(--accent-gold, #ffb800);
  border: 1px solid rgba(255, 184, 0, 0.22);
}
.ov-perf-chart {
  flex: 1;
  min-height: 280px;
  padding: 16px 4px;
  position: relative;
}
.ov-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 200px;
  color: rgba(216, 225, 255, 0.4);
  font-size: 13px;
}

/* ─────────── ROW 3: Recent signals + Win/Loss donut ─────────── */
.ov-bottom-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
}
@media (max-width: 900px) { .ov-bottom-row { grid-template-columns: 1fr; } }

.ov-donut-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.ov-donut-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 6px auto 16px;
}
.ov-donut-wrap svg { width: 100%; height: 100%; }
.ov-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ov-donut-center .num {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #ffffff;
  line-height: 1;
}
.ov-donut-center .lbl {
  margin-top: 6px;
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(216, 225, 255, 0.55);
  font-weight: 700;
}
.ov-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.ov-donut-legend .leg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 13px;
}
.ov-donut-legend .leg-row .dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
}
.ov-donut-legend .leg-row .dot.win    { background: #00ff87; box-shadow: 0 0 8px rgba(0,255,135,0.4); }
.ov-donut-legend .leg-row .dot.loss   { background: #ff3b5c; box-shadow: 0 0 8px rgba(255,59,92,0.4); }
.ov-donut-legend .leg-row .dot.active { background: #ffb800; box-shadow: 0 0 8px rgba(255,184,0,0.4); }
.ov-donut-legend .leg-row .lbl {
  flex: 1;
  color: rgba(216, 225, 255, 0.85);
  font-weight: 600;
}
.ov-donut-legend .leg-row .num {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
}

/* ─────────── CARD (general) ─────────── */
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0%, rgba(255, 255, 255, 0) 30%),
    rgba(20, 25, 40, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 18px !important;
  padding: 22px 24px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.card-head, .card-header {
  padding: 0 0 16px 0 !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-head.no-border, .card-header.no-border { border-bottom: none; padding-bottom: 0 !important; }
.card-title {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px;
  color: #ffffff;
}
.card-subtitle, .card-desc {
  font-size: 12px;
  color: rgba(216, 225, 255, 0.52);
  margin-top: 2px;
  letter-spacing: 0.1px;
}
@media (max-width: 480px){
  .card { padding: 18px !important; border-radius: 14px !important; }
  .card-title { font-size: 14px !important; }
}

/* ─────────── ADMIN KPI CARDS — match new style ─────────── */
.adm-partners-kpi, .adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 1100px){ .adm-partners-kpi, .adm-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px){  .adm-partners-kpi, .adm-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px){  .adm-partners-kpi, .adm-kpi-grid { grid-template-columns: 1fr; } }

.adm-kpi-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 30%),
    rgba(20, 25, 40, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 16px !important;
  padding: 18px 16px !important;
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.22s ease, border-color 0.22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.18);
}
.adm-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 184, 0, 0.20) !important;
}
.adm-kpi-card.highlight {
  border-color: rgba(255, 184, 0, 0.28) !important;
  background:
    linear-gradient(135deg, rgba(255, 184, 0, 0.10) 0%, rgba(255, 138, 0, 0.02) 100%),
    rgba(20, 25, 40, 0.55) !important;
}
.adm-kpi-card.warn {
  border-color: rgba(77, 127, 255, 0.22) !important;
  background:
    linear-gradient(135deg, rgba(77, 127, 255, 0.10) 0%, rgba(58, 90, 220, 0.02) 100%),
    rgba(20, 25, 40, 0.55) !important;
}
.adm-kpi-card.alert {
  border-color: rgba(239, 68, 68, 0.22) !important;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.10) 0%, rgba(220, 38, 38, 0.02) 100%),
    rgba(20, 25, 40, 0.55) !important;
}
.adm-kpi-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px !important;
  margin-bottom: 6px !important;
}
.adm-kpi-num {
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.5px !important;
  color: #ffffff !important;
}
.adm-kpi-card.highlight .adm-kpi-num { color: var(--accent-gold, #ffb800) !important; }
.adm-kpi-card.alert .adm-kpi-num     { color: #ff6b6b !important; }
.adm-kpi-card.warn .adm-kpi-num      { color: #6c8eff !important; }
.adm-kpi-lbl {
  font-size: 11px !important;
  color: rgba(216, 225, 255, 0.55) !important;
  letter-spacing: 0.4px;
  font-weight: 600;
}

/* ─────────── BUTTONS — small refinement ─────────── */
.btn {
  border-radius: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1px !important;
  /* Inter first (clean for Latin), Tajawal for Arabic glyphs — same stack
     as the rest of the site. Tajawal was leading before, which made the
     English label on the gold CTA look out of place compared to body text. */
  font-family: 'Inter', 'Tajawal', system-ui, sans-serif !important;
}
.btn-sm { font-size: 12.5px !important; padding: 7px 14px !important; min-height: 34px !important; }

/* ─────────── BADGES (modern pill) ─────────── */
.badge {
  font-size: 10.5px !important;
  letter-spacing: 0.6px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

/* ─────────── SIDEBAR refinements ─────────── */
/* السايدبار حاوية flex ولا تسكرّل بنفسها (السكرول داخل .sidebar-scroll)،
   حتى تبقى بطاقة المستخدم في الأسفل ثابتة تماماً ولا تطلع عناصر القائمة
   من خلفها. */
.sidebar {
  padding: 22px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 8px;
  /* 2026-06-03 (المالك): فراغ يمين القائمة فلا تلتصق الأزرار بشريط التمرير. */
  padding-inline-end: 9px;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  margin-bottom: 22px;
  font-family: 'Space Grotesk', 'Tajawal', system-ui, sans-serif !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px;
}
.sidebar-section { margin-bottom: 18px; }
.sidebar-section-title {
  font-size: 10.5px !important;
  letter-spacing: 1.6px !important;
  color: rgba(216, 225, 255, 0.42) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  padding: 0 12px !important;
  margin-bottom: 8px !important;
}
.sidebar-link {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 11px 12px !important;
  border-radius: 10px !important;
  letter-spacing: 0.1px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(216, 225, 255, 0.72) !important;
  transition: background 0.18s ease, color 0.18s ease;
}
.sidebar-link svg { width: 17px; height: 17px; }
.sidebar-link:hover { background: rgba(255, 255, 255, 0.04) !important; color: #ffffff !important; }
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(255, 184, 0, 0.14) 0%, rgba(255, 184, 0, 0.02) 100%) !important;
  color: var(--accent-gold, #ffb800) !important;
  box-shadow: inset 2px 0 0 var(--accent-gold, #ffb800);
}
[dir="rtl"] .sidebar-link.active { box-shadow: inset -2px 0 0 var(--accent-gold, #ffb800); }

/* ─────────── SIDEBAR USER (bottom) ─────────── */
/* البطاقة خارج منطقة السكرول (.sidebar-scroll)، فهي ثابتة في أسفل السايدبار
   ولا تتأثر بحركة القائمة. */
.sidebar-user {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.005)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 12px 12px 14px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto !important;
  margin-top: 12px !important;
}
.sidebar-user-avatar {
  width: 36px !important; height: 36px !important;
  border-radius: 10px !important;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800 !important;
  font-size: 14px !important;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-gold), #FF8A00) !important;
  color: #04060d !important;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.25);
  /* الحرف الأول يُعرض دائماً بخط لاتيني نظيف (لا يلتبس مع العربي) */
  font-family: 'Inter', 'Space Grotesk', Arial, sans-serif !important;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.1px;
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-plan {
  font-size: 10.5px !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  color: var(--accent-gold, #ffb800) !important;
  font-weight: 700 !important;
  margin-top: 2px;
}

/* ─────────── SIDEBAR USER ID — visible monospace pill below the name ─────────── */
.sidebar-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.sidebar-user-id {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  margin: 3px 0 4px !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: rgba(216, 225, 255, 0.65) !important;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10.5px !important;
  letter-spacing: 0.2px;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  transition: all 0.18s ease;
  user-select: all;
}
.sidebar-user-id::before { content: none; }
.sidebar-user-id .lbl {
  display: inline !important;
  color: rgba(216, 225, 255, 0.4) !important;
  font-size: 10px;
  font-weight: 700;
}
.sidebar-user-id code {
  display: inline !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--accent-gold, #ffb800) !important;
  font-size: 10.5px !important;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: 0.4px;
}
.sidebar-user-id:hover {
  background: rgba(255, 184, 0, 0.08) !important;
  border-color: rgba(255, 184, 0, 0.22) !important;
}
.sidebar-user-id.copied {
  background: rgba(0, 255, 135, 0.12) !important;
  border-color: rgba(0, 255, 135, 0.28) !important;
}
.sidebar-user-id.copied code { color: var(--accent-green, #00ff87) !important; }
.sidebar-user-id.copied .lbl { display: none !important; }

/* ─────────── PROGRESS BARS (plan distribution) ─────────── */
.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-gold), #FF8A00);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────── TABLES (cleaner header) ─────────── */
.tbl-wrap, .table-wrap {
  background: rgba(20, 25, 40, 0.4);
  border-radius: 14px;
  overflow: hidden;
}
table thead th, .tbl-wrap table thead th {
  font-size: 10.5px !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: rgba(216, 225, 255, 0.45) !important;
  padding: 14px 18px !important;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─────────── TABS (segmented look) ─────────── */
.tabs, .adm-ptabs {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
}
.tab, .ptab {
  border-radius: 9px !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.2px;
  padding: 8px 14px !important;
}
.tab.active, .ptab.active {
  background: linear-gradient(135deg, var(--accent-gold), #FF8A00) !important;
  color: #04060d !important;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.25);
}

/* ─────────── INPUTS (refined) ─────────── */
.form-input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-family: inherit !important;
  color: #ffffff !important;
}
input::placeholder, textarea::placeholder { color: rgba(216, 225, 255, 0.35); }
input:focus, textarea:focus, select:focus { border-color: rgba(255, 184, 0, 0.45) !important; }

/* ─────────── MOBILE refinements ─────────── */
@media (max-width: 768px){
  .fb-hero-row { flex-direction: column !important; gap: 18px !important; }
  #dashHeroSubInfo { width: 100%; min-width: 0 !important; }
}

/* ════════════════════════════════════════════════════════════════
   2026-06-06: ترقية كروت الإحصائيات بهوية بطاقات الأدمن الفخمة —
   تدرّج داكن عميق + توهج دائري بالزاوية بلون أيقونة الكرت + حدود
   ناعمة، على كل .stats-grid .stat-card في لوحة العميل. الموجة
   السفلية تبقى فوق هذا. نفس منطق .adm-hero/.adm-realtime.
   ════════════════════════════════════════════════════════════════ */
.stats-grid .stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 184, 0, 0.13), transparent 58%),
    linear-gradient(135deg, #131829 0%, #1A2038 100%) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
/* توهج زاوي ثانٍ خفيف (نفس لمسة .adm-hero::before) */
.stats-grid .stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 8% 100%, rgba(77, 127, 255, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
/* لون التوهج العلوي يتبع لون أيقونة الكرت — صف متناغم متدرّج الألوان */
.stats-grid .stat-card:has(.stat-card-icon.green) {
  background:
    radial-gradient(circle at 88% 0%, rgba(0, 255, 135, 0.13), transparent 58%),
    linear-gradient(135deg, #131829 0%, #1A2038 100%) !important;
}
.stats-grid .stat-card:has(.stat-card-icon.blue) {
  background:
    radial-gradient(circle at 88% 0%, rgba(77, 127, 255, 0.14), transparent 58%),
    linear-gradient(135deg, #131829 0%, #1A2038 100%) !important;
}
.stats-grid .stat-card:has(.stat-card-icon.red) {
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 59, 92, 0.12), transparent 58%),
    linear-gradient(135deg, #131829 0%, #1A2038 100%) !important;
}
/* رفع المحتوى والموجة فوق طبقة التوهج */
.stats-grid .stat-card > * { position: relative; z-index: 1; }
.stats-grid .stat-card::before { z-index: 0; opacity: 0.5; }
/* تفاعل لمسي/تمرير مثل بطاقات الأدمن */
.stats-grid .stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}