/* ============================================================
   ForexBro Dashboard v2 — Refined visual layer
   Builds on dashboard.css; preserves all class names so JS works.
   ============================================================ */

/* ── Smoother animations everywhere ── */
* { transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
@keyframes fb-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fb-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }
@keyframes fb-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ── Page transitions ── */
[data-page-content] { animation: fb-fade-up 0.28s ease both; }

/* ── Hero welcome card ── */
.fb-hero {
  position: relative;
  padding: 28px 32px;
  border-radius: 20px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at 88% -20%, rgba(255, 184, 0, 0.18), transparent 55%),
    radial-gradient(circle at 12% 130%, rgba(0, 255, 135, 0.12), transparent 50%),
    linear-gradient(135deg, #131829 0%, #1A2038 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.fb-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(77,127,255,0.08), transparent 70%);
  pointer-events: none;
}
.fb-hero-greet { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.fb-hero-name {
  font-size: 28px; font-weight: 800; letter-spacing: -0.4px;
  background: linear-gradient(90deg, #FFFFFF, #FFB800);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
}
.fb-hero-sub { color: var(--text-secondary); font-size: 14px; line-height: 1.6; max-width: 540px; }
.fb-hero-meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px;
}
.fb-hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.fb-hero-pill.gold { background: var(--accent-gold-dim); border-color: rgba(255,184,0,0.25); color: var(--accent-gold); }
.fb-hero-pill.green { background: var(--accent-green-dim); border-color: rgba(0,255,135,0.25); color: var(--accent-green); }
.fb-hero-pill.live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-green); animation: fb-pulse 1.6s ease-in-out infinite;
}

/* ── Stat cards refined ── */
.stat-card {
  position: relative;
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(20, 26, 45, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%);
  pointer-events: none; border-radius: 16px;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.stat-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-card-icon.gold { background: var(--accent-gold-dim); color: var(--accent-gold); box-shadow: 0 0 20px rgba(255,184,0,0.12); }
.stat-card-icon.green { background: var(--accent-green-dim); color: var(--accent-green); box-shadow: 0 0 20px rgba(0,255,135,0.12); }
.stat-card-icon.blue { background: var(--accent-blue-dim); color: var(--accent-blue); box-shadow: 0 0 20px rgba(77,127,255,0.12); }
.stat-card-icon.red { background: var(--accent-red-dim); color: var(--accent-red); box-shadow: 0 0 20px rgba(255,59,92,0.12); }
.stat-card-value { font-size: 32px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.1; }
.stat-card-value .currency { font-size: 18px; opacity: 0.6; margin-inline-start: 4px; }

/* ── Cards modernized ── */
.card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-card);
}
.card:hover { border-color: rgba(255, 255, 255, 0.10); }
.card-head { padding: 20px 22px; }
.card-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Sidebar polish ── */
.sidebar-link {
  position: relative;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
}
.sidebar-link::before {
  content: ""; position: absolute;
  inset-inline-start: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px;
  background: var(--accent-gold);
  opacity: 0; transform: scaleY(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sidebar-link.active::before { opacity: 1; transform: scaleY(1); }
.sidebar-link:hover { background: rgba(255, 255, 255, 0.04); }
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(255,184,0,0.10), rgba(255,184,0,0.02));
  color: var(--accent-gold);
}
.sidebar-section-title {
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-muted); padding: 0 14px; margin-top: 18px; margin-bottom: 8px;
  opacity: 0.7;
}

/* ── Sidebar user (bottom) ── */
.sidebar-user {
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
}
.sidebar-user-avatar {
  background: linear-gradient(135deg, var(--accent-gold), #FF8A00) !important;
  color: #0A0E1A !important;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.25);
}
.sidebar-user-plan {
  font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--accent-gold); font-weight: 700; opacity: 0.85;
}

/* ── Buttons primary refined ── */
.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.1px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #FF8A00);
  color: #0A0E1A;
  box-shadow: 0 4px 14px rgba(255, 184, 0, 0.28);
  border: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 184, 0, 0.42);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.14); }

/* ── Empty states cleaner ── */
.fb-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.fb-empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 28px;
}
.fb-empty-title { font-weight: 700; font-size: 16px; color: var(--text-primary); margin-bottom: 6px; }
.fb-empty-msg { font-size: 13px; line-height: 1.6; max-width: 380px; margin: 0 auto; }

