/* ============================================================
   Gold Master CRM — Complete Stylesheet
   Black #0B0B0C | Gold #E2B755
   RTL-first design | Font: Cairo (Google Fonts)
   ============================================================ */

/* --- Google Font: Cairo --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* CRITICAL: Constrain all inline SVGs so they never blow up to browser default 300px */
svg {
  display: block;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

/* Admin-specific SVG size locks */
.nav-item svg,
.logout-btn svg     { width: 16px !important; height: 16px !important; flex-shrink: 0; }
.card-icon svg      { width: 20px !important; height: 20px !important; }
.login-icon svg     { width: 22px !important; height: 22px !important; }
.wa-btn svg         { width: 18px !important; height: 18px !important; }
.wa-mini svg        { width: 14px !important; height: 14px !important; }
.wa-float svg       { width: 20px !important; height: 20px !important; }
.search-wrap svg    { width: 16px !important; height: 16px !important; }
.export-btn svg     { width: 16px !important; height: 16px !important; }
.back-link svg      { width: 14px !important; height: 14px !important; }
.success-icon       { width: 60px !important; height: 60px !important; }
.faq-icon           { width: 20px !important; height: 20px !important; flex-shrink: 0; }
.modal-close svg    { width: 22px !important; height: 22px !important; }

:root {
  --ink:        #0B0B0C;
  --ink-soft:   #131315;
  --ink-card:   #19191C;
  --gold:       #E2B755;
  --gold-light: #F0D38A;
  --gold-dark:  #A9803A;
  --gold-muted: #8C7440;
  --bone:       #EDEAE2;
  --smoke:      #8A8A8E;
  --gold-grad:  linear-gradient(135deg, #F0D38A 0%, #E2B755 45%, #A9803A 100%);
  --radius:     10px;
  --shadow-gold: 0 0 40px -10px rgba(226,183,85,0.35);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Segoe UI', 'Tahoma', Arial, sans-serif;
  background: var(--ink);
  color: var(--bone);
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* --- Typography helpers --- */
.text-gold     { color: var(--gold); }
.text-smoke    { color: var(--smoke); }
.text-bone     { color: var(--bone); }
.text-center   { text-align: center; }
.text-xs       { font-size: 0.75rem; }
.text-sm       { font-size: 0.875rem; }
.text-lg       { font-size: 1.125rem; }

.text-gradient-gold {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Layout --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section   { padding: 5rem 0; border-top: 1px solid rgba(255,255,255,0.05); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --- Gold divider --- */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 4rem 0;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-bottom 0.3s;
  height: 72px;
  display: flex; align-items: center;
}
.navbar.scrolled {
  background: rgba(11,11,12,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}
.navbar-brand { font-size: 1.35rem; font-weight: 700; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.navbar-links { display: flex; gap: 2rem; }
.navbar-links a { font-size: 0.875rem; color: var(--smoke); transition: color 0.2s; }
.navbar-links a:hover { color: var(--bone); }
.btn-outline-gold {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(226,183,85,0.35);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-outline-gold:hover { background: rgba(226,183,85,0.08); border-color: var(--gold); }

@media (max-width: 640px) { .navbar-links { display: none; } }

/* --- Buttons --- */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--gold-grad);
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: box-shadow 0.25s, opacity 0.2s;
}
.btn-gold:hover { box-shadow: var(--shadow-gold); }
.btn-gold:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: 1px solid rgba(226,183,85,0.3);
  color: var(--bone);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--gold); background: rgba(226,183,85,0.06); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem 0 5rem;
  background: radial-gradient(circle at 60% 0%, #19191C 0%, #0B0B0C 60%);
  overflow: hidden;
  position: relative;
}
.hero-glow {
  position: absolute; top: 20%; right: 20%;
  width: 500px; height: 500px;
  background: rgba(226,183,85,0.06);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid rgba(226,183,85,0.3);
  border-radius: 999px;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(226,183,85,0.9);
  margin-bottom: 1.75rem;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 2s infinite; }

.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.1; font-weight: 700; color: var(--bone); margin-bottom: 1.25rem; }
.hero-sub   { font-size: 1.125rem; color: var(--smoke); max-width: 520px; line-height: 1.75; margin-bottom: 2.25rem; }
.hero-ctas  { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Equity card */
.equity-card {
  border: 1px solid rgba(226,183,85,0.2);
  border-radius: 16px;
  background: rgba(25,25,28,0.85);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
}
.equity-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.equity-card-header span { font-size: 0.75rem; color: var(--smoke); letter-spacing: 0.05em; }
.equity-online { font-size: 0.75rem; color: #34d399; font-weight: 600; }
.equity-stats  { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.06); }
.equity-stat-val { font-size: 1.75rem; font-weight: 700; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.equity-stat-lbl { font-size: 0.7rem; color: var(--smoke); margin-top: 0.2rem; }

/* Section header */
.section-header { text-align: center; max-width: 620px; margin: 0 auto 3.5rem; }
.section-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; color: rgba(226,183,85,0.8); font-weight: 600; text-transform: uppercase; display: block; margin-bottom: 0.75rem; }
.section-title   { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; color: var(--bone); line-height: 1.15; }
.section-sub     { color: var(--smoke); margin-top: 0.875rem; line-height: 1.7; }

/* Cards */
.card {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  background: var(--ink-card);
  padding: 1.75rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(226,183,85,0.2); }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: rgba(226,183,85,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--gold); fill: none; stroke-width: 2; }
.card-title { font-size: 1.05rem; font-weight: 600; color: var(--bone); margin-bottom: 0.5rem; }
.card-desc  { font-size: 0.875rem; color: var(--smoke); line-height: 1.7; }

/* Performance stats */
.perf-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2.5rem; }
.perf-stat  { border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); background: var(--ink-card); padding: 1.5rem; text-align: center; }
.perf-val   { font-size: 2rem; font-weight: 700; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.perf-lbl   { font-size: 0.75rem; color: var(--smoke); margin-top: 0.375rem; }
@media (max-width: 600px) { .perf-stats { grid-template-columns: 1fr 1fr; } }

/* Myfxbook placeholder */
.myfxbook-box {
  border: 1px solid rgba(226,183,85,0.2);
  border-radius: 14px;
  background: var(--ink-card);
  overflow: hidden;
}
.myfxbook-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.875rem;
}
.myfxbook-header a { font-size: 0.75rem; color: var(--gold); }
.myfxbook-embed { aspect-ratio: 16/7; display: flex; align-items: center; justify-content: center; background: var(--ink); }
.myfxbook-embed p { color: var(--smoke); font-size: 0.85rem; max-width: 400px; text-align: center; padding: 1rem; }

/* About section */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-lead { font-size: 1.1rem; color: var(--smoke); line-height: 1.8; margin-top: 1.5rem; }
.pillar     { display: flex; gap: 1.25rem; padding: 1.5rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); transition: border-color 0.2s; }
.pillar:hover { border-color: rgba(226,183,85,0.2); }
.pillar + .pillar { margin-top: 1rem; }
.pillar-num { flex-shrink: 0; width: 40px; height: 40px; border: 1px solid rgba(226,183,85,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 700; }
.pillar-title { font-weight: 600; color: var(--bone); }
.pillar-desc  { font-size: 0.85rem; color: var(--smoke); line-height: 1.65; margin-top: 0.3rem; }

/* FAQ */
.faq-list  { max-width: 700px; margin: 0 auto; }
.faq-item  { border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); background: var(--ink-card); margin-bottom: 0.75rem; overflow: hidden; }
.faq-q     { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: none; border: none; color: var(--bone); font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
[dir="rtl"] .faq-q { text-align: right; }
[dir="ltr"] .faq-q { text-align: left; }
.faq-icon  { flex-shrink: 0; width: 20px; height: 20px; stroke: var(--gold); fill: none; stroke-width: 2.5; transition: transform 0.25s; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-a     { display: none; padding: 0 1.5rem 1.25rem; color: var(--smoke); font-size: 0.875rem; line-height: 1.75; }
.faq-item.open .faq-a { display: block; }

/* Testimonials */
.testi-card { border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); background: var(--ink-card); padding: 1.75rem; }
.testi-quote { color: rgba(226,183,85,0.35); font-size: 2.5rem; line-height: 1; margin-bottom: 0.75rem; }
.testi-text  { font-size: 0.875rem; color: var(--bone); line-height: 1.75; }
.testi-meta  { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.05); }
.testi-name  { font-weight: 600; font-size: 0.875rem; }
.testi-country { font-size: 0.75rem; color: var(--smoke); margin-top: 2px; }

