/**
 * Syrian Business Network (SBN) - Main Stylesheet
 * Design System: Deep midnight blues, gold accents, liquid glass
 * Language: Arabic (RTL)
 * Framework: Bootstrap 5.3 RTL
 */

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Backgrounds */
  --bg-base: #00081A;
  --bg-panel: #0A1628;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-border: rgba(255, 255, 255, 0.08);
  --bg-input: #111D30;
  --bg-elevated: #121E33;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #8B95A5;
  --text-muted: #4A5568;
  --text-gold: #F0B429;
  --text-green: #34D399;
  --text-red: #F87171;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, rgba(10, 22, 40, 0.9) 0%, rgba(0, 8, 26, 0.4) 100%);
  --gradient-gold: linear-gradient(90deg, #F0B429 0%, #D97706 100%);
  --gradient-card: linear-gradient(135deg, rgba(240, 180, 41, 0.1) 0%, rgba(10, 22, 40, 0.8) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-gold: 0 4px 24px rgba(240, 180, 41, 0.15);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Typography Scale */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   2. BASE RESET & TYPOGRAPHY
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Tajawal", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Arabic font weights */
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/tajawal/v9/Iura6YBj_oCad4k1nzSBC45I.woff2") format("woff2");
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/tajawal/v9/Iura6YBj_oCad4k1rzSBC45I.woff2") format("woff2");
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/tajawal/v9/Iura6YBj_oCad4k1nzSBC45I.woff2") format("woff2");
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/tajawal/v9/Iura6YBj_oCad4k1oTODC45I.woff2") format("woff2");
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/tajawal/v9/Iura6YBj_oCad4k1nzSBC45I.woff2") format("woff2");
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Tajawal", sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

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

a:hover {
  color: #D97706;
}

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

/* ============================================
   3. LIQUID GLASS COMPONENT SYSTEM
   ============================================ */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  background-blend-mode: luminosity;
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.25;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(255,255,255,0.18) 0%, transparent 55%),
              radial-gradient(ellipse 60% 35% at 65% 10%, rgba(255,255,255,0.08) 0%, transparent 50%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Thicker glass variant for prominent cards */
.glass-thick {
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   4. NAVIGATION
   ============================================ */
.sbn-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(0, 8, 26, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition-base);
}

.sbn-navbar.scrolled {
  background: rgba(0, 8, 26, 0.92);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.sbn-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.sbn-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  color: var(--bg-base);
  font-weight: 800;
}

/* Search */
.navbar-search {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin: 0 var(--space-6);
}

.navbar-search input {
  width: 100%;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-pill);
  padding: 0 var(--space-4) 0 var(--space-10);
  color: var(--text-primary);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

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

.navbar-search input:focus {
  outline: none;
  border-color: var(--text-gold);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.15);
}

.navbar-search .search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--text-red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(240, 180, 41, 0.4);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.nav-avatar:hover {
  border-color: var(--text-gold);
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-2);
}

/* ============================================
   5. HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Canvas background for Market Pulse */
.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: var(--space-6);
  max-width: 800px;
}

.hero-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, #FFFFFF 0%, #F0B429 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  font-weight: 400;
}

/* Quick stat pills floating in hero */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: transform var(--transition-base);
}

.stat-pill:hover {
  transform: translateY(-2px);
}

.stat-pill .icon {
  width: 20px;
  height: 20px;
}

.stat-pill.gold {
  background: rgba(240, 180, 41, 0.12);
  color: var(--text-gold);
  border: 1px solid rgba(240, 180, 41, 0.25);
}

.stat-pill.currency {
  background: rgba(52, 211, 153, 0.1);
  color: var(--text-green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--gradient-gold);
  color: var(--bg-base);
  border: none;
  border-radius: var(--radius-pill);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(240, 180, 41, 0.3);
  color: var(--bg-base);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-pill);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   6. LIVE TICKER
   ============================================ */
.ticker-section {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 48px;
  background: var(--bg-panel);
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  overflow: hidden;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-6);
  font-size: var(--text-sm);
  border-left: 1px solid var(--bg-border);
}

