/* ==========================================================================
   جدعان — نظام التصميم والهوية البصرية المعاصرة
   مبني للمصانع وأصحاب المشروعات الصغيرة والمتوسطة في مصر
   الألوان: كحلي داكن #10243A + ذهبي #B68A3A + أبيض وعاجي ناعم
   ========================================================================== */

:root {
  --brand: #10243A;
  --navy: #10243A;
  --brand-light: #1E3A5F;
  --brand-dark: #0A1726;
  --brand-hover: #162E4A;
  --gold: #B68A3A;
  --gold-light: #CBA55B;
  --gold-dark: #916B27;
  --gold-subtle: #FBF8F1;
  --gold-border: #E8D7B3;
  --cream: #F8FAFC;
  --cream-card: #F1F5F9;
  --ink: #0F172A;
  --muted: #475569;
  --muted-light: #64748B;
  --line: #E2E8F0;
  --line-subtle: #F1F5F9;
  --white: #FFFFFF;
  --error: #B91C1C;
  --error-bg: #FEF2F2;
  --error-border: #FECACA;
  --success: #15803D;
  --success-bg: #F0FDF4;
  --success-border: #BBF7D0;
  --info: #0284C7;
  --info-bg: #F0F9FF;
  --info-border: #BAE6FD;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 36, 58, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(16, 36, 58, 0.07), 0 2px 4px -2px rgba(16, 36, 58, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(16, 36, 58, 0.08), 0 4px 6px -4px rgba(16, 36, 58, 0.04);
}

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

main:focus {
  outline: none !important;
}

.skip {
  position: absolute;
  top: -100px;
  right: 16px;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 999;
  font-weight: 600;
  transition: top 0.2s;
}

.skip:focus {
  top: 16px;
}

/* ==========================================================================
   الهيكل العام والترويسة (Layout & Header)
   ========================================================================== */

.shell {
  max-width: 1200px;
  width: calc(100% - 48px);
  margin-left: auto;
  margin-right: auto;
}

/* الشريط العلوي المؤسسي (Institutional Top Utility Bar) */
.top-bar {
  background: #0A1726;
  color: #E2E8F0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1.4;
  padding-block: 8px;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-bar-right,
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gov-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #F8FAFC;
}

.gov-flag-badge {
  background: rgba(182, 138, 58, 0.25);
  border: 1px solid rgba(182, 138, 58, 0.5);
  color: #F8E8C8;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: normal;
}

.top-bar-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

.top-bar-slogan {
  color: var(--gold-light);
  font-weight: 600;
}

.top-bar-link {
  color: #CBD5E1;
  font-weight: 500;
  transition: color 0.15s ease;
}

.top-bar-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

#top-cairo-clock {
  color: var(--gold-light);
  font-weight: 600;
  background: rgba(182, 138, 58, 0.15);
  border: 1px solid rgba(182, 138, 58, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
}

header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

header .shell {
  max-width: 1400px;
  width: calc(100% - 64px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 64px;
  flex-wrap: nowrap !important;
  box-sizing: border-box;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.menu-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #FFFFFF;
  cursor: pointer;
  color: var(--navy);
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.menu-toggle-btn:hover {
  background: var(--cream);
  color: var(--brand);
}

.hamburger-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 13px;
}

.hamburger-bars .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--navy);
  border-radius: 1px;
  transition: background-color 0.15s ease;
}

.menu-toggle-btn:hover .hamburger-bars .bar {
  background-color: var(--brand);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-crest {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  max-width: 155px;
  object-fit: contain;
  display: block;
}

.drawer-logo-img {
  height: 38px;
  width: auto;
  max-width: 135px;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  max-width: 155px;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
}

.crest-icon {
  font-size: 26px;
  color: var(--gold);
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.brand-tag {
  font-size: 10px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-top: 1px;
  letter-spacing: 0;
}

/* القائمة الرئيسية المنسدلة للديسكتوب (Desktop Dropdown Navigation) */
nav#main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 1 auto;
  margin-inline: auto;
  justify-content: center;
  flex-wrap: nowrap !important;
}

.nav-item {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.nav-item:hover {
  color: var(--brand);
  background: var(--cream);
}

.nav-item.active {
  color: var(--brand);
  background: var(--gold-subtle);
  border-bottom: 2px solid var(--gold);
}

.nav-item.highlight-nav {
  color: var(--gold-dark);
}

/* القوائم المنسدلة للركائز الاستراتيجية */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown:focus {
  outline: none;
}

.nav-dropdown-btn {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  background: var(--cream);
}

.nav-dropdown.open .nav-dropdown-btn {
  color: var(--brand);
  background: var(--cream);
}

.nav-dropdown.active .nav-dropdown-btn {
  color: var(--brand);
  background: var(--gold-subtle);
  border-bottom: 2px solid var(--gold);
}

.dropdown-chevron {
  font-size: 10px;
  transition: transform 0.2s ease;
  opacity: 0.65;
  display: inline-block;
}

.nav-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-btn {
    color: var(--brand);
    background: var(--cream);
  }

  .nav-dropdown:hover .dropdown-chevron {
    transform: rotate(180deg);
    opacity: 1;
  }

  .nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.dropdown-menu.mega-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 320px;
  max-width: 380px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(16, 36, 58, 0.14), 0 2px 8px rgba(16, 36, 58, 0.06);
  padding: 8px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* قاعدة حاسمة: منع ظهور قائمتين منسدلتين في وقت واحد تحت أي ظرف */
#main-nav:has(.nav-dropdown:hover) .nav-dropdown:not(:hover) .dropdown-menu,
#main-nav:has(.nav-dropdown.open) .nav-dropdown:not(.open) .dropdown-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: #F8FAFC;
}

.dropdown-item.active {
  background: var(--gold-subtle);
}

.dropdown-item .item-icon {
  font-size: 20px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.dropdown-item .item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item .item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.dropdown-item:hover .item-title {
  color: var(--brand);
}

.dropdown-item .item-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-needs {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(182, 138, 58, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-needs:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(182, 138, 58, 0.5);
  color: #FFFFFF !important;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.account-actions a,
.account-actions button {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 5px 9px;
  font-size: 12px;
}

/* درج التصفح للموبايل (Mobile Navigation Drawer) */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 36, 58, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible !important;
  pointer-events: auto !important;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(340px, 86vw);
  background: #FFFFFF;
  z-index: 1101;
  box-shadow: -6px 0 28px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (min-width: 901px) {
  .mobile-drawer,
  .mobile-drawer-backdrop {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

body.drawer-locked {
  overflow: hidden !important;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #FFFFFF;
  z-index: 2;
}

.drawer-close-btn {
  background: #F1F5F9;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: all 0.15s ease;
  padding: 0;
}

.drawer-close-btn:hover {
  background: var(--cream);
  color: var(--brand);
}

.close-symbol {
  display: block;
  line-height: 1;
  margin-top: -2px;
}

.drawer-body {
  padding: 16px 18px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-links-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-direct-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--navy);
  background: #F8FAFC;
  text-decoration: none;
  border: 1px solid var(--line-subtle);
  transition: all 0.15s ease;
}

.drawer-direct-link.highlight {
  color: var(--brand);
  background: var(--gold-subtle);
  border-color: var(--gold-border);
}

.drawer-section {
  border-top: 1px solid var(--line-subtle);
  padding-top: 12px;
}

.drawer-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: 8px;
  padding-right: 4px;
}

.drawer-section-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s ease;
}

.drawer-item:hover {
  background: #F8FAFC;
  color: var(--brand);
}

.drawer-item.active {
  background: var(--gold-subtle);
  color: var(--brand);
  font-weight: 800;
}

.drawer-item-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.drawer-item-title {
  font-size: 13px;
  font-weight: 600;
}

.drawer-footer-actions {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-account-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-account-box .btn,
.drawer-account-box a {
  width: 100%;
  justify-content: center;
  text-align: center;
}

main {
  min-height: 65vh;
  padding-block: 36px 64px;
}

/* ==========================================================================
   الطباعة والعناوين (Typography)
   ========================================================================== */

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--brand);
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--brand);
  margin-bottom: 14px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--brand);
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dark);
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.detail-copy {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 820px;
  margin-bottom: 28px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--line);
  transition: all 0.15s;
}