/* Contact CTA */
.contact-cta { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-cta .section-title { margin-bottom: 1rem; }
.contact-cta p { color: var(--smoke); line-height: 1.75; margin-bottom: 2.25rem; }

/* WhatsApp float */
.wa-float {
  position: fixed; bottom: 1.5rem; z-index: 200;
  display: flex; align-items: center; gap: 0.625rem;
  background: #25D366; color: var(--ink);
  border-radius: 999px;
  padding: 0.875rem 1.25rem;
  font-weight: 700; font-size: 0.875rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.2s;
}
/* RTL (Arabic) — button on the left */
[dir="rtl"] .wa-float { left: 1.5rem; right: auto; }
/* LTR (English) — button on the right */
[dir="ltr"] .wa-float { right: 1.5rem; left: auto; }
.wa-float:hover { transform: scale(1.05); }
.wa-float svg  { width: 20px !important; height: 20px !important; fill: var(--ink); }

/* Footer */
.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
}
.footer-disclaimer { font-size: 0.72rem; color: var(--smoke); max-width: 540px; line-height: 1.65; }

/* ============================================================
   LEAD FORM MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal-box {
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  background: var(--ink-card);
  border: 1px solid rgba(226,183,85,0.2);
  border-radius: 16px;
  padding: 2rem;
}
.modal-header   { margin-bottom: 1.75rem; }
.modal-title    { font-size: 1.4rem; font-weight: 700; color: var(--bone); }
.modal-subtitle { font-size: 0.8rem; color: var(--smoke); margin-top: 0.25rem; }
/* Modal close button — position flips with direction */
.modal-close    { position: absolute; top: 1.25rem; background: none; border: none; color: var(--smoke); cursor: pointer; }
[dir="rtl"] .modal-close { left: 1.25rem; right: auto; }
[dir="ltr"] .modal-close { right: 1.25rem; left: auto; }
.modal-close:hover { color: var(--bone); }