/* ── Tables refined ── */
table.tbl, .tbl-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}
.tbl-wrap table thead th {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tbl-wrap table tbody tr { transition: background-color 0.15s ease; }
.tbl-wrap table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.tbl-wrap table tbody td { padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }

/* ── Topbar refined ── */
.topbar {
  background: linear-gradient(180deg, rgba(15, 19, 32, 0.85), rgba(15, 19, 32, 0.65));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.topbar-title { font-weight: 700; letter-spacing: -0.2px; }

/* ── Lang switch polished ── */
.lang-switch {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 4px;
}
.lang-switch span {
  padding: 6px 12px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch span.active,
.lang-switch span:hover {
  background: rgba(255, 184, 0, 0.15); color: var(--accent-gold);
}

/* ── Badge refinements ── */
.badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.3px;
}
.badge-buy { background: rgba(0, 255, 135, 0.14); color: var(--accent-green); }
.badge-sell { background: rgba(255, 59, 92, 0.14); color: var(--accent-red); }
.badge-tp { background: rgba(0, 255, 135, 0.18); color: var(--accent-green); }
.badge-sl { background: rgba(255, 59, 92, 0.18); color: var(--accent-red); }
.badge-open   { background: rgba(77, 127, 255, 0.16); color: var(--accent-blue); }
.badge-active { background: rgba(0, 255, 135, 0.16); color: var(--accent-green); }
.badge-pending { background: rgba(255, 184, 0, 0.16); color: var(--accent-gold); }
.badge-cancelled { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }
.badge-gold { background: linear-gradient(135deg, rgba(255, 184, 0, 0.20), rgba(255, 138, 0, 0.16)); color: var(--accent-gold); }

/* ── Pair icon refined ── */
.table-pair-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.20), rgba(255, 138, 0, 0.10));
  color: var(--accent-gold);
}
.table-pair-icon.fx {
  background: linear-gradient(135deg, rgba(77, 127, 255, 0.20), rgba(58, 90, 220, 0.10));
  color: var(--accent-blue);
}

/* ── Loading shimmer ── */
.fb-skeleton {
  display: inline-block;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
  animation: fb-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
  height: 1em;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

/* ── Responsive (mobile) ── */
@media (max-width: 768px) {
  .fb-hero { padding: 20px; }
  .fb-hero-name { font-size: 22px; }
  .stat-card-value { font-size: 24px; }
  .card-head { padding: 16px; }
}

/* =============================================================
   AFFILIATE / IB CENTER
   ============================================================= */

/* Hero with FOMO */
.aff-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255,184,0,0.08), rgba(255,138,0,0.02) 50%, rgba(77,127,255,0.06));
  border: 1px solid rgba(255,184,0,0.18);
  padding: 28px;
  text-align: center;
}
/* centering helpers — kept for backwards-compat; explicit margin shorthands below win */
.aff-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255,184,0,0.18), transparent 50%);
  pointer-events: none;
}
.aff-hero-inner { position: relative; }
.aff-hero-badge {
  display: inline-block; padding: 5px 12px;
  background: rgba(255,184,0,0.15); color: var(--accent-gold);
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.aff-hero-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800; line-height: 1.25;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #FFB800, #FFFFFF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.aff-hero-sub { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin: 0 auto 20px; max-width: 720px; }
.aff-hero-sub .hl { color: var(--accent-gold); font-weight: 700; }
.aff-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 600px; margin: 0 auto; }
.aff-hero-stat {
  padding: 14px;
  background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
}
.aff-hero-stat .num { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--accent-gold); }
.aff-hero-stat .num.lost { color: #ff6b6b; }
.aff-hero-stat .lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.3px; }