.back:hover {
  background: var(--gold-subtle);
  border-color: var(--gold-border);
}

/* ==========================================================================
   الواجهة الرئيسية (Hero Section - Monsha'at Style)
   ========================================================================== */

.hero {
  position: relative;
  background: var(--navy);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 56px 40px 48px;
  margin-bottom: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 6px -1px rgba(16, 36, 58, 0.08), 0 20px 40px -10px rgba(16, 36, 58, 0.25);
  display: block;
  text-align: center;
  overflow: hidden;
}

.hero .eyebrow {
  background: rgba(182, 138, 58, 0.15);
  border: 1px solid rgba(182, 138, 58, 0.4);
  color: #F8E8C8;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 20px;
  letter-spacing: normal;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 16px;
  line-height: 1.35;
  max-width: 880px;
  margin-inline: auto;
}

.hero p.hero-subtitle {
  font-size: 16px;
  line-height: 1.8;
  color: #E2E8F0;
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: 32px;
}

/* صندوق البحث المركزي */
.hero-search {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 24px;
}

.search-box-wrap {
  display: flex;
  align-items: center;
  background: #0B1724;
  border-radius: 12px;
  padding: 6px 8px 6px 16px;
  border: 1px solid rgba(182, 138, 58, 0.45);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 24px -4px rgba(0, 0, 0, 0.3);
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box-wrap:focus-within {
  border-color: var(--gold);
  background: #08121D;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(182, 138, 58, 0.25), 0 12px 28px -4px rgba(0, 0, 0, 0.45);
}

.search-input-hero {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #FFFFFF;
  outline: none;
  padding: 8px 10px;
  font-family: inherit;
}

.search-input-hero::placeholder {
  color: #94A3B8;
  font-size: 14px;
}

.search-btn-hero {
  background: var(--gold);
  color: #0A1726;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.search-btn-hero:hover {
  background: #C89945;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(182, 138, 58, 0.4);
}

.search-btn-hero:active {
  transform: translateY(1px) scale(0.985);
}

.hero-quick-paths {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 14px;
  font-size: 13.5px;
  color: #CBD5E1;
}

.hero-quick-paths strong {
  color: #F8E8C8;
  font-weight: 600;
}

.hero-quick-paths a {
  color: #E2E8F0;
  text-decoration: none;
  border-bottom: 1px dashed rgba(182, 138, 58, 0.5);
  padding-bottom: 1px;
  transition: all 0.15s ease;
}

.hero-quick-paths a:hover {
  color: #F8E8C8;
  border-bottom-color: var(--gold);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ==========================================================================
   شريط المؤشرات الوطنية بينتو غير متماثل (Asymmetric Bento Metrics)
   ========================================================================== */

.metrics-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
  align-items: stretch;
}

.metric-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: right;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  position: relative;
}

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

/* Anchor Featured Card */
.metric-card.card-featured {
  background: #10243A;
  color: #FFFFFF;
  border: 1px solid rgba(182, 138, 58, 0.4);
  box-shadow: 0 4px 20px rgba(16, 36, 58, 0.15);
}

.metric-card.card-featured .metric-num {
  color: var(--gold);
}

.metric-card.card-featured .metric-label {
  color: #FFFFFF;
  font-size: 15.5px;
  font-weight: 700;
}

.metric-card.card-featured .metric-desc {
  color: #CBD5E1;
}

.metric-card.card-featured .featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.metric-card.card-featured .featured-tag-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #F8E8C8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Card Pillars */
.metric-card.card-pillars .pillars-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.metric-card.card-pillars .pillar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-card.card-pillars .pillar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* Card Governance */
.metric-card.card-governance {
  border-right: 3px solid var(--gold);
}

/* Card Pulse / Live */
.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  width: fit-content;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.metric-num {
  font-size: 30px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1.1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.metric-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 900px) {
  .metrics-bar {
    grid-template-columns: 1fr 1fr;
  }
  .metric-card.card-featured {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .metrics-bar {
    grid-template-columns: 1fr;
  }
  .metric-card.card-featured {
    grid-column: span 1;
  }
}

/* ==========================================================================
   قسم حدد احتياجك لمشروعك (Needs Assessment)
   ========================================================================== */

.needs-assessment-section {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 44px 32px;
  margin-bottom: 48px;
}

.section-head-center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 32px;
}

.section-head-center h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 10px;
}

.section-head-center p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.stage-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stage-card {
  background: #FFFFFF;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.stage-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stage-card.active {
  border-color: var(--gold);
  background: var(--gold-subtle);
  box-shadow: 0 4px 16px rgba(182, 138, 58, 0.2);
}

.stage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stage-icon {
  font-size: 28px;
}

.stage-count-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 12px;
  color: var(--brand);
}

.stage-card.active .stage-count-badge {
  background: var(--gold);
  color: #FFFFFF;
  border-color: var(--gold);
}

