/* =============================================
   وسيط - Premium Real Estate Platform CSS
   Dark Theme | Glassmorphism | RTL Arabic
   ============================================= */

/* === CSS VARIABLES === */
:root {
  /* Modern Luxury Light Theme (الوضع النهاري - افتراضي) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(0, 0, 0, 0.03);
  --bg-glass-hover: rgba(0, 0, 0, 0.06);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-hover: rgba(0, 0, 0, 0.16);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b; /* كان #94a3b8 (تباين 2.6 على الأبيض) */
  --accent-gold: #b8860b;
  --primary-color: #d4a853; /* ذهبي شريحة الإعلانات المميزة (كان المتغير غير معرّف فتختفي الشارة والنقطة النشطة) */
  --accent-gold-light: #d4a853;
  --accent-gold-dark: #8c6508;
  --accent-blue: #2563eb;
  --accent-blue-light: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --gradient-gold: linear-gradient(135deg, #b8860b, #d4a853, #b8860b);
  --gradient-blue: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-hero: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 4px 20px rgba(184, 134, 11, 0.2);
  --shadow-glow-strong: 0 4px 30px rgba(184, 134, 11, 0.35);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
}

/* Dark Theme Variables (الوضع الليلي عند التبديل) */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(15, 15, 15, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.09);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glass-hover: rgba(255, 255, 255, 0.2);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-gold: #d4a853;
  --accent-gold-light: #e8c97a;
  --accent-gold-dark: #b8922e;
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --gradient-gold: linear-gradient(135deg, #d4a853, #f0d78c, #d4a853);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-hero: linear-gradient(135deg, #000000 0%, #151515 50%, #000000 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(212,168,83,0.3);
  --shadow-glow-strong: 0 0 40px rgba(212,168,83,0.5);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.1);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
  }
  .mobile-filter-toggle:hover {
    background: var(--bg-glass-hover);
  }
body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
::selection { background: rgba(212,168,83,0.3); color: var(--accent-gold-light); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-gold-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
/* نص للقارئ والزاحف فقط (بدون إخفاء بـdisplay:none) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button { font-family: 'Cairo', sans-serif; }
input, select, textarea { font-family: 'Cairo', sans-serif; }

/* === HEADER === */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.header.scrolled {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border-glass);
  box-shadow: var(--shadow-md);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.nav-right-group {
  display: flex;
  align-items: center;
  gap: 25px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 5px; 
  transition: var(--transition);
  background: #000000;
  padding: 3px;
  border: 1px solid rgba(212, 168, 83, 0.5); /* إطار ذهبي رقيق يفصله عن الخلفية */
  box-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 0 10px rgba(212,168,83,0.15); /* ظل ذهبي خفيف للبروز */
}
.logo:hover .logo-img {
  transform: scale(1.04);
}
.search-wrapper {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-xl);
  padding: 10px 18px;
  transition: var(--transition);
}
.search-wrapper:focus-within {
  border-color: var(--accent-gold-light);
  box-shadow: var(--shadow-glow);
  background: var(--bg-glass-hover);
}
.search-wrapper svg { color: var(--accent-gold); flex-shrink: 0; }
.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--accent-gold-light);
  width: 100%;
  font-size: 0.95rem;
}
.search-input::placeholder { color: rgba(212, 168, 83, 0.6); }
.main-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.main-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.main-menu-btn:hover span { background: var(--accent-gold); }

/* === SIDE MENU === */
.side-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.side-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}
.side-menu {
  position: fixed;
  top: 0; right: -300px; /* Hidden initially (RTL) */
  width: 300px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -5px 0 25px rgba(0,0,0,0.5);
  z-index: 1100;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s, visibility 0.4s;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
}
.side-menu.open {
  right: 0;
  visibility: visible;
  opacity: 1;
}
.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-glass);
}
.side-menu-logo {
  height: 40px;
  border-radius: 6px;
}
.side-menu-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  transition: var(--transition);
}
.side-menu-close:hover {
  color: var(--accent-gold);
}
.side-menu-links {
  list-style: none;
  padding: 24px 0;
  margin: 0;
  flex: 1;
}
.side-menu-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}
.side-menu-links li a svg {
  color: var(--accent-gold);
}
.side-menu-links li a:hover {
  background: var(--bg-glass-hover);
  padding-right: 32px; /* slight indent */
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-gold);
  color: var(--bg-primary);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
}
.btn-outline:hover { background: rgba(212,168,83,0.1); }
.btn-glow { box-shadow: var(--shadow-glow); }
.btn-glow:hover { box-shadow: var(--shadow-glow-strong); }
.btn-full { width: 100%; }
.btn-link {
  background: none;
  border: none;
  color: var(--accent-gold);
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  transition: var(--transition);
}
.btn-link:hover { text-decoration: underline; opacity: 0.8; }
.btn-icon { font-size: 1.2rem; }

/* === SPA VIEWS === */
.home-view {
  display: block;
}
.app-view {
  display: none;
  background: var(--bg-primary); /* يتبع الثيم (كان #090d14 ثابتاً فيبقى القسم داكناً بالوضع النهاري) */
  min-height: 100vh;
}
body[data-view="categories"] .home-view,
body[data-view="listings"] .home-view {
  display: none;
}
body[data-view="categories"] .app-view,
body[data-view="listings"] .app-view {
  display: block;
  /* بدون forwards: الأنيميشن الباقي بنهايته يُبقي هذا العنصر سياق تكديس، فيحبس درج الفلاتر (fixed) تحت طبقة .filters-overlay على الموبايل */
  animation: fadeIn 0.4s ease;
  padding-top: 72px;
}
body[data-view="categories"] .main-section { display: none; }
body[data-view="listings"] .categories-section { display: none; }

body[data-view="categories"] .header,
body[data-view="listings"] .header {
  position: fixed;
  background: rgba(255, 255, 255, 0.95); /* يتبع الثيم: كان داكناً دائماً فتختفي أيقونة القائمة الداكنة بالوضع النهاري */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] body[data-view="categories"] .header,
[data-theme="dark"] body[data-view="listings"] .header {
  background: rgba(10, 14, 21, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

body[data-view="listings"] .header .logo,
body.requests-active .header .logo {
  display: none;
}

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

/* === HERO === */
.hero {
  min-height: 100vh;
  padding: 0 0 80px; /* Adjust padding to center better visually with header */
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 100%), url('../city_bg.webp') center/cover no-repeat;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
/* قائمة اقتراحات البحث تنزل أسفل الواجهة — نقصّ الأشكال الزخرفية أفقياً فقط حتى لا تُقصّ القائمة (المتصفحات القديمة تبقى على hidden) */
@supports (overflow-x: clip) {
  .hero { overflow-x: clip; overflow-y: visible; z-index: 11; } /* فوق #quickActionsSection (z-index:10) */
}
.shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.shape-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(212,168,83,0.15), transparent 70%);
  top: 10%; right: -5%;
  animation: float 7s ease-in-out infinite;
}
.shape-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  bottom: 5%; left: 5%;
  animation: float 9s ease-in-out infinite reverse;
}
.shape-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(240,215,140,0.1), transparent 70%);
  top: 50%; left: 40%;
  animation: float 11s ease-in-out infinite;
}
.hero-content { text-align: center; position: relative; z-index: 2; }
.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}
.text-gradient {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.8;
}
.hero-search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}
.browse-btn {
  padding: 14px 32px;
  font-size: 1.2rem;
  border-radius: 50px;
}
.hero-search.search-wrapper {
  max-width: 650px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid var(--accent-gold);
}
.hero-search .search-input {
  font-size: 1.1rem;
}
.hero-search svg {
  width: 24px;
  height: 24px;
}

