/*
Theme Name: مصانع مصر
Theme URI: https://masane3masr.com
Author: مصانع مصر
Author URI: https://masane3masr.com
Description: ثيم دليل المصانع المصرية - يدعم إدارة بروفايلات المصانع والتجار
Version: 10.9.14
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: masane3masr
Tags: rtl-language, custom-colors, custom-logo, directory, business
*/

/* =============================================
   ROOT VARIABLES
   ============================================= */
:root {
  /* ── 9.72.28: باليت الريبراندنج الرسمي ── */
  --navy: #0F294A;
  --navy-800: #0A1D36;
  --navy-700: #16304F;
  --green: #00BB5B;
  --green-dark: #00854B;   /* للنص/الأزرار — تباين 4.99:1 على الخلفية الفاتحة */
  --green-light: #E7F8EF;
  --gold: #D99B26;
  --gold-dark: #8A5A0B;    /* للنص الصغير — تباين 5.47:1 */
  --gold-light: #FBF3E2;
  --paper: #F4F6F9;

  /* أسماء قديمة محفوظة (مستخدمة في 47+ مكان) — القيم بقت هوية جديدة */
  --red: var(--navy);
  --red-dark: var(--navy-800);
  --red-light: #EAF1FA;
  --dark: var(--navy);
  --mid: var(--navy-700);
  --light: var(--paper);
  --white: #ffffff;
  --text: #12233B;
  --muted: #5B6B80;
  --border: #E2E8F0;
  --danger: #DC2626;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Tajawal', Tahoma, Arial, sans-serif;
  background: var(--light);
  color: var(--text);
  direction: rtl;
  line-height: 1.6;
  font-size: 15px;
  max-width: 1920px;
  margin: 0 auto;
  overflow-x: hidden;
}

a { color: var(--red); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red-dark); }

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