.stage-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
}

.stage-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.needs-recommendations-box {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
}

.needs-rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.needs-rec-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--brand);
}

/* ==========================================================================
   الركائز الأربع الاستراتيجية (Strategic Pillars)
   ========================================================================== */

.pillars-section {
  margin-bottom: 48px;
}

.pillar-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.pillar-tab {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pillar-tab:hover {
  color: var(--brand);
  background: var(--cream);
}

.pillar-tab.active {
  color: var(--brand);
  border-bottom-color: var(--gold);
  background: var(--gold-subtle);
}

.pillar-tab-count {
  font-size: 11px;
  background: rgba(16, 36, 58, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  color: inherit;
}

/* ==========================================================================
   الأزرار والإجراءات (Buttons & Actions)
   ========================================================================== */

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--brand);
  color: #FFFFFF;
  border-color: var(--brand);
}

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

.btn.secondary {
  background: #FFFFFF;
  color: var(--brand);
  border-color: var(--line);
}

.btn.secondary:hover {
  background: var(--cream);
  border-color: var(--brand);
}

.btn.gold {
  background: var(--gold);
  color: #FFFFFF;
  border-color: var(--gold);
}

.btn.gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.btn.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
  padding: 8px 12px;
}

.btn.quiet:hover {
  background: var(--cream);
  color: var(--brand-light);
}

.btn.danger {
  background: #FFFFFF;
  color: var(--error);
  border-color: var(--error-border);
}

.btn.danger:hover {
  background: var(--error-bg);
  border-color: var(--error);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait !important;
  pointer-events: none;
}

/* ==========================================================================
   البطاقات والفهرس (Cards, Grids & Catalog)
   ========================================================================== */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-block: 36px 20px;
}

.section-head h2 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.card-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card .actions {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-subtle);
}

/* بطاقات الخدمات المحدثة (Service Cards - Monsha'at Style) */
.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #FFFFFF;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.card-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.service-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.service-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand);
  margin: 0;
  line-height: 1.4;
}

.service-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-outcomes-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  background: var(--cream);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  border: 1px dashed var(--line);
}

.outcome-pill {
  color: var(--muted);
  font-weight: 500;
}

.service-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
}

/* الشارات (Tags & Badges) */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--cream);
  color: var(--muted);
  border: 1px solid var(--line);
}

.tag.blue {
  background: #EFF6FF;
  color: #1E40AF;
  border-color: #BFDBFE;
}

.tag.gold {
  background: var(--gold-subtle);
  color: var(--gold-dark);
  border-color: var(--gold-border);
}

.tag.green {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.tag.gray {
  background: #F1F5F9;
  color: #475569;
  border-color: #CBD5E1;
}

/* ==========================================================================
   الفلاتر والتبويبات (Filters & Tabs)
   ========================================================================== */

.filters {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 16px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.tabs button {
  border: 1px solid var(--line);
  background: #FFFFFF;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.tabs button:hover {
  background: var(--cream);
  color: var(--brand);
}

.tabs button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

.count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 16px;
}

.empty {
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 42px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.empty p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ==========================================================================
   النماذج والمدخلات (Forms & Inputs)
   ========================================================================== */

.panel {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.form-panel {
  max-width: 740px;
  margin: 16px auto 32px;
}

.form-panel.narrow {
  max-width: 500px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  width: 100%;
  min-height: 46px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182, 138, 58, 0.15);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  flex-shrink: 0;
  margin-top: 3px;
}

.field small, .hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.error {
  background: var(--error-bg);
  border-right: 4px solid var(--error);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  color: #991B1B;
  margin: 16px 0;
  overflow-wrap: anywhere;
}

.info {
  background: var(--gold-subtle);
  border-right: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 13.5px;
  color: #78350F;
  line-height: 1.7;
}

.info-blue {
  background: var(--info-bg);
  border-right: 4px solid var(--info);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 13.5px;
  color: #0369A1;
  line-height: 1.7;
}

/* ==========================================================================
   تفاصيل الخدمة والرحلة (Service Detail, Split & Timeline)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 32px;
}

.sidebar {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  align-self: start;
  box-shadow: var(--shadow-sm);
}

.sidebar p {
  font-size: 14px;
  line-height: 1.7;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.timeline li {
  border-right: 2px solid var(--line);
  padding: 0 20px 24px;
  position: relative;
  font-size: 14px;
}

.timeline li::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand);
  right: -6px;
  top: 6px;
}

.timeline small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 4px;
}

.message {
  padding: 16px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.7;
}

.message.admin-reply {
  background: var(--gold-subtle);
  border-color: var(--gold-border);
  border-right: 3px solid var(--gold);
}

.message small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* شبكة الإحصاءات */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat b {
  font-size: 32px;
  display: block;
  color: var(--brand);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* الدروس والنتائج */
.lesson {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.lesson:last-child {
  border-bottom: none;
}

.lesson p {
  white-space: pre-line;
  line-height: 1.8;
}

.result {
  padding: 24px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  margin-block: 22px;
}

.result strong {
  font-size: 32px;
  color: var(--brand);
  display: block;
  margin-bottom: 8px;
}

.list {
  padding-inline-start: 22px;
  margin-bottom: 20px;
}

.list li {
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

/* ==========================================================================
   التذييل المؤسسي الشامل (Institutional Mega Footer - Monsha'at Style)
   ========================================================================== */

.footer-mega {
  background: #0A1726;
  color: #E2E8F0;
  padding: 56px 0 28px;
  border-top: 4px solid var(--gold);
  font-size: 13px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-col-brand .brand-name {
  color: #FFFFFF;
  font-size: 26px;
}

.footer-col-brand .brand-tag {
  color: var(--gold-light);
}

.footer-crest .crest-icon {
  color: var(--gold);
}

.footer-desc {
  font-size: 12.5px;
  line-height: 1.8;
  color: #94A3B8;
  margin: 14px 0 16px;
}

.footer-social-meta #footer-cairo-clock {
  color: var(--gold-light);
  font-weight: 600;
  background: rgba(182, 138, 58, 0.15);
  border: 1px solid rgba(182, 138, 58, 0.35);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  font-size: 12px;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
}

.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links a {
  color: #94A3B8;
  transition: color 0.15s ease;
  font-weight: 500;
}

.footer-col-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748B;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  color: #94A3B8;
}

.footer-legal {
  color: #64748B;
}

/* التذييل القديم للتوافق */
footer:not(.footer-mega) {
  border-top: 1px solid var(--line);
  background: var(--cream);
  padding: 28px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}

.footer-brand strong {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand);
  display: block;
}

.footer-brand p {
  margin: 4px 0 0;
  font-size: 12px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cairo-clock {
  font-size: 11.5px;
  color: var(--gold-dark);
  font-weight: 600;
  background: var(--gold-subtle);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--gold-border);
}

.footer-link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--brand);
}

#notice {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--brand);
  color: #FFFFFF;
  max-width: calc(100% - 48px);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.2s ease-out;
}

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

