/* =============================================
   شمعات - الأنماط الرئيسية
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --primary:    #0a0e1a;
  --secondary:  #111827;
  --card-bg:    #1a2236;
  --border:     #2a3a5c;
  --gold:       #f0b429;
  --gold-light: #fcd96a;
  --accent:     #3b82f6;
  --green:      #10b981;
  --red:        #ef4444;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --white:      #ffffff;
  --radius:     12px;
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
  --transition: all 0.3s ease;
  /* هوية شمعات الرسمية */
  --brand-green: #028756;
  --brand-navy:  #053954;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans Arabic', Arial, sans-serif;
  direction: rtl;
  background: var(--primary);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; }

ul { list-style: none; }

/* =============================================
   Layout
   ============================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 0; }
.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  color: var(--white);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 50px;
}
.section-title span { color: var(--gold); }

/* =============================================
   Navbar
   ============================================= */
.navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 1000;
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  transition: var(--transition);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
}
.nav-brand img,
.nav-brand .brand-logo { height: 38px; width: auto; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { background: var(--card-bg); color: var(--gold); }
.nav-links .btn-nav {
  background: var(--gold);
  color: var(--primary);
  font-weight: 700;
}
.nav-links .btn-nav:hover { background: var(--gold-light); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: radial-gradient(ellipse at 60% 40%, #1e3a5f 0%, var(--primary) 60%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(240,180,41,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 650px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(240,180,41,0.12);
  border: 1px solid rgba(240,180,41,0.3);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--white);
}
.hero-title .highlight {
  color: var(--gold);
  position: relative;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--primary);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,180,41,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.btn-danger {
  background: var(--red);
  color: var(--white);
}
.btn-danger:hover { background: #dc2626; }
.btn-success {
  background: var(--green);
  color: var(--white);
}
.btn-success:hover { background: #059669; }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* =============================================
   Cards
   ============================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.card:hover { border-color: rgba(240,180,41,0.3); box-shadow: var(--shadow); }

/* =============================================
   Features Section
   ============================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(240,180,41,0.12);
}
.feature-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, rgba(240,180,41,0.15), rgba(240,180,41,0.05));
  border: 1px solid rgba(240,180,41,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
}
.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--white); }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* =============================================
   Plans / Pricing
   ============================================= */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
}
.plan-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}
.plan-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.plan-card.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, #1e2d45 0%, var(--card-bg) 100%);
}
.plan-badge {
  position: absolute;
  top: -14px;
  right: 50%;
  transform: translateX(50%);
  background: var(--gold);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 18px;
  border-radius: 50px;
  white-space: nowrap;
}
.plan-icon { font-size: 2.4rem; margin-bottom: 16px; }
.plan-name { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.plan-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold);
  margin: 16px 0 8px;
}
.plan-price sup { font-size: 1rem; vertical-align: super; }
.plan-price sub { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.plan-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.6; }
.plan-features { text-align: right; margin-bottom: 28px; }
.plan-features li {
  padding: 6px 0;
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}

/* =============================================
   Stats
   ============================================= */
.stats-section {
  background: var(--secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
}
.stat-label { color: var(--text-muted); font-size: 0.95rem; margin-top: 6px; }

/* =============================================
   Forms
   ============================================= */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  direction: rtl;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control select, select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
  background: radial-gradient(ellipse at center, #112240 0%, var(--primary) 70%);
}
.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-text {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}
.auth-title { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 6px; color: var(--white); }
.auth-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 28px; }

/* =============================================
   Alerts
   ============================================= */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 0.95rem;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-danger  { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* =============================================
   Badges
   ============================================= */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-active   { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.badge-inactive { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.25); }
.badge-expired  { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-buy      { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-sell     { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-neutral  { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* =============================================
   User Dashboard
   ============================================= */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 74px;
}
.sidebar {
  width: 260px;
  background: var(--secondary);
  border-left: 1px solid var(--border);
  padding: 28px 16px;
  position: fixed;
  top: 74px;
  right: 0;
  height: calc(100vh - 74px);
  overflow-y: auto;
  z-index: 100;
}
.sidebar-user {
  text-align: center;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.sidebar-avatar {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--gold), #e08a00);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: var(--primary);
  margin: 0 auto 12px;
}
.sidebar-name { font-weight: 700; color: var(--white); font-size: 1rem; }
.sidebar-email { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  margin-bottom: 4px;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--card-bg);
  color: var(--gold);
  border: 1px solid rgba(240,180,41,0.15);
}
.sidebar-nav a .nav-icon { font-size: 1.1rem; }
.main-content {
  flex: 1;
  margin-left: 0;
  margin-right: 260px;
  padding: 32px;
  min-height: calc(100vh - 74px);
}
.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--white); }
.page-header p { color: var(--text-muted); margin-top: 4px; }

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card-icon {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card-info .label { font-size: 0.85rem; color: var(--text-muted); }
.stat-card-info .value { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-top: 2px; }

/* =============================================
   Data Table
   ============================================= */
.table-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.table-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--white); }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--secondary);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: right;
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(42,58,92,0.5);
  font-size: 0.93rem;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
.change-positive { color: var(--green); font-weight: 600; }
.change-negative { color: var(--red); font-weight: 600; }
.change-neutral  { color: var(--text-muted); }

/* Stock pulse animation */
@keyframes pulse-green { 0%,100% { background: transparent; } 50% { background: rgba(16,185,129,0.08); } }
@keyframes pulse-red   { 0%,100% { background: transparent; } 50% { background: rgba(239,68,68,0.08); } }
.updated-up   { animation: pulse-green 1s ease; }
.updated-down { animation: pulse-red 1s ease; }

/* =============================================
   Footer
   ============================================= */
footer {
  background: var(--secondary);
  border-top: 3px solid;
  border-image: linear-gradient(90deg, var(--brand-green), var(--brand-navy)) 1;
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { font-size: 1.6rem; font-weight: 900; color: var(--gold); margin-bottom: 12px; }
.footer-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.footer-heading { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

/* =============================================
   Contact Page
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.contact-info-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }

/* Disclosure Page */
.disclosure-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  line-height: 2;
  color: var(--text);
  white-space: pre-wrap;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: rgba(10,14,26,0.98);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; width: 100%; }
  .hero-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .dashboard-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }
  .main-content { margin-right: 0; padding: 20px 16px; }
  .auth-card { padding: 28px 20px; }
  .section { padding: 50px 0; }
}

@media (max-width: 480px) {
  .plans-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2rem; }
}
