/* ============================================================
   ميزات إضافية: الوضع الليلي
   يُحمَّل بعد style.min.css في الواجهة العامة فقط.
   ============================================================ */

/* ================= الوضع الليلي ================= */
html[data-theme="dark"] {
  --primary-light: #123f31;
  --amber-soft: #3b2f14;
  --danger-soft: #3a1616;
  --info-soft: #152440;
  --success-soft: #12331f;
  --gray-50: #15181e;
  --gray-100: #1b1f27;
  --gray-200: #2a2f3a;
  --gray-300: #3b4150;
  --gray-500: #9aa3b2;
  --gray-700: #d1d5db;
  --gray-900: #f3f4f6;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5);
}

html[data-theme="dark"] body { background: #0e1014; color: var(--gray-900); }

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .mobile-topbar,
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .card,
html[data-theme="dark"] .ad-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .g-slide,
html[data-theme="dark"] .ad-thumb,
html[data-theme="dark"] .profile-avatar { background: var(--gray-100); }

html[data-theme="dark"] .btn-outline { border-color: var(--primary); color: var(--primary); }
html[data-theme="dark"] .btn-outline:hover { background: var(--primary-light); }

html[data-theme="dark"] .form-control,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] select.form-control {
  background: #0e1014;
  color: var(--gray-900);
  border-color: var(--gray-200);
}

html[data-theme="dark"] .alert-success { background: var(--success-soft); color: #bbf7d0; border-color: #166534; }
html[data-theme="dark"] .alert-danger,
html[data-theme="dark"] .alert-error { background: var(--danger-soft); color: #fecaca; border-color: #991b1b; }
html[data-theme="dark"] .alert-warning { background: var(--amber-soft); color: #fde68a; border-color: #92400e; }
html[data-theme="dark"] .alert-info { background: var(--info-soft); color: #bfdbfe; border-color: #1e40af; }

html[data-theme="dark"] .table th { background: var(--gray-50); }
html[data-theme="dark"] .table tr:hover td { background: var(--gray-50); }

html[data-theme="dark"] .disclaimer-box,
html[data-theme="dark"] .empty-state { background: var(--gray-100); border-color: var(--gray-200); }

html[data-theme="dark"] .bottom-nav-add { background: var(--primary); color: #fff; }