/* Progress bar */
.progress-bar { display: flex; gap: 6px; margin-top: 1rem; }
.progress-step { height: 4px; flex: 1; border-radius: 999px; background: rgba(255,255,255,0.1); transition: background 0.3s; }
.progress-step.done { background: var(--gold); }

/* Form steps */
.form-step { display: none; }
.form-step.active { display: block; }

.form-group       { margin-bottom: 1rem; }
.form-label       { display: block; font-size: 0.8rem; color: var(--smoke); margin-bottom: 0.375rem; }
.form-input {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--bone);
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: rgba(226,183,85,0.5); }
.form-input::placeholder { color: rgba(138,138,142,0.5); }

textarea.form-input { min-height: 80px; resize: vertical; }

.option-btns { display: grid; gap: 0.625rem; }
.option-btn {
  width: 100%; padding: 0.875rem 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; background: transparent;
  color: var(--bone); font-size: 0.9rem; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
[dir="rtl"] .option-btn { text-align: right; }
[dir="ltr"] .option-btn { text-align: left; }
.option-btn:hover  { border-color: rgba(255,255,255,0.3); }
.option-btn.active { border-color: var(--gold); background: rgba(226,183,85,0.1); color: var(--gold); }
.option-2col { grid-template-columns: 1fr 1fr; }

.step-q { font-size: 0.9375rem; font-weight: 600; color: var(--bone); margin-bottom: 1rem; }

/* Step nav — button order flips with reading direction */
.step-nav { display: flex; gap: 0.75rem; margin-top: 1.75rem; }
/* RTL: Next on right (natural), Prev on left — default flex order is fine */
/* LTR: Prev on left, Next on right — reverse order via order property */
[dir="ltr"] .step-nav #btnPrev   { order: 1; }
[dir="ltr"] .step-nav #btnNext   { order: 2; }
[dir="ltr"] .step-nav #btnSubmit { order: 2; }
.btn-prev {
  flex: 1; padding: 0.875rem; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; background: transparent; color: var(--bone);
  font-size: 0.9rem; cursor: pointer; transition: border-color 0.2s;
}
.btn-prev:hover { border-color: rgba(226,183,85,0.3); }
.btn-next, .btn-submit { flex: 1; }

/* Success state */
.success-state { text-align: center; padding: 2rem 0; }
.success-icon  { width: 60px; height: 60px; stroke: var(--gold); fill: none; stroke-width: 1.5; margin: 0 auto 1.25rem; }
.success-title { font-size: 1.5rem; font-weight: 700; color: var(--bone); }
.success-desc  { color: var(--smoke); font-size: 0.875rem; line-height: 1.7; max-width: 340px; margin: 0.875rem auto 1.75rem; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-body { background: var(--ink); min-height: 100vh; }

.admin-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--ink-card);
  border-left: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 1.5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.brand-text { display: block; font-size: 1.2rem; font-weight: 700; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub  { font-size: 0.7rem; color: var(--smoke); margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.875rem;
  border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
  color: var(--smoke);
  transition: background 0.15s, color 0.15s;
  margin-bottom: 0.25rem;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--bone); }
.nav-item.active { background: rgba(226,183,85,0.1); color: var(--gold); }

.sidebar-footer { padding: 1rem 0.75rem; border-top: 1px solid rgba(255,255,255,0.05); }
.admin-info { padding: 0.5rem 0.875rem; margin-bottom: 0.5rem; }
.admin-name { display: block; font-size: 0.875rem; font-weight: 600; color: var(--bone); }
.admin-role { font-size: 0.72rem; color: var(--smoke); }
.logout-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.875rem;
  border-radius: 8px;
  font-size: 0.875rem; color: var(--smoke);
  width: 100%; background: none; border: none; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.logout-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.logout-btn:hover { background: rgba(239,68,68,0.08); color: #f87171; }

/* Admin main */
.admin-main { flex: 1; min-width: 0; padding: 2.5rem; overflow-y: auto; }
.page-header { margin-bottom: 2rem; }
.page-title  { font-size: 1.75rem; font-weight: 700; color: var(--bone); }
.page-sub    { font-size: 0.875rem; color: var(--smoke); margin-top: 0.25rem; }

/* KPI grid */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-card {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05);
  background: var(--ink-card);
  padding: 1.25rem 1.5rem;
}
.kpi-card.accent { border-color: rgba(226,183,85,0.3); background: rgba(226,183,85,0.04); }
.kpi-label { font-size: 0.72rem; color: var(--smoke); }
.kpi-value { font-size: 1.75rem; font-weight: 700; color: var(--bone); margin-top: 0.375rem; }
.kpi-card.accent .kpi-value { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Table */
.table-card { border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius); background: var(--ink-card); overflow: hidden; }
.table-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap svg { position: absolute; right: 0.875rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--smoke); fill: none; stroke-width: 2; pointer-events: none; }
.search-input {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--bone); font-size: 0.875rem;
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  outline: none; transition: border-color 0.2s;
}
.search-input:focus { border-color: rgba(226,183,85,0.4); }