/* ==========================================================================
   فئات مساعدة عامة وتنسيق الكتل (Utility & Layout Classes - CSP Compliant)
   ========================================================================== */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px !important; }
.mt-2 { margin-top: 12px !important; }
.mt-3 { margin-top: 18px !important; }
.mt-4 { margin-top: 24px !important; }
.mt-5 { margin-top: 36px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 6px !important; }
.mb-2 { margin-bottom: 12px !important; }
.mb-3 { margin-bottom: 18px !important; }
.mb-4 { margin-bottom: 24px !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.p-0 { padding: 0 !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.w-full { width: 100%; }
.text-brand { color: var(--brand) !important; }
.text-gold { color: var(--gold-dark) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--muted) !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.pre-wrap { white-space: pre-wrap !important; }
.pre-line { white-space: pre-line !important; }
.bg-white { background: #FFFFFF !important; }
.mb-section { margin-bottom: 48px !important; }
.section-subtext { margin: 4px 0 0 !important; color: var(--muted) !important; font-size: 14px !important; }
.partner-showcase {
  margin-bottom: 48px !important;
  background: linear-gradient(135deg, #FDFBF7 0%, #F8FAFC 100%) !important;
  border: 1px solid var(--gold-border) !important;
}

/* بطاقات الهوية والتوثيق (Auth & Identity) */
.auth-container {
  max-width: 520px;
  margin-inline: auto;
}

.auth-panel {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab.active {
  color: var(--brand);
  border-bottom-color: var(--gold);
}

.auth-trust-box {
  margin-top: 24px;
  padding: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.auth-trust-item:last-child {
  margin-bottom: 0;
}

/* مساحة عمل المستثمر والمصنع (Dashboard Cockpit) */
.dashboard-banner {
  background: var(--navy);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 6px -1px rgba(16, 36, 58, 0.08), 0 16px 32px -8px rgba(16, 36, 58, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-user-info h2 {
  color: #FFFFFF;
  font-size: 24px;
  margin-bottom: 6px;
}

.dashboard-user-info p {
  color: #CBD5E1;
  font-size: 14px;
  margin: 0;
}

.dashboard-user-badge {
  background: rgba(182, 138, 58, 0.2);
  border: 1px solid var(--gold);
  color: #F8E8C8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

/* بطاقات مؤشرات الأداء الحديثة (KPI Cards) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--cream);
  color: var(--brand);
}

.kpi-icon.gold { background: var(--gold-subtle); color: var(--gold-dark); }
.kpi-icon.blue { background: var(--info-bg); color: var(--info); }
.kpi-icon.green { background: var(--success-bg); color: var(--success); }

.kpi-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--muted-light);
  margin-top: 4px;
}

/* شريط الإجراءات السريعة في مساحة العمل */
.quick-actions-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

/* بطاقات المصانع والمشروعات (Factory Cards) */
.factory-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  border-top: 3px solid var(--brand);
}

.factory-card:hover {
  box-shadow: var(--shadow-md);
  border-top-color: var(--gold);
}

.factory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.factory-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 6px;
}

.factory-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 12.5px;
}

.factory-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-weight: 600;
  color: var(--muted);
}

.factory-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
  flex: 1;
}

/* بطاقات ومسار طلبات الدعم (Request Cards & Stepper) */
.request-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: all 0.15s ease;
}

.request-card:hover {
  box-shadow: var(--shadow-md);
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 10px;
}

/* مسار التقدم المؤسسي (Institutional Stepper) */
.stepper-wrap {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--line);
  z-index: 1;
}

.stepper-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.stepper-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.stepper-step.completed .stepper-circle {
  background: var(--success);
  border-color: var(--success);
  color: #FFFFFF;
}

.stepper-step.active .stepper-circle {
  background: var(--brand);
  border-color: var(--gold);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--gold-subtle);
}

.stepper-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.stepper-step.active .stepper-title {
  color: var(--brand);
}

.stepper-step.completed .stepper-title {
  color: var(--success);
}

.stepper-sub {
  font-size: 11px;
  color: var(--muted-light);
  margin-top: 2px;
}

/* بطاقة الموعد المؤكد والمستشار المسؤول */
.appointment-card {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 1px solid var(--success-border);
  border-right: 4px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.appointment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.appointment-icon {
  font-size: 24px;
}

.appointment-text b {
  display: block;
  font-size: 14px;
  color: #166534;
}

.appointment-text span {
  font-size: 12px;
  color: #15803D;
}

/* فقاعات المحادثة (Chat Bubbles) */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  max-height: 500px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-bubble.user {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.chat-bubble.official {
  align-self: flex-end;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-right: 3px solid var(--gold);
}

.chat-bubble-author {
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-bubble.user .chat-bubble-author {
  color: var(--brand);
}

.chat-bubble.official .chat-bubble-author {
  color: var(--gold-dark);
}

.chat-bubble-time {
  font-size: 11px;
  color: var(--muted-light);
  margin-top: 6px;
  display: block;
  text-align: left;
}

/* بطاقات مقدمي الخدمات ودليل مزايا */
.provider-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  border-top: 3px solid var(--line);
}

.provider-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--gold);
}

.provider-card.official-partner {
  border-top-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-subtle) 0%, #FFFFFF 80px);
}

.verified-seal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

/* الأكاديمية والدروس (Academy & Courses) */
.course-card-modern {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  border-top: 4px solid var(--brand);
}

.course-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--gold);
}

.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.lesson-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.lesson-card.completed {
  border-color: var(--success-border);
  background: linear-gradient(180deg, var(--success-bg) 0%, #FFFFFF 120px);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: var(--cream);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--ink);
}

.checklist-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-dark);
  display: inline-block;
  margin-top: 6px;
  flex-shrink: 0;
}

/* ورقة خطة العمل القابلة للطباعة (Plan on One Page) */
.plan-sheet {
  background: #FFFFFF;
  border: 2px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.plan-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.plan-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}

.plan-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.plan-section h3 {
  color: var(--brand-light);
  font-size: 16px;
  margin-bottom: 8px;
}