/* === CATEGORIES === */
.categories-section { padding: 80px 0; }
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 52px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-gold);
  margin: 16px auto 0;
  border-radius: 2px;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.category-card {
  background: rgba(16, 22, 34, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 16px 16px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #c5a059; /* Soft elegant gold */
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.category-card:hover::before, .category-card.active::before { transform: scaleX(1); }
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(197, 160, 89, 0.4);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  background: rgba(20, 28, 42, 0.8);
}
.category-card.active {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
  background: rgba(212,168,83,0.06);
}
.category-card.disabled {
  opacity: 0.45;
  cursor: default;
}
.category-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--border-glass); background: var(--bg-glass); }
.category-card.disabled::before { transform: none !important; }
.coming-soon-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gradient-gold);
  color: var(--bg-primary);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.category-image-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card:hover .category-image {
  transform: scale(1.08);
}
.category-name { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.category-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 14px; }
.category-count { font-size: 0.82rem; color: var(--accent-gold); font-weight: 600; }
.category-arrow {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: var(--accent-gold);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(8px);
  transition: var(--transition);
}
.category-card:hover .category-arrow { opacity: 1; transform: translateX(0); }

/* === MAIN SECTION === */
.main-section { padding: 40px 0 80px; }
.main-layout {
  display: grid;
  grid-template-columns: 290px 1fr 290px;
  gap: 28px;
  align-items: start;
}
.main-layout.hide-filters {
  grid-template-columns: 1fr 290px;
}

/* === FILTERS SIDEBAR === */
.filters-sidebar {
  background: rgba(14, 19, 28, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.filters-sidebar::-webkit-scrollbar { width: 4px; }
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-glass);
}
.filters-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.filter-group { margin-bottom: 22px; }
.filter-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  transition: var(--transition);
}
.filter-btn:hover { border-color: rgba(212,168,83,0.4); color: var(--text-primary); }
.filter-btn.active {
  background: rgba(212,168,83,0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-separator { color: var(--text-muted); flex-shrink: 0; }
.input-field {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
.input-field:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.12);
  background: var(--bg-glass-hover);
}
.input-field::placeholder { color: var(--text-muted); }
.select-field {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Cairo', sans-serif;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 38px;
}
.select-field:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(212,168,83,0.12); }
.select-field option { background: var(--bg-secondary); color: var(--text-primary); }
.textarea { resize: vertical; min-height: 110px; }

/* === LISTINGS AREA === */
.listings-container { min-width: 0; }
.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}
.listings-info h2 { font-size: 1.4rem; font-weight: 800; }
.listings-count { color: var(--text-secondary); font-size: 0.9rem; }
.listings-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.listings-controls .select-field { width: auto; }
.view-toggle {
  display: flex;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-btn {
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.view-btn.active { background: rgba(212,168,83,0.2); color: var(--accent-gold); }
.view-btn:hover:not(.active) { color: var(--text-primary); }

/* === MERCHANT STORES (دليل المتاجر — ركن التاجر) === */
/* === تذكير انتهاء صلاحية الإعلان (سيارات + تأجير عقارات) === */
.renewal-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; transition: opacity 0.25s;
}
.renewal-modal-overlay.active { opacity: 1; }
.renewal-modal {
  background: rgba(12,18,32,0.98);
  border: 1px solid rgba(212,168,83,0.25);
  border-radius: 20px;
  max-width: 420px; width: 100%;
  padding: 28px 24px;
  text-align: center;
}
.renewal-modal-icon { font-size: 2.2rem; margin-bottom: 10px; }
.renewal-modal h3 { color: #fff; font-size: 1.1rem; margin: 0 0 10px; line-height: 1.5; }
.renewal-modal p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin: 0 0 20px; line-height: 1.6; }
.renewal-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.renewal-btn {
  padding: 12px 16px; border-radius: 12px; font-family: 'Cairo', sans-serif;
  font-weight: 700; font-size: 0.92rem; cursor: pointer; border: 1px solid transparent;
  transition: all 0.2s;
}
.renewal-btn-yes { background: rgba(34,197,94,0.15); color: #22c55e; border-color: rgba(34,197,94,0.3); }
.renewal-btn-yes:hover { background: #22c55e; color: #fff; }
.renewal-btn-no { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.15); }
.renewal-btn-no:hover { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }

.merchant-stores-row { margin-bottom: 24px; }
.merchant-stores-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 14px; color: var(--text-primary); }
.merchant-stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.merchant-store-card {
  background: rgba(10, 14, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.merchant-store-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}
.merchant-store-logo {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: rgba(212,168,83,0.12);
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  border: 1px solid rgba(212,168,83,0.25);
}
.merchant-store-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; color: var(--text-primary); }
.merchant-store-rating { font-size: 0.82rem; color: var(--accent-gold); }

/* === LISTINGS GRID === */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  min-width: 0;
}
.listings-grid.list-view { grid-template-columns: 1fr; }



/* === CARD ACTIONS (FAV & SHARE) === */
.card-actions-top {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  gap: 8px;
}
.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 19, 28, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.action-btn:hover {
  background: rgba(14, 19, 28, 0.8);
  transform: scale(1.1);
}
.favorite-btn.active {
  color: #ef4444; 
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  animation: heartPulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.share-btn {
  /* optional specific styling for share btn */
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* === LISTING CARD === */
.listing-card {
  position: relative;
  height: 380px;
  background: rgba(10, 14, 21, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}
.listing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(197, 160, 89, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.listing-image-wrapper {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-secondary);
}
.listing-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 21, 1) 0%, rgba(10, 14, 21, 0.5) 50%, transparent 100%);
  pointer-events: none;
}
.listing-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.listing-card:hover .listing-image { transform: scale(1.08); }
.listing-type-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  z-index: 3;
}
.listing-type-badge.sale { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); backdrop-filter: blur(4px); font-size: 0.7rem; padding: 3px 10px; }
.listing-type-badge.rent { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); backdrop-filter: blur(4px); font-size: 0.7rem; padding: 3px 10px; }
.listing-category-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(10, 14, 21, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 3;
}
.listing-image-count {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  z-index: 3;
}

/* ── شارة "موثّق" على صورة الإعلان ── */
.verified-badge-img {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 4;
  box-shadow: 0 2px 10px rgba(34,197,94,0.45);
  letter-spacing: 0.3px;
  animation: verifiedPulse 2.5s ease-in-out infinite;
}
@keyframes verifiedPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(34,197,94,0.45); }
  50%       { box-shadow: 0 2px 18px rgba(34,197,94,0.75), 0 0 0 4px rgba(34,197,94,0.1); }
}

/* ── شارة "موثّق" داخل عنوان الإعلان ── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.35);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-right: 6px;
  white-space: nowrap;
}
.listing-info { 
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 20px 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.listing-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.listing-location {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.listing-specs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.spec {
  font-size: 0.75rem;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 10px;
}
.listing-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #e4c88a;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.listing-date { font-size: 0.75rem; color: #94a3b8; }

/* === CURRENCY TOGGLE (للأراضي والشقق) === */
.currency-toggle {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-glass);
  width: fit-content;
  margin-top: 4px;
}
.currency-btn {
  padding: 10px 22px;
  background: var(--bg-glass);
  border: none;
  color: var(--text-secondary);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--border-glass);
}
.currency-btn:first-child { border-left: none; }
.currency-btn:hover { background: var(--bg-glass-hover); color: var(--text-primary); }
.currency-btn.active {
  background: rgba(212,168,83,0.18);
  color: var(--accent-gold);
  border-color: transparent;
}

/* شارة العملة على البطاقة */
.listing-currency-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
  vertical-align: middle;
}
.listing-currency-badge.shekel {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.25);
}
.listing-currency-badge.dinar {
  background: rgba(212,168,83,0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(212,168,83,0.25);
}
.listing-currency-badge.dollar {
  background: rgba(16,185,129,0.15);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.25);
}

