/* ============================================
   نظام التصميم — رؤية التحول الرقمي والحوكمة
   هيئة الخليج وعدن للتنمية والخدمات الإنسانية
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Brand Colors */
  --primary: #1a6b4a;
  --primary-light: #2d8f65;
  --primary-dark: #0f4a32;
  --primary-glow: rgba(26, 107, 74, 0.15);

  --secondary: #c8a951;
  --secondary-light: #e8d48b;
  --secondary-dark: #a08530;

  /* Neutral Palette */
  --dark: #1a1a2e;
  --dark-surface: #16213e;
  --dark-card: #1e2a45;
  --dark-border: #2a3a5c;

  --light-bg: #f4f6f8;
  --light-surface: #ffffff;
  --light-card: #ffffff;
  --light-border: #e2e8f0;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #5a6572;
  --text-muted: #94a3b8;
  --text-on-primary: #ffffff;
  --text-on-dark: #e2e8f0;

  /* Status Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-ar: 'Droid Arabic Kufi', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 20px rgba(26, 107, 74, 0.15);
  --shadow-gold: 0 0 20px rgba(200, 169, 81, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1200px;
  --sidebar-width: 280px;
  --header-height: 70px;
  --page-padding: 2rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--primary-light);
}

ul, ol {
  list-style: none;
}

/* --- Fonts Loading --- */
@font-face {
  font-family: 'Droid Arabic Kufi';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/npm/mw-fonts@0.0.2/droidarabickufi/DroidKufi-Regular.woff2) format('woff2'),
       url(https://cdn.jsdelivr.net/npm/mw-fonts@0.0.2/droidarabickufi/DroidKufi-Regular.woff) format('woff');
}

@font-face {
  font-family: 'Droid Arabic Kufi';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://cdn.jsdelivr.net/npm/mw-fonts@0.0.2/droidarabickufi/DroidKufi-Bold.woff2) format('woff2'),
       url(https://cdn.jsdelivr.net/npm/mw-fonts@0.0.2/droidarabickufi/DroidKufi-Bold.woff) format('woff');
}

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Layout: Site Shell --- */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* --- Sidebar Navigation --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark);
  color: var(--text-on-dark);
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--dark-border);
  transition: transform var(--transition-slow);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--dark-border);
  border-radius: 4px;
}

.sidebar-header {
  padding: var(--space-xl);
  text-align: center;
  border-bottom: 1px solid var(--dark-border);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-xl);
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-glow);
}

.sidebar-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-on-dark);
  line-height: 1.5;
}

.sidebar-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-md) 0;
  overflow-y: auto;
}

.nav-section-title {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-md) var(--space-xl) var(--space-sm);
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  color: var(--text-on-dark);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
  opacity: 0.75;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  font-family: var(--font-ar);
}

.nav-item:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  color: var(--secondary-light);
}

.nav-item.active {
  opacity: 1;
  color: var(--secondary);
  background: linear-gradient(270deg, rgba(200, 169, 81, 0.15), rgba(200, 169, 81, 0.02));
  font-weight: 700;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--secondary);
  border-radius: 4px 0 0 4px;
  box-shadow: 0 0 8px rgba(200, 169, 81, 0.4);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
}

.nav-item-number {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-right: auto;
  margin-left: 0;
  font-family: var(--font-en);
}

.sidebar-footer {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--dark-border);
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  width: 100%;
}

/* --- Top Header Bar --- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(244, 246, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-border);
  padding: 0 var(--page-padding);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.top-bar-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.top-bar-breadcrumb span {
  color: var(--text-muted);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: var(--space-sm);
}

/* --- Page Content Area --- */
.page-content {
  padding: var(--space-2xl) var(--page-padding);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* --- Tab System --- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--light-border);
  padding-bottom: var(--space-xs);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: var(--space-xs) var(--space-md);
  border: none;
  background: var(--light-bg);
  color: var(--text-secondary) !important;
  font-family: var(--font-ar);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  background: var(--light-border);
  color: var(--text-primary) !important;
}