.filter-select {
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--bone); font-size: 0.875rem;
  padding: 0.625rem 1rem;
  outline: none; cursor: pointer;
}

.export-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(226,183,85,0.3);
  border-radius: 8px;
  color: var(--gold); background: transparent;
  font-size: 0.875rem; cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.export-btn:hover { background: rgba(226,183,85,0.08); }
.export-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: right; font-size: 0.72rem; font-weight: 600;
  color: var(--smoke); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
}
.data-table td {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem; color: var(--smoke);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.015); }
.td-name { color: var(--bone); font-weight: 600; }
.td-name a { transition: color 0.15s; }
.td-name a:hover { color: var(--gold); }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.badge-blue   { background: rgba(59,130,246,0.12);  color: #93c5fd; border-color: rgba(59,130,246,0.3); }
.badge-cyan   { background: rgba(6,182,212,0.12);   color: #67e8f9; border-color: rgba(6,182,212,0.3); }
.badge-amber  { background: rgba(245,158,11,0.12);  color: #fcd34d; border-color: rgba(245,158,11,0.3); }
.badge-purple { background: rgba(168,85,247,0.12);  color: #d8b4fe; border-color: rgba(168,85,247,0.3); }
.badge-indigo { background: rgba(99,102,241,0.12);  color: #a5b4fc; border-color: rgba(99,102,241,0.3); }
.badge-teal   { background: rgba(20,184,166,0.12);  color: #5eead4; border-color: rgba(20,184,166,0.3); }
.badge-green  { background: rgba(16,185,129,0.12);  color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.badge-gray   { background: rgba(113,113,122,0.12); color: #a1a1aa; border-color: rgba(113,113,122,0.3); }
.badge-red    { background: rgba(239,68,68,0.12);   color: #fca5a5; border-color: rgba(239,68,68,0.3); }

/* Pagination */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem; color: var(--smoke);
}
.page-btns { display: flex; gap: 0.5rem; }
.page-btn {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--bone); background: transparent; cursor: pointer;
  font-size: 0.8rem; transition: border-color 0.15s;
  text-decoration: none;
}
.page-btn:hover  { border-color: rgba(226,183,85,0.3); }
.page-btn.active { border-color: var(--gold); color: var(--gold); }
.page-btn.disabled { opacity: 0.35; pointer-events: none; }

/* Admin login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(circle at 50% 0%, #19191C 0%, #0B0B0C 60%); }
.login-box  { width: 100%; max-width: 380px; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon { width: 52px; height: 52px; border: 1px solid rgba(226,183,85,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.login-icon svg { width: 22px; height: 22px; stroke: var(--gold); fill: none; stroke-width: 2; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--bone); }
.login-sub   { font-size: 0.8rem; color: var(--smoke); margin-top: 0.25rem; }

.login-form { background: var(--ink-card); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 2rem; }
.login-form .form-group { margin-bottom: 1.25rem; }
.error-box { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.8rem; color: #fca5a5; margin-bottom: 1.25rem; }

/* Lead detail */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-card { background: var(--ink-card); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; }
.detail-card-title { font-size: 1rem; font-weight: 600; color: var(--bone); margin-bottom: 1.25rem; padding-bottom: 0.875rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.info-label { font-size: 0.72rem; color: var(--smoke); margin-bottom: 0.25rem; }
.info-value { font-size: 0.9rem; color: var(--bone); }

.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 0.875rem;
  background: #25D366; color: var(--ink);
  border-radius: 8px; border: none;
  font-weight: 700; font-size: 0.9rem;
  cursor: pointer; transition: opacity 0.2s;
  margin-top: 1.25rem;
  text-decoration: none;
}
.wa-btn:hover { opacity: 0.9; }
.wa-btn svg { width: 18px; height: 18px; fill: var(--ink); }

/* Notes */
.note-add { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }
.note-add textarea { flex: 1; min-height: 42px; resize: none; }
.btn-add-note {
  padding: 0 1.25rem;
  background: var(--gold-grad);
  color: var(--ink); font-weight: 700; font-size: 0.875rem;
  border: none; border-radius: 8px; cursor: pointer;
  white-space: nowrap;
}
.note-item { background: var(--ink); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 1rem; margin-bottom: 0.625rem; }
.note-text { font-size: 0.875rem; color: var(--bone); line-height: 1.65; }
.note-meta { font-size: 0.72rem; color: var(--smoke); margin-top: 0.5rem; }
.notes-empty { text-align: center; color: var(--smoke); font-size: 0.875rem; padding: 2rem 0; }

/* Status select */
.status-select-wrap select { width: 100%; }

/* Follow-up */
.followup-form { display: flex; flex-direction: column; gap: 0.75rem; }
.btn-save {
  padding: 0.75rem;
  border: 1px solid rgba(226,183,85,0.35);
  border-radius: 8px;
  color: var(--gold); background: transparent;
  font-size: 0.875rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-save:hover { background: rgba(226,183,85,0.08); }

/* Status log */
.log-item { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.625rem; }
.log-time  { font-size: 0.72rem; color: var(--smoke); }

/* Today follow-ups widget */
.followup-list { }
.followup-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.followup-row:last-child { border-bottom: none; }
.followup-name { font-size: 0.9rem; font-weight: 600; color: var(--bone); }
.followup-name a:hover { color: var(--gold); }
.followup-sub  { font-size: 0.75rem; color: var(--smoke); margin-top: 2px; }
.wa-mini {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 6px;
  color: #25D366; font-size: 0.75rem;
  text-decoration: none; white-space: nowrap;
  transition: background 0.15s;
}
.wa-mini:hover { background: rgba(37,211,102,0.08); }
.empty-state { text-align: center; color: var(--smoke); font-size: 0.875rem; padding: 3rem 0; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  background: var(--ink-card);
  border: 1px solid rgba(226,183,85,0.3);
  border-radius: 10px;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem; color: var(--bone);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.error { border-color: rgba(239,68,68,0.4); color: #fca5a5; }

@keyframes slideIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes pulse   { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Spinner */
.spinner { width:18px; height:18px; border: 2px solid rgba(11,11,12,0.3); border-top-color: var(--ink); border-radius:50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Back link */
.back-link { display:inline-flex; align-items:center; gap:0.375rem; font-size:0.8rem; color:var(--smoke); margin-bottom:1.25rem; transition:color 0.15s; }
.back-link:hover { color:var(--bone); }
.back-link svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; }

/* ============================================================
   LTR OVERRIDES — English page ([dir="ltr"])
   Resets every RTL-specific layout to left-to-right
   ============================================================ */

/* Base direction */
[dir="ltr"] body { direction: ltr; }

/* Navbar */
[dir="ltr"] .navbar-inner    { flex-direction: row; }
[dir="ltr"] .navbar-links    { flex-direction: row; }

/* Hero — text left, card right */
[dir="ltr"] .hero-title      { text-align: left; }
[dir="ltr"] .hero-sub        { text-align: left; }
[dir="ltr"] .hero-ctas       { justify-content: flex-start; }
[dir="ltr"] .hero-badge      { float: none; text-align: left; }
[dir="ltr"] .hero-grid       { direction: ltr; }

/* Equity card stats — left to right */
[dir="ltr"] .equity-stats    { direction: ltr; }
[dir="ltr"] .equity-card-header { direction: ltr; }
[dir="ltr"] .equity-stat-val { text-align: left; }
[dir="ltr"] .equity-stat-lbl { text-align: left; }

/* Performance stats */
[dir="ltr"] .perf-stats      { direction: ltr; }
[dir="ltr"] .perf-stat       { direction: ltr; text-align: left; }
[dir="ltr"] .perf-val        { text-align: left; }
[dir="ltr"] .perf-lbl        { text-align: left; }

/* About section */
[dir="ltr"] .about-grid      { direction: ltr; }
[dir="ltr"] .pillar          { direction: ltr; flex-direction: row; }
[dir="ltr"] .pillar-title    { text-align: left; }
[dir="ltr"] .pillar-desc     { text-align: left; }
[dir="ltr"] .about-lead      { text-align: left; }

/* Cards grid */
[dir="ltr"] .grid-2,
[dir="ltr"] .grid-3,
[dir="ltr"] .grid-4          { direction: ltr; }
[dir="ltr"] .card            { direction: ltr; text-align: left; }
[dir="ltr"] .card-icon       { margin-left: 0; margin-right: 0; }
[dir="ltr"] .card-title      { text-align: left; }
[dir="ltr"] .card-desc       { text-align: left; }

/* Testimonials */
[dir="ltr"] .testi-card      { direction: ltr; text-align: left; }
[dir="ltr"] .testi-quote     { text-align: left; }
[dir="ltr"] .testi-text      { text-align: left; }
[dir="ltr"] .testi-meta      { text-align: left; }

/* KPI / perf stats */
[dir="ltr"] .kpi-grid        { direction: ltr; }
[dir="ltr"] .kpi-card        { direction: ltr; text-align: left; }

/* Myfxbook box */
[dir="ltr"] .myfxbook-header { direction: ltr; }

/* Footer */
[dir="ltr"] .footer-inner    { direction: ltr; }
[dir="ltr"] .footer-disclaimer { text-align: left; }

/* Section headers */
[dir="ltr"] .section-header  { text-align: center; }
[dir="ltr"] .section-eyebrow { text-align: center; }
[dir="ltr"] .section-title   { text-align: center; }
[dir="ltr"] .section-sub     { text-align: center; }

/* Contact CTA */
[dir="ltr"] .contact-cta     { text-align: center; }

/* FAQ */
[dir="ltr"] .faq-list        { direction: ltr; }
[dir="ltr"] .faq-item        { direction: ltr; }
[dir="ltr"] .faq-q           { text-align: left; flex-direction: row; }
[dir="ltr"] .faq-a           { text-align: left; }

/* Lead form modal */
[dir="ltr"] .modal-box       { direction: ltr; }
[dir="ltr"] .modal-title     { text-align: left; }
[dir="ltr"] .modal-subtitle  { text-align: left; }
[dir="ltr"] .form-label      { text-align: left; }
[dir="ltr"] .step-q          { text-align: left; }
[dir="ltr"] .success-state   { direction: ltr; }
[dir="ltr"] .success-title   { text-align: center; }
[dir="ltr"] .success-desc    { text-align: center; }

/* Progress bar LTR */
[dir="ltr"] .progress-bar    { direction: ltr; }

/* Step nav LTR — Previous left, Next right */
[dir="ltr"] .step-nav        { flex-direction: row; }

/* Sidebar (admin is always RTL, no change needed) */

/* Responsive admin */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .admin-main { padding: 1.25rem; }
}

/* ============================================================
   MYFXBOOK WIDGET
   ============================================================ */
.mfx-widget {
  border: 1px solid rgba(226,183,85,0.25);
  border-radius: 16px;
  background: #0f0f11;
  overflow: hidden;
  font-family: 'Cairo', sans-serif;
}

/* Header */
.mfx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.mfx-title   { display: block; font-size: 1rem; font-weight: 700; color: var(--bone); }
.mfx-sub     { display: block; font-size: 0.72rem; color: var(--smoke); margin-top: 2px; }
.mfx-header-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.mfx-badge {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.875rem;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.mfx-badge-pair     { border-color: rgba(226,183,85,0.3); color: var(--gold); background: rgba(226,183,85,0.08); }
.mfx-badge-verified { border-color: rgba(99,102,241,0.4); color: #a5b4fc; background: rgba(99,102,241,0.1); }
.mfx-badge-live     { border-color: rgba(52,211,153,0.4); color: #34d399; background: rgba(52,211,153,0.1); }

/* Body layout */
.mfx-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 380px;
}
[dir="ltr"] .mfx-body { grid-template-columns: 220px 1fr; }

/* Panel */
.mfx-panel {
  border-left: 1px solid rgba(255,255,255,0.05);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(0,0,0,0.2);
}
[dir="ltr"] .mfx-panel {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* Total gain */
.mfx-gain-label { font-size: 0.72rem; color: var(--smoke); margin-bottom: 0.25rem; }
.mfx-gain-value {
  font-size: 2.75rem; font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.mfx-gain-sub   { font-size: 0.72rem; color: var(--smoke); margin-top: 0.2rem; }
.mfx-gain-last  { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.4rem; }
.mfx-arrow      { font-size: 0.85rem; font-weight: 700; }
.mfx-arrow.up   { color: #34d399; }
.mfx-arrow.down { color: #f87171; }
.mfx-last-val   { font-size: 0.75rem; color: #34d399; font-weight: 600; }

/* Donut */
.mfx-donut-label { font-size: 0.72rem; color: var(--smoke); margin-bottom: 0.5rem; }
.mfx-donut-wrap  { display: flex; justify-content: center; }

/* Monthly */
.mfx-monthly-label { font-size: 0.72rem; color: var(--smoke); margin-bottom: 0.5rem; }
.mfx-monthly-row   {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.25rem 0;
  font-size: 0.82rem;
}
.mfx-month-name { color: var(--bone); }
.mfx-month-val.pos { color: #34d399; font-weight: 600; }
.mfx-month-val.neg { color: #f87171; font-weight: 600; }

/* Drawdown */
.mfx-dd-label  { font-size: 0.72rem; color: var(--smoke); margin-bottom: 0.25rem; }
.mfx-dd-value  { font-size: 1.75rem; font-weight: 700; color: var(--bone); }
.mfx-dd-sub    { font-size: 0.7rem; color: var(--smoke); margin-top: 0.2rem; }

/* Chart area */
.mfx-chart-area {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 0.75rem;
}
.mfx-chart-title {
  font-size: 0.82rem; font-weight: 600;
  color: var(--bone);
  text-align: center;
  margin-bottom: 0.75rem;
}
.mfx-chart-wrap { flex: 1; min-height: 0; }
.mfx-svg        { width: 100%; height: 100%; min-height: 200px; display: block; }

/* Chart footer */
.mfx-chart-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 0.5rem;
  flex-wrap: wrap; gap: 0.5rem;
}
.mfx-chart-legend    { display: flex; align-items: center; gap: 1rem; }
.mfx-legend-item     { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--smoke); }
.mfx-legend-dot      { width: 10px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.mfx-verified-label  { font-size: 0.68rem; color: rgba(138,138,142,0.6); }

/* Responsive */
@media (max-width: 700px) {
  .mfx-body { grid-template-columns: 1fr; }
  .mfx-panel {
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .mfx-svg { min-height: 160px; }
}

/* Myfxbook update time badge */
.mfx-update-time {
  font-size: 0.68rem;
  color: var(--smoke);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0.2rem 0.625rem;
}

/* Myfxbook iframe & placeholder */
.mfx-chart-wrap iframe { width:100%; min-height:220px; border:none; display:block; }
.mfx-iframe-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 220px; gap: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(226,183,85,0.2);
  border-radius: 8px; padding: 2rem; text-align: center;
}
.mfx-iframe-placeholder p    { font-size:0.85rem; color:var(--smoke); }
.mfx-iframe-placeholder code {
  font-size:0.72rem; color:var(--gold);
  background:rgba(226,183,85,0.08);
  padding:0.3rem 0.75rem; border-radius:5px;
  direction:ltr; display:inline-block;
}
