/* =====================================================================
   سكن — الوضع الداكن
   بيتفعّل بإضافة data-theme="dark" على <html>. الألوان البرتقالية
   بتفضل زي ما هي (بتبان أحلى على الغامق)، والأسطح البيضاء بتتقلب لغامق دافئ.
   ===================================================================== */
html[data-theme="dark"]{
  --ink:#F2EEE8; --ink-soft:#C6BFB5; --ink-faint:#948C81;
  --bg:#15130F; --bg-soft:#201C17; --line:#332E27;
  --brand:#F06A4B; --brand-deep:#E15B3D; --brand-tint:#2C221C;
  --teal:#2AA491; --gold:#E0B45E;
  color-scheme:dark;
}

/* الأسطح البيضاء الثابتة → غامق دافئ */
html[data-theme="dark"] header,
html[data-theme="dark"] .listing-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .hero-search,
html[data-theme="dark"] .quick-search button,
html[data-theme="dark"] .filter-sidebar,
html[data-theme="dark"] .filter-group,
html[data-theme="dark"] .site-loc-results,
html[data-theme="dark"] .account-dropdown,
html[data-theme="dark"] .mobile-drawer .panel,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .nbhd-card,
html[data-theme="dark"] .prop-side,
html[data-theme="dark"] .view-toggle,
html[data-theme="dark"] .btn-fav,
html[data-theme="dark"] .btn-search,
html[data-theme="dark"] .account-btn,
html[data-theme="dark"] .hs-field,
html[data-theme="dark"] .select-pill select,
html[data-theme="dark"] .sort-control select,
html[data-theme="dark"] .sk-cmp-btn,
html[data-theme="dark"] .prop-fav{
  background:var(--bg-soft) !important;
  border-color:var(--line) !important;
}

/* الحقول */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:var(--bg-soft) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{ color:var(--ink-faint) !important; }

/* الفوتر */
html[data-theme="dark"] footer{ background:var(--bg-soft); border-top:1px solid var(--line); }

/* الهيدر شبه الشفاف عند السكرول */
html[data-theme="dark"] header.scrolled{ background:rgba(30,27,22,.9) !important; }

/* المودالات (خلفياتها البيضاء داخلية) */
html[data-theme="dark"] #favModal > div,
html[data-theme="dark"] #authModal > div,
html[data-theme="dark"] #contactModal > div,
html[data-theme="dark"] .sk-ai-sheet,
html[data-theme="dark"] .sk-cmp-sheet,
html[data-theme="dark"] #skPwa{
  background:var(--bg-soft) !important;
  color:var(--ink);
}

/* جداول المقارنة */
html[data-theme="dark"] .sk-cmp-table td,
html[data-theme="dark"] .sk-cmp-table th{ border-color:var(--line); }
html[data-theme="dark"] .sk-cmp-table .rowlbl{ background:var(--bg); color:var(--ink-soft); }

/* شرائح ونصوص خفيفة تفضل مقروءة */
html[data-theme="dark"] .badge-status{ background:var(--bg) !important; color:var(--ink) !important; }
html[data-theme="dark"] .listing-specs,
html[data-theme="dark"] .listing-loc{ color:var(--ink-soft); }

/* صور السكيلتون */
html[data-theme="dark"] .skeleton-photo, html[data-theme="dark"] .skeleton-line{ background:#2A251F; }

/* قسم "ليه تختار سكن" — الكروت البيضا تبقى غامقة (من غير !important عشان hover البرتقالي يفضل شغّال) */
html[data-theme="dark"] .tm-card{ background:var(--bg-soft); border-color:var(--line); }
html[data-theme="dark"] .tm-card:hover{ background:var(--brand); border-color:var(--brand); }
html[data-theme="dark"] .tm-icon{ background:var(--brand-tint); }

/* شهادة العميل + شريط الثقة السفلي */
html[data-theme="dark"] .trust-band{ background:var(--bg-soft); }

/* زر تبديل الثيم */
.theme-toggle{ background:none; border:1px solid var(--line); border-radius:50%; width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; color:var(--ink); flex-shrink:0; transition:border-color .18s, color .18s; }
.theme-toggle:hover{ border-color:var(--brand); color:var(--brand); }
.theme-toggle svg{ width:19px; height:19px; }
.theme-toggle .moon{ display:block; } .theme-toggle .sun{ display:none; }
html[data-theme="dark"] .theme-toggle .moon{ display:none; } html[data-theme="dark"] .theme-toggle .sun{ display:block; }
