/* ── Dark Mode - Global ────────────────────────────────────────────── */
html.dark body {
  background: #0f172a !important;
  color: #f8fafc !important;
}

html.dark a {
  color: #f8fafc;
}

/* Base layouts and containers */
html.dark .stats-strip,
html.dark .section,
html.dark .form-card,
html.dark .rest-card,
html.dark .mini-card,
html.dark #app-header,
html.dark .page-header,
html.dark .bottom-nav,
html.dark .modal-content,
html.dark .bg-white {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Borders */
html.dark .stat-item,
html.dark .menu-item,
html.dark .sep,
html.dark .border-b,
html.dark .border,
html.dark .rest-meta,
html.dark #filter-bar {
  border-color: #334155 !important;
}
html.dark .sep {
  background: #334155 !important;
}

/* Typography Colors */
html.dark .stat-val,
html.dark .mc-val,
html.dark .section-title,
html.dark .menu-label,
html.dark .rest-name,
html.dark .page-title,
html.dark .text-gray-900,
html.dark .text-slate-900,
html.dark .text-black,
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6 {
  color: #f8fafc !important;
}

html.dark .mc-label,
html.dark .field-label,
html.dark .menu-sub,
html.dark .rest-cuisine,
html.dark .text-gray-500,
html.dark .text-slate-500,
html.dark p {
  color: #94a3b8 !important;
}

html.dark .menu-right i, html.dark .text-gray-400 {
  color: #475569 !important;
}

/* Active and Hover states */
html.dark .menu-item:active,
html.dark .address-item:active,
html.dark .order-card:active {
  background: #334155 !important;
}
html.dark .logout-row:active {
  background: #451a23 !important;
}

/* Inputs and Forms */
html.dark .field-input,
html.dark .search-input,
html.dark input,
html.dark select,
html.dark textarea {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
html.dark .field-input:focus,
html.dark .search-input:focus,
html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
  background: #1e293b !important;
  border-color: var(--orange, #f97316) !important;
}
html.dark .search-wrap i {
  color: #64748b !important;
}

/* Specific component overrides */
html.dark .mc-deco {
  opacity: 0.1 !important;
}

html.dark .danger-zone {
  background: #451a23 !important;
  border-color: #9f1239 !important;
}
html.dark .danger-title {
  color: #fda4af !important;
}
html.dark .danger-sub {
  color: #fecdd3 !important;
}
html.dark .danger-btn {
  border-color: #f43f5e !important;
  color: #fda4af !important;
}
html.dark .danger-btn:hover {
  background: #9f1239 !important;
}

html.dark .toast-success {
  background: #064e3b !important;
  border-color: #065f46 !important;
  color: #a7f3d0 !important;
}
html.dark .toast-error {
  background: #7f1d1d !important;
  border-color: #991b1b !important;
  color: #fecaca !important;
}

/* Backgrounds for specific components */
html.dark #filter-bar {
  background: rgba(30, 41, 59, 0.97) !important;
}
html.dark .filter-chip {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
html.dark .filter-chip.active {
  background: var(--orange, #f97316) !important;
  color: white !important;
  border-color: var(--orange, #f97316) !important;
}

html.dark .cat-icon {
  background: #334155 !important;
  border-color: transparent !important;
}

/* Toggles */
html.dark .toggle-label {
  background: #475569 !important;
}
html.dark .toggle-input:checked + .toggle-label {
  background: var(--orange, #f97316) !important;
}

/* Bottom Nav */
html.dark .bottom-nav {
  background: rgba(30, 41, 59, 0.98) !important;
  border-top-color: #334155 !important;
}
html.dark .nav-item {
  color: #94a3b8 !important;
}
html.dark .nav-item.active {
  color: var(--orange, #f97316) !important;
}

/* Fixes for dark elements with specific hardcoded backgrounds */
html.dark .rest-badges .badge-dist {
  background: #334155 !important;
  color: #f8fafc !important;
}

/* Back button in headers */
html.dark .back-btn {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

/* Orders page - Stats & Cards */
html.dark .stat-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
html.dark .order-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html.dark .order-card.is-active {
  border-color: rgba(249, 115, 22, 0.3) !important;
}
html.dark .items-block {
  background: rgba(15, 23, 42, 0.4) !important;
  border-color: #334155 !important;
}
html.dark .price-row {
  border-color: #334155 !important;
}
html.dark .order-total {
  color: #f8fafc !important;
}
html.dark .progress-bar {
  background: #334155 !important;
}
