/* 
  ===================================================================
  RADICAL EXECUTIVE NATIONAL DASHBOARD DESIGN SYSTEM
  جمهورية مصر العربية - المنظومة الوطنية للمتابعة الاستراتيجية
  ===================================================================
*/

@import url('animations.css');
@import url('tablet.css');
@import url('mobile.css');

:root {
  /* HSL-Curated Presidential Official Colors */
  --hsl-navy: 215, 55%, 24%;
  /* #1b365d */
  --hsl-navy-dark: 217, 63%, 12%;
  /* #0a192f */
  --hsl-navy-light: 215, 49%, 33%;
  /* #2b4c7e */

  --hsl-gold: 43, 89%, 38%;
  /* Base Gold: #b8860b */
  --hsl-gold-dark: 43, 91%, 29%;
  /* #8c6607 */
  --hsl-gold-light: 53, 98%, 77%;
  /* #fef08a */

  --hsl-emerald: 160, 94%, 24%;
  /* #047857 */
  --hsl-amber: 32, 95%, 44%;
  /* #b45309 */
  --hsl-red: 0, 72%, 42%;
  /* #b91c1c */

  /* Sovereign Core Brand Tokens */
  --navy-primary: hsl(var(--hsl-navy));       /* #1b365d */
  --navy-dark: hsl(var(--hsl-navy-dark));     /* #0a192f */
  --navy-light: hsl(var(--hsl-navy-light));   /* #2b4c7e */

  /* Calibrated Gold Tokens for WCAG Contrast Compliance */
  --gold-primary: #d9a01b;                   /* Calibrated Gold Surface */
  --gold-dark: hsl(var(--hsl-gold-dark));    /* #8c6607 */
  --gold-light: hsl(var(--hsl-gold-light));  /* #fef08a */
  --gold-text-on-navy: #e2ab17;              /* WCAG AA (5.1:1 on #1b365d, 6.8:1 on #0a192f) */
  --gold-btn-bg: #d9a01b;                    /* Gold Button Background */
  --gold-btn-text: #0a192f;                  /* WCAG AAA (9.8:1 contrast on #d9a01b) */
  --gold-foil: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);

  /* Calibrated Semantic Status Tokens (WCAG Compliant Pairs) */
  --emerald-accent: hsl(var(--hsl-emerald)); /* #047857 - 5.2:1 on #f0fdf4 */
  --emerald-bg: #f0fdf4;
  --emerald-border: #a7f3d0;

  --amber-accent: #92400e;                   /* Calibrated from #b45309 - 5.8:1 on #fffbeb */
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;

  --red-accent: hsl(var(--hsl-red));         /* #b91c1c - 6.8:1 on #fef2f2 */
  --red-bg: #fef2f2;
  --red-border: #fecaca;

  /* Neutral Background & Surface Tokens */
  --bg-primary: #f2f4f8;
  --bg-secondary: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;

  /* Neutral Text Tokens (WCAG Compliant) */
  --text-main: #0f172a;                       /* 15.8:1 on #ffffff (AAA) */
  --text-muted: #475569;                      /* 5.4:1 on #ffffff (AA) */
  --text-light: #64748b;                      /* 4.6:1 on #ffffff (AA) */

  --border-color: #cbd5e1;
  --border-dark: #94a3b8;
  --border-navy-subtle: rgba(27, 54, 93, 0.15);
  --border-gold-subtle: rgba(184, 134, 11, 0.25);

  /* Unified Elevation & Shadow System */
  --shadow-flat: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-raised: 0 4px 14px rgba(10, 25, 47, 0.06);
  --shadow-hover: 0 10px 24px rgba(10, 25, 47, 0.1), 0 0 14px rgba(184, 134, 11, 0.12);
  --shadow-presidential: 0 16px 40px rgba(10, 25, 47, 0.2), 0 0 25px rgba(184, 134, 11, 0.2);

  /* Unified Border-Radius System */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  /* Standardized Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 32px;

  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Modular Typography Scale */
  --fluid-hero-title: clamp(1.55rem, 3.8vw + 0.8rem, 2.85rem);
  --fluid-section-title: clamp(1.3rem, 2.2vw + 0.7rem, 2.2rem);
  --fluid-card-title: clamp(1.05rem, 1.2vw + 0.7rem, 1.35rem);
  --fluid-body: clamp(0.85rem, 0.35vw + 0.75rem, 1rem);
  --fluid-subtext: clamp(0.72rem, 0.25vw + 0.65rem, 0.86rem);

  --fluid-section-padding: clamp(2rem, 4.5vw, 5rem);
  --fluid-container-padding: clamp(0.75rem, 3vw, 2rem);
}