/* بطاقات حاسبة التكلفة والتعادل (Calculator KPIs) */
.calc-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.calc-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.calc-kpi-card b {
  display: block;
  font-size: 22px;
  color: var(--brand);
  margin-bottom: 4px;
}

.calc-kpi-card span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.calc-kpi-card.highlight {
  background: var(--gold-subtle);
  border-color: var(--gold-border);
}

.calc-kpi-card.highlight b {
  color: var(--gold-dark);
}

.calc-bep-box {
  background: #FFFFFF;
  border: 2px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.calc-bep-info h3 {
  margin: 0 0 4px;
  color: var(--brand);
}

.calc-bep-info p {
  margin: 0;
  font-size: 13.5px;
}

.calc-bep-badge {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-dark);
  background: var(--gold-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-border);
}

/* لوحة إدارة النظام (Admin Portal) */
.admin-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--brand);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.admin-details-box {
  background: var(--cream);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13.5px;
  line-height: 1.7;
}

/* لوحة التحكم والإدارة الشاملة (Universal Control Panel) */
.admin-cockpit-header {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 3px solid var(--brand);
}

.admin-kpi-card.accent-green { border-top-color: var(--success); }
.admin-kpi-card.accent-gold { border-top-color: var(--gold); }
.admin-kpi-card.accent-navy { border-top-color: var(--navy); }
.admin-kpi-card.accent-blue { border-top-color: #2563EB; }

.admin-kpi-num {
  font-size: 26px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.1;
}

.admin-kpi-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.admin-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: right;
  min-width: 600px;
}

.admin-table th {
  background: #F8FAFC;
  color: var(--navy);
  font-weight: 800;
  padding: 14px 16px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #F8FAFC;
}

.admin-sub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-sub-tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-sub-tab-btn.active {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
}

.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   التجاوب على الشاشات والموبايل (Responsive Breakpoints)
   ========================================================================== */