/* === اختيار العملة في النموذج === */
.price-with-currency {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.currency-selector {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-glass);
  width: 100%;
}
.currency-opt {
  flex: 1;
  padding: 11px 10px;
  background: var(--bg-glass);
  border: none;
  color: var(--text-secondary);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-left: 1px solid var(--border-glass);
}
.currency-opt:first-child { border-left: none; }
.currency-opt:hover:not(.active) {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* === REQUESTS SIDEBAR (Left) === */
.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.requests-board {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 100px;
}
.requests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-glass);
}
.requests-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-gold);
  margin: 0;
}
.requests-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-right: 5px; /* for scrollbar */
}
/* custom scrollbar for requests list */
.requests-list::-webkit-scrollbar { width: 4px; }
.requests-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.request-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.request-item p {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}
.request-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.request-author {
  display: flex;
  align-items: center;
  gap: 5px;
}
.request-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.request-phone, .request-whatsapp {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.request-phone {
  background: rgba(212, 168, 83, 0.1);
  color: var(--accent-gold);
}
.request-phone:hover {
  background: rgba(212, 168, 83, 0.2);
}
.request-whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #25D366; /* WhatsApp color */
}
.request-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
}
.empty-requests {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 0;
  font-size: 0.9rem;
}
.currency-opt.active {
  background: rgba(212,168,83,0.2);
  color: var(--accent-gold);
  font-weight: 800;
}
.currency-opt.active[data-currency="shekel"] {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}
.currency-opt.active[data-currency="dinar"] {
  background: rgba(212,168,83,0.15);
  color: var(--accent-gold);
}

/* خانات أسعار بيع العقار/الأرض متعددة العملات (فورم النشر) */
.price-multi { display: flex; flex-direction: column; gap: 8px; }
.price-multi-row { display: flex; align-items: center; gap: 10px; }
.price-multi-row .price-multi-label { min-width: 84px; font-weight: 700; font-size: 0.9rem; color: var(--text-secondary); }
.price-multi-row .input-field { flex: 1; }
.price-multi-hint { font-size: 0.8rem; color: var(--text-muted); }

/* List View */
.list-view .listing-card { display: flex; flex-direction: row; }
.list-view .listing-image-wrapper { width: 240px; height: auto; flex-shrink: 0; }
.list-view .listing-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-secondary);
}
.empty-state svg { margin: 0 auto 20px; opacity: 0.4; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text-primary); }
.empty-state p { margin-bottom: 28px; }

/* === MODALS === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(14, 19, 28, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  margin: 40px auto;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-large { max-width: 920px; }
.modal-small { max-width: 420px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}
.modal-header h2 { font-size: 1.3rem; font-weight: 800; }
.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover { background: var(--accent-red); color: white; border-color: var(--accent-red); }
.modal-close-abs {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
}
.modal-body { padding: 26px; }

/* === FORM STEPS === */
.form-step { display: none; animation: fadeIn 0.3s ease; }
.form-step.active { display: block; }
.step-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 22px; color: var(--text-primary); }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.category-select-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.category-radio { cursor: pointer; }
.category-radio input[type="radio"] { display: none; }
.category-radio-card {
  padding: 22px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  text-align: center;
  transition: var(--transition);
  font-weight: 700;
}
.category-radio-card:hover { border-color: rgba(212,168,83,0.5); background: var(--bg-glass-hover); }
.category-radio input:checked + .category-radio-card {
  border-color: var(--accent-gold);
  background: rgba(212,168,83,0.1);
  box-shadow: var(--shadow-glow);
}
.category-radio-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.dynamic-fields-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 20px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent-gold); }

/* === UPLOAD === */
.upload-area {
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--accent-gold);
  background: rgba(212,168,83,0.05);
}
.upload-icon { color: var(--text-muted); margin-bottom: 14px; }
.upload-icon svg { margin: 0 auto; }
.upload-text { color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.upload-browse { color: var(--accent-gold); font-weight: 700; cursor: pointer; }
.upload-browse:hover { text-decoration: underline; }
.upload-hint { color: var(--text-muted); font-size: 0.8rem; }
.image-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.image-preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--border-glass);
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-red);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  font-family: monospace;
}
.image-preview-item:hover .remove-image { opacity: 1; }

/* === MAP === */
.map-container {
  height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  margin-top: 12px;
}
.map-hint { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }

/* === FORM NAVIGATION === */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid var(--border-glass);
}
.step-indicators { display: flex; gap: 8px; align-items: center; }
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
}
.step-dot.active { background: var(--accent-gold); border-color: var(--accent-gold); transform: scale(1.2); }
.step-dot.completed { background: var(--accent-green); border-color: var(--accent-green); }

/* === COMING SOON MODAL === */
.coming-soon-body { padding: 48px 32px; text-align: center; }
.coming-soon-icon-large { font-size: 4.5rem; margin-bottom: 18px; }
.coming-soon-body h2 { font-size: 1.6rem; margin-bottom: 14px; }
.coming-soon-body p { color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }

/* === TOAST === */
.toast-container {
  position: fixed;
  top: 90px;
  left: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideInLeft 0.3s ease;
  transition: all 0.3s ease;
}
.toast-success { border-right: 4px solid var(--accent-green); }
.toast-error { border-right: 4px solid var(--accent-red); }
.toast-message { flex: 1; font-size: 0.9rem; color: var(--text-primary); font-weight: 600; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: var(--transition);
}
.toast-close:hover { color: var(--text-primary); }
.toast-hide { opacity: 0; transform: translateX(-20px); }

/* === DETAIL MODAL === */
.detail-gallery { margin-bottom: 24px; }
.detail-main-image {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--bg-secondary);
}
.detail-main-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.detail-thumb {
  width: 82px;
  height: 62px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}
.detail-thumb.active { border-color: var(--accent-gold); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-header { margin-bottom: 20px; }
.detail-title { font-size: 1.6rem; font-weight: 900; margin-bottom: 12px; }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.detail-price { font-size: 1.9rem; font-weight: 900; color: var(--accent-gold); }
.detail-badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.detail-badge.sale { background: var(--accent-green); color: white; }
.detail-badge.rent { background: var(--accent-blue); color: white; }
.detail-location { color: var(--text-secondary); font-size: 0.9rem; }
.detail-description {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.95rem;
}
.detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.detail-spec {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
}
.spec-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; display: block; }
.spec-value { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.detail-contact {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
}
.detail-contact h4 { margin-bottom: 12px; font-weight: 700; }
.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-gold);
  font-size: 1.15rem;
  font-weight: 800;
  transition: var(--transition);
}
.contact-phone:hover { color: var(--accent-gold-light); }
.detail-map {
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-glass);
}
.detail-actions { display: flex; gap: 12px; justify-content: flex-end; }
.btn-delete {
  background: transparent;
  border: 1.5px solid var(--accent-red);
  color: var(--accent-red);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}
.btn-delete:hover { background: var(--accent-red); color: white; }


.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1700;
}
.filters-overlay.active { display: block; }