/* Tab switcher */
.aff-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 18px;
}
.aff-tab {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--bg-secondary, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: inherit; text-align: start;
}
.aff-tab:hover { border-color: rgba(255,184,0,0.3); transform: translateY(-1px); }
.aff-tab.active {
  background: linear-gradient(135deg, rgba(255,184,0,0.12), rgba(255,138,0,0.04));
  border-color: var(--accent-gold);
  box-shadow: 0 8px 24px rgba(255,184,0,0.18);
}
.aff-tab .t-icon { font-size: 26px; flex-shrink: 0; }
.aff-tab .t-text { display: flex; flex-direction: column; gap: 2px; }
.aff-tab .t-title { font-weight: 800; font-size: 16px; }
.aff-tab .t-sub { font-size: 12px; color: var(--text-muted); }
.aff-tab .t-badge-elite {
  position: absolute; top: 10px; inset-inline-end: 10px;
  padding: 3px 8px; background: linear-gradient(135deg, var(--accent-gold), #FF8A00);
  color: #0A0E1A; font-size: 9px; font-weight: 800; letter-spacing: 1px;
  border-radius: 6px;
}

/* Link card + share */
.aff-link-card { margin-top: 18px; }
.aff-link-row {
  display: flex; gap: 8px; align-items: center;
  padding: 14px;
  background: var(--bg-secondary, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  flex-wrap: wrap;
}
.aff-link-input {
  border: none !important; background: transparent !important;
  flex: 1; min-width: 200px; padding: 0;
  font-family: var(--font-mono); font-size: 13px;
}
.aff-share-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.aff-share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer; color: inherit; font-size: 13px; font-weight: 600;
  transition: all 0.15s ease;
}
.aff-share-btn:hover { transform: translateY(-1px); }
.aff-share-wa:hover { background: rgba(37,211,102,0.15); border-color: rgba(37,211,102,0.4); color: #25D366; }
.aff-share-tg:hover { background: rgba(38,156,225,0.15); border-color: rgba(38,156,225,0.4); color: #269CE1; }
.aff-share-tw:hover { background: rgba(29,155,240,0.12); border-color: rgba(29,155,240,0.4); }
.aff-share-em:hover { background: rgba(255,184,0,0.12); border-color: rgba(255,184,0,0.4); color: var(--accent-gold); }
.aff-share-qr:hover { background: rgba(255,255,255,0.08); }

/* Rates */
.aff-rates-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-top: 16px;
}
.aff-rate-pill {
  padding: 14px 12px; text-align: center;
  background: var(--bg-secondary, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.aff-rate-pill .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.aff-rate-pill .num { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--accent-gold); line-height: 1.1; }
.aff-rate-pill .sub { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }
.aff-rate-pill.primary { background: linear-gradient(135deg, rgba(255,184,0,0.14), rgba(255,138,0,0.04)); border-color: rgba(255,184,0,0.4); }
.aff-rate-pill.primary .num { font-size: 28px; }
.aff-rate-pill.muted .num { color: var(--text-muted); }

/* Customers list */
.aff-cust-legend { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.aff-cust-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-inline-end: 4px; }
.aff-cust-legend .dot.active { background: var(--accent-green); }
.aff-cust-legend .dot.expired { background: #FFB800; }
.aff-cust-legend .dot.churned { background: #ff6b6b; }

.aff-cust-list { display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.aff-cust-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px;
  background: var(--bg-secondary, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  transition: all 0.15s ease;
}
.aff-cust-row:hover { border-color: rgba(255,184,0,0.2); }
.aff-cust-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #FF8A00);
  display: flex; align-items: center; justify-content: center;
  color: #0A0E1A; font-weight: 800; font-size: 16px;
}
.aff-cust-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aff-cust-name { font-weight: 700; font-size: 14px; }
.aff-cust-meta { font-size: 11.5px; color: var(--text-muted); }
.aff-cust-renew {
  display: flex; gap: 4px; margin-top: 4px;
}
.aff-cust-renew .pip {
  width: 22px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08);
}
.aff-cust-renew .pip.paid { background: var(--accent-green); }
.aff-cust-renew .pip.first { background: var(--accent-gold); }
.aff-cust-side { text-align: end; }
.aff-cust-amt { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--accent-gold); }
.aff-cust-status { font-size: 11px; margin-top: 3px; }
.aff-cust-status.active { color: var(--accent-green); }
.aff-cust-status.expired { color: #FFB800; }
.aff-cust-status.churned { color: #ff6b6b; }

.aff-cust-empty { text-align: center; padding: 40px 20px; }
.aff-cust-empty .ico { font-size: 42px; opacity: 0.6; margin-bottom: 10px; }
.aff-cust-empty .t { font-weight: 700; margin-bottom: 4px; }
.aff-cust-empty .s { color: var(--text-muted); font-size: 13px; }

/* Templates */
.aff-tpl-list { display: flex; flex-direction: column; gap: 10px; padding: 6px; }
.aff-tpl {
  background: var(--bg-secondary, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
.aff-tpl-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.aff-tpl-icon { font-size: 20px; }
.aff-tpl-title { flex: 1; font-weight: 700; font-size: 13.5px; }
.aff-tpl-copy {
  padding: 6px 12px; background: rgba(255,184,0,0.12); color: var(--accent-gold);
  border: 1px solid rgba(255,184,0,0.3); border-radius: 8px;
  cursor: pointer; font-size: 12px; font-weight: 700;
  transition: all 0.15s ease;
}
.aff-tpl-copy:hover { background: rgba(255,184,0,0.2); }
.aff-tpl-copy.copied { background: var(--accent-green); color: #0A0E1A; border-color: var(--accent-green); }
.aff-tpl-body {
  padding: 14px; font-size: 13px; line-height: 1.7;
  color: var(--text-secondary, rgba(255,255,255,0.85));
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.18);
}

/* Flow steps */
.aff-flow {
  display: flex; align-items: stretch; gap: 8px;
  padding: 8px;
  flex-wrap: wrap; justify-content: center;
}
.aff-flow-step {
  flex: 1 1 200px; min-width: 200px;
  position: relative;
  padding: 18px 16px;
  background: var(--bg-secondary, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  text-align: center;
}
.aff-flow-num {
  position: absolute; top: -12px; inset-inline-start: 14px;
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-gold), #FF8A00);
  color: #0A0E1A; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.aff-flow-icon { font-size: 30px; margin-bottom: 8px; }
.aff-flow-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.aff-flow-desc { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.aff-flow-arrow {
  display: flex; align-items: center; color: var(--accent-gold);
  font-size: 22px; opacity: 0.6;
}
[dir="ltr"] .aff-flow-arrow { transform: rotate(180deg); }

/* Calculator */
.aff-calc-card {
  background: linear-gradient(135deg, rgba(255,184,0,0.05), rgba(255,138,0,0.02));
  border: 1px solid rgba(255,184,0,0.18);
}
.aff-calc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; padding: 6px;
}
.aff-calc-cell {
  padding: 18px 14px; text-align: center;
  background: rgba(0,0,0,0.2); border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}
.aff-calc-cell.highlight { background: linear-gradient(135deg, rgba(255,184,0,0.12), rgba(255,138,0,0.04)); border-color: rgba(255,184,0,0.4); }
.aff-calc-cell.premium { background: linear-gradient(135deg, rgba(255,184,0,0.18), rgba(255,138,0,0.06)); border-color: var(--accent-gold); }
.aff-calc-num { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--accent-gold); line-height: 1; }
.aff-calc-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.aff-calc-amt { font-family: var(--font-display); font-size: 18px; font-weight: 800; margin-top: 10px; }
.aff-calc-yr { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.aff-calc-cta { padding: 14px; background: rgba(0,0,0,0.18); border-radius: 10px; margin-top: 14px; text-align: center; font-size: 13.5px; line-height: 1.7; }

/* FAQ */
.aff-faq-list { display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.aff-faq {
  background: var(--bg-secondary, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.aff-faq summary {
  padding: 14px; cursor: pointer; font-weight: 700; font-size: 13.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.aff-faq summary::after { content: "+"; color: var(--accent-gold); font-size: 20px; font-weight: 700; }
.aff-faq[open] summary::after { content: "−"; }
.aff-faq[open] summary { border-bottom: 1px solid rgba(255,255,255,0.05); }
.aff-faq > div { padding: 14px; color: var(--text-muted); font-size: 13px; line-height: 1.8; }

/* IB Pitch (not yet applied) */
.ib-pitch-card { background: linear-gradient(135deg, rgba(255,184,0,0.05), rgba(77,127,255,0.04)); border: 1px solid rgba(255,184,0,0.2); padding: 30px; }
.ib-pitch-badge { display: inline-block; padding: 5px 12px; background: linear-gradient(135deg, var(--accent-gold), #FF8A00); color: #0A0E1A; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 14px; }
.ib-pitch-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.3; margin: 0 0 10px; }
.ib-pitch-sub { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin: 0 0 22px; max-width: 700px; }

.ib-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.ib-compare-col { padding: 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); }
.ib-compare-col.aff { background: rgba(0,0,0,0.2); }
.ib-compare-col.ib { background: linear-gradient(135deg, rgba(255,184,0,0.12), rgba(255,138,0,0.04)); border-color: var(--accent-gold); }
.ib-compare-head { font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.ib-compare-line { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; }
.ib-compare-line .ok { color: var(--accent-green); font-weight: 800; }
.ib-compare-line .x { color: #ff6b6b; font-weight: 800; }
.ib-compare-amount { font-family: var(--font-display); font-weight: 800; font-size: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }

.ib-eligibility { padding: 16px; background: rgba(0,0,0,0.2); border-radius: 12px; margin-bottom: 14px; }
.ib-elig-title { font-weight: 800; margin-bottom: 10px; font-size: 13.5px; color: var(--accent-gold); }
.ib-elig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ib-elig-item { padding: 10px 12px; background: rgba(255,255,255,0.03); border-radius: 8px; font-size: 13px; }
.ib-apply-btn { padding: 16px; font-size: 16px; font-weight: 800; }

/* IB pending state */
.ib-pending-card { text-align: center; padding: 40px 20px; }
.ib-pending-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.8; }
.ib-pending-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.ib-pending-sub { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 14px; }
.ib-pending-meta { font-size: 12px; color: var(--text-muted); padding: 8px 14px; background: rgba(255,255,255,0.03); border-radius: 8px; display: inline-block; margin-bottom: 18px; }
.ib-pending-tips { padding: 16px; background: linear-gradient(135deg, rgba(255,184,0,0.08), rgba(255,138,0,0.02)); border-radius: 12px; border: 1px solid rgba(255,184,0,0.18); }
.ib-pending-tips .t { font-size: 13.5px; line-height: 1.7; }

/* IB rejected */
.ib-rej-card { text-align: center; padding: 40px 20px; }
.ib-rej-icon { font-size: 56px; margin-bottom: 14px; opacity: 0.7; }
.ib-rej-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.ib-rej-sub { color: var(--text-muted); font-size: 14px; line-height: 1.7; max-width: 500px; margin: 0 auto; }

/* IB approved welcome banner */
.ib-welcome-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,184,0,0.12), rgba(255,138,0,0.04));
  border: 1px solid var(--accent-gold);
  border-radius: 14px;
  margin-bottom: 18px;
}
.ib-wb-icon { font-size: 36px; }
.ib-wb-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.ib-wb-sub { font-size: 13px; color: var(--text-muted); }
.ib-wb-tier {
  margin-inline-start: auto;
  padding: 6px 14px; background: linear-gradient(135deg, var(--accent-gold), #FF8A00);
  color: #0A0E1A; font-weight: 800; font-size: 12px; letter-spacing: 0.5px;
  border-radius: 8px;
}

/* IB Modal — raise above sidebar (z:50), portal-fx, and any other overlays */
.ib-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
/* When any modal is open, hide chrome (sidebar/topbar) so the modal isn't
   visually crowded by the fixed-position UI underneath. */
body.fb-modal-open .sidebar,
body.fb-modal-open .topbar { visibility: hidden; }
body.fb-modal-open { overflow: hidden; }
.ib-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); }
.ib-modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  background: var(--bg-primary, #0F1421);
  border: 1px solid rgba(255,184,0,0.3);
  border-radius: 18px;
  overflow: hidden;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.ib-modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ib-modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.ib-modal-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.ib-modal-close { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.05); border: none; cursor: pointer; color: inherit; font-size: 22px; line-height: 1; }
.ib-modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.ib-modal-foot { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.06); justify-content: flex-end; }
.ib-field { display: flex; flex-direction: column; gap: 6px; }
.ib-field-lbl { font-size: 13px; font-weight: 700; }

/* Mobile */
@media (max-width: 640px) {
  .aff-hero-title { font-size: 22px; }
  .aff-hero-stats { grid-template-columns: 1fr; }
  .aff-tabs { grid-template-columns: 1fr; }
  .ib-compare-grid { grid-template-columns: 1fr; }
  .ib-elig-grid { grid-template-columns: 1fr; }
  .aff-flow-arrow { display: none; }
  .ib-welcome-banner { flex-direction: column; text-align: center; }
  .ib-wb-tier { margin-inline-start: 0; }
}

/* ─── Signal close animation (issue 14) ───
   Applied by dash-signals.js to a row when its underlying signal moves from
   active to a closing state (hit_*, closed_*). The row fades out for 800ms,
   then dash-signals.js removes the DOM node so the user sees a clear visual
   transition instead of the row vanishing instantly. */
.fb-signal-closing {
  animation: fbSignalClosing 800ms ease-out forwards;
  pointer-events: none;
}
@keyframes fbSignalClosing {
  0%   { opacity: 1; transform: translateX(0); background-color: rgba(255,184,0,0.05); }
  40%  { opacity: 1; transform: translateX(0); background-color: rgba(255,184,0,0.18); }
  100% { opacity: 0; transform: translateX(8px); background-color: transparent; }
}
@media (prefers-reduced-motion: reduce){
  .fb-signal-closing { animation: none; opacity: 0.5; }
}