body.dark-theme {
  --bg-primary: #070e17;
  --bg-secondary: #0f1826;
  --bg-surface: #142236;
  --bg-card: #101c2e;

  --text-main: #f8fafc;                       /* 15.2:1 on #101c2e (AAA) */
  --text-muted: #cbd5e1;                      /* Calibrated from #94a3b8 -> 10.5:1 on #101c2e (AAA) */
  --gold-text-on-navy: #facc15;              /* 10.8:1 on #101c2e (AAA) */
  --border-color: #1e2e46;
}

/* Presidential Live Ticker Banner */
.presidential-ticker-bar {
  background: linear-gradient(90deg, #0a192f 0%, #1b365d 50%, #0a192f 100%);
  border-bottom: 1px solid var(--gold-primary);
  color: #ffffff;
  padding: 0.35rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  contain: content;
}

.presidential-ticker-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
  animation: tickerScroll 35s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.presidential-ticker-content:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(50%);
  }
}

.presidential-badge-seal {
  background: var(--gold-foil);
  color: #0a192f;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.01em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Cairo', system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
}

/* Official Crest Top Banner */
.official-crest-strip {
  background: var(--navy-dark);
  color: #ffffff;
  border-bottom: 3px solid var(--gold-primary);
  padding: 0.45rem 2rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.crest-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crest-brand-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.egypt-eagle-emblem {
  font-size: 1.25rem;
  color: var(--gold-text-on-navy);
}

.crest-text-group {
  display: flex;
  flex-direction: column;
}

.country-title {
  font-weight: 800;
  color: var(--gold-text-on-navy);
  font-size: 0.85rem;
  line-height: 1.2;
}

.system-sub-title {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.crest-right-tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.live-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.3);
  }
}

/* Main Navigation Header */
#main-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--gold-primary);
  box-shadow: var(--shadow-raised);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

body.dark-theme #main-header {
  background: rgba(15, 23, 42, 0.94);
  border-bottom-color: rgba(184, 134, 11, 0.5);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.65rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  background: var(--navy-primary);
  color: var(--gold-text-on-navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid var(--gold-primary);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-primary);
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.dark-theme .brand-text h1 {
  color: #ffffff;
}

.vision-tag {
  font-size: 0.7rem;
  background: var(--gold-primary);
  color: var(--gold-btn-text);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
}