/* === FOOTER === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 44px;
  margin-bottom: 44px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.footer-logo span { font-size: 1.5rem; font-weight: 900; }
.footer-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; }
.footer-col h4 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; color: var(--text-primary); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a { color: var(--text-secondary); transition: var(--transition); }
.footer-links a:hover { color: var(--accent-gold); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
}
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(4deg); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,83,0.5), var(--shadow-lg); }
  50% { box-shadow: 0 0 0 12px rgba(212,168,83,0), var(--shadow-lg); }
}
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-in.visible { opacity: 1; transform: translateY(0); }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .main-layout, .main-layout.hide-filters { grid-template-columns: 1fr; }
  
  /* Reorder to put requests board above listings on mobile */
  .listings-container { display: contents; }
  .category-banner { order: 1; }
  .listings-header { order: 2; }
  .info-sidebar { order: 3; }
  .listings-grid { order: 4; }
  .empty-state { order: 5; }

  .filters-sidebar {
      position: fixed;
      right: -320px; top: 0;
      height: 100vh;
      width: 300px;
      z-index: 1800;
      border-radius: 0;
      transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      max-height: 100vh;
      visibility: hidden;
      opacity: 0;
    }
    .filters-sidebar.open { 
      right: 0; 
      visibility: visible;
      opacity: 1;
    }
  .mobile-filter-toggle { display: flex; }
}
@media (max-width: 768px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar { flex-wrap: nowrap; padding: 14px 0; }
  .search-wrapper { width: 100%; max-width: 100%; }
  .hero { min-height: 60vh; padding: 120px 0 60px; }
  .form-row { grid-template-columns: 1fr; }
  .category-select-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .listings-grid { grid-template-columns: 1fr; }
  .detail-specs { grid-template-columns: repeat(2, 1fr); }
  .list-view .listing-card { flex-direction: column; }
  .list-view .listing-image-wrapper { width: 100%; height: 200px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content h1 { font-size: 1.9rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { max-width: 100%; margin: 10px; border-radius: 12px; }
  .modal-body { padding: 18px; }
  .detail-main-image { height: 240px; }
}

/* === LTR overrides (English) === */
html[dir="ltr"] .side-menu {
  right: auto;
  left: -300px;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
html[dir="ltr"] .side-menu.open {
  left: 0;
  right: auto;
}
html[dir="ltr"] .listing-type-badge {
  right: auto;
  left: 16px;
}
html[dir="ltr"] .listing-category-badge {
  left: auto;
  right: 16px;
}
html[dir="ltr"] .category-count {
  left: auto;
  right: 16px;
}
html[dir="ltr"] .select-field {
  background-position: right 14px center;
  padding-left: 16px;
  padding-right: 38px;
}
html[dir="ltr"] .toast-success,
html[dir="ltr"] .toast-error,
html[dir="ltr"] .toast-info,
html[dir="ltr"] .toast-warning {
  border-right: none;
}
html[dir="ltr"] .toast-success { border-left: 4px solid var(--accent-green); }
html[dir="ltr"] .toast-error { border-left: 4px solid var(--accent-red); }
html[dir="ltr"] .toast-info { border-left: 4px solid #3b82f6; }
html[dir="ltr"] .toast-warning { border-left: 4px solid #f59e0b; }

html[dir="ltr"] .btn-glow svg {
  transform: scaleX(1) !important;
  margin-right: 0 !important;
  margin-left: 8px !important;
}
html[dir="ltr"] .category-arrow {
  transform: scaleX(-1);
}
html[dir="ltr"] .filters-sidebar {
  border-left: none;
  border-right: 1px solid var(--border-glass);
}
\n
/* --- AD BOARD SECTION --- */
.ad-board-section { margin: 40px auto; position: relative; z-index: 10; }
.ad-slider { position: relative; width: 100%; height: 250px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
@media (min-width: 768px) { .ad-slider { height: 350px; } }
.ad-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease-in-out; pointer-events: none; }
.ad-slide.active { opacity: 1; pointer-events: auto; }
.ad-slide img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.ad-slide-content { position: absolute; top: 50%; right: 5%; transform: translateY(-50%); max-width: 500px; color: #fff; z-index: 2; }
html[dir='ltr'] .ad-slide-content { right: auto; left: 5%; }
.ad-badge { display: inline-block; background: var(--primary-color); color: #0e131c; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; margin-bottom: 15px; box-shadow: 0 0 10px var(--primary-color); }
.ad-slide-content h3 { font-size: 2rem; margin-bottom: 10px; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.ad-slide-content p { font-size: 1.1rem; margin-bottom: 20px; opacity: 0.9; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.ad-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; transition: all 0.3s; }
.ad-nav-btn:hover { background: var(--primary-color); color: #0e131c; }
.ad-nav-btn.prev { left: 20px; }
.ad-nav-btn.next { right: 20px; }
html[dir='rtl'] .ad-nav-btn.prev { left: 20px; right: auto; }
html[dir='rtl'] .ad-nav-btn.next { right: 20px; left: auto; }
.ad-indicators { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.ad-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: 0.3s; }
.ad-dot.active { background: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); }
/* --- CATEGORY BANNER --- */
.category-banner { position: relative; width: 100%; height: 180px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); animation: fadeIn 0.5s ease-out; }
@media (min-width: 768px) { .category-banner { height: 220px; margin-bottom: 30px; } }
.category-banner img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.category-banner-content { position: absolute; top: 50%; right: 4%; transform: translateY(-50%); max-width: 60%; color: #fff; z-index: 2; }
html[dir='ltr'] .category-banner-content { right: auto; left: 4%; }
.category-banner-content h3 { font-size: 1.6rem; margin-bottom: 8px; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
@media (min-width: 768px) { .category-banner-content h3 { font-size: 2.2rem; } }
.category-banner-content p { font-size: 1rem; margin-bottom: 0; opacity: 0.9; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }.req-cat-badge {
  background: var(--primary-color);
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 8px;
}

/* MODAL BODY SCROLLING */
.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px;
  flex-shrink: 1; /* Allow body to shrink if needed */
}
@media (max-width: 768px) {
  .modal-body {
    padding: 18px;
  }
}


/* ===== REVIEWS SECTION ===== */
.reviews-section {
  padding: 60px 0;
  position: relative;
}
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}
.reviews-slider-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 24px;
  scrollbar-width: none; /* Firefox */
  scroll-behavior: smooth;
  margin: 0 -20px;
  padding: 0 20px 24px 20px;
}
.reviews-slider-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
/* الهامش السالب = padding الـcontainer بالضبط (16px بالموبايل) وإلا خرج الشريط عن الشاشة وظهر تمرير أفقي بالصفحة.
   موضوعة بعد القاعدة الأساسية عمداً (نفس الخصوصية، فالأخيرة تغلب) */
@media (max-width: 480px) {
  .reviews-slider-container { margin: 0 -16px; padding: 0 16px 24px 16px; }
}
.review-card {
  min-width: 320px;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(212,168,83,0.15);
}
.review-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.review-info {
  flex: 1;
}
.review-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.review-job {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.review-stars {
  color: var(--gold);
  font-size: 1rem;
}
.review-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  flex: 1;
}
.review-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
}
.empty-reviews {
  width: 100%;
  text-align: center;
  padding: 40px;
  background: rgba(255,255,255,0.02);
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
}


/* ===== Explore Map ===== */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid rgba(212,168,83,0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}
.leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid rgba(212,168,83,0.2);
}
.map-popup-card {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Cairo', sans-serif;
}
.map-popup-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.map-popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-popup-price {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.1rem;
}
.map-popup-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-deep) !important;
  text-align: center;
  padding: 6px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  display: block;
}

/* ===== SMART SEARCH SUGGESTIONS ===== */
.search-wrapper { position: relative; }
.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
}
.search-suggestions.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
[data-theme="dark"] .search-suggestions {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.15);
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text-primary);
}
.search-suggestion-item:last-child {
  border-bottom: none;
}
.search-suggestion-item:hover {
  background: rgba(212, 168, 83, 0.1);
}
.search-suggestion-img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.search-suggestion-info {
  flex: 1;
  overflow: hidden;
}
.search-suggestion-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-suggestion-price {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 700;
}
.search-suggestion-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== DALLNI STYLES ===== */
.dallni-page {
  min-height: 100vh;
  background: var(--bg-primary, #0a0e1a);
  padding-top: 80px;
}

.category-icon-dallni {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(167,139,250,0.15));
  border: 2px solid rgba(124,58,237,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #a78bfa;
  box-shadow: 0 0 30px rgba(124,58,237,0.25);
}

.dallni-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.dallni-cat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--dcs, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.dallni-cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dcs, rgba(255,255,255,0.04));
  opacity: 0;
  transition: opacity 0.25s;
}

.dallni-cat-card:hover::before,
.dallni-cat-card:active::before { opacity: 1; }