.ticker-item .ticker-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.ticker-item .ticker-value {
  color: var(--text-gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ticker-item .ticker-change {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.ticker-change.up {
  color: var(--text-green);
  background: rgba(52, 211, 153, 0.1);
}

.ticker-change.down {
  color: var(--text-red);
  background: rgba(248, 113, 113, 0.1);
}

/* ============================================
   7. SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.section-title .title-icon {
  color: var(--text-gold);
  width: 28px;
  height: 28px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* View All Link */
.view-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-gold);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: gap var(--transition-fast);
}

.view-all:hover {
  gap: var(--space-2);
}

/* ============================================
   8. BENTO GRID (Market Cards)
   ============================================ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.bento-item {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  border: 1px solid var(--bg-border);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.bento-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.12);
}

.bento-item:hover::before {
  opacity: 1;
}

.bento-item.span-2 {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item.span-1 {
  grid-column: span 1;
  grid-row: span 1;
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon.gold {
  background: rgba(240, 180, 41, 0.12);
  color: var(--text-gold);
}

.card-icon.green {
  background: rgba(52, 211, 153, 0.1);
  color: var(--text-green);
}

.card-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #60A5FA;
}

.card-icon.red {
  background: rgba(248, 113, 113, 0.1);
  color: var(--text-red);
}

/* Price display */
.price-main {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-gold);
  font-variant-numeric: tabular-nums;
}

.price-unit {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 400;
}

.change-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
}

.change-badge.up {
  background: rgba(52, 211, 153, 0.1);
  color: var(--text-green);
}

.change-badge.down {
  background: rgba(248, 113, 113, 0.1);
  color: var(--text-red);
}

/* Sparkline canvas */
.sparkline-container {
  width: 100%;
  height: 60px;
  margin-top: var(--space-3);
}

/* ============================================
   9. REELS / SHORT VIDEOS SLIDER
   ============================================ */
.reels-container {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-4);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reels-container::-webkit-scrollbar {
  display: none;
}

.reel-card {
  flex: 0 0 auto;
  width: 180px;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.reel-card:hover {
  transform: scale(1.03);
}

.reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 8, 26, 0.9) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
}

.reel-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 10px;
  background: rgba(248, 113, 113, 0.9);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.reel-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.reel-info .reel-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.reel-meta .views::before {
  content: "\1F441";
  margin-left: 4px;
}

/* ============================================
   10. NEWS GRID
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.news-card {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bg-border);
  transition: all var(--transition-base);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.12);
}

.news-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.news-content {
  padding: var(--space-4);
}

.news-category {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(240, 180, 41, 0.3);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-gold);
  margin-bottom: var(--space-2);
}

.news-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   11. MARKET PAGE STYLES
   ============================================ */
.page-header {
  padding: 100px 0 var(--space-8);
  text-align: center;
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-md);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  margin-bottom: var(--space-6);
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 160px;
}

.filter-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  height: 40px;
  padding: 0 var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast);
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--text-gold);
}

.filter-group select option {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.filter-btn {
  height: 40px;
  padding: 0 var(--space-6);
  background: var(--gradient-gold);
  color: var(--bg-base);
  border: none;
  border-radius: var(--radius-sm);
  font-family: "Tajawal", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-btn:hover {
  box-shadow: var(--shadow-gold);
}

/* Chart Container */
.chart-container {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.chart-title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.chart-legend {
  display: flex;
  gap: var(--space-4);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Comparison Table */
.compare-table-wrapper {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.compare-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--bg-border);
}

.compare-table-title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: var(--space-3) var(--space-5);
  text-align: right;
  font-size: var(--text-sm);
}

.data-table th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--bg-border);
}

.data-table td {
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table .price-cell {
  font-weight: 700;
  color: var(--text-gold);
  font-variant-numeric: tabular-nums;
}

.data-table .trend-up {
  color: var(--text-green);
}

.data-table .trend-down {
  color: var(--text-red);
}

.data-table .region-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

/* ============================================
   12. DASHBOARD PAGE STYLES
   ============================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-6);
  padding-top: 88px;
  padding-bottom: var(--space-8);
}

/* Sidebar */
.dashboard-sidebar {
  position: sticky;
  top: 88px;
  height: calc(100vh - 104px);
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  padding: var(--space-5);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: var(--space-4);
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(240, 180, 41, 0.4);
  overflow: hidden;
}

.sidebar-user-info .user-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-user-info .user-role {
  font-size: var(--text-xs);
  color: var(--text-gold);
  font-weight: 500;
}

/* Role Toggle */
.role-toggle {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: var(--space-4);
}

.role-toggle-btn {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.role-toggle-btn.active {
  background: var(--gradient-gold);
  color: var(--bg-base);
}

/* Sidebar Nav */
.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-nav-item a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.sidebar-nav-item a:hover,
.sidebar-nav-item a.active {
  background: rgba(240, 180, 41, 0.08);
  color: var(--text-gold);
}

.sidebar-nav-item a .nav-icon {
  width: 20px;
  height: 20px;
}

/* Dashboard Content */
.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Stat Cards Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.stat-card {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  padding: var(--space-5);
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.stat-card-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-1);
}

.stat-card-trend {
  font-size: var(--text-xs);
  font-weight: 600;
}

/* Investor-only metrics */
.investor-metric {
  background: var(--gradient-card);
  border: 1px solid rgba(240, 180, 41, 0.15);
}

/* Contribute Form */
.form-card {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  padding: var(--space-6);
}

.form-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.form-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  height: 44px;
  padding: 0 var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-base);
  transition: all var(--transition-fast);
}