.brand-text span {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.header-nav {
  display: flex;
  gap: 0.35rem;
  background: rgba(241, 245, 249, 0.8);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(203, 213, 225, 0.6);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

body.dark-theme .header-nav {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(51, 65, 85, 0.6);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
  background: var(--navy-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.25);
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
  background: var(--gold-btn-bg);
  color: var(--gold-btn-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-btn-gold {
  background: var(--gold-btn-bg);
  color: var(--gold-btn-text);
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.25);
  transition: all 0.25s ease;
}

.action-btn-gold:hover {
  background: var(--gold-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.official-date-badge {
  background: #f0fdf4;
  color: var(--emerald-accent);
  border: 1px solid #bbf7d0;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--navy-primary);
  cursor: pointer;
}

/* Filter Controls Bar */
.filter-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
}

body.dark-theme .filter-bar {
  background: var(--bg-secondary);
}

.filter-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 210px;
}

.filter-group label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

body.dark-theme .filter-group label {
  color: var(--gold-primary);
}

.filter-group select {
  width: 100%;
  padding: 0.5rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

body.dark-theme .filter-group select {
  background: var(--bg-surface);
}

.official-btn-primary {
  padding: 0.55rem 1.4rem;
  background: var(--navy-primary);
  color: #ffffff;
  border: 1px solid var(--navy-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.official-btn-primary:hover {
  background: var(--navy-light);
}

/* Main Dashboard */
.dashboard-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Sector Navigation Scroll Tabs */
.sector-tabs-scroll-container {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.sector-tabs-wrapper {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

.sector-tab-btn {
  padding: 0.5rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-normal);
}

body.dark-theme .sector-tab-btn {
  background: var(--bg-card);
}

.sector-tab-btn:hover,
.sector-tab-btn.active {
  background: var(--navy-primary);
  color: #ffffff;
  border-color: var(--navy-primary);
}

/* KPI Summary Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* KPI Summary Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-raised);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme .kpi-card {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.08);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-hover);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--navy-primary);
  border-top-right-radius: var(--radius-lg);
  border-top-left-radius: var(--radius-lg);
}

.kpi-card.kpi-gold::before {
  background: var(--gold-primary);
}

.kpi-card.kpi-emerald::before {
  background: var(--emerald-accent);
}

.kpi-card.kpi-royal::before {
  background: #4c1d95;
}

.kpi-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy-primary);
}

body.dark-theme .kpi-label {
  color: #cbd5e1;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(27, 54, 93, 0.08);
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border: 1px solid var(--border-navy-subtle);
}

.icon-gold {
  background: rgba(184, 134, 11, 0.1);
  color: var(--gold-primary);
  border-color: var(--border-gold-subtle);
}

.icon-emerald {
  background: rgba(4, 120, 87, 0.1);
  color: var(--emerald-accent);
  border-color: rgba(4, 120, 87, 0.25);
}

.icon-royal {
  background: rgba(76, 29, 149, 0.1);
  color: #4c1d95;
  border-color: rgba(76, 29, 149, 0.25);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.75rem 0 0.5rem;
}

.kpi-value {
  font-size: 2.35rem;
  font-weight: 800;
  font-family: 'Outfit', 'Cairo', sans-serif;
  color: var(--navy-primary);
  line-height: 1;
}

body.dark-theme .kpi-value {
  color: #ffffff;
}

.kpi-unit {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold-dark);
}

body.dark-theme .kpi-unit {
  color: var(--gold-light);
}

.kpi-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.5rem;
}

body.dark-theme .kpi-bar {
  background: rgba(255, 255, 255, 0.1);
}

.kpi-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, var(--navy-primary) 0%, var(--navy-light) 100%);
}

.kpi-gold .kpi-bar-fill {
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
}

.kpi-emerald .kpi-bar-fill {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.kpi-royal .kpi-bar-fill {
  background: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 100%);
}

.trend-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.65rem;
}

.trend-up {
  background: #ecfdf5;
  color: var(--emerald-accent);
  border: 1px solid #a7f3d0;
}

.kpi-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.pill-green {
  background: #ecfdf5;
  color: var(--emerald-accent);
  border: 1px solid #a7f3d0;
}

.pill-amber {
  background: #fffbeb;
  color: var(--amber-accent);
  border: 1px solid #fde68a;
}

.pill-red {
  background: #fef2f2;
  color: var(--red-accent);
  border: 1px solid #fecaca;
}

.kpi-sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 0.65rem;
}

/* Charts Section */
.charts-grid-expanded {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
}

.chart-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-raised);
}

body.dark-theme .chart-card {
  background: var(--bg-card);
}

.chart-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

body.dark-theme .chart-header h3 {
  color: var(--gold-primary);
}

.chart-container {
  min-height: 290px;
  width: 100%;
}

/* Micro-Grid & Interactive Sector Chart Controls */
.sector-micro-row:hover {
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.08);
  filter: brightness(0.97);
}

.sector-chart-toggle-group .gauge-scenario-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sector-chart-toggle-group .gauge-scenario-btn.active {
  background: var(--bg-card);
  color: var(--navy-primary);
  box-shadow: var(--shadow-flat);
  font-weight: 700;
}

.section-header {
  margin-bottom: 1.35rem;
}

.official-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-primary);
  background: #e0e7ff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #c7d2fe;
}

.section-title h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-top: 0.2rem;
}

body.dark-theme .section-title h2 {
  color: #ffffff;
}

.section-title p {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.sector-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-raised);
  transition: all var(--transition-normal);
}