.dallni-cat-card:hover {
  border-color: var(--dc, #fff);
  transform: translateX(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px var(--dc, #fff) inset;
}

.dallni-cat-icon {
  font-size: 36px;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dcs, rgba(255,255,255,0.06));
  border-radius: 14px;
  border: 1px solid var(--dc, rgba(255,255,255,0.1));
  flex-shrink: 0;
}

.dallni-cat-info { flex: 1; }
.dallni-cat-info h3 {
  font-size: 16px; font-weight: 700;
  color: #fff; margin: 0 0 4px;
}
.dallni-cat-info p {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin: 0;
}

.dallni-cat-arrow { color: rgba(255,255,255,0.3); flex-shrink: 0; transform: rotate(180deg); }
.dallni-cat-card:hover .dallni-cat-arrow { color: var(--dc, #fff); }

/* Services Grid */
.dallni-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.dallni-service-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s;
}
.dallni-service-card:hover {
  border-color: rgba(167,139,250,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.dallni-service-header {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px;
}
.dallni-service-avatar {
  width: 50px; height: 50px; border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.dallni-service-title { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.dallni-service-subtitle { font-size: 13px; color: rgba(255,255,255,0.5); margin: 0; }
.dallni-service-desc { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 14px; }
.dallni-service-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.dallni-service-location {
  font-size: 12px; color: rgba(255,255,255,0.4);
  display: flex; align-items: center; gap: 4px;
}
.dallni-contact-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border: none; border-radius: 8px;
  color: #fff; font-family: 'Cairo', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s;
}
.dallni-contact-btn:hover { opacity: 0.85; }

/* Empty state */
.dallni-empty {
  text-align: center; padding: 60px 20px;
  color: rgba(255,255,255,0.4);
}
.dallni-empty .empty-icon { font-size: 56px; margin-bottom: 16px; }
.dallni-empty p { font-size: 15px; margin: 0; }

@media (min-width: 600px) {
  .dallni-grid { grid-template-columns: 1fr 1fr; }
  
}

/* Fix for Leaflet tiles in dark themes */
.leaflet-container img { max-width: none !important; }
.leaflet-container { background: #0a0e15 !important; }


/* =============================================
   THEME TOGGLE BUTTON & LIGHT THEME ENHANCEMENTS
   ============================================= */
.theme-toggle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  font-size: 1.15rem;
  padding: 0;
}
.theme-toggle-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}
.theme-icon-sun { display: inline-block; line-height: 1; }
.theme-icon-moon { display: none; line-height: 1; }

[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: inline-block; }

/* Header buttons theme alignment */
.header-action-btn, #langToggle {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-glass) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: var(--transition);
}
.header-action-btn:hover, #langToggle:hover {
  border-color: var(--accent-gold) !important;
  transform: translateY(-2px);
}
[data-theme="dark"] .header-action-btn, [data-theme="dark"] #langToggle {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}

/* شارات الهيدر تتمركز على أيقونتها (RTL/LTR) لا على الهيدر */
.header-action-btn { position: relative; }
.header-action-btn > span[id$="Badge"] {
  top: -4px !important;
  right: auto !important;
  inset-inline-end: -4px !important;
}

/* Header scrolled in Light Theme */
.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .header.scrolled {
  background: rgba(0, 0, 0, 0.95);
  border-bottom-color: var(--border-glass);
  box-shadow: var(--shadow-md);
}

/* Search Box in Light Theme */
.search-wrapper {
  background: #ffffff;
  border: 1.5px solid var(--border-glass);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.search-wrapper:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 18px rgba(184, 134, 11, 0.2);
  background: #ffffff;
}
.search-input {
  color: var(--text-primary);
}
.search-input::placeholder {
  color: var(--text-muted);
}
[data-theme="dark"] .search-wrapper {
  background: var(--bg-glass);
  border-color: var(--accent-gold);
}
[data-theme="dark"] .search-input {
  color: var(--accent-gold-light);
}
[data-theme="dark"] .search-input::placeholder {
  color: rgba(212, 168, 83, 0.6);
}

/* Hero Section in Light Theme */
.hero {
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.8) 0%, rgba(248, 250, 252, 0.97) 100%), url('../city_bg.webp') center/cover no-repeat;
}
[data-theme="dark"] .hero {
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 100%), url('../city_bg.webp') center/cover no-repeat;
}
.hero-search.search-wrapper {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 2px solid var(--accent-gold);
}
[data-theme="dark"] .hero-search.search-wrapper {
  background: rgba(0, 0, 0, 0.6);
  box-shadow: none;
}

/* Category Cards in Light Theme */
.category-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}
.category-card:hover {
  background: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}
.category-image-wrapper {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .category-card {
  background: rgba(16, 22, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: none;
}
[data-theme="dark"] .category-card:hover {
  border-color: rgba(197, 160, 89, 0.4);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  background: rgba(20, 28, 42, 0.8);
}

/* Filters Sidebar in Light Theme */
.filters-sidebar {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}
.filter-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-secondary);
}
.filter-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}
.filter-btn.active {
  background: rgba(184, 134, 11, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-dark);
}
.input-field, .select-field {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-primary);
}
.input-field:focus, .select-field:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
  background: #ffffff;
}
select option {
  background: #ffffff;
  color: #0f172a;
}
[data-theme="dark"] .filters-sidebar {
  background: rgba(14, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: none;
}
[data-theme="dark"] .filter-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
[data-theme="dark"] .filter-btn.active {
  background: rgba(212,168,83,0.15);
  color: var(--accent-gold);
}
[data-theme="dark"] .input-field, [data-theme="dark"] .select-field {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
}
[data-theme="dark"] select option {
  background: #12182b;
  color: #f1f5f9;
}

/* Listing Cards in Light Theme */
.listing-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.listing-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}
.listing-image-wrapper::after {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.78) 45%, transparent 100%);
}
.listing-title {
  color: #0f172a;
  text-shadow: none;
}
.listing-location {
  color: #475569;
}
.spec {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.listing-price {
  color: var(--accent-gold);
  text-shadow: none;
}
.listing-category-badge {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.card-actions-top .action-btn {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #475569 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .listing-card {
  background: rgba(10, 14, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: none;
}
[data-theme="dark"] .listing-card:hover {
  border-color: rgba(197, 160, 89, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
[data-theme="dark"] .listing-image-wrapper::after {
  background: linear-gradient(to top, rgba(10, 14, 21, 1) 0%, rgba(10, 14, 21, 0.5) 50%, transparent 100%);
}
[data-theme="dark"] .listing-title {
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
[data-theme="dark"] .listing-location {
  color: #cbd5e1;
}
[data-theme="dark"] .spec {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .listing-price {
  color: #e4c88a;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
[data-theme="dark"] .listing-category-badge {
  background: rgba(10, 14, 21, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .card-actions-top .action-btn {
  background: rgba(0, 0, 0, 0.6) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Wasalni Cards in Light Theme */
.wasalni-card {
  height: auto !important;
  background: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}
.wasalni-card:hover {
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15) !important;
}
.wasalni-card [style*="color: #fff"] {
  color: #0f172a !important;
}
.wasalni-card [style*="rgba(255,255,255,0.05)"] {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}
.wasalni-card [style*="rgba(255,255,255,0.5)"] {
  color: #64748b !important;
}
.wasalni-card [style*="rgba(255,255,255,0.3)"] {
  color: #94a3b8 !important;
}
.wasalni-card .listing-title {
  color: #0f172a !important;
}
.wasalni-card .owner-name {
  color: #0f172a !important;
}

[data-theme="dark"] .wasalni-card {
  background: rgba(10, 14, 21, 0.9) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}
[data-theme="dark"] .wasalni-card [style*="color: #fff"] {
  color: #fff !important;
}
[data-theme="dark"] .wasalni-card [style*="rgba(255,255,255,0.05)"] {
  background: rgba(255,255,255,0.05) !important;
  color: inherit !important;
  border: none !important;
}
[data-theme="dark"] .wasalni-card [style*="rgba(255,255,255,0.5)"] {
  color: rgba(255,255,255,0.5) !important;
}
[data-theme="dark"] .wasalni-card [style*="rgba(255,255,255,0.3)"] {
  color: rgba(255,255,255,0.3) !important;
}
[data-theme="dark"] .wasalni-card .listing-title {
  color: #fff !important;
}
[data-theme="dark"] .wasalni-card .owner-name {
  color: #fff !important;
}

/* Dallni Page in Light Theme */
.dallni-page {
  background: var(--bg-primary);
}
.dallni-page h2[style*="color:#fff"], .dallni-page h2[style*="color: #fff"] {
  color: #0f172a !important;
}
.dallni-page p[style*="rgba(255,255,255"] {
  color: #475569 !important;
}
#btnBackFromDallni, #btnBackFromDallniSub {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}
#btnBackFromDallni:hover, #btnBackFromDallniSub:hover {
  border-color: var(--accent-gold) !important;
}
#dallniSearch {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
}
#dallniSearch::placeholder {
  color: #94a3b8 !important;
}
.dallni-filter-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
.dallni-filter-btn.active {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}
.dallni-cat-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}
.dallni-cat-card:hover {
  transform: translateX(-4px) !important;
  border-color: var(--dc, #0f172a) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
}
.dallni-cat-info h3 {
  color: #0f172a !important;
}
.dallni-cat-info p {
  color: #64748b !important;
}
.dallni-cat-arrow {
  color: #94a3b8 !important;
}
.dallni-service-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}
.dallni-service-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.09) !important;
}
.dallni-service-title {
  color: #0f172a !important;
}
.dallni-service-subtitle {
  color: #64748b !important;
}
.dallni-service-desc {
  color: #334155 !important;
}
.dallni-service-location {
  color: #64748b !important;
}
#dallniSubTitle {
  color: #0f172a !important;
}
#dallniAddModal > div > div[style*="background:#12182b"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
}
#dallniAddModal h2 {
  color: #0f172a !important;
}
#btnCloseDallniModal {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
#dallniAddModal label {
  color: #334155 !important;
}
#dallniAddModal input, #dallniAddModal select, #dallniAddModal textarea {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
#dallniAddModal select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="dark"] .dallni-page h2[style*="color:#fff"], [data-theme="dark"] .dallni-page h2[style*="color: #fff"] {
  color: #fff !important;
}
[data-theme="dark"] .dallni-page p[style*="rgba(255,255,255"] {
  color: rgba(255,255,255,0.5) !important;
}
[data-theme="dark"] #btnBackFromDallni, [data-theme="dark"] #btnBackFromDallniSub {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}
[data-theme="dark"] #dallniSearch {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #fff !important;
}
[data-theme="dark"] .dallni-filter-btn {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}
[data-theme="dark"] .dallni-cat-card {
  background: var(--dcs, rgba(255,255,255,0.04)) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .dallni-cat-info h3 {
  color: #fff !important;
}
[data-theme="dark"] .dallni-cat-info p {
  color: rgba(255,255,255,0.5) !important;
}
[data-theme="dark"] .dallni-service-card {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .dallni-service-title {
  color: #fff !important;
}
[data-theme="dark"] #dallniSubTitle {
  color: #fff !important;
}
[data-theme="dark"] #dallniAddModal > div > div[style*="background:#12182b"] {
  background: #12182b !important;
  border-color: rgba(124,58,237,0.3) !important;
}
[data-theme="dark"] #dallniAddModal h2 {
  color: #fff !important;
}
[data-theme="dark"] #dallniAddModal input, [data-theme="dark"] #dallniAddModal select, [data-theme="dark"] #dallniAddModal textarea {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #fff !important;
}

