/* =====================================================
   TAMX Neumorphism Design System
   Professional Forex Broker Platform
   ===================================================== */

:root {
  /* Background & Surface - DARK MODE BY DEFAULT (TAMX black/gold theme) */
  --bg: #070b1e;
  --bg-darker: #050818;
  --surface: #0a0e27;
  --surface-2: #141938;
  --surface-3: #1a1f44;

  /* Shadows for Dark Neumorphism */
  --shadow-dark: rgba(0, 0, 0, 0.65);
  --shadow-light: rgba(212, 175, 55, 0.06);
  --shadow-dark-soft: rgba(0, 0, 0, 0.4);

  /* Brand Colors */
  --primary: #0a0e27;
  --primary-2: #141938;
  --primary-light: #1a1f44;
  --gold: #d4af37;
  --gold-dark: #a08825;
  --gold-light: #f5e6a8;

  /* Status */
  --green: #10b981;
  --green-light: #34d399;
  --red: #ef4444;
  --red-light: #f87171;
  --blue: #3b82f6;
  --orange: #f59e0b;

  /* Text */
  --text: #e5e7eb;
  --text-2: #c4cdde;
  --text-3: #9ca3af;
  --text-muted: #6b7790;

  /* Borders */
  --border-gold: rgba(212, 175, 55, 0.15);
  --border-gold-strong: rgba(212, 175, 55, 0.3);

  /* Radii */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t: 250ms ease;
}

/* Light mode (opt-in via data-theme="light") - kept for theme toggle support */
[data-theme="light"] {
  --bg: #e8ecf3;
  --bg-darker: #dde2eb;
  --surface: #eef1f7;
  --surface-2: #f4f6fb;
  --shadow-dark: rgba(163, 177, 198, 0.55);
  --shadow-light: rgba(255, 255, 255, 0.95);
  --shadow-dark-soft: rgba(163, 177, 198, 0.35);
  --text: #1a2332;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --text-muted: #9ca3af;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   Neumorphism Core Classes
   ===================================================== */

.neu-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-gold, rgba(212, 175, 55, 0.12));
  box-shadow:
    0 10px 30px var(--shadow-dark),
    inset 0 1px 0 var(--shadow-light);
  transition: all var(--t);
}

.neu-card-inset {
  background: var(--bg-darker, var(--surface));
  border-radius: var(--r);
  border: 1px solid var(--border-gold, rgba(212, 175, 55, 0.08));
  box-shadow:
    inset 0 2px 8px var(--shadow-dark-soft);
  transition: all var(--t);
}

.neu-card-flat {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border-gold, rgba(212, 175, 55, 0.10));
  box-shadow: 0 4px 12px var(--shadow-dark-soft);
}

/* Light theme override - use classic neumorphism shadows */
[data-theme="light"] .neu-card {
  border: none;
  box-shadow:
    9px 9px 22px var(--shadow-dark),
    -9px -9px 22px var(--shadow-light);
}
[data-theme="light"] .neu-card-inset {
  border: none;
  box-shadow:
    inset 5px 5px 12px var(--shadow-dark-soft),
    inset -5px -5px 12px var(--shadow-light);
}
[data-theme="light"] .neu-card-flat {
  border: none;
  box-shadow:
    4px 4px 10px var(--shadow-dark-soft),
    -4px -4px 10px var(--shadow-light);
}

/* =====================================================
   Buttons
   ===================================================== */

.btn-neu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  box-shadow:
    6px 6px 14px var(--shadow-dark-soft),
    -6px -6px 14px var(--shadow-light);
  transition: all var(--t);
  position: relative;
  user-select: none;
  white-space: nowrap;
}

.btn-neu:hover {
  transform: translateY(-1px);
  box-shadow:
    8px 8px 18px var(--shadow-dark),
    -8px -8px 18px var(--shadow-light);
}

.btn-neu:active {
  transform: translateY(0);
  box-shadow:
    inset 4px 4px 10px var(--shadow-dark-soft),
    inset -4px -4px 10px var(--shadow-light);
}

.btn-neu:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-neu-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
}
.btn-gold:hover { box-shadow: 8px 8px 20px rgba(212, 175, 55, 0.45), -8px -8px 20px var(--shadow-light); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.btn-success { background: linear-gradient(135deg, var(--green), var(--green-light)); color: #fff; }
.btn-danger  { background: linear-gradient(135deg, var(--red), var(--red-light));     color: #fff; }
.btn-ghost   { background: transparent; box-shadow: none; }
.btn-ghost:hover {
  background: var(--surface);
  box-shadow: 6px 6px 14px var(--shadow-dark-soft), -6px -6px 14px var(--shadow-light);
}

.btn-block { width: 100%; }

/* =====================================================
   Form Inputs
   ===================================================== */

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-2);
}

.input-neu {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  box-shadow:
    inset 5px 5px 10px var(--shadow-dark-soft),
    inset -5px -5px 10px var(--shadow-light);
  transition: all var(--t);
  outline: none;
}

.input-neu:focus {
  box-shadow:
    inset 6px 6px 12px var(--shadow-dark),
    inset -6px -6px 12px var(--shadow-light),
    0 0 0 2px rgba(212, 175, 55, 0.35);
}

.input-neu::placeholder { color: var(--text-muted); }

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .input-neu { padding-right: 48px; }
.input-icon-wrap .input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 16px;
  pointer-events: none;
}

.input-error { color: var(--red); font-size: 12px; margin-top: 6px; display: none; }
.input-error.show { display: block; }