.sector-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

body.dark-theme .sector-card {
  background: var(--bg-card);
}

.sector-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.sector-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sector-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #f0f4f8;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sector-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--navy-primary);
}

body.dark-theme .sector-title {
  color: #ffffff;
}

.sector-metric-main {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border-color);
}

body.dark-theme .sector-metric-main {
  background: var(--bg-surface);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 800;
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--navy-primary);
  margin-top: 0.1rem;
}

body.dark-theme .metric-val {
  color: var(--gold-primary);
}

.gauge-block {
  margin-bottom: 0.7rem;
}

.gauge-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.gauge-bar-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.gauge-bar-val {
  height: 100%;
  border-radius: 99px;
}

.sector-footer {
  margin-top: 0.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-color);
}

.drilldown-btn {
  background: none;
  border: none;
  color: var(--navy-primary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Projects Table */
.table-actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.official-search {
  position: relative;
  width: 320px;
}

.official-search i {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.official-search input {
  width: 100%;
  padding: 0.5rem 2.2rem 0.5rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
}

.official-btn-outline {
  padding: 0.5rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--navy-primary);
  cursor: pointer;
}

.table-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

body.dark-theme .table-container {
  background: var(--bg-card);
}

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

.data-table th {
  background: #f8fafc;
  padding: 0.85rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--navy-primary);
  border-bottom: 2px solid var(--border-color);
}

body.dark-theme .data-table th {
  background: var(--bg-surface);
  color: var(--gold-primary);
}

.data-table td {
  padding: 0.85rem 1.15rem;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border-color);
}

.table-action-btn {
  background: var(--navy-primary);
  color: #ffffff;
  border: none;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.table-action-btn:hover {
  background: var(--navy-light);
}

/* Map Section */
.map-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

body.dark-theme .map-layout {
  background: var(--bg-card);
}

.map-display {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-theme .map-display {
  background: var(--bg-surface);
}

#egypt-map {
  width: 100%;
  max-height: 480px;
}

.gov-path {
  fill: #cbd5e1;
  stroke: #94a3b8;
  stroke-width: 1.5;
  cursor: pointer;
}

.gov-path:hover,
.gov-path.active {
  fill: var(--navy-primary);
  stroke: var(--gold-primary);
}

.map-tooltip {
  position: absolute;
  display: none;
  background: var(--navy-primary);
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  pointer-events: none;
  z-index: 50;
  border: 1px solid var(--gold-primary);
}

.map-sidebar {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
}

body.dark-theme .map-sidebar {
  background: var(--bg-surface);
}

.map-sidebar h3 {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--navy-primary);
  margin-bottom: 0.85rem;
}

body.dark-theme .map-sidebar h3 {
  color: var(--gold-primary);
}

.map-stats-placeholder {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  padding: 2.5rem 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.65);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 2px solid var(--navy-primary);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dark-theme .modal-card {
  background: var(--bg-card);
}