/* Requests Page in Light Theme */
#requestsPage {
  background: var(--bg-primary);
}
#requestsPage h2[style*="color:#f1f5f9"], #requestsPage h2[style*="color: #f1f5f9"] {
  color: #0f172a !important;
}
#btnBackFromRequests {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}
#btnBackFromRequests:hover {
  border-color: var(--accent-gold) !important;
}
#reqPageSubtitle {
  color: #475569 !important;
}
.requests-hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}
.requests-hero-banner h2 {
  color: #0f172a !important;
}
.requests-hero-banner p {
  color: #475569 !important;
}
.requests-hero-banner button {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(15,23,42,0.2) !important;
}
.req-cat-btn {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
}
.req-cat-btn.active {
  background: var(--accent-gold) !important;
  color: #ffffff !important;
  border-color: var(--accent-gold) !important;
}

#reqPageGrid > div {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
}
#reqPageGrid > div:hover {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
}
#reqPageGrid [style*="color:#f1f5f9"], #reqPageGrid [style*="color: #f1f5f9"] {
  color: #0f172a !important;
}
#reqPageGrid [style*="color:rgba(255,255,255,0.35)"] {
  color: #94a3b8 !important;
}
#reqPageGrid [style*="color:rgba(255,255,255,0.8)"] {
  color: #334155 !important;
}
#reqPageGrid [style*="background: rgba(255,255,255,0.02)"] {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="dark"] #requestsPage h2[style*="color:#f1f5f9"] {
  color: #f1f5f9 !important;
}
[data-theme="dark"] #btnBackFromRequests {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.8) !important;
}
[data-theme="dark"] .requests-hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8)) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .requests-hero-banner h2 {
  color: #fff !important;
}
[data-theme="dark"] .requests-hero-banner p {
  color: rgba(255, 255, 255, 0.6) !important;
}
[data-theme="dark"] .requests-hero-banner button {
  background: #fff !important;
  color: #0f172a !important;
}
[data-theme="dark"] .req-cat-btn {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.6) !important;
}
[data-theme="dark"] #reqPageGrid > div {
  background: rgba(255,255,255,0.025) !important;
  border-color: rgba(255,255,255,0.07) !important;
}
[data-theme="dark"] #reqPageGrid [style*="color:#f1f5f9"] {
  color: #f1f5f9 !important;
}
[data-theme="dark"] #reqPageGrid [style*="color:rgba(255,255,255,0.8)"] {
  color: rgba(255,255,255,0.8) !important;
}
[data-theme="dark"] #reqPageGrid [style*="background: rgba(255,255,255,0.02)"] {
  background: rgba(255,255,255,0.02) !important;
}

/* Modals General in Light Theme */
.modal {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.modal-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.modal-close {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.modal-close:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}
.category-radio-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  color: #0f172a;
}
.category-radio-card:hover {
  background: #f1f5f9;
  border-color: var(--accent-gold);
}
.category-radio input:checked + .category-radio-card {
  background: rgba(184, 134, 11, 0.08);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.15);
}
.upload-area {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
}
.upload-area:hover {
  border-color: var(--accent-gold);
  background: #f1f5f9;
}

[data-theme="dark"] .modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .modal-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-glass);
}
[data-theme="dark"] .category-radio-card {
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  color: var(--text-primary);
}
[data-theme="dark"] .category-radio input:checked + .category-radio-card {
  background: rgba(212,168,83,0.1);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}
[data-theme="dark"] .upload-area {
  background: transparent;
  border-color: var(--border-glass);
}

/* Reviews in Light Theme */
.review-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}
.review-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.review-name {
  color: #0f172a;
}
.review-text {
  color: #334155;
}
.review-date {
  color: #94a3b8;
}

[data-theme="dark"] .review-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .review-name {
  color: var(--text-main);
}