ul, ol { list-style: none; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER / NAVBAR
   ============================================= */
#masthead {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 20px;
}
/* 9.28.2: القائمة في نفس سطر اللوجو والأزرار، وفي نص المساحة اللي بينهم */
@media (min-width: 769px) {
  .site-header-inner { display: flex; gap: 14px; }
  .site-header-inner > .site-branding, .site-header-inner > .header-actions { flex-shrink: 0; }
  .site-header-inner > .main-navigation { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
  .site-header-inner > .menu-toggle { display: none; }
  .site-header-inner.mm-h-tight .main-navigation > ul > li > a { padding: 7px 7px; font-size: 13px; }
  .site-header-inner.mm-h-tight .main-navigation ul { gap: 0; }
}
/* القوائم المنسدلة */
.main-navigation li { position: relative; }
.main-navigation > ul > li > a, .main-navigation .mm-dropdown a { display: flex !important; align-items: center; gap: 6px; }
.main-navigation .mm-nav-ic { font-size: 13px; line-height: 1; }
.main-navigation .mm-nav-caret { font-size: 10px; opacity: .6; margin-inline-start: 1px; transition: transform .2s; }
.main-navigation li.is-on > a, .main-navigation a.active { color: #fff; background: rgba(255,255,255,0.1); }
.main-navigation a.mm-nav-ai { background: linear-gradient(90deg, rgba(139,92,246,.22), rgba(34,211,238,.16)); color: #fff; border: 1px solid rgba(139,92,246,.35); }
.main-navigation a.mm-nav-ai:hover { background: linear-gradient(90deg, rgba(139,92,246,.35), rgba(34,211,238,.25)); }
@media (min-width: 769px) {
  .main-navigation .mm-dropdown { position: absolute; top: calc(100% + 8px); inset-inline-start: 50%; transform: translateX(50%) translateY(6px); min-width: 250px; background: #fff; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.22); padding: 6px; opacity: 0; visibility: hidden; transition: opacity .16s, transform .16s, visibility .16s; z-index: 1001; }
  [dir=ltr] .main-navigation .mm-dropdown, html[dir=ltr] .main-navigation .mm-dropdown { transform: translateX(-50%) translateY(6px); }
  .main-navigation .mm-dropdown::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
  .main-navigation li.has-dropdown:hover > .mm-dropdown, .main-navigation li.has-dropdown:focus-within > .mm-dropdown { opacity: 1; visibility: visible; transform: translateX(50%) translateY(0); }
  html[dir=ltr] .main-navigation li.has-dropdown:hover > .mm-dropdown, html[dir=ltr] .main-navigation li.has-dropdown:focus-within > .mm-dropdown { transform: translateX(-50%) translateY(0); }
  .main-navigation li.has-dropdown:hover > a .mm-nav-caret { transform: rotate(180deg); }
  .main-navigation .mm-dropdown a { color: #0F294A; padding: 9px 10px; border-radius: 8px; gap: 10px; font-size: 13.5px; white-space: normal; }
  .main-navigation .mm-dropdown a:hover, .main-navigation .mm-dropdown a.on { background: #fff0f2; color: #0F294A; }
  .main-navigation .mm-dd-i { width: 32px; height: 32px; border-radius: 8px; background: #f4f3ef; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
  .main-navigation .mm-dd-t { display: flex; flex-direction: column; font-weight: 700; line-height: 1.35; }
  .main-navigation .mm-dd-t small { font-weight: 400; font-size: 11.5px; color: #888; }
}
@media (max-width: 768px) {
  #primary-nav.open .mm-dd-i { margin-inline-end: 8px; }
  #primary-nav.open .mm-dd-t small { display: none; }
  #primary-nav.open .mm-nav-caret { display: none; }
}
/* لو المساحة مش كفاية: نشيل الأيقونات ← نصغّر المسافات ← قائمة ☰ (بيتحدد بالـ JS في header.php حسب العرض الحقيقي) */
#masthead > .container { max-width: 1320px; }
.site-header-inner.mm-h-noic .main-navigation .mm-nav-ic { display: none; }
/* 9.59.1: خطوات إضافية قبل ☰ — أزرار الهيدر أيقونات بس، وبعدها «المزيد ▾» */
#masthead > .container { max-width: 1440px; }
.main-navigation li[hidden] { display: none !important; }
.mm-lang-code, .mm-ha-ic { display: none; }
.site-header-inner.mm-h-cact .mm-ha-t, .site-header-inner.mm-h-cact .mm-lang-name { display: none; }
.site-header-inner.mm-h-cact .mm-lang-code { display: inline; font-weight: 700; letter-spacing: .5px; }
.site-header-inner.mm-h-cact .mm-ha-ic { display: inline; font-size: 15px; line-height: 1; }
.site-header-inner.mm-h-cact .header-actions .btn-lang { padding-inline: 10px; }
@media (min-width: 769px) {
  .main-navigation .mm-nav-more > .mm-dropdown { display: block; list-style: none; margin: 0; min-width: 250px; max-height: 70vh; overflow-y: auto; inset-inline-start: auto; inset-inline-end: 0; transform: translateY(6px); }
  html[dir=ltr] .main-navigation .mm-nav-more > .mm-dropdown { transform: translateY(6px); }
  .main-navigation li.mm-nav-more:hover > .mm-dropdown, .main-navigation li.mm-nav-more:focus-within > .mm-dropdown, html[dir=ltr] .main-navigation li.mm-nav-more:hover > .mm-dropdown, html[dir=ltr] .main-navigation li.mm-nav-more:focus-within > .mm-dropdown { transform: translateY(0); }
  .main-navigation .mm-nav-more > .mm-dropdown > li { display: block; }
  .main-navigation .mm-nav-more > .mm-dropdown > li > a { color: #0F294A; padding: 9px 10px; border-radius: 8px; font-weight: 800; font-size: 13.5px; }
  .main-navigation .mm-nav-more > .mm-dropdown > li > a:hover, .main-navigation .mm-nav-more > .mm-dropdown > li.is-on > a { background: #fff0f2; color: #0F294A; }
  .main-navigation .mm-nav-more > .mm-dropdown > li > a .mm-nav-ic { display: inline; }
  .main-navigation .mm-nav-more > .mm-dropdown > li > a .mm-nav-caret { display: none; }
  .main-navigation .mm-nav-more .mm-dropdown .mm-dropdown { position: static; opacity: 1; visibility: visible; transform: none !important; box-shadow: none; padding: 0 0 4px; padding-inline-start: 14px; min-width: 0; background: transparent; }
  .main-navigation .mm-nav-more .mm-dropdown .mm-dropdown::before { display: none; }
  .main-navigation .mm-nav-more .mm-dropdown .mm-dropdown a { padding: 6px 8px; font-size: 13px; }
  .main-navigation .mm-nav-more .mm-dropdown .mm-dropdown small { display: none; }
  .main-navigation .mm-nav-more .mm-dropdown .mm-dd-i { width: 24px; height: 24px; font-size: 13px; }
}
@media (min-width: 769px) {
  .site-header-inner.mm-h-burger { display: flex; }
  .site-header-inner.mm-h-burger > .menu-toggle { display: block; order: 3; }
  .site-header-inner.mm-h-burger > .main-navigation { display: none; }
  .site-header-inner.mm-h-burger > .main-navigation.open { display: block; position: absolute; top: 100%; inset-inline: 0; background: var(--dark); padding: 10px 16px 16px; box-shadow: 0 16px 30px rgba(0,0,0,.35); max-height: calc(100vh - 80px); overflow-y: auto; }
  .site-header-inner.mm-h-burger > .main-navigation.open ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; }
  .site-header-inner.mm-h-burger .main-navigation .mm-dropdown { position: static; opacity: 1; visibility: visible; transform: none !important; background: rgba(255,255,255,.05); box-shadow: none; min-width: 0; margin-top: 4px; }
  .site-header-inner.mm-h-burger .main-navigation .mm-dropdown a { color: rgba(255,255,255,.85); }
  .site-header-inner.mm-h-burger .main-navigation .mm-dropdown a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .site-header-inner.mm-h-burger .main-navigation .mm-dd-i { background: rgba(255,255,255,.08); }
  .site-header-inner.mm-h-burger .main-navigation .mm-nav-caret { display: none; }
  .site-header-inner.mm-h-burger { position: relative; }
}

/* سلة طلباتي */
@media (min-width: 769px) { #mm-cart-panel { right: auto; left: 0; } }
.mm-cart-it { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f2f1ec; text-decoration: none; color: var(--text,#0F294A); }
.mm-cart-it:hover { background: #faf9f6; }
.mm-cart-ic { width: 34px; height: 34px; border-radius: 8px; background: #f4f3ef; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mm-cart-tx { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.mm-cart-tx small { color: #888; font-size: 11.5px; }
.mm-cart-tx em { font-style: normal; font-size: 11.5px; color: #0F294A; font-weight: 600; margin-top: 2px; }

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  /* 9.72.28: الهيدر كحلي، فالمربع الذهبي هو اللي يبان + حرف كحلي (تباين 6:1) */
  background: var(--gold);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  flex-shrink: 0;
}

.site-title {
  color: white;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1;
}

.site-title span { color: var(--gold); }

/* 9.72.27: شعار الريبراندنج في النافبار — ارتفاع ثابت ومساحة آمنة */
.site-branding .site-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
@media (max-width: 768px) {
  .site-branding .site-logo { height: 34px; max-width: 170px; }
}

/* Nav Menu */
.main-navigation ul {
  display: flex;
  gap: 2px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  display: block;
  transition: all 0.2s;
}

.main-navigation a { white-space: nowrap; }
@media (max-width: 1440px) { .main-navigation a { padding: 8px 10px; } }
@media (max-width: 1260px) { .main-navigation a { padding: 7px 7px; font-size: 13px; } }
@media (max-width: 1120px) { .main-navigation a { padding: 6px 4px; font-size: 12px; } .header-actions { gap: 6px; } .btn-add-factory { padding-left: 10px !important; padding-right: 10px !important; font-size: 12px !important; } }

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: white;
  background: rgba(255,255,255,0.1);
}

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

.btn-add-factory {
  background: var(--red);
  color: white !important;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-add-factory:hover {
  background: var(--red-dark) !important;
  transform: translateY(-1px);
}

.btn-lang {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 11px;
  border-radius: 20px;
  transition: all 0.2s;
}

.btn-lang:hover { color: white; border-color: rgba(255,255,255,0.45); }

/* Hamburger mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  font-size: 22px;
  padding: 5px;
}

/* =============================================
   SEARCH STRIP (below header)
   ============================================= */
.search-strip {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.search-form {
  display: flex;
  gap: 10px;
  max-width: 700px;
}

.search-form input[type="search"] {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  direction: rtl;
  color: var(--text);
}

.search-form input[type="search"]:focus { border-color: var(--red); }

.search-form button {
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-form button:hover { background: var(--red-dark); }

/* Category Filter Pills */
.category-filter {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

/* =============================================
   HERO (Homepage)
   ============================================= */
.hero-section {
  background: #0a0a1a;
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Video overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10,10,26,0.88) 0%,
    rgba(15,41,74,0.78) 50%,
    rgba(10,10,26,0.88) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Bottom fade */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(10,10,26,0.6));
  z-index: 1;
  pointer-events: none;
}

/* Video element */
.hero-section video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  opacity: .45;
}

@media (max-width: 768px) {
  .hero-section video {
    display: none;
  }
  .hero-section {
    background: linear-gradient(
      160deg,
      rgba(10,10,26,1) 0%,
      rgba(15,41,74,1) 50%,
      rgba(10,10,26,1) 100%
    );
  }
  .hero-section::before {
    background: linear-gradient(
      160deg,
      rgba(160,50,20,0.3) 0%,
      rgba(15,41,74,0.95) 50%,
      rgba(10,10,26,1) 100%
    );
  }
}


/* Animated particles overlay */
.hero-section .hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-section .hero-particles span {
  position: absolute;
  display: block;
  width: 2px; height: 2px;
  background: var(--gold);
  border-radius: 50%;
  animation: hero-float linear infinite;
  opacity: 0;
}

@keyframes hero-float {
  0%   { transform: translateY(100%) translateX(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-120%) translateX(30px); opacity: 0; }
}

/* Red glow on left */
.hero-section::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(15,41,74,0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 6s ease-in-out infinite alternate;
}

/* Gold glow on right */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -80px; right: 5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(217,155,38,0.10) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 8s ease-in-out infinite alternate-reverse;
}

@keyframes hero-glow {
  0%   { transform: scale(1) translate(0,0); opacity: 0.8; }
  100% { transform: scale(1.3) translate(20px,-20px); opacity: 1.2; }
}

.hero-section h1 {
  font-size: 2.6rem;
  font-weight: 900;
  color: white;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hero-section h1 span { color: var(--gold); }

.hero-section p {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}

.hero-search input {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  direction: rtl;
}

.hero-search button {
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.hero-search button:hover { background: var(--red-dark); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

.hero-stat-lbl {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.card-header {
  padding: 16px 20px 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2, .card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.card-header-icon {
  width: 32px;
  height: 32px;
  background: var(--red-light);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.card-body { padding: 20px; }

/* =============================================
   FACTORY LISTING CARD (Grid)
   ============================================= */
.factories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.factory-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.factory-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.11);
  transform: translateY(-2px);
}

.factory-card-thumb {
  height: 130px;
  background: linear-gradient(135deg, #0F294A, #16304F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  position: relative;
  overflow: hidden;
}

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

.factory-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.factory-card-body { padding: 16px; flex: 1; }

.factory-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

.factory-card-name:hover { color: var(--red); }

.factory-card-location {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.factory-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.factory-card-tag {
  background: #f0f4ff;
  color: #2547a1;
  border: 1px solid #d0dbf5;
  border-radius: 20px;
  font-size: 11px;
  padding: 2px 9px;
}

.factory-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.verified-dot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #1a7a3f;
  font-weight: 600;
}

.verified-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #25d366;
  border-radius: 50%;
}

.btn-view-profile {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 5px 13px;
  border-radius: 20px;
  transition: all 0.15s;
}

.btn-view-profile:hover {
  background: var(--red);
  color: white;
}

/* =============================================
   FACTORY PROFILE PAGE
   ============================================= */
.profile-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--mid) 60%, #1f1f35 100%);
  position: relative;
  overflow: hidden;
  padding: 36px 0 0;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 300px; height: 300px;
  background: var(--red);
  opacity: 0.06;
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero-inner {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 105px;
  height: 105px;
  border-radius: 14px;
  border: 3px solid rgba(255,255,255,0.15);
  background: #2a2a40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  flex-shrink: 0;
  overflow: hidden;
}

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

.profile-info { flex: 1; padding-bottom: 18px; }

.profile-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin-bottom: 6px;
  line-height: 1.2;
}

.profile-location {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Profile Tabs */
.profile-tabs-bar {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.profile-tabs {
  display: flex;
  gap: 4px;
}

.profile-tab {
  color: rgba(255,255,255,0.5);
  font-size: 13.5px;
  font-weight: 500;
  padding: 13px 18px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-tab:hover { color: rgba(255,255,255,0.85); }
.profile-tab.active, .profile-tab:hover { color: white; border-bottom-color: var(--red); }

/* Profile Content Layout */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 22px;
  margin: 28px 0 48px;
}

.profile-main { display: flex; flex-direction: column; gap: 20px; }
.profile-sidebar { display: flex; flex-direction: column; gap: 18px; }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-box {
  background: white;
  padding: 18px 12px;
  text-align: center;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--red);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-item label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.info-item p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Products Tags */
.products-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-tag {
  background: #f0f4ff;
  color: #2547a1;
  border: 1px solid #c8d5f8;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

.product-tag:hover { background: #2547a1; color: white; }

/* About Text */
.about-text {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #e8e6de;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: transform 0.2s, opacity 0.2s;
}

.gallery-item:hover { transform: scale(0.96); opacity: 0.9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================
   SIDEBAR COMPONENTS
   ============================================= */
/* Contact Box */
.contact-box {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.contact-box-header {
  background: var(--red);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-box-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: #fafaf8; }

.contact-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.contact-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  direction: ltr;
  display: block;
}

a.contact-value:hover { color: var(--red); }

.contact-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ci-phone { background: #eaf7ee; }
.ci-email { background: #fff0f0; }
.ci-web   { background: #f0f2ff; }
.ci-map   { background: #fff8e6; }
.ci-wa    { background: #e7f7e7; }

/* CTA Buttons */
.sidebar-ctas { padding: 14px 18px 18px; }

.btn-cta {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 10px;
}

.btn-cta:last-child { margin-bottom: 0; }

.btn-cta-primary { background: var(--red); color: white; }
.btn-cta-primary:hover { background: var(--red-dark); color: white; transform: translateY(-1px); }

.btn-cta-wa { background: #25d366; color: white; }
.btn-cta-wa:hover { background: #1da851; color: white; transform: translateY(-1px); }

/* Verified Badge */
.verified-card {
  background: linear-gradient(135deg, #fff8e6, #fffbf0);
  border: 1px solid #e8c96a;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.verified-card .v-icon { font-size: 28px; flex-shrink: 0; }
.verified-card h4 { font-size: 13px; font-weight: 700; color: #7a5400; margin-bottom: 2px; }
.verified-card p  { font-size: 11px; color: #a07020; }

/* Address Card */
.address-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.address-map-placeholder {
  width: 100%;
  height: 150px;
  background: #e8e6de;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.address-map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.map-pin {
  width: 34px; height: 34px;
  background: var(--red);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(15,41,74,0.4);
}

.map-pin::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(45deg);
  width: 11px; height: 11px;
  background: white;
  border-radius: 50%;
}

.address-body { padding: 14px 16px; }
.address-body p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.address-body a { font-size: 13px; font-weight: 600; display: inline-block; margin-top: 10px; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
  padding: 14px 0;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { opacity: 0.4; }

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  margin: 32px 0 48px;
  min-height: 600px;
}

/* Dashboard Sidebar */
.dash-sidebar {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  align-self: start;
}

.dash-user-info {
  background: linear-gradient(135deg, var(--dark), var(--mid));
  padding: 20px 16px;
  text-align: center;
}

.dash-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--red);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 3px solid rgba(255,255,255,0.15);
}

.dash-user-name { color: white; font-size: 14px; font-weight: 700; }
.dash-user-role { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 3px; }

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: all 0.15s;
  cursor: pointer;
}

.dash-nav-item:last-child { border-bottom: none; }
.dash-nav-item:hover { background: var(--light); color: var(--red); }
.dash-nav-item.active { background: var(--red-light); color: var(--red); font-weight: 700; }
.dash-nav-item .icon { font-size: 17px; width: 22px; text-align: center; }

/* Dashboard Content */
.dash-content { display: flex; flex-direction: column; gap: 20px; }

/* Dashboard Stats */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.dash-stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-stat-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.dsi-red    { background: #fff0f2; }
.dsi-blue   { background: #f0f2ff; }
.dsi-green  { background: #eaf7ee; }
.dsi-gold   { background: #fff8e6; }

.dash-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  display: block;
  line-height: 1;
}

.dash-stat-lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  background: var(--light);
  padding: 11px 14px;
  text-align: right;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafaf8; }

.table-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-active  { background: #eaf7ee; color: #1a7a3f; }
.badge-pending { background: #fff8e6; color: #a07020; }
.badge-premium { background: #f0f2ff; color: #2547a1; }

.table-actions { display: flex; gap: 6px; }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--text);
}

.btn-sm:hover { border-color: var(--red); color: var(--red); }
.btn-sm.danger:hover { border-color: #c00; color: #c00; }

/* Form Styles */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group label span { color: var(--red); }

.form-control {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  direction: rtl;
  color: var(--text);
  background: white;
}

.form-control:focus { border-color: var(--red); }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover { border-color: var(--red); color: var(--red); }

/* =============================================
   SUBSCRIPTION PLANS
   ============================================= */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.plan-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
  position: relative;
}

.plan-card.featured {
  border-color: var(--red);
  box-shadow: 0 4px 20px rgba(15,41,74,0.12);
}

.plan-card.featured::before {
  content: '⭐ الأكثر طلباً';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 0 0 8px 8px;
}

.plan-header { padding: 28px 22px 20px; text-align: center; border-bottom: 1px solid var(--border); }
.plan-name { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.plan-price .amount { font-size: 36px; font-weight: 900; color: var(--red); }
.plan-price .period { font-size: 13px; color: var(--muted); }

.plan-features { padding: 20px 22px; }
.plan-feature { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid #F4F6F9; }
.plan-feature:last-child { border-bottom: none; }
.plan-feature .check { color: #25d366; font-weight: 700; }
.plan-feature .cross { color: #ccc; }

.plan-footer { padding: 16px 22px 22px; }
.plan-footer .btn-cta { margin: 0; }

/* =============================================
   FOOTER
   ============================================= */
#colophon {
  background: var(--dark);
  color: rgba(255,255,255,0.55);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand .logo-icon { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.8; margin-top: 10px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col a {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.footer-bottom a { color: rgba(255,255,255,0.45); margin-right: 16px; }
.footer-bottom a:hover { color: white; }

.footer-logo-text { color: white; font-size: 17px; font-weight: 800; }
.footer-logo-text span { color: var(--gold); }

/* =============================================
   WIDGETS
   ============================================= */
.widget { margin-bottom: 28px; }
.widget-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--red); display: inline-block; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.page-link {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: white;
  transition: all 0.15s;
}

.page-link:hover, .page-link.current {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

/* =============================================
   NOTICES / ALERTS
   ============================================= */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-success { background: #eaf7ee; color: #1a7a3f; border: 1px solid #b7e4c7; }
.notice-error   { background: #fff0f0; color: #0A1D36; border: 1px solid #f5c0c0; }
.notice-info    { background: #f0f2ff; color: #2547a1; border: 1px solid #c8d5f8; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-stats  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-navigation { display: none; }
  .main-navigation.open { display: block; position: absolute; top: 66px; right: 0; left: 0; background: var(--dark); padding: 12px; z-index: 999; }
  .main-navigation.open ul { flex-direction: column; }
  .menu-toggle { display: block; }
  .btn-add-factory { display: none; }

  .profile-layout { grid-template-columns: 1fr; }
  .dashboard-wrap  { grid-template-columns: 1fr; }
  .plans-grid      { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr; }
  .info-grid       { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .factories-grid  { grid-template-columns: 1fr; }
  .dash-stats      { grid-template-columns: repeat(2, 1fr); }
  .hero-section h1 { font-size: 1.8rem; }
  .hero-stats      { gap: 20px; }
}

@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .stats-row  { grid-template-columns: repeat(3, 1fr); }
  .container, .container-sm { padding: 0 12px; }
}

/* =============================================
   MOBILE FIXES — max-width: 768px
   ============================================= */
@media (max-width: 768px) {

  /* ── Header ── */
  .site-header-inner { height: 56px; gap: 10px; }
  .logo-icon { width: 34px; height: 34px; font-size: 17px; }
  .site-title { font-size: 16px; }
  .header-actions { gap: 6px; }
  .btn-lang { font-size: 11px; padding: 4px 8px; }

  /* Hide nav bell label text, keep icon */
  #mm-notif-bell span[style*="font-size:18px"] { font-size: 16px; }

  /* ── Hero Stats — wrap to grid ── */
  .hero-section { padding: 44px 0 52px; }
  .hero-section h1 { font-size: 1.6rem; }
  .hero-section p { font-size: 14px; margin-bottom: 24px; }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 28px;
  }

  .hero-stats > div {
    padding: 12px 6px;
    border-left: 1px solid rgba(255,255,255,0.1);
    text-align: center;
  }

  .hero-stats > div:last-child { border-left: none; }
  /* Every 3rd item — remove left border to start new row cleanly */
  .hero-stats > div:nth-child(3n+1) { border-left: none; }
  /* Top border for 2nd row onward */
  .hero-stats > div:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,0.1); }

  .hero-stat-num { font-size: 1.3rem; }
  .hero-stat-lbl { font-size: 11px; }

  .hero-search { flex-direction: row; gap: 8px; }
  .hero-search input { font-size: 13px; padding: 11px 12px; }
  .hero-search button { padding: 11px 14px; font-size: 13px; }

  /* ── Profile Hero ── */
  .profile-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
    border-radius: 12px;
  }

  .profile-name { font-size: 18px; }
  .profile-location { font-size: 12px; flex-wrap: wrap; gap: 4px; justify-content: center; }

  /* ── Profile Tabs — horizontal scroll ── */
  .profile-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 0;
  }
  .profile-tabs::-webkit-scrollbar { display: none; }

  .profile-tab {
    font-size: 12px;
    padding: 11px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 4px;
  }

  /* ── Stats Row in profile ── */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row .stat-box:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .stat-num { font-size: 20px; }

  /* ── Profile Layout ── */
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0 32px;
  }

  /* Sidebar goes below main on mobile */
  .profile-sidebar { order: -1; }

  /* ── Sidebar cards ── */
  .contact-box { padding: 16px; }
  .verified-card { padding: 14px; }
  .address-card { border-radius: var(--radius); overflow: hidden; }

  /* ── Factory Cards Grid ── */
  .factories-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .factory-card-thumb { height: 100px; font-size: 36px; }
  .factory-card-body { padding: 10px 12px; }
  .factory-card-name { font-size: 13px; }
  .factory-card-footer { padding: 10px 12px; }

  /* ── Footer ── */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  #colophon { padding: 32px 0 16px; margin-top: 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

  /* ── Dashboard ── */
  .dashboard-wrap { grid-template-columns: 1fr; }
  .dash-nav { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; padding: 8px; gap: 6px; }
  .dash-nav-item { white-space: nowrap; flex-shrink: 0; padding: 8px 12px; font-size: 12px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-stat-card { padding: 14px 12px; }

  /* ── Form ── */
  .form-row { grid-template-columns: 1fr; gap: 12px; }

  /* ── Chat FAB — move up a bit from bottom ── */
  #mm-chat-fab { bottom: 16px; left: 16px; width: 46px; height: 46px; font-size: 20px; }
  #mm-chat-window { width: calc(100vw - 24px); left: 12px; bottom: 74px; height: 420px; }

  /* ── Sector list rows ── */
  .mm-list-row { padding: 10px 14px; gap: 10px; }
  .mm-list-logo { width: 44px; height: 44px; font-size: 20px; }
  .mm-list-name { font-size: 13px; max-width: 180px; }
  .mm-list-actions { min-width: 68px; }
  .mm-list-btn-profile { font-size: 11px; padding: 5px 8px; }
}

/* =============================================
   MOBILE FIXES — max-width: 480px (small phones)
   ============================================= */
@media (max-width: 480px) {

  .container, .container-sm { padding: 0 12px; }

  /* ── Hero ── */
  .hero-section { padding: 36px 0 44px; }
  .hero-section h1 { font-size: 1.4rem; }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-stat-num { font-size: 1.1rem; }
  .hero-stat-lbl { font-size: 10px; }

  /* ── Factory cards — single column on very small ── */
  .factories-grid { grid-template-columns: 1fr; gap: 10px; }

  /* ── Profile tabs — smaller ── */
  .profile-tab { font-size: 11px; padding: 10px 10px; }

  /* ── Stats row — 3 col still ── */
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .stat-num { font-size: 17px; }
  .stat-lbl { font-size: 10px; }

  /* ── Profile avatar ── */
  .profile-avatar { width: 68px; height: 68px; font-size: 26px; }
  .profile-name { font-size: 16px; }

  /* ── Breadcrumb ── */
  .breadcrumb { font-size: 11px; flex-wrap: wrap; }

  /* ── Info grid in profile ── */
  .info-grid { grid-template-columns: 1fr; }

  /* ── Sidebar CTA buttons stack ── */
  .sidebar-ctas { flex-direction: column; }
  .btn-cta { text-align: center; }

  /* ── Search ── */
  .search-form { flex-direction: row; }
  .search-form input { font-size: 13px; }

  /* ── Sector rows ── */
  .mm-sector-card-head { padding: 12px; }
  .mm-list-row { flex-wrap: wrap; }
  .mm-list-actions { flex-direction: row; width: 100%; }
  .mm-list-btn-profile { flex: 1; text-align: center; }
  .mm-list-btn-phone { flex: 1; text-align: center; }

  /* ── Footer ── */
  .footer-grid { gap: 20px; }

  /* ── Dashboard ── */
  .dash-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-stat-num { font-size: 18px; }
  .dash-stat-lbl { font-size: 11px; }
}

/* =============================================
   FIX HORIZONTAL OVERFLOW — المشكلة الرئيسية
   ============================================= */

/* منع أي عنصر من الخروج خارج عرض الشاشة */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Hero section — النص والمحتوى يقطع للسطر التالي */
.hero-section {
  overflow: hidden;
}

.hero-section h1 {
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero-section p {
  word-break: break-word;
}

/* الإحصائيات — المشكلة الأساسية في الصورة */
@media (max-width: 768px) {
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    flex-wrap: unset !important;
  }

  .hero-stats > div {
    min-width: 0 !important;
    padding: 12px 4px !important;
    flex-shrink: 1 !important;
  }

  .hero-stat-num {
    font-size: 1.15rem !important;
    white-space: nowrap;
  }

  .hero-stat-lbl {
    font-size: 10px !important;
    word-break: break-word;
    hyphens: auto;
  }

  /* Hero search — لا يخرج خارج الشاشة */
  .hero-search {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Header — يمنع الخروج */
  #masthead { overflow: hidden; }
  .site-header-inner { overflow: hidden; }

  /* Profile hero */
  .profile-hero { overflow: hidden; }
  .profile-hero-inner { overflow: hidden; }
  .profile-location {
    white-space: normal;
    word-break: break-word;
  }

  /* كل الـ containers */
  .container, .container-sm {
    max-width: 100% !important;
    overflow: hidden;
  }

  /* Cards grid */
  .factories-grid {
    overflow: hidden;
  }

  /* Profile tabs — منع الخروج مع تفعيل scroll */
  .profile-tabs-bar { overflow: hidden; }
  .profile-tabs {
    overflow-x: auto !important;
    max-width: 100% !important;
  }

  /* Sector sections */
  .mm-sectors-grid { overflow: hidden; }
  .mm-list-row { overflow: hidden; }
  .mm-list-name {
    max-width: 150px !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .hero-stat-num { font-size: 1rem !important; }
  .hero-stat-lbl { font-size: 9px !important; }

  /* Hero title لا يخرج */
  .hero-section h1 { font-size: 1.35rem !important; padding: 0 8px; }
  .hero-section p  { padding: 0 4px; }
}

/* ─── Mobile Menu Open State ─── */
@media (max-width: 768px) {
  /* القائمة المفتوحة */
  #primary-nav.open {
    display: block !important;
    position: fixed;
    top: 56px;
    right: 0;
    left: 0;
    bottom: 0;
    background: var(--dark);
    z-index: 9990;
    overflow-y: auto;
    padding: 12px 0 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  #primary-nav.open ul {
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
  }

  #primary-nav.open li { width: 100%; }

  #primary-nav.open a {
    font-size: 15px;
    padding: 13px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  #primary-nav.open a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
  }

  /* Dropdown داخل القائمة المفتوحة */
  #primary-nav.open .mm-dropdown {
    position: static !important;
    display: none;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    margin: 4px 0 8px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: none;
    min-width: unset;
    padding: 4px 0;
  }

  #primary-nav.open .mm-dropdown.open-mobile {
    display: block !important;
  }

  #primary-nav.open .mm-dropdown a {
    font-size: 13px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  #primary-nav.open .mm-dropdown a:hover { color: white; }

  #primary-nav.open .has-dropdown > a::after {
    content: '▾';
    font-size: 12px;
    opacity: 0.5;
    margin-right: auto;
    margin-left: 0;
  }

  #primary-nav.open .dd-header {
    color: rgba(255,255,255,0.35);
    padding: 8px 20px 4px;
    font-size: 10px;
  }

  #primary-nav.open .dd-divider {
    background: rgba(255,255,255,0.08);
  }

  #primary-nav.open .dd-count {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    margin-right: 0;
    margin-left: auto;
  }
}

/* ─── HIDE SEARCH STRIP EVERYWHERE ─── */
.search-strip { display: none !important; }

/* ═══════════════════════════════════════════════════════
   HEADER NOTIFICATION & MESSAGE BELLS
═══════════════════════════════════════════════════════ */
.mm-header-notif {
    position: relative;
    flex-shrink: 0;
}
.mm-hb-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    cursor: pointer;
    color: white;
    position: relative;
    transition: background .15s;
}
.mm-hb-btn:hover { background: rgba(255,255,255,.15); }

.mm-hb-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--red);
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 17px; height: 17px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 1.5px solid var(--dark);
    line-height: 1;
}

/* Panel */
.mm-hb-panel {
    display: none;
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 30px));
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.14);
    z-index: 9995;
    overflow: hidden;
}
@media(min-width: 769px) {
    .mm-hb-panel {
        position: absolute;
        top: calc(100% + 10px);
        left: auto;
        right: 0;
        transform: none;
        width: 320px;
    }
}
.mm-hb-panel.open { display: flex; flex-direction: column; }

.mm-hb-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.mm-hb-panel-list {
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.mm-hb-panel-foot {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.mm-hb-panel-foot a {
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
}

.mm-hb-empty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* Notification items */
.mm-hb-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid #F4F6F9;
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    color: var(--text);
}
.mm-hb-notif-item:hover { background: #fafaf8; }
.mm-hb-notif-item.unread { background: #fff8f8; }
.mm-hb-notif-item.unread:hover { background: #ffefef; }
.mm-hb-notif-icon { font-size: 20px; flex-shrink: 0; }
.mm-hb-notif-body { flex: 1; min-width: 0; }
.mm-hb-notif-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.mm-hb-notif-sub   { font-size: 11px; color: var(--muted); line-height: 1.4; }
.mm-hb-notif-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; margin-top: 5px; }
/* 9.55.2: نص الإشعار سطرين، ولو مالوش رابط بيتفتح كامل بالضغط */
.mm-hb-notif-item { cursor: pointer; }
.mm-notif-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mm-notif-open .mm-notif-text { display: block; -webkit-line-clamp: unset; overflow: visible; white-space: pre-line; }
.mm-notif-big { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; }
.mm-notif-big.unread { border-color: #0F294A; background: #fff5f5; }
.mm-notif-big .mm-hb-notif-icon { font-size: 22px; }
.mm-notif-big .mm-hb-notif-title { font-size: 14px; }
.mm-notif-big .mm-hb-notif-sub { font-size: 13px; color: #555; }

/* Message items */
.mm-hb-msg-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #F4F6F9;
    cursor: pointer;
    transition: background .12s;
}
.mm-hb-msg-item:hover { background: #fafaf8; }
.mm-hb-msg-item.unread { background: #fff8f8; }
.mm-hb-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--red);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800;
    flex-shrink: 0;
}
.mm-hb-msg-info { flex: 1; min-width: 0; }
.mm-hb-msg-name {
    font-size: 13px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 2px;
}
.mm-hb-ur {
    background: var(--red); color: white;
    font-size: 9px; font-weight: 800;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px;
}
.mm-hb-msg-preview { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════════
   SIDEBAR MESSAGES (Facebook-style)
═══════════════════════════════════════════════════════ */
#mm-msg-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.1);
}
[dir="rtl"] #mm-msg-sidebar {
    left: auto; right: 0;
    border-right: none;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    box-shadow: -4px 0 24px rgba(0,0,0,.1);
}
#mm-msg-sidebar.open {
    transform: translateX(0);
}
.mm-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 9989;
}
.mm-sidebar-overlay.open { display: block; }

.mm-sidebar-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark);
    color: white;
}
.mm-sidebar-title { font-size: 15px; font-weight: 800; }
.mm-sidebar-close {
    background: none; border: none; color: white;
    font-size: 20px; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    transition: background .15s;
}
.mm-sidebar-close:hover { background: rgba(255,255,255,.1); }

.mm-sidebar-search {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.mm-sidebar-search input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
}
.mm-sidebar-search input:focus { border-color: var(--red); }

.mm-sidebar-convlist {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
}
.mm-sidebar-conv {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: background .12s;
    border-bottom: 1px solid #F4F6F9;
}
.mm-sidebar-conv:hover { background: #fafaf8; }
.mm-sidebar-conv.active { background: var(--red-light); }
.mm-sidebar-conv.unread .mm-sc-name { font-weight: 800; color: var(--text); }
.mm-sc-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--red);
    color: white; font-size: 18px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative;
}
.mm-sc-online-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 11px; height: 11px; border-radius: 50%;
    border: 2px solid white;
}
.mm-sc-info { flex: 1; min-width: 0; }
.mm-sc-name { font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-sc-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mm-sc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.mm-sc-time { font-size: 10px; color: var(--muted); }
.mm-sc-badge { background: var(--red); color: white; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Mobile FAB buttons */
.mm-mobile-fabs {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    flex-direction: column;
    gap: 10px;
    z-index: 9988;
}
[dir="rtl"] .mm-mobile-fabs { left: auto; right: 20px; }
.mm-mobile-fab {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    position: relative;
    transition: transform .2s;
}
.mm-mobile-fab:hover { transform: scale(1.08); }
.mm-mobile-fab.red { background: var(--red); }
.mm-mobile-fab .mm-fab-badge {
    position: absolute; top: -3px; right: -3px;
    background: var(--gold); color: var(--dark);
    font-size: 9px; font-weight: 800;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; border: 1.5px solid white;
}

@media(max-width: 900px) {
    /* Hide desktop bells & all dropdown panels on mobile */
    #mm-notif-bell, #mm-msg-bell { display: none !important; }
    #mm-notif-panel, #mm-msg-panel, .mm-hb-panel { display: none !important; }
    /* Hide mobile FABs */
    .mm-mobile-fabs { display: none !important; }
    /* Sidebar full screen on mobile */
    #mm-msg-sidebar { width: 100%; }
    [dir="rtl"] #mm-msg-sidebar { width: 100%; }
}

/* Mobile full-screen pages */
.mm-mobile-fullpage {
    position: fixed; inset: 0; z-index: 9999;
    background: white;
    display: none; flex-direction: column;
}
.mm-mobile-fullpage.open { display: flex; }
.mm-mfp-head {
    padding: 16px 18px;
    background: var(--dark); color: white;
    display: flex; align-items: center; gap: 12px;
}
.mm-mfp-back {
    background: none; border: none; color: white;
    font-size: 20px; cursor: pointer; padding: 0;
}
.mm-mfp-title { font-size: 16px; font-weight: 800; flex: 1; }


/* ── Dashboard: full-width footer fix ── */
.page-template-page-dashboard #colophon {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    clear: both;
    float: none;
}
.page-template-page-dashboard .dashboard-wrap {
    overflow: visible;
}

/* ── Full width dashboard for admin ── */
.page-template-page-dashboard .container:has(.dashboard-wrap) {
    max-width: 100% !important;
    padding: 0 24px !important;
    overflow-x: hidden !important;
}
.page-template-page-dashboard .dashboard-wrap {
    grid-template-columns: 220px 1fr;
    gap: 20px;
    overflow: hidden;
}

/* ══ DASHBOARD MOBILE ══ */
@media(max-width:768px) {
    /* الصفحة كاملة */
    .page-template-page-dashboard .container:has(.dashboard-wrap) {
        padding: 0 !important;
    }
    .dashboard-wrap {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        margin: 0 0 60px !important;
    }

    /* الهيدر */
    .dashboard-wrap > div:first-child {
        background: linear-gradient(135deg, var(--dark), var(--mid));
        padding: 16px;
        border-radius: 0;
    }

    /* Sidebar — يتحول لـ bottom sheet */
    .dash-sidebar {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 10px rgba(0,0,0,.15);
    }

    /* معلومات اليوزر — أفقية */
    .dash-user-info {
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        text-align: right !important;
    }
    .dash-user-info > div:first-child {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        flex-shrink: 0;
    }
    .dash-user-info > div[style*="position:relative"] {
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }
    .dash-user-name { font-size: 13px !important; text-align: right; }
    .dash-user-role { font-size: 11px !important; margin-top: 2px !important; }

    /* قائمة الناف — أفقية مع scroll */
    .dash-sidebar > div:not(.dash-user-info) {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        padding: 0 !important;
        border-top: 1px solid var(--border);
    }
    .dash-sidebar > div:not(.dash-user-info)::-webkit-scrollbar { display: none; }

    .dash-nav-item {
        flex-shrink: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 10px 14px !important;
        font-size: 11px !important;
        border-bottom: none !important;
        border-left: none !important;
        border-right: 1px solid var(--border) !important;
        white-space: nowrap !important;
        min-width: 70px !important;
        text-align: center !important;
    }
    .dash-nav-item:last-child { border-right: none !important; }
    .dash-nav-item .icon {
        font-size: 20px !important;
        width: auto !important;
        display: block !important;
    }
    .dash-nav-item.active {
        border-bottom: 3px solid var(--red) !important;
        background: var(--red-light) !important;
    }

    /* المحتوى */
    .dash-content {
        padding: 16px !important;
        gap: 16px !important;
    }

    /* الكروت */
    .dash-stats { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
    .dash-stat-card { padding: 12px !important; }

    /* الجداول */
    .dash-content table { font-size: 12px !important; }
    .dash-content th, .dash-content td { padding: 8px 6px !important; }

    /* الفورمات */
    .form-row { grid-template-columns: 1fr !important; }

    /* grids كبيرة */
    .dash-content [style*="grid-template-columns: repeat(3"] { 
        grid-template-columns: repeat(2,1fr) !important; 
    }
    .dash-content [style*="grid-template-columns: 2fr 1fr"] { 
        grid-template-columns: 1fr !important; 
    }
    .dash-content [style*="grid-template-columns: 1fr 300px"] { 
        grid-template-columns: 1fr !important; 
    }
}
/* biz-center panel */
#panel-biz-center {
    min-height: 80vh;
    overflow: hidden;
    min-width: 0;
}
/* منع أي عنصر من الخروج عن حدود البانل */
#panel-biz-center * {
    max-width: 100%;
    word-break: break-word;
}
#panel-biz-center table {
    word-break: normal;
}

/* ── إخفاء زر الرسائل والإشعارات على الموبايل ── */
@media (max-width: 768px) {
    #mm-notif-bell,
    #mm-msg-bell {
        display: none !important;
    }
}

/* ── Mobile/Desktop visibility helpers ── */
.mm-desktop-only { display: inline-flex; align-items: center; }
.mm-mobile-only  { display: none; }

@media (max-width: 768px) {
    .mm-desktop-only { display: none !important; }
    .mm-mobile-only  { display: inline-flex !important; align-items: center; }

    /* إظهار أيقونات الرسائل والإشعارات في الهيدر على الموبايل */
    #mm-notif-bell,
    #mm-msg-bell {
        display: inline-flex !important;
    }
}

/* =============================================
   9.98.0 — شريط الأقسام (الصف الثاني)
   ============================================= */
.mm-header-tag{flex:1 1 auto;text-align:center;font-size:12.5px;font-weight:700;color:rgba(255,255,255,.55);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:1100px){.mm-header-tag{display:none}}
#masthead .site-header-inner{transition:height .18s ease}
body.mm-scrolled #masthead .site-header-inner{height:56px}
@media (min-width:769px){ body.mm-scrolled .site-logo{height:32px;width:auto} }

.mm-secbar{background:#173654;border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 4px 16px rgba(0,0,0,.22);position:sticky;top:66px;z-index:990}
body.mm-scrolled .mm-secbar{top:56px}
.mm-sec-nav{height:48px;display:flex;align-items:center}
.mm-sec-nav > ul{list-style:none;margin:0;padding:0;display:flex;align-items:stretch;justify-content:center;width:100%;overflow:visible}
.mm-sec-item{position:relative;flex:0 0 auto}
.mm-sec-a{display:flex;align-items:center;gap:6px;height:48px;padding:0 11px;font-size:13px;font-weight:800;color:rgba(255,255,255,.8);text-decoration:none;border-bottom:3px solid transparent;white-space:nowrap;transition:background .15s,color .15s,border-color .15s}
.mm-sec-a:hover{background:rgba(255,255,255,.07);color:#fff}
.mm-sec-item.is-on > .mm-sec-a{color:#fff;border-bottom-color:var(--gold)}
.mm-sec-ic{font-size:15px;line-height:1}
.mm-sec-cv{font-size:9px;opacity:.5;margin-top:2px}

.mm-sec-dd{position:absolute;top:100%;inset-inline-start:0;min-width:255px;background:#fff;border:1px solid var(--border);border-top:0;border-radius:0 0 12px 12px;box-shadow:0 18px 40px rgba(15,41,74,.16);padding:6px;opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .15s,transform .15s,visibility .15s;z-index:1001;max-height:70vh;overflow:auto}
.mm-sec-item.has-dd:hover > .mm-sec-dd,
.mm-sec-item.has-dd:focus-within > .mm-sec-dd,
.mm-sec-item.open > .mm-sec-dd{opacity:1;visibility:visible;transform:none}
.mm-sec-item:last-child .mm-sec-dd{inset-inline-start:auto;inset-inline-end:0}
.mm-sec-dd a,.mm-sec-ddi{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;text-decoration:none;color:var(--text);font-size:13px;font-weight:700;line-height:1.35}
.mm-sec-dd a:hover,.mm-sec-dd a.on{background:var(--light);color:var(--navy)}
.mm-sec-ddi-ic{width:26px;text-align:center;flex-shrink:0;font-size:15px}
.mm-sec-ddt{display:flex;flex-direction:column;min-width:0}
.mm-sec-ddt small{font-size:10.5px;color:var(--muted);font-weight:500;margin-top:1px}
.mm-sec-ddi.soon{opacity:.72;cursor:default}
.mm-sec-soon{margin-inline-start:auto;font-size:10px;font-weight:900;background:var(--gold-light);color:var(--gold-dark);border-radius:999px;padding:2px 8px;font-style:normal;white-space:nowrap}

@media (max-width:1099px){
  .mm-sec-nav > ul{justify-content:flex-start;overflow-x:auto;overflow-y:hidden;padding:0 6px;scrollbar-width:none}
  .mm-sec-nav > ul::-webkit-scrollbar{display:none}
  .mm-sec-dd{display:none!important}
  .mm-sec-cv{display:none}
}
@media (max-width:768px){
  .mm-secbar{display:none!important}
  body.mm-scrolled #masthead .site-header-inner{height:66px}
}

.mm-hsearch{flex:1 1 auto;max-width:520px;margin:0 auto;display:flex;align-items:center;height:38px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:10px;overflow:hidden;transition:border-color .15s,background .15s}
.mm-hsearch:focus-within{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.32)}
.mm-hsearch select{background:transparent;border:0;border-inline-end:1px solid rgba(255,255,255,.15);color:#fff;font-family:inherit;font-size:12px;font-weight:700;height:100%;padding:0 9px;outline:none;cursor:pointer;max-width:118px}
.mm-hsearch select option{color:#0F294A;background:#fff}
.mm-hsearch input{flex:1;min-width:0;background:transparent;border:0;outline:none;color:#fff;font-family:inherit;font-size:13px;padding:0 10px}
.mm-hsearch input::placeholder{color:rgba(255,255,255,.55)}
.mm-hsearch button{background:var(--gold);color:var(--navy-800);border:0;height:100%;width:44px;font-size:15px;cursor:pointer;flex-shrink:0;transition:filter .15s}
.mm-hsearch button:hover{filter:brightness(1.06)}
@media (max-width:1100px){.mm-hsearch{max-width:360px}}
@media (max-width:900px){.mm-hsearch{display:none}}

/* =============================================
   10.3.0 — هيرو الأقسام + تثبيت النافيجيشن
   ============================================= */
/* إصلاح: overflow:hidden على body كان بيمنع sticky */
body{overflow-x:hidden;overflow-x:clip}

.mm-hero{position:relative;overflow:hidden;background:linear-gradient(120deg,var(--ha,#0F294A),var(--hb,#16304F));color:#fff;padding:34px 0 30px;margin-bottom:20px}
.mm-hero::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px);background-size:52px 52px;-webkit-mask-image:radial-gradient(circle at 25% 20%,#000,transparent 78%);mask-image:radial-gradient(circle at 25% 20%,#000,transparent 78%);pointer-events:none}
.mm-hero::after{content:"";position:absolute;inset-inline-end:-90px;top:-110px;width:360px;height:360px;border-radius:50%;background:rgba(255,255,255,.07);pointer-events:none}
.mm-hero-art{position:absolute;inset-inline-end:5%;bottom:-26px;font-size:172px;line-height:1;opacity:.14;filter:grayscale(.15);transform:rotate(-6deg);pointer-events:none;user-select:none}
.mm-hero-inner{position:relative;z-index:1}
.mm-hero-chip{display:inline-block;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);color:#fff;font-size:11px;font-weight:900;border-radius:999px;padding:5px 13px;margin-bottom:12px;letter-spacing:.2px}
.mm-hero h1{font-size:clamp(23px,3.2vw,34px);font-weight:900;margin:0 0 8px;color:#fff;line-height:1.3}
.mm-hero p{font-size:14px;line-height:1.9;color:rgba(255,255,255,.78);margin:0;max-width:640px}
.mm-hero-meta{margin-top:12px;font-size:12px;color:rgba(255,255,255,.55);font-weight:700}
.mm-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.mm-hero-cta{display:inline-flex;align-items:center;gap:6px;background:#fff;color:var(--navy-800);border-radius:10px;padding:9px 18px;font-size:13px;font-weight:900;text-decoration:none;transition:.15s}
.mm-hero-cta:hover{background:var(--gold);color:var(--navy-800)}
.mm-hero-cta.ghost{background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.28)}
.mm-hero-cta.ghost:hover{background:rgba(255,255,255,.18)}
@media (max-width:768px){
  .mm-hero{padding:26px 0 22px}
  .mm-hero-art{font-size:120px;inset-inline-end:-10px;opacity:.10}
  .mm-hero p{font-size:13px}
}

/* منع تكرار العنوان/الهيرو القديم بعد إضافة الهيرو الجديد */
.svm-hero h1,.svm-hero p{display:none!important}
.svm-hero{padding-top:18px}
.ic-hero,.osv-hero{display:none!important}
.mm-old-hero{display:none!important}

/* =============================================
   10.3.1 — إزالة البانرات المكررة + شريط الخدمات
   ============================================= */
.ab-hero{display:none!important}
.ty-banner{display:none!important}
.svm-hero{background:#F8FAFD!important;color:var(--text)!important;border-bottom:1px solid var(--border);padding:12px 0!important}
.svm-hero .row{justify-content:flex-end}
.svm-hero .svm-reg{background:var(--navy);color:#fff!important;border-radius:10px;padding:10px 16px;font-weight:800;text-decoration:none}
.svm-hero form{max-width:780px;margin:10px auto 0}
.svm-hero input{background:#fff;color:var(--text);border:1px solid var(--border)}
.svm-hero button{background:var(--gold);color:var(--navy-800)}

/* breadcrumb داخل الهيرو */
.mm-hero-crumb{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:11.5px;color:rgba(255,255,255,.55);margin-bottom:10px}
.mm-hero-crumb a{color:rgba(255,255,255,.8);text-decoration:none;font-weight:700}
.mm-hero-crumb a:hover{color:#fff}
.mm-hero-crumb span{color:rgba(255,255,255,.55)}

/* =============================================
   10.3.3 — تصغير الهيرو والهيدر
   ============================================= */
/* الهيرو */
.mm-hero{padding:20px 0 18px;margin-bottom:14px}
.mm-hero-crumb{font-size:11px;margin-bottom:7px}
.mm-hero-chip{margin-bottom:8px;padding:4px 11px;font-size:10.5px}
.mm-hero h1{font-size:clamp(20px,2.6vw,27px);margin:0 0 5px}
.mm-hero p{font-size:13px;line-height:1.75;max-width:600px}
.mm-hero-meta{margin-top:7px;font-size:11.5px}
.mm-hero-actions{margin-top:12px}
.mm-hero-cta{padding:7px 15px;font-size:12.5px;border-radius:9px}
.mm-hero-art{font-size:120px;opacity:.10;bottom:-18px}
.mm-hero::after{width:260px;height:260px;top:-90px}

@media (max-width:768px){
  .mm-hero{padding:16px 0 14px}
  .mm-hero h1{font-size:20px}
  .mm-hero p{font-size:12.5px}
  .mm-hero-art{font-size:86px;bottom:-12px}
  .mm-hero-cta{padding:6px 13px;font-size:12px}
}

/* الهيدر وشريط الأقسام */
@media (min-width:769px){
  #masthead .site-header-inner{height:60px}
  body.mm-scrolled #masthead .site-header-inner{height:52px}
}
.mm-secbar{top:60px}
body.mm-scrolled .mm-secbar{top:52px}
.mm-sec-nav,.mm-sec-a{height:42px}
.mm-hsearch{height:34px}
.mm-hsearch button{width:40px}

/* =============================================
   10.5.0 — الصفحة الرئيسية الجديدة
   ============================================= */
.hp-hero{position:relative;overflow:hidden;background:linear-gradient(120deg,#0A1D36 0%,#0F294A 55%,#16304F 100%);color:#fff;padding:42px 0 36px}
.hp-hero::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:56px 56px;-webkit-mask-image:radial-gradient(circle at 20% 30%,#000,transparent 80%);mask-image:radial-gradient(circle at 20% 30%,#000,transparent 80%);pointer-events:none}
.hp-hero-art{position:absolute;inset-inline-start:-20px;bottom:-40px;font-size:220px;line-height:1;opacity:.05;pointer-events:none;user-select:none}
.hp-hero-in{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:30px;align-items:center}
.hp-eyebrow,.hp-kicker{display:inline-block;background:rgba(217,155,38,.16);color:var(--gold);border:1px solid rgba(217,155,38,.35);border-radius:999px;padding:5px 13px;font-size:11px;font-weight:900}
.hp-kicker.light{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.2)}
.hp-hero h1{font-size:clamp(27px,4vw,44px);font-weight:900;line-height:1.25;margin:14px 0 10px;color:#fff}
.hp-hero h1 em{color:var(--gold);font-style:normal}
.hp-hero p{font-size:14.5px;line-height:1.9;color:rgba(255,255,255,.75);max-width:560px;margin:0}
.hp-hero-stats{display:flex;gap:26px;flex-wrap:wrap;margin:18px 0}
.hp-hero-stats b{display:block;font-size:23px;font-weight:900;color:var(--gold);line-height:1.2}
.hp-hero-stats span{font-size:11.5px;color:rgba(255,255,255,.6)}
.hp-hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.hp-btn{display:inline-flex;align-items:center;gap:6px;border-radius:10px;padding:10px 20px;font-size:13px;font-weight:900;text-decoration:none;transition:.15s;border:0;cursor:pointer;font-family:inherit}
.hp-btn.gold{background:var(--gold);color:#0A1D36}
.hp-btn.gold:hover{filter:brightness(1.06)}
.hp-btn.navy{background:var(--navy);color:#fff}
.hp-btn.navy:hover{background:var(--navy-700)}
.hp-btn.white{background:#fff;color:var(--navy)}
.hp-btn.ghost{background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.3)}
.hp-btn.ghost:hover{background:rgba(255,255,255,.18)}
.hp-asst{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:18px}
.hp-asst b{display:block;margin-bottom:10px;font-size:14px}
.hp-asst form{display:flex;gap:6px}
.hp-asst input{flex:1;border:0;border-radius:9px;padding:10px 12px;font-family:inherit;font-size:13px}
.hp-asst button{background:var(--gold);border:0;border-radius:9px;padding:0 16px;font-weight:900;font-family:inherit;cursor:pointer;color:#0A1D36}
.hp-asst small{display:block;margin-top:8px;font-size:11px;color:rgba(255,255,255,.5)}

/* مميزات */
.hp-feats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:18px 0 0}
.hp-feat{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--border);border-radius:12px;padding:10px 12px}
.hp-feat-ic{width:34px;height:34px;border-radius:9px;background:#FBEEF1;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.hp-feat b{display:block;font-size:12.5px;color:var(--text);font-weight:900}
.hp-feat small{display:block;font-size:10.5px;color:var(--muted);line-height:1.5}

/* أقسام عامة */
.hp-sec{padding:44px 0}
.hp-panel{background:var(--light);padding:44px 0}
.hp-sec-head{max-width:760px;margin-bottom:22px}
.hp-sec-head.center{text-align:center;margin-inline:auto}
.hp-sec-head h2{font-size:clamp(22px,3vw,30px);font-weight:900;color:var(--text);margin:10px 0 8px;line-height:1.4}
.hp-sec-head p{font-size:13.5px;color:var(--muted);line-height:1.9;margin:0}
.hp-center{text-align:center;margin-top:22px}
.hp-grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.hp-grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.hp-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:18px;color:var(--text)}
.hp-card.soft{background:#F8FAFD}
.hp-card.big{display:block;text-decoration:none;transition:.18s}
.hp-card.big:hover,.hp-card.link:hover{border-color:var(--gold);transform:translateY(-2px)}
.hp-card.link{display:block;text-decoration:none;transition:.18s}
.hp-card-ic{display:inline-flex;width:42px;height:42px;border-radius:11px;background:var(--gold-light);align-items:center;justify-content:center;font-size:20px;margin-bottom:10px}
.hp-card b{display:block;font-size:15px;font-weight:900;margin-bottom:5px}
.hp-card p{font-size:12.5px;color:var(--muted);line-height:1.8;margin:0 0 8px}
.hp-link{display:inline-block;font-size:12px;font-weight:900;color:var(--navy)}
.hp-chip{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--border);border-radius:999px;padding:8px 15px;font-size:12.5px;font-weight:800;color:var(--text);text-decoration:none}
.hp-chip small{color:var(--muted);font-weight:600}
.hp-chips{display:flex;flex-wrap:wrap;gap:8px}

/* البطاقات الملونة */
.hp-tiles{display:grid;grid-template-columns:repeat(8,1fr);gap:10px}
.hp-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:4px;border-radius:14px;padding:18px 8px;min-height:112px;text-decoration:none;color:#fff;background:linear-gradient(150deg,var(--a,#0F294A),var(--b,#1D4E7A));overflow:hidden}
.hp-tile::after{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:26px 26px;-webkit-mask-image:radial-gradient(circle at 30% 20%,#000,transparent 80%);mask-image:radial-gradient(circle at 30% 20%,#000,transparent 80%)}
.hp-tile-ic{position:relative;z-index:1;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.92);color:#0F294A;display:flex;align-items:center;justify-content:center;font-size:17px;margin-bottom:2px}
.hp-tile strong{position:relative;z-index:1;font-size:11.5px;font-weight:900;line-height:1.4}
.hp-tile small{position:relative;z-index:1;font-size:10px;color:rgba(255,255,255,.8)}
.hp-tile:hover{transform:translateY(-2px)}

/* RFQ */
.hp-rfq{background:linear-gradient(120deg,#0A1D36,#3A1450 60%,#5B1E3E);color:#fff;padding:34px 0}
.hp-rfq-in{display:grid;grid-template-columns:1.15fr .85fr;gap:26px;align-items:center}
.hp-rfq h2{font-size:clamp(22px,3vw,32px);font-weight:900;margin:10px 0 8px;color:#fff}
.hp-rfq h2 em{color:var(--gold);font-style:normal}
.hp-rfq p{font-size:13.5px;color:rgba(255,255,255,.72);line-height:1.9;margin:0;max-width:560px}
.hp-rfq-side{text-align:center}
.hp-rfq-stats{display:flex;justify-content:center;gap:24px;margin-top:16px;flex-wrap:wrap}
.hp-rfq-stats b{display:block;font-size:17px;color:var(--gold)}
.hp-rfq-stats span{font-size:10.5px;color:rgba(255,255,255,.6)}

/* سوق المال */
.hp-market{background:linear-gradient(135deg,#0A1D36,#0F294A 60%,#153B32);color:#fff;padding:44px 0}
.hp-market-in{display:grid;grid-template-columns:1.05fr .95fr;gap:28px;align-items:center}
.hp-market h2{font-size:clamp(22px,3vw,31px);font-weight:900;margin:10px 0 8px;color:#fff}
.hp-market p{font-size:13.5px;color:rgba(255,255,255,.72);line-height:1.9;margin:0 0 14px;max-width:560px}
.hp-market-stats{display:flex;gap:22px;flex-wrap:wrap;margin-bottom:16px}
.hp-market-stats b{display:block;font-size:20px;color:var(--gold)}
.hp-market-stats span{font-size:10.5px;color:rgba(255,255,255,.6)}
.hp-market-feats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.hp-mf{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:11px;padding:10px;text-align:center}
.hp-mf span{display:block;font-size:17px}
.hp-mf b{display:block;font-size:11px;margin-top:4px}
.hp-mf small{display:block;font-size:9.5px;color:rgba(255,255,255,.5)}

/* خريطة الصادرات */
.hp-export{background:linear-gradient(120deg,#0F294A,#1B6470);color:#fff;padding:38px 0}
.hp-export-in{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:center}
.hp-export h2{font-size:clamp(22px,3vw,30px);font-weight:900;margin:10px 0 8px;color:#fff}
.hp-export p{font-size:13.5px;color:rgba(255,255,255,.72);line-height:1.9;margin:0 0 14px;max-width:560px}
.hp-export-art{font-size:150px;text-align:center;opacity:.9;filter:drop-shadow(0 12px 30px rgba(0,0,0,.3))}

/* النشرة */
.hp-newsletter{background:#fff;border-top:1px solid var(--border);padding:30px 0}
.hp-nl-in{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.hp-newsletter h2{font-size:21px;font-weight:900;margin:0 0 4px;color:var(--text)}
.hp-newsletter p{font-size:12.5px;color:var(--muted);margin:0}
.hp-nl-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.hp-nl-form input{border:1px solid var(--border);border-radius:10px;padding:11px 14px;font-family:inherit;font-size:13px;min-width:240px}
.hp-nl-form button{background:var(--navy);color:#fff;border:0;border-radius:10px;padding:11px 20px;font-weight:900;font-family:inherit;cursor:pointer}
#hp-nl-msg{font-size:12px;font-weight:700}

/* ريسبونسيف */
@media (max-width:1100px){
  .hp-feats{grid-template-columns:repeat(4,1fr)}
  .hp-tiles{grid-template-columns:repeat(4,1fr)}
}
@media (max-width:900px){
  .hp-hero-in,.hp-rfq-in,.hp-market-in,.hp-export-in{grid-template-columns:1fr}
  .hp-hero-side{order:2}
  .hp-grid3{grid-template-columns:1fr 1fr}
  .hp-feats{grid-template-columns:repeat(2,1fr)}
  .hp-export-art{font-size:110px}
}
@media (max-width:640px){
  .hp-hero{padding:28px 0 24px}
  .hp-hero h1{font-size:26px}
  .hp-hero-stats{gap:16px}
  .hp-hero-stats b{font-size:19px}
  .hp-grid2,.hp-grid3{grid-template-columns:1fr}
  .hp-tiles{grid-template-columns:repeat(2,1fr)}
  .hp-feats{grid-template-columns:1fr}
  .hp-market-feats{grid-template-columns:repeat(2,1fr)}
  .hp-nl-form input{min-width:0;width:100%}
  .hp-nl-form{width:100%}
}

/* =============================================
   10.6.0 — خدمات المصانع + صفحة القطاعات
   ============================================= */
.hp-svc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.hp-svc{display:flex;gap:12px;background:#fff;border:1px solid var(--border);border-radius:14px;padding:16px;transition:.15s}
.hp-svc:hover{border-color:var(--gold);transform:translateY(-2px)}
.hp-svc-ic{width:44px;height:44px;border-radius:12px;background:var(--gold-light);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.hp-svc b{display:block;font-size:14px;font-weight:900;color:var(--text);margin-bottom:3px}
.hp-svc p{font-size:12px;color:var(--muted);line-height:1.7;margin:0}

.mm-sectors-page{padding:28px 0 54px}
.mm-sp-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.mm-sp-card{display:block;background:#fff;border:1px solid var(--border);border-radius:14px;overflow:hidden;text-decoration:none;transition:.18s;box-shadow:var(--shadow)}
.mm-sp-card:hover{transform:translateY(-3px);border-color:var(--gold)}
.mm-sp-img{display:block;height:150px;background:linear-gradient(135deg,#0F294A,#16304F);overflow:hidden}
.mm-sp-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s}
.mm-sp-card:hover .mm-sp-img img{transform:scale(1.05)}
.mm-sp-emoji{display:flex;height:100%;align-items:center;justify-content:center;font-size:46px}
.mm-sp-body{display:block;padding:12px 14px}
.mm-sp-body b{display:block;font-size:14px;font-weight:900;color:var(--text);line-height:1.4}
.mm-sp-body small{display:block;font-size:11px;color:var(--muted);margin-top:2px}

@media (max-width:1100px){ .mm-sp-grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width:900px){
  .hp-svc-grid{grid-template-columns:1fr 1fr}
  .mm-sp-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:600px){
  .hp-svc-grid,.mm-sp-grid{grid-template-columns:1fr}
}

/* 10.6.2 — دمج المميزات + إخفاء المساعد على الموبايل */
.hp-feats-block{margin-top:24px}
@media (max-width:900px){ .hp-hero-side{display:none!important} }
@media (max-width:768px){ #mm-ai-fab{display:none!important} }

/* 10.6.3 — توحيد بطاقات المميزات */
.hp-feats{gap:12px;margin-top:8px}
.hp-feat{min-height:92px;align-items:flex-start;padding:14px;border-radius:14px}
.hp-feat-ic{width:40px;height:40px;border-radius:11px;font-size:19px}
.hp-feat b{font-size:13px;margin-bottom:2px;line-height:1.4}
.hp-feat small{font-size:11px;line-height:1.6}

/* 10.6.4 — تنسيق قسم الشركات */
.hp-comp-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.hp-comp{background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px 18px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow)}
.hp-comp-head{display:flex;align-items:center;gap:12px}
.hp-comp-ic{width:48px;height:48px;border-radius:12px;background:var(--gold-light);display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.hp-comp-head b{display:block;font-size:15.5px;font-weight:900;color:var(--text)}
.hp-comp-head small{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.hp-comp-head .hp-btn{margin-inline-start:auto;flex-shrink:0}
.hp-btn-sm{padding:7px 14px;font-size:12px;border-radius:9px}
.hp-comp-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.hp-comp-list li{display:flex;align-items:center;gap:9px;background:#F8FAFD;border:1px solid #eef2f7;border-radius:10px;padding:8px 10px}
.hp-clogo{width:32px;height:32px;border-radius:8px;object-fit:contain;background:#fff;flex-shrink:0;padding:3px}
.hp-clogo-ph{display:flex;align-items:center;justify-content:center;font-size:16px}
.hp-cname{flex:1;min-width:0;font-size:12.5px;font-weight:800;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hp-ccity{font-size:10.5px;color:var(--muted);white-space:nowrap}
.hp-comp-empty{font-size:12px;color:var(--muted);margin:0}
@media (max-width:900px){ .hp-comp-grid{grid-template-columns:1fr} }

/* 10.6.5 — المميزات 2×2 على الموبايل */
@media (max-width:640px){
  .hp-feats{grid-template-columns:repeat(2,1fr);gap:8px}
  .hp-feat{padding:10px;min-height:104px;gap:8px;border-radius:12px}
  .hp-feat-ic{width:34px;height:34px;font-size:16px;border-radius:9px}
  .hp-feat b{font-size:11.5px;line-height:1.35}
  .hp-feat small{font-size:9.5px;line-height:1.5}
}
@media (max-width:380px){
  .hp-feat{padding:8px;min-height:98px}
  .hp-feat b{font-size:11px}
  .hp-feat small{font-size:9px}
}

/* 10.6.6 — قطاعات بصور زي المنتجات + إصلاح عرض الموبايل */
.hp-sec.container{padding-left:20px;padding-right:20px}
.hp-tile.has-img{background:#0F294A}
.hp-tile-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.62;z-index:0}
.hp-tile.has-img::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,29,54,.10),rgba(10,29,54,.78));z-index:1}
.hp-tile.has-img::after{opacity:.22}
.hp-tile-ic,.hp-tile strong,.hp-tile small{position:relative;z-index:2}

@media (max-width:768px){
  html,body{max-width:100%;overflow-x:hidden}
  .hp-sec, .hp-sec.container, .hp-panel .container{padding-left:16px;padding-right:16px}
  .hp-sec-head h2{font-size:21px;line-height:1.55;overflow-wrap:anywhere}
  .hp-sec-head p{overflow-wrap:anywhere}
  .hp-hero h1{font-size:23px;line-height:1.45;overflow-wrap:anywhere}
  .hp-tile strong,.hp-tile small{overflow-wrap:anywhere}
  .hp-comp-list li{flex-wrap:wrap}
  .hp-cname{white-space:normal;overflow:visible}
  .hp-ccity{white-space:normal}
}

/* =============================================
   10.6.7 — كل عناوين الأقسام في الوسط + بطاقات الخدمات بصور
   ============================================= */
.hp-sec-head,.hp-sec-head.center{text-align:center;margin-inline:auto}
.hp-hero-main,.hp-rfq-in>div:first-child,.hp-market-in>div:first-child,.hp-export-in>div:first-child{text-align:center}
.hp-hero-stats,.hp-hero-cta,.hp-market-stats{justify-content:center}
.hp-rfq-side{display:flex;flex-direction:column;align-items:center}

@media (max-width:768px){
  .hp-sec-head,.hp-rfq-in>div:first-child,.hp-market-in>div:first-child,.hp-export-in>div:first-child{text-align:center}
  .hp-tile{min-height:104px;padding:14px 6px}
  .hp-tile strong{font-size:11px}
}

/* =============================================
   10.6.8 — تنسيق المناقصات والمزادات + حالات فاضية
   ============================================= */
.hp-feed{align-items:stretch}
.hp-feed-card{display:flex;flex-direction:column;gap:9px;background:#fff;border:1px solid var(--border);border-radius:16px;padding:15px 17px;box-shadow:var(--shadow);text-decoration:none;color:inherit;transition:transform .18s,border-color .18s,box-shadow .18s;min-width:0}
.hp-feed-card:hover{transform:translateY(-2px);border-color:#c9d6e6;box-shadow:0 10px 26px rgba(15,41,74,.09)}
.hp-feed-img{display:block;margin:-15px -17px 4px;border-radius:15px 15px 0 0;overflow:hidden;height:128px;background:#EEF2F7}
.hp-feed-img img{width:100%;height:100%;object-fit:cover;display:block}
.hp-feed-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hp-tag{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:800;border-radius:999px;padding:3px 9px;background:#EEF2F7;color:#41556e;line-height:1.5}
.hp-tag.navy{background:#0F294A;color:#fff}
.hp-tag.gold{background:#FFF4DC;color:#8A5A0B}
.hp-tag.green{background:#E7F6EC;color:#1A7A3F}
.hp-tag.red{background:#FDECEA;color:#B42318}
.hp-tag.live{background:#B42318;color:#fff}
.hp-feed-title{font-size:14px;font-weight:900;line-height:1.65;margin:0;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:46px}
.hp-feed-meta{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:5px;font-size:11.5px;color:var(--muted)}
.hp-feed-meta li{display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hp-feed-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px dashed var(--border);padding-top:9px;margin-top:auto;font-size:11.5px;color:var(--muted);font-weight:700}
.hp-feed-price{font-weight:900;color:var(--navy);font-size:13px}
.hp-empty{background:#fff;border:1px dashed #c9d6e6;border-radius:16px;padding:26px 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;max-width:640px;margin-inline:auto}
.hp-empty-ic{width:56px;height:56px;border-radius:50%;background:#FFF4DC;display:flex;align-items:center;justify-content:center;font-size:26px;margin-bottom:2px}
.hp-empty b{font-size:15px;color:var(--text)}
.hp-empty p{margin:0;font-size:12px;color:var(--muted);line-height:1.9;max-width:520px}
.hp-empty-cta{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:6px}
.hp-btn.line{background:#fff;color:var(--navy);border:1px solid var(--border)}
.hp-btn.line:hover{border-color:var(--navy);background:#F8FAFD}

@media (max-width:640px){
  .hp-feed-title{font-size:13px;min-height:0}
  .hp-feed-card{padding:13px 14px}
  .hp-feed-img{margin:-13px -14px 4px;height:146px}
  .hp-empty{padding:22px 14px}
}

/* =============================================
   10.6.9 — المجتمع (آخر 5 منشورات + آخر 5 أخبار) + ويدجت خريطة الصادرات
   ============================================= */
.hp-comm-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.hp-comm-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:14px 16px 6px;box-shadow:var(--shadow);display:flex;flex-direction:column;min-width:0}
.hp-comm-head{display:flex;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid #eef2f7;margin-bottom:4px}
.hp-comm-ic{width:40px;height:40px;border-radius:11px;background:var(--gold-light);display:flex;align-items:center;justify-content:center;font-size:19px;flex-shrink:0}
.hp-comm-ic.news{background:#E8F2FE}
.hp-comm-head b{display:block;font-size:14.5px;font-weight:900;color:var(--text)}
.hp-comm-head small{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.hp-comm-all{margin-inline-start:auto;font-size:11.5px;font-weight:800;color:var(--navy);text-decoration:none;white-space:nowrap}
.hp-comm-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.hp-comm-item>a{display:flex;align-items:flex-start;gap:9px;padding:9px 0;border-bottom:1px dashed #eef2f7;text-decoration:none;color:inherit;min-width:0}
.hp-comm-item:last-child>a{border-bottom:0}
.hp-comm-item>a:hover .hp-comm-txt b{color:var(--navy)}
.hp-comm-av{width:36px;height:36px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#EEF2F7}
.hp-comm-av-ph{display:flex;align-items:center;justify-content:center;font-size:15px}
.hp-comm-thumb{border-radius:9px}
.hp-comm-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hp-comm-txt b{font-size:12.5px;font-weight:900;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hp-comm-txt span{font-size:11.5px;color:var(--muted);line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hp-comm-title{white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.6}
.hp-comm-date{font-size:10.5px!important;color:#98a2b3!important}
.hp-comm-meta{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:3px;font-size:10px;color:#98a2b3}
.hp-comm-meta i{font-style:normal;white-space:nowrap}
.hp-comm-meta em{font-style:normal;white-space:nowrap;color:var(--muted)}
.hp-comm-empty{font-size:12px;color:var(--muted);padding:16px 0;margin:0}
.hp-comm-cta{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:20px}

/* ويدجت خريطة الصادرات */
.hp-xmap-sec{background:linear-gradient(120deg,#0F294A,#1B6470);color:#fff;padding:44px 0 40px}
.hp-xmap-head h2{color:#fff}
.hp-xmap-head p{color:rgba(255,255,255,.78)}
.hp-xmap-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
.hp-xs{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:12px;padding:11px 12px;text-align:center;min-width:0}
.hp-xs b{display:block;font-size:15px;font-weight:900;color:var(--gold);line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hp-xs span{display:block;font-size:10.5px;color:rgba(255,255,255,.7);margin-top:2px}
.hp-xmap-grid{display:grid;grid-template-columns:1.55fr 1fr;gap:14px;align-items:start}
.hp-xmap-map{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:12px;min-width:0}
.hp-xmap-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.hp-xmap-lbl{font-size:11px;color:rgba(255,255,255,.72);font-weight:800}
.hp-xmap-years{display:flex;gap:5px;flex-wrap:wrap}
.hp-xyear{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);color:#fff;border-radius:999px;padding:4px 10px;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.hp-xyear:hover{background:rgba(255,255,255,.18)}
.hp-xyear.on{background:var(--gold);border-color:var(--gold);color:#0A1D36}
.hp-xmap-box{position:relative;width:100%;min-height:230px;border-radius:12px;overflow:hidden}
#hp-xmap-svg{display:block;width:100%;height:auto}
.hp-xmap-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:rgba(255,255,255,.78);padding:10px;text-align:center}
.hp-xmap-tip{position:absolute;display:none;background:#0A1D36;color:#fff;font-size:11px;font-weight:700;padding:5px 9px;border-radius:8px;pointer-events:none;white-space:nowrap;z-index:5;box-shadow:0 6px 18px rgba(0,0,0,.3)}
.hp-xc{fill:#1C4F68;stroke:rgba(255,255,255,.18);stroke-width:.4;cursor:pointer;transition:fill .2s}
.hp-xc-has{fill:#3B82F6}
.hp-xc-top{fill:#FBBF24}
.hp-xc:hover{fill:#fff}
.hp-xmap-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:rgba(255,255,255,.72);margin-top:8px}
.hp-xmap-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;vertical-align:-1px;margin-inline-end:4px}
.lg-none{background:#1C4F68}
.lg-has{background:#3B82F6}
.lg-top{background:#FBBF24}
.hp-xmap-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.hp-xlist{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:10px 12px;min-width:0}
.hp-xlist-h{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:900;color:#fff;margin-bottom:6px}
.hp-xlist-h a{font-size:10.5px;color:var(--gold);text-decoration:none;font-weight:800}
.hp-xrow{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px dashed rgba(255,255,255,.1);min-width:0}
.hp-xrow:last-child{border-bottom:0}
.hp-xrow-flag{font-size:15px;width:20px;text-align:center;flex-shrink:0}
.hp-xrow-rank{width:20px;text-align:center;font-size:11px;font-weight:900;color:var(--gold);flex-shrink:0}
.hp-xrow-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hp-xrow-main b{font-size:11.5px;font-weight:800;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hp-xrow-main i{display:block;height:3px;background:rgba(255,255,255,.14);border-radius:3px;overflow:hidden}
.hp-xrow-main i u{display:block;height:100%;background:var(--gold);border-radius:3px;text-decoration:none}
.hp-xrow-main small{font-size:9px;color:rgba(255,255,255,.5);font-family:monospace}
.hp-xrow-val{font-size:10.5px;font-weight:900;color:#fff;white-space:nowrap;flex-shrink:0}
.hp-xmap-empty{font-size:11px;color:rgba(255,255,255,.62);padding:8px 0}
.hp-xyearly{margin-top:16px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:12px 14px}
.hp-xyearly-h{font-size:12.5px;font-weight:900;color:#fff;margin-bottom:8px}
.hp-xline{display:flex;align-items:center;gap:10px;padding:3px 0;min-width:0}
.hp-xline-year{width:44px;font-size:11px;font-weight:800;color:rgba(255,255,255,.82);flex-shrink:0}
.hp-xline-track{flex:1;height:8px;background:rgba(255,255,255,.12);border-radius:6px;overflow:hidden}
.hp-xline-track u{display:block;height:100%;background:linear-gradient(90deg,var(--gold),#F7D47A);border-radius:6px;text-decoration:none}
.hp-xline-val{width:96px;text-align:end;font-size:10.5px;font-weight:800;color:#fff;flex-shrink:0}

/* إزالة الفاصل الأبيض بين خريطة الصادرات واشتراك النشرة */
body.home footer.mmf,body.home .mmf{margin-top:0}

@media (max-width:1024px){
  .hp-xmap-grid{grid-template-columns:1fr}
  .hp-xmap-stats{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .hp-comm-grid{grid-template-columns:1fr}
}
@media (max-width:640px){
  .hp-xs b{font-size:13px}
  .hp-xline-val{width:78px;font-size:9.5px}
  .hp-xline-year{width:38px}
  .hp-comm-head b{font-size:13.5px}
  .hp-comm-meta{display:none}
}

/* =============================================
   10.7.0 — إعلانات الصفحة الرئيسية (توزيع جديد) + أماكن الصفحات الجديدة
   ============================================= */
.hp-ads-band{padding:2px 0}
.hp-ads-band .mm-ad-wrap{margin-top:22px;margin-bottom:22px}
@media (max-width:640px){
  .hp-ads-band .mm-ad-wrap{margin-top:16px;margin-bottom:16px}
}

/* =============================================
   10.8.0 — الاشتراكات: كشف الأرقام + بطاقات
   ============================================= */
.mm-sub-reveal{border:1px solid var(--navy);background:#fff;color:var(--navy);border-radius:8px;padding:4px 9px;font:inherit;font-size:11.5px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-block;margin-inline-start:6px}
.mm-sub-reveal:hover{background:var(--navy);color:#fff}
.mm-sub-reveal[disabled]{opacity:.5;cursor:default}
#mm-sub-user .sub-pill{display:inline-block;font-size:11px;font-weight:800;border-radius:20px;padding:2px 10px;background:#eef2f7;color:#41556e}
#mm-sub-user .sub-pill.active{background:#eaf7ee;color:#1a7a3f}
#mm-sub-user .sub-pill.pending{background:#fff7e0;color:#7a5200}
#mm-sub-user .sub-pill.expired{background:#fdecea;color:#b42318}
#mm-sub-user .sub-btn{border:1px solid var(--border);background:#fff;color:var(--navy);border-radius:8px;padding:7px 12px;font:inherit;font-size:12px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;gap:5px}
#mm-sub-user .sub-btn.p{background:var(--red);border-color:var(--red);color:#fff}

/* =============================================
   10.8.3 — ضبط لوحة التحكم والبروفايل على الموبايل
   ============================================= */
@media (max-width: 768px) {
  .dashboard-wrap { padding-bottom: 96px; gap: 14px; }
  .dash-user-info {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 2px 10px !important;
    padding: 12px 14px !important;
    text-align: start !important;
  }
  .dash-user-info > div[style*="position:relative"] {
    grid-row: 1 / 3;
    width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
  }
  #dash-avatar-img {
    width: 46px !important;
    height: 46px !important;
    font-size: 20px !important;
    border-width: 2px !important;
  }
  .dash-user-info label[title] {
    width: 18px !important;
    height: 18px !important;
    font-size: 9px !important;
  }
  .dash-user-name { align-self: end; font-size: 13px !important; line-height: 1.4; }
  .dash-user-role { align-self: start; font-size: 11px !important; }
  .dash-sidebar > div:not(.dash-user-info) {
    padding: 0 !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .dash-nav-item {
    min-width: 84px !important;
    padding: 9px 8px !important;
    gap: 3px !important;
    scroll-snap-align: start;
  }
  .dash-nav-item .icon { font-size: 19px !important; }
  .dash-nav-item > span:last-child { line-height: 1.35; }
  .dash-content { padding: 12px !important; gap: 12px !important; }
  .dash-content .card, .dash-panels .card { border-radius: 12px; }
  .dash-content .card-body, .dash-panels .card-body { padding: 12px !important; }
  .dash-content .card-header, .dash-panels .card-header { padding: 12px 14px !important; }
  .dash-content .card-header h2, .dash-panels .card-header h2 { font-size: 15px !important; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .dash-stat-card { padding: 12px !important; min-width: 0; gap: 10px !important; }
  .dash-stat-icon { width: 38px !important; height: 38px !important; font-size: 18px !important; }
  .dash-stat-num { font-size: 17px !important; overflow-wrap: anywhere; }
  .dash-stat-lbl { font-size: 10.5px !important; line-height: 1.4; }
  .dash-content table, .dash-panels table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .dash-panels [style*="grid-template-columns:1fr 1fr"],
  .dash-panels [style*="grid-template-columns: 1fr 1fr"],
  .dash-panels [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  .dash-panels input, .dash-panels select, .dash-panels textarea {
    max-width: 100%;
    font-size: 16px;
  }
  .dash-panels .card-body [style*="display:flex"] { flex-wrap: wrap; }
  #panel-my-profile .dash-stats,
  #panel-my-factory .dash-stats { grid-template-columns: 1fr 1fr !important; }
  #panel-my-profile img, #panel-my-factory img { max-width: 100%; height: auto; }
  .dash-content, .dash-panels { min-width: 0; }
  .dash-content * { min-width: 0; }
  .dash-content h1, .dash-content h2, .dash-content h3 { overflow-wrap: anywhere; }
}

/* =============================================
   10.8.4 — وضوح ألوان ونصوص لوحة التحكم على الموبايل
   ============================================= */
@media (max-width: 768px) {
  /* الشريط الجانبي: التابات على خلفية بيضاء والنصوص واضحة */
  .dashboard-wrap > .dash-sidebar,
  .dash-sidebar {
    background: #fff !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .dash-user-info {
    background: linear-gradient(135deg, var(--dark), var(--mid)) !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
  }
  .dash-user-role { color: rgba(255,255,255,.85) !important; }
  .dash-sidebar > div:not(.dash-user-info) {
    background: #fff !important;
    border-top: 1px solid var(--border) !important;
  }
  .dash-nav-item {
    color: #0F294A !important;
    font-weight: 800 !important;
  }
  .dash-nav-item.active {
    background: #0F294A !important;
    color: #fff !important;
    border-bottom: 3px solid var(--gold) !important;
  }
  .dash-nav-item.active .icon { filter: none; }

  /* وضوح نصوص الكروت والإحصائيات */
  .dash-content [style*="color:var(--muted)"],
  .dash-content .dash-stat-lbl { color: #475569 !important; }
  .dash-content [style*="font-size:11px"] { line-height: 1.5; }
}