.modal-header {
  padding: 1.15rem 1.5rem;
  background: var(--navy-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
}

.modal-header p {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Footer */
.official-footer {
  background: var(--navy-dark);
  color: #cbd5e1;
  border-top: 3px solid var(--gold-primary);
  padding: 1.5rem 2rem;
  margin-top: 3rem;
  font-size: 0.82rem;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile Responsive Navbar Adjustments */
@media (max-width: 1024px) {
  .header-inner {
    padding: 0.5rem 1rem;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    background: rgba(15, 25, 47, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .header-nav.mobile-active {
    display: flex;
  }

  .header-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1.25rem;
    color: #ffffff;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(184, 134, 11, 0.15);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    font-size: 1.2rem;
    cursor: pointer;
  }
}

/* 
  ===================================================================
  OFFICIAL SOVEREIGN EXECUTIVE PRINT & PDF SYSTEM
  تنسيقات الطباعة والتقرير السيادي الرسمي لرئاسة مجلس الوزراء
  ===================================================================
*/

@media print {

  /* Force exact color, background graphics, and standard page setup */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  @page {
    size: A4 landscape;
    margin: 1.2cm 1.5cm;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
  }

  /* Hide Non-Print Interactive Elements */
  .presidential-ticker-bar,
  .header-nav,
  .header-actions,
  .mobile-nav-toggle,
  .filter-bar,
  .sector-tabs-scroll-container,
  .table-actions,
  .official-search,
  .modal-overlay,
  .swal2-container,
  .swal2-backdrop-show,
  #theme-toggle,
  .theme-toggle-btn,
  .logos-showcase-section,
  .swiper,
  button,
  .action-btn-gold,
  .btn-hero-primary {
    display: none !important;
  }

  /* Official Crest Strip & Header Adjustments */
  .official-crest-strip {
    position: relative !important;
    background: #0a192f !important;
    color: #ffffff !important;
    border-bottom: 3px solid #b8860b !important;
    padding: 0.6rem 1.2rem !important;
    margin-bottom: 1.5rem !important;
  }

  #main-header {
    position: relative !important;
    background: #ffffff !important;
    border-bottom: 2px solid #b8860b !important;
    box-shadow: none !important;
    padding: 0.5rem 1rem !important;
  }

  /* Dashboard Grid Formatting for A4 Landscape */
  .dashboard-main {
    padding: 0 !important;
    margin: 0 !important;
  }

  .kpi-section {
    margin-bottom: 1.5rem !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
  }

  .kpi-card {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .kpi-navy .kpi-label,
  .kpi-gold .kpi-label,
  .kpi-emerald .kpi-label,
  .kpi-royal .kpi-label {
    color: #0f172a !important;
  }

  /* Charts Section Print Optimization */
  .charts-section {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 1.5rem !important;
  }

  .charts-grid-expanded {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr !important;
    gap: 1rem !important;
  }

  .chart-card {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Sectors Grid Print Formatting */
  .sectors-section {
    page-break-before: always;
  }

  .sectors-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }

  .sector-card-modern,
  .sector-matrix-card {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Projects Table Print Formatting */
  .projects-section {
    page-break-before: always;
  }

  .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
  }

  .data-table th {
    background: #1b365d !important;
    color: #ffffff !important;
    border: 1px solid #0a192f !important;
    padding: 0.5rem !important;
  }

  .data-table td {
    border: 1px solid #cbd5e1 !important;
    padding: 0.4rem 0.6rem !important;
    color: #0f172a !important;
  }

  .data-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Map Section Print Formatting */
  .map-section {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Official Sovereign Footer */
  .official-footer {
    border-top: 2px solid #b8860b !important;
    background: #0a192f !important;
    color: #ffffff !important;
    padding: 1rem !important;
    margin-top: 2rem !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* Official Ministry Badges & Logo Marquee Styling */
.official-ministry-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-raised);
  transition: all 0.25s ease;
}

body.dark-theme .official-ministry-card {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.08);
}

.official-ministry-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.ministry-seal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(27, 54, 93, 0.06);
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

body.dark-theme .ministry-seal-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #fef08a;
}

.ministry-details h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.15rem;
}

body.dark-theme .ministry-details h4 {
  color: #ffffff;
}

.ministry-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* DataTables Sovereign Theme Overrides */
.dataTables_wrapper {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  padding: 0.5rem 0;
}

.dataTables_length select,
.dataTables_filter input {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.4rem 0.75rem !important;
  font-family: inherit !important;
  font-weight: 700 !important;
}

.dataTables_paginate .paginate_button.current {
  background: var(--navy-primary) !important;
  color: #ffffff !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
}

/* Radical Gauge Scenario Buttons Styling */
.gauge-scenario-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--navy-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

body.dark-theme .gauge-scenario-btn {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.gauge-scenario-btn:hover,
.gauge-scenario-btn.active {
  border-color: var(--gold-primary);
  background: rgba(184, 134, 11, 0.08);
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.15);
}

@keyframes pulse-dot {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-pulse {
  animation: pulse-dot 1.5s infinite ease-in-out;
}