/* Support Section in Light Theme */
.support-section {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.support-section p {
  color: #475569 !important;
}
[data-theme="dark"] .support-section {
  background: rgba(255,255,255,0.02) !important;
}
[data-theme="dark"] .support-section p {
  color: rgba(255,255,255,0.6) !important;
}

/* Footer in Light Theme */
.footer {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.footer-desc {
  color: #475569;
}
.footer-col h4 {
  color: #0f172a;
}
.footer-links a {
  color: #475569;
}
.footer-links a:hover {
  color: var(--accent-gold);
}
.footer-bottom {
  border-top-color: rgba(0, 0, 0, 0.08);
}
.footer-bottom p {
  color: var(--text-muted);   /* كان #94a3b8 (تباين 2.6 على الأبيض) */
}

[data-theme="dark"] .footer {
  background: var(--bg-secondary);
  border-top-color: var(--border-glass);
}
[data-theme="dark"] .footer-desc {
  color: var(--text-secondary);
}
[data-theme="dark"] .footer-col h4 {
  color: var(--text-primary);
}
[data-theme="dark"] .footer-links a {
  color: var(--text-secondary);
}
[data-theme="dark"] .footer-bottom {
  border-top-color: var(--border-glass);
}
[data-theme="dark"] .footer-bottom p {
  color: var(--text-secondary);   /* --text-muted (#64748b) تباينه 4.2 على خلفية الفوتر الداكنة */
}

/* Auth Modal in Light Theme */
.auth-modal {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}
.auth-modal h2 {
  color: #0f172a !important;
}
.auth-modal p {
  color: #64748b !important;
}
.auth-modal-close {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
.auth-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
.auth-tab {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
}
.auth-tab.active {
  background: #0f172a !important;
  color: #ffffff !important;
}
[data-theme="dark"] .auth-modal {
  background: linear-gradient(145deg, #1a1a2e, #16213e, #0f3460) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .auth-modal h2 {
  color: #fff !important;
}
[data-theme="dark"] .auth-modal p {
  color: rgba(255,255,255,0.6) !important;
}
[data-theme="dark"] .auth-modal-close {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.6) !important;
}
[data-theme="dark"] .auth-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* Chat Widget in Light Theme */
.chat-widget {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
}
.chat-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.chat-header-title {
  color: #0f172a !important;
}
.chat-close-btn {
  color: #64748b !important;
}
.chat-inbox-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
.chat-inbox-item:hover {
  background: #f1f5f9 !important;
  border-color: var(--accent-gold) !important;
}
.chat-inbox-name {
  color: #0f172a !important;
}
.chat-inbox-msg {
  color: #64748b !important;
}
.chat-msg.received {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.chat-msg.sent.failed {
  color: #7f1d1d !important;
}
.chat-msg.sent.failed .chat-msg-status.err {
  color: #b91c1c !important;
}
.chat-msg-action {
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.3) !important;
  background: rgba(15, 23, 42, 0.06) !important;
}
[data-theme="dark"] .chat-msg.sent.failed {
  color: #fff !important;
}
[data-theme="dark"] .chat-msg.sent.failed .chat-msg-status.err {
  color: #fca5a5 !important;
}
[data-theme="dark"] .chat-msg-action {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}
.chat-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
.chat-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] .chat-widget {
  background: rgba(13, 18, 32, 0.95) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .chat-header {
  background: rgba(255,255,255,0.03) !important;
  border-bottom-color: rgba(255,255,255,0.05) !important;
}
[data-theme="dark"] .chat-header-title {
  color: #fff !important;
}
[data-theme="dark"] .chat-inbox-item {
  background: rgba(255,255,255,0.02) !important;
  border-color: transparent !important;
}
[data-theme="dark"] .chat-msg.received {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
}
[data-theme="dark"] .chat-input {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}
[data-theme="dark"] .chat-footer {
  background: transparent !important;
}

/* Leaflet Container in Light Theme */
.leaflet-container {
  background: #f8fafc !important;
}
[data-theme="dark"] .leaflet-container {
  background: #0a0e15 !important;
}


/* =============================================
   QUICK ACTIONS SECTION (ماذا تريد أن تفعل؟)
   ============================================= */
.quick-actions-section {
  padding: 40px 0 10px;
  position: relative;
  z-index: 10;
}
.quick-actions-header {
  text-align: center;
  margin-bottom: 26px;
}
.quick-actions-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  position: relative;
}
.quick-actions-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3.5px;
  background: var(--gradient-gold);
  border-radius: 2px;
  margin: 10px auto 0;
}
.quick-actions-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.quick-action-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  font-family: 'Cairo', sans-serif;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  outline: none;
  width: 100%;
}
.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.quick-action-card:hover::before {
  transform: scaleX(1);
}
.quick-action-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
  background: #ffffff;
}
.quick-action-card:active {
  transform: translateY(-2px);
}
.action-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--action-bg, rgba(0, 0, 0, 0.04));
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.quick-action-card:hover .action-card-icon {
  transform: scale(1.12) rotate(4deg);
}
.action-card-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.action-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.action-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
}

/* Dark Theme for Quick Actions */
[data-theme="dark"] .quick-action-card {
  background: rgba(16, 22, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
[data-theme="dark"] .quick-action-card:hover {
  border-color: var(--accent-gold);
  background: rgba(22, 30, 46, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .action-card-icon {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Responsive Styles for Quick Actions */
@media (max-width: 1024px) {
  .quick-actions-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
  .quick-action-card {
    padding: 16px 10px;
  }
  .action-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  .action-card-title {
    font-size: 1.02rem;
  }
  .action-card-desc {
    font-size: 0.74rem;
  }
}

@media (max-width: 768px) {
  .quick-actions-section {
    padding: 30px 0 10px;
  }
  .quick-actions-title {
    font-size: 1.5rem;
  }
  .quick-actions-subtitle {
    font-size: 0.86rem;
  }
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  /* The 5th item spans full width on mobile with horizontal layout for balance */
  .quick-action-card:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    padding: 14px 20px;
    gap: 16px;
  }
  .quick-action-card:last-child .action-card-text {
    align-items: flex-start;
    text-align: right;
  }
  .quick-action-card {
    padding: 16px 12px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .quick-actions-grid {
    gap: 10px;
  }
  .action-card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }
  .action-card-title {
    font-size: 0.96rem;
  }
}

/* =============================================
   صفحات المحتوى القانوني (سياسة الخصوصية / شروط الاستخدام)
   ============================================= */
.legal-page-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}
.legal-page-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.legal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.legal-logo img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}
.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
  white-space: nowrap;
}
.legal-back-link:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}
.legal-theme-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.legal-theme-btn:hover { background: var(--bg-glass-hover); }

.legal-content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.legal-content-wrap h1 {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.legal-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}
.legal-content-wrap h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold-dark);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-glass);
}
[data-theme="dark"] .legal-content-wrap h2 { color: var(--accent-gold-light); }
.legal-content-wrap h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 18px 0 8px;
}
.legal-content-wrap p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 12px;
  font-size: 0.96rem;
}
.legal-content-wrap ul {
  margin: 0 0 14px;
  padding-right: 22px;
}
.legal-content-wrap li {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 8px;
  font-size: 0.96rem;
}
.legal-content-wrap a {
  color: var(--accent-blue);
  text-decoration: underline;
}
.legal-content-wrap strong { color: var(--text-primary); font-weight: 800; }

.legal-footer-links {
  text-align: center;
  margin-bottom: 10px;
}
.legal-footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0 10px;
  transition: var(--transition);
}
.legal-footer-links a:hover { color: var(--accent-gold); }

@media (max-width: 480px) {
  .legal-content-wrap { padding: 28px 16px 60px; }
  .legal-content-wrap h1 { font-size: 1.4rem; }
  .legal-back-link { padding: 8px 10px; font-size: 0.82rem; }
  .legal-logo span { display: none; }
}