@media (max-width: 1220px) {
  .header-inner {
    flex-wrap: nowrap;
    min-height: 66px;
    padding-block: 8px;
    gap: 12px;
    max-width: 100%;
  }

  .brand-row {
    flex: 1;
    min-width: 0;
    gap: 10px;
  }

  .menu-toggle-btn {
    display: inline-flex;
  }

  nav#main-nav {
    display: none !important;
  }

  .header-actions-group {
    gap: 8px;
  }

  .btn-needs {
    padding: 7px 12px;
    font-size: 12px;
  }

  .hero {
    padding: 36px 20px;
  }

  .hero h1 {
    font-size: 30px;
  }

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

  .stage-selector-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

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

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

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

  .filters > .field:first-child {
    grid-column: 1 / -1;
  }

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

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

  .stepper {
    flex-wrap: wrap;
    gap: 16px;
  }

  .stepper::before {
    display: none;
  }

  .stepper-step {
    flex: 1 1 45%;
  }
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 24px);
    max-width: 100%;
  }

  .top-bar-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }

  .top-bar-right,
  .top-bar-left {
    justify-content: center;
  }

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

  header .shell {
    width: calc(100% - 16px);
    max-width: 100%;
  }

  .header-inner {
    min-height: 60px;
    padding-block: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    max-width: 100%;
    flex-wrap: nowrap;
  }

  .brand-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-tag {
    display: none;
  }

  .crest-icon {
    font-size: 24px;
  }

  .header-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  #btn-needs-header {
    display: none;
  }

  .account-actions {
    gap: 4px;
    font-size: 11.5px;
  }

  .account-actions .btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .btn-needs {
    font-size: 12px;
    padding: 6px 12px;
  }

  .account-actions {
    gap: 6px;
  }

  .account-actions .btn {
    font-size: 11.5px;
    padding: 6px 10px;
    min-height: 32px;
  }

  main {
    padding-block: 20px 48px;
  }

  h1 {
    font-size: 26px;
    line-height: 1.35;
  }

  h2 {
    font-size: 20px;
  }

  .hero {
    padding: 24px 16px;
    margin-bottom: 24px;
  }

  .hero h1 {
    font-size: 24px;
    line-height: 1.35;
  }

  .hero p.hero-subtitle {
    font-size: 13.5px;
    margin-bottom: 20px;
  }

  .search-box-wrap {
    padding: 4px 6px 4px 10px;
  }

  .search-input-hero {
    font-size: 13px;
    padding: 6px 4px;
  }

  .search-btn-hero {
    padding: 8px 16px;
    font-size: 12px;
  }

  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 32px;
  }

  .metric-card {
    padding: 16px 10px;
  }

  .metric-num {
    font-size: 26px;
  }

  .metric-label {
    font-size: 12.5px;
  }

  .metric-desc {
    font-size: 11px;
  }

  .needs-assessment-section {
    padding: 24px 16px;
    margin-bottom: 32px;
  }

  .stage-selector-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .grid, .grid.two, .grid.three, .grid.four {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }

  .tabs {
    gap: 6px;
    padding-block: 12px;
  }

  .tabs button {
    font-size: 11.5px;
    padding: 7px 11px;
  }

  .card, .panel {
    padding: 18px;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat {
    padding: 14px 8px;
  }

  .stat b {
    font-size: 24px;
  }

  .stat span {
    font-size: 11px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calc-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stepper-step {
    flex: 1 1 100%;
    flex-direction: row;
    text-align: right;
    gap: 12px;
  }

  .stepper-circle {
    margin-bottom: 0;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .dashboard-banner {
    padding: 20px 16px;
  }

  .auth-panel {
    padding: 24px 16px;
  }

  .plan-sheet {
    padding: 20px 16px;
  }

  .chat-bubble {
    max-width: 95%;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 16px; /* منع تكبير الشاشة التلقائي في iOS */
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ==========================================================================
   دعم تقليل الحركة (Reduced Motion)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   بوابة خدماتي والخدمات الإلكترونية (Monsha'at Egyptianized Services Hub)
   ========================================================================== */

.portal-hero-banner {
  background: var(--navy);
  border: 1px solid rgba(182, 138, 58, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: #FFFFFF;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(16, 36, 58, 0.08), 0 16px 32px -8px rgba(16, 36, 58, 0.2);
}

.portal-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.portal-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.portal-hero-subtitle {
  font-size: 14px;
  color: #C0C8D2;
  max-width: 680px;
  line-height: 1.6;
}

.portal-factory-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.portal-factory-selector select {
  background: transparent;
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.portal-factory-selector select option {
  background: #10243A;
  color: #FFFFFF;
}

.portal-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}

.portal-stat-item {
  display: flex;
  flex-direction: column;
}

.portal-stat-label {
  font-size: 12px;
  color: #9DB0C6;
  font-weight: 600;
  margin-bottom: 4px;
}

.portal-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: #E2AD38;
}

/* التبويبات الفئوية للبوابة */
.portal-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.portal-tab-btn {
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-tab-btn:hover {
  border-color: var(--brand);
  background: var(--cream);
}

.portal-tab-btn.active {
  background: var(--brand);
  color: #FFFFFF;
  border-color: var(--brand);
}

.portal-tab-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.portal-tab-btn.active .portal-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* شبكة كروت الخدمات الإلكترونية */
.services-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.service-action-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.service-action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.service-action-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.service-action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.service-badge-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.service-badge-pill.official {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.service-badge-pill.verified {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.service-badge-pill.urgent {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.service-action-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.4;
}

.service-action-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.service-action-reqs {
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-action-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
}

/* ==========================================================================
   الشهادات الرقمية وقانون 152 لسنة 2020 (Official Certificates)
   ========================================================================== */

.cert-frame {
  background: #FFFFFF;
  border: 3px double #C9A24D;
  border-radius: 8px;
  padding: 42px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  max-width: 820px;
  margin: 24px auto 36px;
  background-image: radial-gradient(circle at center, rgba(201, 162, 77, 0.03) 0%, rgba(255, 255, 255, 1) 75%);
}

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 240px;
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #C9A24D;
  padding-bottom: 20px;
  margin-bottom: 26px;
}

.cert-header-right, .cert-header-left {
  text-align: center;
}

.cert-republic-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 3px;
}

.cert-republic-sub {
  font-size: 11px;
  color: var(--muted);
}

.cert-emblem {
  font-size: 42px;
}

.cert-title-section {
  text-align: center;
  margin-bottom: 28px;
}

.cert-main-title {
  font-size: 24px;
  font-weight: 800;
  color: #10243A;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.cert-law-citation {
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
  background: #FEF3C7;
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.cert-body-intro {
  font-size: 14px;
  line-height: 1.8;
  color: #1E293B;
  margin-bottom: 24px;
  text-align: justify;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
}

.cert-row-item {
  display: flex;
  flex-direction: column;
}

.cert-row-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 3px;
}

.cert-row-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}

.cert-incentives-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 28px;
}

.cert-incentives-title {
  font-size: 13px;
  font-weight: 800;
  color: #166534;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-incentives-list {
  margin: 0;
  padding-right: 20px;
  font-size: 12px;
  color: #14532D;
  line-height: 1.7;
}

.cert-footer-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.cert-qr-box {
  text-align: center;
}

.cert-qr-visual {
  width: 90px;
  height: 90px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
}

.cert-code-tag {
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.5px;
}

.cert-seal-box {
  text-align: center;
  position: relative;
}

.cert-seal-stamp {
  width: 100px;
  height: 100px;
  border: 3px dashed #B91C1C;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #B91C1C;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.3;
  transform: rotate(-12deg);
  opacity: 0.85;
}

/* بوابة التحقق من الشهادات (Verification Portal) */
.validator-shell {
  max-width: 720px;
  margin: 32px auto 48px;
}

.validator-search-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.validator-result-valid {
  background: #FFFFFF;
  border: 2px solid #10B981;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.1);
}

.validator-result-invalid {
  background: #FFFFFF;
  border: 2px solid #EF4444;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.1);
}

.validator-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.validator-badge.success {
  background: #D1FAE5;
  color: #065F46;
}

.validator-badge.error {
  background: #FEE2E2;
  color: #991B1B;
}

/* بوابة التمويل والحوافز الصناعية (Industrial Funding) */
.funding-programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.funding-program-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.funding-program-rate {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand);
  margin: 12px 0 6px;
}

.funding-calculator-box {
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
}

/* شبكة تحديات المصانع B2B (Industrial Challenges) */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.challenge-item-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.challenge-badge-urgent {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   المنظومة الصناعية المصرية والخدمات المتكاملة (Egyptian Industrial Hub)
   ========================================================================== */

.border-brand { border: 2px solid var(--brand) !important; }
.border-gold { border: 2px solid var(--gold) !important; }
.border-success { border: 2px solid var(--success) !important; }
.border-muted { border: 1px solid var(--line) !important; }
.border-bottom { border-bottom: 1px solid var(--line) !important; }
.border-top { border-top: 1px solid var(--line) !important; }
.border { border: 1px solid var(--line) !important; }
.bg-light { background: #F8FAFC !important; }

/* شبكات العرض الثلاثية والبوابات */
.portal-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  width: 100%;
}

.portal-box {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.portal-box-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

/* التسلسل الزمني لخطوات إطلاق المصنع */
.timeline-steps-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  margin-top: 12px;
}

.timeline-step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.step-num-badge {
  background: var(--brand);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* شريط الفلترة والبحث للمجمعات والمناطق */
.split-search-filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  width: 100%;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
}

/* بطاقات المجمعات الصناعية الـ ١٦ */
.complexes-container {
  width: 100%;
}

.complex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.complex-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.complex-card:hover {
  box-shadow: var(--shadow-md);
}

.complex-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.complex-gov-badge {
  font-size: 12px;
  font-weight: 700;
  color: #1E3A8A;
  background: #DBEAFE;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.complex-units-badge {
  font-size: 12px;
  font-weight: 800;
  color: #065F46;
  background: #D1FAE5;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.complex-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.4;
}

.complex-meta {
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.complex-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.complex-meta-label {
  color: var(--muted);
  font-weight: 600;
}

.complex-meta-val {
  font-weight: 700;
  color: var(--navy);
}

.complex-sectors-box {
  margin-bottom: 12px;
}

.complex-features-text {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ترخيص توفيق الأوضاع وسند الحماية (Formalization) */
.cert-gov-seal {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seal-eagle {
  font-size: 38px;
}

.seal-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--navy);
}

.cert-meta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cert-code-stamp {
  font-family: monospace;
  font-size: 15px;
  font-weight: 800;
  color: #065F46;
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.cert-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cert-cell-k {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.cert-cell-v {
  font-size: 13.5px;
  color: var(--navy);
}

.formalization-legal-clause {
  border-radius: var(--radius-sm);
  border-right: 4px solid #059669;
  line-height: 1.7;
}

.cert-footer-signatures {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.signature-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sig-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.sig-stamp-mark {
  font-size: 13px;
  font-weight: 800;
  color: #059669;
  border: 2px dashed #059669;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.cert-qr-mock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.qr-box {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  border-radius: 4px;
}

/* فاحص الرخصة الذهبية (Golden License) */
.golden-score-meter {
  text-align: center;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 20px;
}

.score-big {
  font-size: 26px;
  font-weight: 900;
  color: #B45309;
  line-height: 1.2;
}

.criteria-breakdown-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.criteria-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #FFFFFF;
}

.criteria-met {
  border-color: #A7F3D0;
  background: #F0FDF4;
}

.criteria-gap {
  border-color: #FED7AA;
  background: #FFFBEB;
}

.checklist-box {
  border-radius: var(--radius-md);
}

.checklist-item {
  margin-bottom: 6px;
  line-height: 1.6;
  list-style: none;
}

/* ==========================================================================
   شبكة التصنيع للغير وسوق التصدير المصري B2B (White Label & Export Marketplace)
   ========================================================================== */

/* أزرار التبويب في البوابات */
.portal-tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 12px;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13.5px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: var(--cream);
  border-color: var(--brand);
}

.tab-btn.active {
  background: var(--brand) !important;
  color: #FFFFFF !important;
  border-color: var(--brand) !important;
}

/* بطاقات التصنيع للغير (White Label) */
.white-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  width: 100%;
}

.capacity-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  word-break: break-word;
}

.capacity-card:hover {
  box-shadow: var(--shadow-md);
}

.capacity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.capacity-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.capacity-actions .btn {
  white-space: normal;
  text-align: center;
}

.capacity-factory-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}

.capacity-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.cap-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cap-metric-k {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.cap-metric-v {
  font-size: 13.5px;
  font-weight: 800;
}

.capacity-section-box {
  background: #FAFAFA;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.list-bullets-sm {
  margin: 0;
  padding-right: 18px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
}

/* سوق التصدير B2B (Export Marketplace) */
.export-categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.export-cat-btn {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.export-cat-btn:hover,
.export-cat-btn.active {
  background: var(--navy) !important;
  color: #FFFFFF !important;
  border-color: var(--navy) !important;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.export-product-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.export-product-card:hover {
  box-shadow: var(--shadow-md);
}

.export-prod-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--navy);
  margin-top: 4px;
  line-height: 1.35;
}

.export-prod-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  direction: ltr;
  text-align: right;
}

.export-hs-badge {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.export-pricing-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 12px;
}

.export-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.export-price-val {
  font-weight: 900;
  font-size: 14.5px;
  color: #065F46;
}

.export-moq-val {
  font-weight: 800;
  font-size: 13px;
}

/* النوافذ المنبثقة (Modals) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 23, 38, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
  position: relative;
  margin: auto;
}

.specs-table {
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* طباعة الشهادة الرسمية فقط عند الطباعة */
@media print {
  body * {
    visibility: hidden;
  }
  .cert-frame, .cert-frame * {
    visibility: visible;
  }
  .cert-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px;
    border: 2px solid #000;
    box-shadow: none;
  }
  .btn, header, footer, .top-bar {
    display: none !important;
  }
}

/* استجابة الشاشات الصغيرة */
@media (max-width: 600px) {
  .portal-hero-banner {
    padding: 20px;
  }
  .portal-hero-top {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-factory-selector {
    width: 100%;
  }
  .portal-factory-selector select {
    max-width: 220px;
    flex: 1;
  }
  .cert-frame {
    padding: 20px;
    border-width: 2px;
  }
  .cert-header {
    flex-direction: column;
    gap: 16px;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .cert-footer-signatures {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .services-portal-grid {
    grid-template-columns: 1fr;
  }
  .portal-grid-3 {
    grid-template-columns: 1fr !important;
  }
  .complex-grid {
    grid-template-columns: 1fr !important;
  }
  .split-search-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-field {
    width: 100% !important;
    min-width: unset !important;
  }
  .timeline-step-item {
    padding: 12px;
  }
  .cert-meta-box {
    align-items: center;
    margin-top: 10px;
  }
  .golden-score-meter {
    width: 100%;
    margin-top: 10px;
  }
  .portal-tabs-nav {
    flex-direction: column;
  }
  .tab-btn {
    width: 100%;
    text-align: center;
  }
  .white-label-grid {
    grid-template-columns: 100% !important;
    width: 100% !important;
  }
  .capacity-card {
    padding: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .capacity-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .capacity-actions button,
  .capacity-actions .btn {
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }
  .capacity-actions span {
    text-align: center !important;
  }
  .capacity-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .capacity-card-header > div:first-child {
    width: 100% !important;
  }
  .export-grid {
    grid-template-columns: 100% !important;
    width: 100% !important;
  }
  .export-product-card {
    padding: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .export-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .export-actions button,
  .export-actions .btn {
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }
  .capacity-meta-grid {
    grid-template-columns: 1fr;
  }
  .modal-box {
    max-height: 95vh;
    padding: 16px !important;
    width: 95% !important;
    max-width: 95% !important;
  }
  .admin-cockpit-header {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px !important;
    gap: 12px !important;
  }
  .admin-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .admin-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  .admin-toolbar .input,
  .admin-toolbar .select,
  .admin-toolbar .btn {
    width: 100% !important;
  }
}

/* ==========================================================================
   مكونات الأيقونات الاحترافية والصفحات المؤسسية الجديدة (Icons & Institutional Pages)
   ========================================================================== */

/* صندوق الأيقونة الاحترافي للبطاقات (Professional Card Icon Box) */
.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #F1F5F9;
  border: 1px solid rgba(16, 36, 58, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  margin-bottom: 14px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(16, 36, 58, 0.04);
}

.card:hover .card-icon-box,
.service-card:hover .card-icon-box,
.course-card-modern:hover .card-icon-box {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(16, 36, 58, 0.15);
}

.card-icon-box svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-icon-box.gold {
  background: var(--gold-subtle);
  border-color: var(--gold-border);
  color: var(--gold-dark);
}
.card:hover .card-icon-box.gold,
.service-card:hover .card-icon-box.gold {
  background: var(--navy);
  color: var(--gold-light);
  border-color: var(--navy);
}

.card-icon-box.green {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.card:hover .card-icon-box.green,
.service-card:hover .card-icon-box.green {
  background: var(--navy);
  color: #86EFAC;
  border-color: var(--navy);
}

.card-icon-box.blue {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}
.card:hover .card-icon-box.blue,
.service-card:hover .card-icon-box.blue {
  background: var(--navy);
  color: #93C5FD;
  border-color: var(--navy);
}

/* صفحة من نحن (About Us Institutional Page) */
.about-hero {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  color: #FFFFFF;
  margin-bottom: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 6px -1px rgba(16, 36, 58, 0.08), 0 16px 32px -8px rgba(16, 36, 58, 0.2);
  position: relative;
  overflow: hidden;
}

.about-hero h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 12px;
  color: #FFFFFF;
  line-height: 1.25;
}

.about-hero-sub {
  font-size: 16px;
  color: #E2E8F0;
  max-width: 880px;
  line-height: 1.7;
}

.about-legal-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-right: 5px solid #0B2545;
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.about-legal-title {
  font-size: 20px;
  font-weight: 800;
  color: #0B2545;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-legal-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #E2E8F0;
}
.about-legal-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.about-legal-item h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 6px;
}
.about-legal-item p {
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.about-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.about-pillar-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.about-pillar-card:hover {
  border-color: #0B2545;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.08);
}

.about-pillar-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0B2545;
  margin-bottom: 8px;
}

.about-pillar-card p {
  font-size: 13.5px;
  color: #64748B;
  line-height: 1.65;
  margin-bottom: 16px;
  flex-grow: 1;
}

.about-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 36px;
  text-align: center;
}

.about-stat-number {
  font-size: 32px;
  font-weight: 900;
  color: #0B2545;
  line-height: 1;
  margin-bottom: 6px;
}

.about-stat-label {
  font-size: 13px;
  color: #64748B;
  font-weight: 600;
}

/* صفحة التواصل والدعم (Contact Page) */
.contact-hero-banner {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  color: #FFFFFF;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 6px -1px rgba(16, 36, 58, 0.08), 0 16px 32px -8px rgba(16, 36, 58, 0.2);
}

.contact-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 160, 23, 0.2);
  color: #F8D348;
  border: 1px solid rgba(248, 211, 72, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.contact-hero-desc {
  font-size: 15px;
  color: #E2E8F0;
  line-height: 1.7;
  max-width: 850px;
  margin: 0 0 20px 0;
}

.contact-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  color: #F8FAFC;
}

/* بطاقات الاتصال السريعة العلوية (Top Quick Channels) */
.contact-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.contact-top-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.contact-top-card:hover {
  border-color: #0B2545;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-top-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.contact-top-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-top-card-icon.blue { background: #EFF6FF; color: #1D4ED8; }
.contact-top-card-icon.green { background: #ECFDF5; color: #059669; }
.contact-top-card-icon.gold { background: #FEF3C7; color: #D97706; }
.contact-top-card-icon.navy { background: #F1F5F9; color: #0B2545; }

.contact-top-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.contact-top-card-val {
  font-size: 16px;
  font-weight: 800;
  color: #0B2545;
  text-decoration: none;
  margin-bottom: 6px;
  display: inline-block;
  direction: ltr;
  text-align: right;
}
.contact-top-card-val:hover {
  text-decoration: underline;
  color: #1D4ED8;
}

.contact-top-card-note {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.5;
  margin: 0;
}

/* الشبكة الرئيسية: النموذج والمكاتب (Main Container) */
.contact-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  margin-bottom: 40px;
}

.contact-form-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-form-box-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #F1F5F9;
}

.contact-form-box-title {
  font-size: 20px;
  font-weight: 800;
  color: #0B2545;
  margin: 0 0 6px 0;
}

.contact-form-box-desc {
  font-size: 13.5px;
  color: #64748B;
  margin: 0;
}

.contact-user-banner {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #166534;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-channels-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-branches-title {
  font-size: 18px;
  font-weight: 800;
  color: #0B2545;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-branch-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.contact-branch-card:hover {
  border-color: #0B2545;
  transform: translateY(-2px);
}

.contact-branch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.contact-branch-name {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.contact-branch-scope {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #F1F5F9;
  color: #475569;
}

.contact-branch-address {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 6px 0;
}

.contact-branch-phone {
  font-size: 12.5px;
  color: #0B2545;
  font-weight: 600;
}

.contact-hours-card {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 18px;
}

.contact-hours-title {
  font-size: 14px;
  font-weight: 700;
  color: #0B2545;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
}

/* بطاقة التذكرة الناجحة (Ticket Success Box) */
.ticket-success-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 28px;
  margin-top: 20px;
  text-align: center;
}

.ticket-badge-pill {
  display: inline-block;
  background: #047857;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 16px;
  padding: 8px 18px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin: 12px 0;
}

.ticket-actions-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* الدوائر التخصصية (Departments Strip) */
.contact-departments-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.contact-dept-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.contact-dept-card:hover {
  border-color: #0B2545;
  transform: translateY(-2px);
}

.contact-dept-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0B2545;
  margin: 8px 0 4px 0;
}

.contact-dept-desc {
  font-size: 12.5px;
  color: #64748B;
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.contact-dept-email {
  font-size: 13px;
  font-weight: 700;
  color: #1D4ED8;
  text-decoration: none;
  display: inline-block;
  direction: ltr;
}
.contact-dept-email:hover {
  text-decoration: underline;
}

/* قسم الأسئلة الشائعة (FAQ Section) */
.contact-faq-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 40px;
}

.contact-faq-header {
  margin-bottom: 24px;
}

.contact-faq-title {
  font-size: 20px;
  font-weight: 800;
  color: #0B2545;
  margin: 0 0 6px 0;
}

.contact-faq-subtitle {
  font-size: 13.5px;
  color: #64748B;
  margin: 0;
}

.contact-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-faq-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.contact-faq-q {
  font-size: 15px;
  font-weight: 700;
  color: #0B2545;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-faq-a {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

/* صفحة الشروط والخصوصية (Legal / Terms Pages) */
.legal-doc-shell {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0B2545;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #F1F5F9;
}

.legal-section p,
.legal-section li {
  font-size: 14.5px;
  color: #334155;
  line-height: 1.8;
}

/* رقائق الأكواد السريعة لصفحة التحقق (Quick Sample Code Chips) */
.sample-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 20px;
}

.sample-chip-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: monospace;
}

.sample-chip-btn:hover {
  background: #0B2545;
  color: #FFFFFF;
  border-color: #0B2545;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  .contact-top-grid {
    grid-template-columns: 1fr;
  }
  .contact-departments-strip {
    grid-template-columns: 1fr;
  }
  .contact-faq-grid {
    grid-template-columns: 1fr;
  }
  .contact-hero-banner {
    padding: 24px 18px;
  }
  .contact-form-box {
    padding: 20px;
  }
  .about-stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .about-hero {
    padding: 28px 20px;
  }
  .about-hero h1 {
    font-size: 24px;
  }
  .legal-doc-shell {
    padding: 20px;
  }
}