/* Checkbox custom */
.checkbox-neu {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}
.checkbox-neu input { display: none; }
.checkbox-neu .box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark-soft),
    inset -3px -3px 6px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  margin-top: 2px;
}
.checkbox-neu input:checked + .box {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}
.checkbox-neu input:checked + .box::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary);
  font-size: 12px;
}

/* =====================================================
   Navbar
   ===================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(232, 236, 243, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 0;
  box-shadow: 0 4px 12px rgba(163, 177, 198, 0.18);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
}
.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 10px var(--shadow-dark-soft), -4px -4px 10px var(--shadow-light);
}
.logo-text {
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t);
  position: relative;
}
.nav-links a:hover { color: var(--gold-dark); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .nav-actions .btn-neu span { display: none; }
}

/* =====================================================
   Hero
   ===================================================== */

.hero {
  padding: 60px 0 80px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 24px;
}
.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-2);
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 560px;
}
.stat-item {
  padding: 18px;
  text-align: center;
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-3);
}

/* Hero Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}
.dashboard-mockup {
  width: 100%;
  max-width: 480px;
  padding: 22px;
  transform: rotate(-2deg);
  transition: transform var(--t);
}
.dashboard-mockup:hover { transform: rotate(0); }
.mockup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(163, 177, 198, 0.25);
}
.mockup-dots {
  display: flex;
  gap: 6px;
}
.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-darker);
  box-shadow: inset 2px 2px 4px var(--shadow-dark-soft);
}
.mockup-title {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}
.mockup-balance {
  padding: 22px;
  margin-bottom: 16px;
}
.mockup-label {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.mockup-amount {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.mockup-amount .text-gold {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
}
.trend-up {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mockup-mini {
  padding: 16px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.mockup-mini i { font-size: 20px; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 60px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-title { font-size: 34px; }
  .hero-subtitle { font-size: 16px; }
  .dashboard-mockup { transform: rotate(0); }
}

/* =====================================================
   Sections
   ===================================================== */

.section {
  padding: 80px 0;
}
.section-alt {
  background: linear-gradient(180deg, var(--bg), var(--bg-darker), var(--bg));
}
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 14px;
}
.section-header p {
  color: var(--text-2);
  font-size: 16px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.feature-card {
  padding: 32px;
  transition: transform var(--t);
}
.feature-card:hover { transform: translateY(-4px); }
.feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--gold-dark);
  margin-bottom: 20px;
  border-radius: var(--r);
}
.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-2);
  font-size: 14px;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.step-card {
  padding: 30px 22px;
  text-align: center;
  position: relative;
  transition: transform var(--t);
}
.step-card:hover { transform: translateY(-4px); }
.step-number {
  position: absolute;
  top: -16px;
  right: 50%;
  transform: translateX(50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 4px 4px 10px var(--shadow-dark-soft);
}
.step-icon {
  font-size: 28px;
  color: var(--primary);
  margin: 12px 0 14px;
}
.step-card h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.step-card p {
  font-size: 13px;
  color: var(--text-3);
}

/* Security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.security-item {
  padding: 28px;
  text-align: center;
}
.security-item i {
  font-size: 34px;
  margin-bottom: 16px;
}
.security-item h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.security-item p {
  font-size: 13px;
  color: var(--text-3);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  padding: 18px 24px;
  transition: all var(--t);
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--gold-dark);
  font-weight: 800;
  transition: transform var(--t);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
}

/* Risk Section */
.risk-section { padding: 24px 0 60px; }
.risk-card {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}
.risk-card i {
  color: var(--orange);
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* =====================================================
   Footer
   ===================================================== */

.footer {
  padding: 56px 0 24px;
  background: linear-gradient(180deg, var(--bg-darker), var(--bg));
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-col h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col a, .footer-col p {
  display: block;
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: 8px;
  transition: color var(--t);
}
.footer-col a:hover { color: var(--gold-dark); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(163, 177, 198, 0.25);
  color: var(--text-3);
  font-size: 13px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 28px; }
}

/* =====================================================
   Utilities
   ===================================================== */

.text-gold { color: var(--gold-dark); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* =====================================================
   Toast Notifications
   ===================================================== */

.toast-container {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow:
    8px 8px 20px var(--shadow-dark),
    -8px -8px 20px var(--shadow-light);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn 320ms ease;
  border-right: 4px solid var(--gold);
}
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }
.toast.warning { border-color: var(--orange); }
.toast.info    { border-color: var(--blue); }
@keyframes toastIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* =====================================================
   Auth Pages
   ===================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(circle at 30% 20%, rgba(212, 175, 55, 0.08), transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(26, 35, 50, 0.06), transparent 40%),
              var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
}
.auth-card.wide { max-width: 560px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header .logo { justify-content: center; margin-bottom: 16px; }
.auth-header h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}
.auth-header p { color: var(--text-3); font-size: 14px; }

.auth-divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
  color: var(--text-3);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(163, 177, 198, 0.4);
}
.auth-divider::before { right: 0; }
.auth-divider::after { left: 0; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-2);
}
.auth-footer a {
  color: var(--gold-dark);
  font-weight: 700;
}

.google-btn {
  background: #fff;
  color: #3c4043;
  width: 100%;
}
.google-btn:hover { background: #f8f9fa; }

/* Password strength meter */
.pwd-strength {
  margin-top: 8px;
  display: flex;
  gap: 4px;
}
.pwd-strength span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(163, 177, 198, 0.4);
}
.pwd-strength span.active.weak { background: var(--red); }
.pwd-strength span.active.medium { background: var(--orange); }
.pwd-strength span.active.strong { background: var(--green); }