.form-group textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-gold);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-upload:hover {
  border-color: var(--text-gold);
  background: rgba(240, 180, 41, 0.02);
}

.file-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  color: var(--text-muted);
}

.file-upload-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.file-upload-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  justify-content: flex-start;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: background var(--transition-fast);
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Export Buttons */
.export-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-export:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   13. SBN WATERMARK (Footer)
   ============================================ */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--bg-border);
  padding: var(--space-8) 0;
  margin-top: var(--space-12);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-gold);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* SBN Watermark Effect */
.sbn-watermark-container {
  display: flex;
  transform-style: preserve-3d;
  perspective: 500px;
  mix-blend-mode: screen;
  background: transparent;
}

.sbn-char {
  display: inline-block;
  color: #D4AF37;
  font-size: 3rem;
  font-weight: 700;
  animation: pulse-gold 3s infinite ease-in-out;
  transform-style: preserve-3d;
}

.sbn-char:nth-child(1) { animation-delay: 0s; }
.sbn-char:nth-child(2) { animation-delay: 0.2s; }
.sbn-char:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-gold {
  0% {
    transform: translateZ(0px);
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
  }
  50% {
    transform: translateZ(10px);
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 1));
  }
  100% {
    transform: translateZ(0px);
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
  }
}

/* ============================================
   14. UTILITY CLASSES
   ============================================ */
.container-sbn {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section-padding {
  padding: var(--space-12) 0;
}

.glass-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: var(--space-6);
}

.tab-btn {
  padding: var(--space-2) var(--space-5);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-family: "Tajawal", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--gradient-gold);
  color: var(--bg-base);
}

/* Responsive Tab Nav (scrollable on mobile) */
.tab-nav-scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-nav-scroll::-webkit-scrollbar {
  display: none;
}

/* Sector Cards (for Market page) */
.sector-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.sector-card {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.sector-card:hover,
.sector-card.active {
  border-color: var(--text-gold);
  background: rgba(240, 180, 41, 0.05);
  transform: translateY(-2px);
}

.sector-card.active {
  box-shadow: var(--shadow-gold);
}

.sector-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  font-size: var(--text-xl);
}

.sector-name {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.sector-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   15. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-elevated) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   16. RESPONSIVE STYLES (Mobile First)
   ============================================ */

/* Large screens */
@media (max-width: 1200px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-item.span-2 {
    grid-column: span 2;
    grid-row: span 1;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .sector-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet */
@media (max-width: 992px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar {
    position: static;
    height: auto;
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile landscape */
@media (max-width: 768px) {
  .navbar-search {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .nav-actions .nav-btn:not(.mobile-menu-btn) {
    display: none;
  }
  .hero-title {
    font-size: var(--text-2xl);
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-item.span-2 {
    grid-column: span 1;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .sector-cards {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar {
    flex-direction: column;
  }
  .filter-group {
    min-width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
  .page-title {
    font-size: var(--text-2xl);
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .sbn-watermark-container {
    justify-content: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --space-6: 16px;
  }
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }
  .hero-cta {
    flex-direction: column;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .reel-card {
    width: 150px;
    height: 266px;
  }
  .sector-cards {
    grid-template-columns: 1fr;
  }
  .tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tab-btn {
    white-space: nowrap;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-wrapper {
    animation: none;
  }
}

/* ============================================
   17. BOOTSTRAP 5 OVERRIDES
   ============================================ */
/* Ensure Bootstrap doesn't override our dark theme */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--bg-border);
}

.dropdown-menu {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  box-shadow: var(--shadow-lg);
}

.dropdown-item {
  color: var(--text-secondary);
  font-family: "Tajawal", sans-serif;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--bg-border);
}

.modal-footer {
  border-top: 1px solid var(--bg-border);
}

.btn-close {
  filter: invert(1);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 80px;
  left: 16px;
  z-index: 9999;
}

.toast {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
  font-family: "Tajawal", sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
