/* ------------------------------------- */
/*  CSS Variables & Theme Setup         */
/* ------------------------------------- */
:root {
  /* Core Colors */
  --bg-dark: #07170E;
  --bg-darker: #05100A;
  --surface-color: rgba(14, 38, 24, 0.4);
  --surface-border: rgba(235, 176, 77, 0.15);
  --glass-bg: #0D2618;
  
  /* Text Colors */
  --text-main: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-gold: #EBB04D;
  --text-green-light: #52C382;
  
  /* Chart Colors */
  --chart-blue: #3b82f6;
  --chart-green: #10b981;
  --chart-orange: #f59e0b;
  --chart-red: #ef4444;
  --chart-yellow: #eab308;
  --chart-purple: #8b5cf6;
  --chart-teal: #14b8a6;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 80% 0%, rgba(235, 176, 77, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(82, 195, 130, 0.05) 0%, transparent 40%);
}

.dashboard-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 4rem;
}

/* ------------------------------------- */
/*  Typography                           */
/* ------------------------------------- */
h1, h2, h3, .serif {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
}

.text-gold { color: var(--text-gold); }
.text-green-light { color: var(--text-green-light); }

.mt-10 { margin-top: 40px; }
.mt-20 { margin-top: 80px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ------------------------------------- */
/*  Navigation                           */
/* ------------------------------------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(7, 23, 14, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 1rem;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.nav-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: white;
  object-fit: contain;
  padding: 4px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  margin-right: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
}

/* Buttons */
.btn-primary {
  background: var(--text-gold);
  color: #000;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

/* ------------------------------------- */
/*  Hero Section                         */
/* ------------------------------------- */
.hero-section {
  padding-top: 3rem;
  max-width: 800px;
}

.section-label, .hero-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-gold);
  margin-bottom: 1.5rem;
}

.line {
  height: 1px;
  width: 30px;
  background-color: var(--text-gold);
}

.hero-title {
  font-size: 5rem;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
}

.status-msg.success { color: var(--chart-green); border-left: 3px solid var(--chart-green); }
.status-msg.error { color: var(--chart-red); border-left: 3px solid var(--chart-red); }


/* ------------------------------------- */
/*  Stats Board                          */
/* ------------------------------------- */
.stats-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--glass-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
}

.stat-column {
  padding-right: 2rem;
}

.border-left {
  padding-left: 2rem;
  border-left: 1px solid rgba(255,255,255,0.05);
}

.stat-title {
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-date {
  font-size: 0.75rem;
  color: var(--text-green-light);
  margin-top: 0.5rem;
  font-weight: 500;
  opacity: 0.8;
}

/* ------------------------------------- */
/*  Quote Section (Carousel)             */
/* ------------------------------------- */
.quote-section {
  background: linear-gradient(135deg, rgba(82,195,130,0.1) 0%, rgba(235,176,77,0.15) 100%);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(235, 176, 77, 0.2);
}

.quote-carousel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.carousel-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-gold);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--text-gold);
  color: #000;
}

.quote-card {
  flex: 1;
  border-left: 2px solid var(--text-gold);
  padding-left: 2rem;
  max-width: 800px;
  margin: 0 auto;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-arabic {
  font-size: 2.2rem;
  color: var(--text-gold);
  margin-bottom: 1rem;
  text-align: right;
  direction: rtl;
  font-family: "Amiri", serif;
}

.quote-english {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  line-height: 1.6;
  color: #fff;
  font-style: italic;
  margin-bottom: 1rem;
}

.quote-source {
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--text-green-light);
  font-weight: 600;
  text-transform: uppercase;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--text-gold);
  width: 24px;
  border-radius: 4px;
}

/* ------------------------------------- */
/*  Charts Layout                        */
/* ------------------------------------- */
.section-heading {
  font-size: 3rem;
}
.section-subtext {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.chart-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.glass-dark {
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.span-full {
  grid-column: 1 / -1;
}

.chart-header {
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.chart-subtitle {
  font-size: 1.25rem;
  color: #fff;
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
}

.pie-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .dashboard-container { padding: 2rem; }
  .stats-board {
    padding: 2rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .border-left { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; }
  .chart-cards-grid { grid-template-columns: 1fr; }
  .uploads-grid { flex-direction: column; }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  .dashboard-container { padding: 1rem; }
  .hero-title { font-size: 3.5rem; }
  .hero-subtitle { font-size: 1rem; }
  .stats-board {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .quote-section {
    padding: 1.5rem;
  }
  .quote-carousel {
    flex-direction: column;
    gap: 1.5rem;
  }
  .carousel-btn {
    align-self: center;
    transform: rotate(90deg); /* point down/up */
  }
  .quote-card {
    padding-left: 0;
    border-left: none;
    border-top: 2px solid var(--text-gold);
    padding-top: 1.5rem;
    text-align: center;
  }
  .quote-arabic { 
    text-align: center; 
    font-size: 1.6rem; 
  }
  .quote-english { font-size: 1.2rem; }
  .stat-value { font-size: 2.2rem; }
  .glass-dark { padding: 1.25rem; }
  .section-heading { font-size: 2rem; }
  .chart-canvas-wrapper { height: 280px !important; }
}