.tab-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(26, 107, 74, 0.35) !important;
}

.tab-content {
  display: none;
  max-width: 100%;
}

.tab-content.active {
  display: block;
}

/* --- Page Navigation Footer --- */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--light-border);
  gap: var(--space-md);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-ar);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  min-width: 200px;
}

.page-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.page-nav-btn.next {
  flex-direction: row-reverse;
  text-align: left;
}

.page-nav-btn .label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
}

.page-nav-btn .title {
  font-weight: 700;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-surface) 50%, var(--primary-dark) 100%);
  color: white;
  padding: var(--space-4xl) var(--page-padding);
  margin: calc(-1 * var(--space-2xl)) calc(-1 * var(--page-padding)) var(--space-2xl);
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(26, 107, 74, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(200, 169, 81, 0.1) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 2%); }
  66% { transform: translate(2%, -2%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(200, 169, 81, 0.15);
  border: 1px solid rgba(200, 169, 81, 0.3);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--secondary-light);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, #ffffff 0%, var(--secondary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.9;
  max-width: 600px;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-overline {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-overline::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
}

/* --- Cards --- */
.card {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(26, 107, 74, 0.2);
}

.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-accent {
  border-right: 4px solid var(--primary);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
}

.card-icon.green { background: var(--success-bg); color: var(--success); }
.card-icon.gold { background: rgba(200, 169, 81, 0.12); color: var(--secondary-dark); }
.card-icon.blue { background: var(--info-bg); color: var(--info); }
.card-icon.red { background: var(--danger-bg); color: var(--danger); }
.card-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.card-number {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: rgba(26, 107, 74, 0.06);
  font-family: var(--font-en);
  line-height: 1;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

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

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.stat-card {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.stat-value {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-en);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.stat-change {
  font-size: var(--text-xs);
  color: var(--success);
  font-family: var(--font-en);
  margin-top: var(--space-xs);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-right: var(--space-2xl);
}

.timeline::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
  padding-right: var(--space-xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  right: calc(-1 * var(--space-2xl) - 6px);
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--light-bg);
  z-index: 1;
}

.timeline-item.active::before {
  background: var(--secondary);
  box-shadow: 0 0 0 4px rgba(200, 169, 81, 0.2);
}

.timeline-date {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.timeline-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Flow Diagram --- */
.flow-diagram {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

.flow-step {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  min-width: 120px;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.flow-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.flow-step.secondary {
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
}

.flow-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* --- Comparison Table --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.comparison-side {
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--light-border);
}

.comparison-side.before {
  background: linear-gradient(135deg, #fef3c7, #fef9e7);
  border-color: #fcd34d;
}

.comparison-side.after {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  border-color: #6ee7b7;
}

.comparison-side h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.comparison-item .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Tables --- */
/* --- Table Wrapper Scroll Protection --- */
div[style*="overflow-x:auto"],
div[style*="overflow-x: auto"],
.table-responsive {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-md);
  box-shadow: inset -8px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.data-table {
  width: 100% !important;
  min-width: 680px !important;
  border-collapse: collapse !important;
  border-spacing: 0;
  background: var(--light-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--light-border);
}

.data-table th {
  background: var(--dark);
  color: var(--text-on-dark);
  padding: 12px 14px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--light-border);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .data-table th,
  .data-table td {
    padding: 10px 8px !important;
    font-size: 0.8rem !important;
  }
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(26, 107, 74, 0.02);
}

/* --- Badges & Tags --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge-primary { background: var(--primary-glow); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-ar);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 12px rgba(26, 107, 74, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 107, 74, 0.35);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
  color: white;
  box-shadow: 0 4px 12px rgba(200, 169, 81, 0.25);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 169, 81, 0.35);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--light-border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

/* --- Callout Box --- */
.callout {
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin: var(--space-xl) 0;
}

.callout-info {
  background: var(--info-bg);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.callout-warning {
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.callout-success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.callout-danger {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.callout-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.callout-content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--light-border);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  padding-bottom: 0;
}

.tab-btn {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-ar);
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Progress Bar --- */
.progress-bar {
  height: 8px;
  background: var(--light-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-sm) 0;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 1s ease;
}

.progress-fill.gold {
  background: linear-gradient(90deg, var(--secondary-dark), var(--secondary));
}

.progress-fill.red {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

/* --- Persona Cards --- */
.persona-card {
  display: flex;
  gap: var(--space-xl);
  background: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  transition: all var(--transition-base);
}

.persona-card:hover {
  box-shadow: var(--shadow-lg);
}

.persona-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.persona-info {
  flex: 1;
}

.persona-name {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.persona-role {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.persona-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.persona-detail h5 {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.persona-detail p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Mockup Container --- */
.mockup-container {
  background: var(--dark);
  border-radius: var(--radius-2xl);
  padding: var(--space-md);
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-xl);
}

.mockup-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.mockup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mockup-dot.red { background: #ff5f57; }
.mockup-dot.yellow { background: #febc2e; }
.mockup-dot.green { background: #28c840; }

.mockup-title {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-right: var(--space-md);
  flex: 1;
  text-align: center;
}

.mockup-body {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;
}

/* --- Mobile Mockup --- */
.mobile-mockup {
  width: 360px;
  margin: var(--space-2xl) auto;
  background: var(--dark);
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 2px rgba(255,255,255,0.1);
}

.mobile-notch {
  width: 120px;
  height: 24px;
  background: var(--dark);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  margin-top: -12px;
  margin-bottom: -12px;
}

.mobile-screen {
  background: var(--light-bg);
  border-radius: 28px;
  overflow: hidden;
  min-height: 640px;
}

.mobile-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-family: var(--font-en);
  color: var(--text-secondary);
  background: white;
}

.mobile-header {
  background: var(--primary);
  color: white;
  padding: var(--space-lg);
  text-align: center;
}

.mobile-header h4 {
  font-size: var(--text-base);
  font-weight: 700;
}

.mobile-body {
  padding: var(--space-md);
}

.mobile-bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: var(--space-md);
  background: white;
  border-top: 1px solid var(--light-border);
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  border-radius: 0 0 28px 28px;
}

.mobile-nav-item {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item .icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

/* --- Mockup Dashboard Elements --- */
.mock-widget {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border: 1px solid var(--light-border);
}

.mock-chart {
  height: 200px;
  background: linear-gradient(180deg, rgba(26, 107, 74, 0.05) 0%, transparent 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.mock-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 20px;
  transition: height 1s ease;
}

.mock-bar.gold {
  background: linear-gradient(180deg, var(--secondary-dark), var(--secondary));
}

/* --- Divider --- */
.divider {
  border: none;
  height: 1px;
  background: var(--light-border);
  margin: var(--space-2xl) 0;
}

/* --- Text Utilities --- */
.text-center { text-align: center; }
.text-start { text-align: right; }
.text-end { text-align: left; }
.text-primary { color: var(--primary) !important; }
.text-secondary-color { color: var(--secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.font-en { font-family: var(--font-en) !important; }
.font-bold { font-weight: 700 !important; }

/* --- Spacing Utilities --- */
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }
.py-2 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.gap-1 { gap: var(--space-md); }
.gap-2 { gap: var(--space-xl); }

/* --- Animation Classes --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* --- Disclaimer Bar --- */
.disclaimer {
  display: none !important;
}

/* --- Roadmap --- */
.roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.roadmap-phase {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  border-top: 4px solid var(--primary);
  transition: all var(--transition-base);
}

.roadmap-phase:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.roadmap-phase.current {
  border-top-color: var(--secondary);
  box-shadow: var(--shadow-gold);
}

.phase-number {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-en);
}

.phase-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.phase-items {
  list-style: none;
}

.phase-items li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.phase-items li::before {
  content: '◆';
  color: var(--primary);
  font-size: 0.5rem;
  margin-top: 6px;
  flex-shrink: 0;
}

/* --- Layer Diagram --- */
.layer-diagram {
  max-width: 700px;
  margin: var(--space-2xl) auto;
}

.layer {
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  font-weight: 700;
  font-size: var(--text-sm);
  position: relative;
  margin-bottom: 2px;
  transition: all var(--transition-base);
  cursor: default;
}

.layer:hover {
  transform: scale(1.02);
}

.layer:first-child {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.layer:last-child {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.layer.l1 { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); color: white; }
.layer.l2 { background: linear-gradient(90deg, var(--primary), var(--primary-light)); color: white; }
.layer.l3 { background: linear-gradient(90deg, #2d8f65, #3db87f); color: white; }
.layer.l4 { background: linear-gradient(90deg, var(--secondary-dark), var(--secondary)); color: white; }
.layer.l5 { background: linear-gradient(90deg, #d4a843, #e8d48b); color: white; }
.layer.l6 { background: rgb(232, 175, 75); color: white; }

/* --- Feature List --- */
.feature-list {
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--light-border);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-check {
  color: var(--success);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Audit Trail Visual --- */
.audit-chain {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  padding: var(--space-lg);
  background: var(--light-bg);
  border-radius: var(--radius-xl);
  margin: var(--space-xl) 0;
}

.audit-node {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  min-width: 80px;
}

.audit-arrow {
  color: var(--primary);
  font-size: 1.2rem;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: var(--space-2xl) var(--page-padding);
  border-top: 1px solid var(--light-border);
  margin-top: var(--space-4xl);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.site-footer a {
  color: var(--primary);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }
}

@media (max-width: 768px) {
  :root {
    --page-padding: 1rem;
  }

  .sidebar {
    transform: translateX(100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-right: 0;
  }

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

  .hero {
    min-height: 300px;
    padding: var(--space-2xl) var(--page-padding);
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .comparison {
    grid-template-columns: 1fr;
  }

  .persona-card {
    flex-direction: column;
  }

  .persona-details {
    grid-template-columns: 1fr;
  }

  .page-nav {
    flex-direction: column;
  }

  .page-nav-btn {
    width: 100%;
    min-width: auto;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-diagram,
  .audit-chain {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-arrow,
  .audit-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .flow-step,
  .audit-node {
    width: 100% !important;
    min-width: auto !important;
    text-align: center;
  }

  .mobile-mockup {
    width: 100%;
    max-width: 360px;
  }

  .top-bar-breadcrumb {
    display: none;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  .section-title {
    font-size: var(--text-2xl);
  }
}

/* --- Print Styles --- */
@media print {
  .sidebar, .top-bar, .page-nav, .mobile-menu-btn {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
  }

  .hero {
    background: white !important;
    color: black !important;
  }

  .card, .stat-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* --- Sidebar Overlay for Mobile --- */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.open {
  display: block;
}

/* =============================================
   EXTENDED COMPONENTS — Used across pages
   ============================================= */

/* --- Flow & Audit Diagrams --- */
.flow-diagram,
.audit-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--light-bg);
  border-radius: var(--radius-xl);
  margin: var(--space-lg) 0;
  max-width: 100%;
}

.audit-node {
  background: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border);
  text-align: center;
}

.audit-arrow {
  color: var(--text-muted);
  font-weight: 700;
}

.flow-step {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  min-width: 100px;
  box-shadow: 0 2px 8px rgba(26, 107, 74, 0.2);
  transition: transform 0.2s;
}

.flow-step:hover {
  transform: translateY(-2px);
}

.flow-step.secondary {
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
}

.flow-arrow {
  font-size: var(--text-xl);
  color: var(--text-muted);
  font-weight: 700;
}

/* --- Layer Diagram --- */
.layer-diagram {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
}

.layer {
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  transition: transform 0.2s;
}

.layer:hover {
  transform: scale(1.01);
}

.layer.l1 { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.layer.l2 { background: linear-gradient(135deg, #0f4a32, #1a6b4a); }
.layer.l3 { background: linear-gradient(135deg, #a08530, #c8a951); }
.layer.l4 { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.layer.l5 { background: linear-gradient(135deg, #991b1b, #dc2626); opacity: 0.85; }
.layer.l6 { background: rgb(232, 175, 75); color: white; border: 1px solid var(--light-border); }

/* --- Comparison Section --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin: var(--space-xl) 0;
}

@media (max-width: 768px) {
  .comparison { grid-template-columns: 1fr; }
}

.comparison-side {
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.comparison-side.before {
  border: 2px solid var(--danger);
  border-right: 4px solid var(--danger);
}

.comparison-side.after {
  border: 2px solid var(--success);
  border-right: 4px solid var(--success);
}

.comparison-side h3 {
  margin-bottom: var(--space-lg);
  font-size: var(--text-lg);
}

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--light-border);
}

.comparison-item:last-child { border-bottom: none; }

.comparison-item .icon {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

/* --- Persona Cards --- */
.persona-card {
  display: flex;
  gap: var(--space-xl);
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.persona-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.persona-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: white;
  box-shadow: var(--shadow-glow);
}

.persona-info { flex: 1; }

.persona-name {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.persona-role {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.persona-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.persona-detail h5 {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.persona-detail p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .persona-card { flex-direction: column; align-items: center; text-align: center; }
  .persona-details { grid-template-columns: 1fr; }
}

/* --- Audit Chain --- */
.audit-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--light-bg);
  border-radius: var(--radius-xl);
  margin: var(--space-lg) 0;
}

.audit-node {
  background: var(--light-surface);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border);
  line-height: 1.6;
}

.audit-arrow {
  font-size: var(--text-xl);
  color: var(--primary);
  font-weight: 700;
}

/* --- Data Table --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table thead {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.data-table thead th {
  padding: var(--space-md) var(--space-lg);
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.data-table tbody td {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--light-border);
  color: var(--text-secondary);
}

.data-table tbody tr:hover {
  background: var(--primary-glow);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Grid Variants --- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
}

/* --- Additional Badges --- */
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* --- Card Accent --- */
.card-accent {
  border-right: 4px solid var(--primary);
}

/* --- Card Number --- */
.card-number {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary-glow);
  line-height: 1;
}

.card {
  position: relative;
}

/* --- Disclaimer --- */
.disclaimer {
  padding: var(--space-md) var(--space-xl);
  background: var(--warning-bg);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--warning);
  text-align: center;
  margin: var(--space-xl) 0;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* --- Page Nav (Prev/Next) --- */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  margin: var(--space-3xl) 0 var(--space-xl);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
  flex: 1;
  max-width: 45%;
}

.page-nav-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.page-nav-btn span:first-child {
  font-size: var(--text-xl);
  color: var(--primary);
}

.page-nav-btn .label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.page-nav-btn .title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
}

.page-nav-btn.next {
  flex-direction: row-reverse;
  text-align: left;
}

@media (max-width: 640px) {
  .page-nav { flex-direction: column; }
  .page-nav-btn { max-width: 100%; }
}

/* --- Nav Section Titles --- */
.nav-section-title {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-md);
}

/* --- Nav Item Number --- */
.nav-item-number {
  margin-right: auto;
  margin-left: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  opacity: 0.5;
}

/* --- Stagger Animations --- */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }

/* --- Font EN for English Numbers --- */
.font-en {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  direction: ltr;
  unicode-bidi: bidi-override;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-overline {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-xs) var(--space-lg);
  background: var(--primary-glow);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- Site Footer --- */
.site-footer {
  padding: var(--space-xl) var(--space-2xl);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
  border-top: 1px solid var(--light-border);
  margin-top: var(--space-3xl);
  line-height: 1.8;
}

.site-footer::after {
  content: "وثيقة رؤية أولية تحليلية — وليست تصميمًا نهائيًا";
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  opacity: 0.75;
  margin-top: 4px;
}

/* --- Text Colors --- */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