/* === أهداف اللمس (موبايل): فحص الموقع الحي وجد أزرار الهيدر وروابط الفوتر بارتفاع 22–32px، والمعيار 44px === */
@media (max-width: 768px) {
  .main-menu-btn { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .header-action-btn { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .footer a { display: inline-flex; align-items: center; min-height: 44px; }
  .toast-close { min-width: 32px; min-height: 32px; }
}

/* === الوضع النهاري: ألوان مكتوبة inline للوضع الداكن (نص أبيض/شفاف، حدود وخلفيات زجاجية، خلفيات داكنة) تتحوّل لمتغيرات الثيم ===
   كانت تظهر نصوص بيضاء على خلفية بيضاء بنوافذ التقييمات والطلبات وصفحة دلّني. مقيّدة بالنوافذ وصفحتي دلّني والطلبات فقط،
   وتستثني العناصر ذات الخلفية الصلبة الملوّنة (أزرار) لتبقى نصوصها بيضاء. الوضع الداكن لا يتأثر (:not([data-theme="dark"])). ولّدها scratch gen_light_css.js */
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:#fff"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:#ffffff"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:#FFF"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:white"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.95)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.95)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.9)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.9)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.85)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.85)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.8)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.8)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.75)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.75)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.7)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.7)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: #fff"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: #ffffff"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: #FFF"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: white"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.95)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.95)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.9)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.9)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.85)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.85)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.8)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.8)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.75)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.75)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.7)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.7)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]) { color: var(--text-primary) !important; }
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.65)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.65)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.6)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.6)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.55)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.55)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.5)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.5)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.65)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.65)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.6)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.6)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.55)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.55)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.5)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.5)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]) { color: var(--text-secondary) !important; }
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.45)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.45)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.4)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.4)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.35)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.35)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.3)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.3)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.25)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.25)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255,255,255,0.2)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color:rgba(255, 255, 255, 0.2)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.45)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.45)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.4)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.4)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.35)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.35)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.3)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.3)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.25)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.25)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255,255,255,0.2)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]),
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="color: rgba(255, 255, 255, 0.2)"]:not([style*="background:#"]):not([style*="background: #"]):not([style*="gradient"]) { color: var(--text-muted) !important; }
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="solid rgba(255,255,255"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="solid rgba(255, 255, 255"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="border-color:rgba(255,255,255"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="border-color: rgba(255,255,255"] { border-color: var(--border-glass) !important; }
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:rgba(255,255,255,0.0"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:rgba(255,255,255,0.1"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:rgba(255, 255, 255, 0.0"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:rgba(255, 255, 255, 0.1"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: rgba(255,255,255,0.0"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: rgba(255,255,255,0.1"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: rgba(255, 255, 255, 0.0"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: rgba(255, 255, 255, 0.1"] { background: var(--bg-glass) !important; }
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#12182b"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#0f172a"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#0a0e15"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#0e131c"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#090d14"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#111827"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#0d1117"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background:#1a1f2e"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #12182b"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #0f172a"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #0a0e15"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #0e131c"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #090d14"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #111827"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #0d1117"],
html:not([data-theme="dark"]) :is(.dallni-page, #requestsPage, .modal-overlay) [style*="background: #1a1f2e"] { background: var(--bg-card) !important; }
.merchant-store-card { background: var(--bg-card); border-color: var(--border-glass); }
html:not([data-theme="dark"]) .btn-primary { color: #1a1205; } /* نص داكن على الذهبي (كان أبيض شبه شفاف بالوضع النهاري) */

/* === ما هي مسار؟ + الأسئلة الشائعة (تتبع الثيم بالمتغيرات) === */
.about-section { padding: 70px 0; }
.about-lead { max-width: 820px; margin: 0 auto 8px; text-align: center; font-size: 1.05rem; line-height: 2; color: var(--text-secondary); }
.faq-title { margin-top: 48px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: var(--radius-lg, 16px); padding: 20px 22px; }
.faq-item h3 { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.faq-item p { font-size: 0.95rem; line-height: 1.9; color: var(--text-secondary); margin: 0; }
@media (max-width: 768px) { .about-section { padding: 48px 0; } .faq-grid { grid-template-columns: 1fr; } }

/* الأداء: background-attachment: fixed يجبر إعادة رسم الصورة مع كل تمرير على الجوال؛ الباراللاكس للشاشات الكبيرة فقط */
@media (max-width: 768px) {
  .hero { background-attachment: scroll; }
}

/* ===== ألوان القائمة الجانبية والفوتر تتبع الثيم =====
   كانت inline ثابتة (أبيض شفاف للخصوصية/الشروط وتعليق QR، وألوان زاهية للأقسام) فتختفي أو تضعف على الخلفية البيضاء بالوضع النهاري.
   الوضع النهاري: درجات أغمق بتباين ≥ 4.5؛ الليلي: الألوان الزاهية الأصلية. */
:root {
  --menu-gold: #8c6508;
  --menu-green: #047857;
  --menu-rose: #be123c;
  --menu-purple: #7e22ce;
  --menu-danger: #b91c1c;
}
[data-theme="dark"] {
  --menu-gold: #d4a853;
  --menu-green: #10b981;
  --menu-rose: #f43f5e;
  --menu-purple: #a855f7;
  --menu-danger: #f87171;
}
.side-menu-links li a.menu-link-gold { color: var(--menu-gold); }
.side-menu-links li a.menu-link-green { color: var(--menu-green); }
.side-menu-links li a.menu-link-rose { color: var(--menu-rose); }
.side-menu-links li a.menu-link-purple { color: var(--menu-purple); }
.side-menu-links li a.menu-link-danger { color: var(--menu-danger); }
.side-menu-links li a.side-menu-legal { color: var(--text-secondary); font-size: 0.85rem; }
.footer .footer-links a.footer-support-link { color: var(--menu-gold); font-weight: 700; }
.footer-qr-note { color: var(--text-secondary); font-size: 0.8rem; margin-top: 8px; }

/* القائمة الجانبية على الشاشات القصيرة: كانت overflow:visible فتُقصّ العناصر السفلية (الخصوصية/الشروط/خروج) ولا يمكن الوصول إليها —
   تمرير داخلي بدل القص. وزر/فقاعة المساعد (z-index 8500) كانا يغطيان أسفل القائمة المفتوحة، فيُخفيان أثناء فتحها. */
.side-menu { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* height:100vh على متصفحات الموبايل أطول من المساحة المرئية (شريط العنوان/التنقل السفلي يغطي أسفلها)، فكان آخر عنصر (شروط الاستخدام) يقع تحت الحافة المرئية
   حتى مع التمرير. 100dvh = المساحة المرئية فعلاً، ومساحة أسفل القائمة تكفي ليظهر آخر عنصر فوق شريط المتصفح وزر المساعد وحافة الشاشة. */
.side-menu { height: 100vh; height: 100dvh; }
.side-menu-links { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
body:has(.side-menu.open) .ai-assistant-wrapper { display: none; }

/* ===== الهيدر على الموبايل: لا تداخل بين الشعار وأزرار الثيم/الإشعارات/الرسائل =====
   المجموع كان يتجاوز عرض الشاشة (قائمة + EN + شعار 74px + ثيم + إشعارات + رسائل + فراغات 25/20/10px)، فيتراكب الشعار مع زر الثيم
   ويخرج زر القائمة عن الحافة. نضغط الفراغات والأحجام (بما فيها margin:0 10px الـinline على زر EN) بدرجتين حسب العرض. */
@media (max-width: 480px) {
  .header .navbar { gap: 6px; }
  .header .nav-right-group { gap: 6px; min-width: 0; }
  .header .nav-left-group { gap: 6px !important; flex-shrink: 0; }
  .header #langToggle { margin: 0 !important; padding: 4px 8px !important; min-width: 40px; min-height: 40px; }
  .header .logo-img { height: 52px; margin-top: 0; }
  .header .theme-toggle-btn, .header .header-action-btn { width: 40px; height: 40px; min-width: 40px; }
}
@media (max-width: 360px) {
  .header .navbar { gap: 4px; }
  .header .nav-right-group, .header .nav-left-group { gap: 4px !important; }
  .header .main-menu-btn { min-width: 40px; }
  .header .logo-img { height: 46px; }
  .header .theme-toggle-btn, .header .header-action-btn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
  .header #langToggle { min-width: 36px; min-height: 36px; padding: 2px 6px !important; font-size: 0.85rem; }
}

/* ===== نافذة موافقة Google: بطاقة فاتحة بالوضع النهاري وداكنة بالليلي =====
   عنوانها وروابطها كانت #7c3aed/#a78bfa inline (الرابط تباينه 2.7 على الأبيض) وزر "إلغاء" ذهبي فاتح (3.25). */
.consent-title { color: #6d28d9; }
.consent-link { color: #6d28d9; text-decoration: underline; }
[data-theme="dark"] .consent-title, [data-theme="dark"] .consent-link { color: #a78bfa; }
#googleConsentModal .btn-outline { color: var(--accent-gold-dark); }
[data-theme="dark"] #googleConsentModal .btn-outline { color: var(--accent-gold-light); }
