﻿/* рџЊ™ Dark Theme - Clean Version */
/* РўРћР›Р¬РљРћ С†РІРµС‚Р°, РјР°РєРµС‚ РЅРµ С‚СЂРѕРіР°РµРј! */

body.dark-theme {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* РћСЃРЅРѕРІРЅС‹Рµ С†РІРµС‚Р° С„РѕРЅР° */
body.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --border-color: #334155;
}

/* ============ Р‘Р•Р›Р«Р• Р¤РћРќР« СЃС‚Р°РЅРѕРІСЏС‚СЃСЏ РўР•РњРќР«РњР ============ */
body.dark-theme .bg-white {
  background-color: #1e293b !important;
}

body.dark-theme .bg-slate-50,
body.dark-theme .bg-gray-50,
body.dark-theme .bg-slate-100,
body.dark-theme .bg-gray-100 {
  background-color: #1e293b !important;
}

/* ============ Р§Р•Р РќР«Р• Р­Р›Р•РњР•РќРўР« СЃС‚Р°РЅРѕРІСЏС‚СЃСЏ РЎРРќРРњР ============ */
body.dark-theme .bg-slate-900,
body.dark-theme .bg-gray-900,
body.dark-theme .bg-black {
  background-color: #0C2558 !important;
}

body.dark-theme .bg-slate-800,
body.dark-theme .bg-gray-800 {
  background-color: #1e293b !important;
}

/* ============ РРќР”РР“Рћ РѕСЃС‚Р°РµС‚СЃСЏ РРќР”РР“Рћ ============ */
body.dark-theme .bg-indigo-600 {
  background-color: #0C2558 !important;
}

body.dark-theme .bg-indigo-700 {
  background-color: #1e40af !important;
}

/* ============ РўР•РљРЎРў ============ */
body.dark-theme .text-slate-900,
body.dark-theme .text-slate-800,
body.dark-theme .text-slate-700,
body.dark-theme .text-gray-900,
body.dark-theme .text-gray-800,
body.dark-theme .text-gray-700,
body.dark-theme .text-black {
  color: #f1f5f9 !important;
}

body.dark-theme .text-slate-600,
body.dark-theme .text-slate-500,
body.dark-theme .text-slate-400,
body.dark-theme .text-gray-600,
body.dark-theme .text-gray-500,
body.dark-theme .text-gray-400 {
  color: #cbd5e1 !important;
}

/* ============ INPUTS & SELECTS ============ */
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
  color: #94a3b8 !important;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
  background-color: #1e293b !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
}

/* ============ РЎРЎР«Р›РљР ============ */
body.dark-theme a {
  color: #60a5fa !important;
}

body.dark-theme a:hover {
  color: #93c5fd !important;
}

/* ============ Р‘РћР Р”Р®Р Р« ============ */
body.dark-theme .border-slate-200,
body.dark-theme .border-gray-200 {
  border-color: #334155 !important;
}

/* ============ РўРђР‘Р›РР¦Р« ============ */
body.dark-theme table {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
}

body.dark-theme th {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}

body.dark-theme td {
  border-color: #334155 !important;
}

/* ============ РљРќРћРџРљР ============ */
body.dark-theme button {
  color: inherit;
}

/* ============ РќРђР’РР“РђР¦РРЇ ============ */
body.dark-theme nav {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #f1f5f9 !important;
}

/* ============ РњРћР”РђР›Р¬РќР«Р• РћРљРќРђ ============ */
body.dark-theme .modal {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

body.dark-theme .modal-content {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
}

/* ============ Р—РђР“РћР›РћР’РљР ============ */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
  color: #f1f5f9 !important;
}

body.dark-theme p {
  color: #cbd5e1;
}

/* ============ CATEGORY BROWSER ============ */
body.dark-theme .category-browser {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .category-tab {
  color: #f8fafc !important;
}

body.dark-theme .category-tab * {
  color: #f8fafc !important;
}

body.dark-theme .category-tab:hover {
  background-color: #263449 !important;
}

body.dark-theme .category-tab.bg-indigo-50,
body.dark-theme .category-tab.text-indigo-700 {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

body.dark-theme .category-tab.bg-indigo-50 *,
body.dark-theme .category-tab.text-indigo-700 * {
  color: #0f172a !important;
  text-shadow: none !important;
}

body.dark-theme .category-tab.bg-indigo-50 .category-icon,
body.dark-theme .category-tab.text-indigo-700 .category-icon {
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.25);
}

body.dark-theme .category-panel {
  border-color: #334155 !important;
  background-color: #1e293b !important;
}

body.dark-theme .category-panel a {
  color: #f8fafc !important;
}

body.dark-theme .category-panel a:hover {
  color: #93c5fd !important;
}

body.dark-theme .category-subgroup {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-theme .category-inner-chip {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

body.dark-theme .category-inner-chip:hover {
  background-color: #1d4ed8 !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

body.dark-theme .favorite-photo-preview span {
  border-color: rgba(255, 255, 255, 0.75) !important;
}

body.dark-theme .favorite-note-box {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-theme .favorite-note-box input {
  background-color: #111827 !important;
  color: #e5e7eb !important;
  border-color: #475569 !important;
}

body.dark-theme #bulkPanel,
body.dark-theme .bg-amber-50,
body.dark-theme .bg-orange-50,
body.dark-theme .bg-green-50,
body.dark-theme .bg-red-50 {
  background-color: #0f172a !important;
}

body.dark-theme .text-amber-600,
body.dark-theme .text-amber-700 {
  color: #fbbf24 !important;
}

body.dark-theme .text-orange-700 {
  color: #fb923c !important;
}

body.dark-theme .text-green-600,
body.dark-theme .text-green-700 {
  color: #34d399 !important;
}

body.dark-theme .text-red-600,
body.dark-theme .text-red-700,
body.dark-theme .text-red-800 {
  color: #fca5a5 !important;
}

body.dark-theme .text-green-800 {
  color: #86efac !important;
}

body.dark-theme .border-red-200 {
  border-color: #7f1d1d !important;
}

body.dark-theme .border-green-200 {
  border-color: #166534 !important;
}

body.dark-theme input[type="password"] {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  caret-color: #f8fafc !important;
}

body.dark-theme input[type="password"]:-webkit-autofill,
body.dark-theme input[type="password"]:-webkit-autofill:hover,
body.dark-theme input[type="password"]:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc !important;
  box-shadow: 0 0 0 1000px #0f172a inset !important;
}

/* ============ CATEGORY MEGA MENU ============ */
body.dark-theme .category-mega {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .category-mega-sidebar {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-theme .category-mega-content,
body.dark-theme .category-mega-panel {
  background-color: #1e293b !important;
}

body.dark-theme .category-mega-tab {
  color: #cbd5e1 !important;
}

body.dark-theme .category-mega-tab:hover {
  background-color: #263449 !important;
  color: #f8fafc !important;
}

body.dark-theme .category-mega-tab.is-active {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

body.dark-theme .category-mega-tab.is-active .category-mega-icon {
  background-color: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
}

body.dark-theme .category-mega-all,
body.dark-theme .category-mega-sub-link {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .category-mega-all:hover,
body.dark-theme .category-mega-sub-link:hover {
  background-color: #1d4ed8 !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

body.dark-theme .category-mega-empty {
  background-color: #0f172a !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

/* Global JSP readability safety net */
body.dark-theme *,
body.dark-theme *::before,
body.dark-theme *::after {
  border-color: #334155;
}

body.dark-theme :where(div, section, article, aside, main, header, footer, nav, form, label, p, span, small, strong, em, li, td, th, dt, dd) {
  color: inherit;
}

body.dark-theme :where(.bg-white, .bg-slate-50, .bg-gray-50, .bg-slate-100, .bg-gray-100, .bg-blue-50, .bg-indigo-50, .bg-red-50, .bg-green-50, .bg-yellow-50, .bg-amber-50, .bg-orange-50, .bg-purple-50) {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme :where(.bg-white, .bg-slate-50, .bg-gray-50, .bg-slate-100, .bg-gray-100, .bg-blue-50, .bg-indigo-50, .bg-red-50, .bg-green-50, .bg-yellow-50, .bg-amber-50, .bg-orange-50, .bg-purple-50) *:not(button):not(a):not([class*="bg-"]) {
  color: inherit !important;
}

body.dark-theme :where(.text-white) {
  color: #ffffff !important;
}

body.dark-theme :where(.text-slate-900, .text-slate-800, .text-slate-700, .text-gray-900, .text-gray-800, .text-gray-700, .text-black, .text-blue-700, .text-indigo-700, .text-purple-700) {
  color: #f8fafc !important;
}

body.dark-theme :where(.text-slate-600, .text-slate-500, .text-slate-400, .text-gray-600, .text-gray-500, .text-gray-400) {
  color: #cbd5e1 !important;
}

body.dark-theme :where(.text-blue-500, .text-blue-600, .text-indigo-500, .text-indigo-600, .text-purple-500, .text-purple-600) {
  color: #93c5fd !important;
}

body.dark-theme :where(.text-red-500, .text-red-600, .text-red-700, .text-red-800, .text-red-900) {
  color: #fca5a5 !important;
}

body.dark-theme :where(.text-green-500, .text-green-600, .text-green-700, .text-green-800, .text-green-900) {
  color: #86efac !important;
}

body.dark-theme :where(.text-amber-500, .text-amber-600, .text-amber-700, .text-amber-800, .text-orange-500, .text-orange-600, .text-orange-700, .text-yellow-500, .text-yellow-600, .text-yellow-700) {
  color: #fbbf24 !important;
}

body.dark-theme :where(input, textarea, select, .form-control) {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
  caret-color: #f8fafc !important;
}

body.dark-theme :where(input, textarea, select, .form-control):disabled {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-theme :where(input, textarea)::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

body.dark-theme input:-webkit-autofill,
body.dark-theme input:-webkit-autofill:hover,
body.dark-theme input:-webkit-autofill:focus,
body.dark-theme textarea:-webkit-autofill,
body.dark-theme textarea:-webkit-autofill:hover,
body.dark-theme textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc !important;
  box-shadow: 0 0 0 1000px #0f172a inset !important;
}

body.dark-theme :where(table, thead, tbody, tr, th, td) {
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark-theme :where(.modal, .modal-content, .dropdown-menu, .popover, .tooltip-inner) {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark-theme :where(.alert, .badge, .label) {
  color: #f8fafc !important;
}

body.dark-theme a:not(.finda-logo):not(.finda-post-btn):not([class*="bg-"]):not(.btn) {
  color: #93c5fd !important;
}

body.dark-theme a:not(.finda-logo):not(.finda-post-btn):hover {
  color: #bfdbfe !important;
}

/* Dark button/readability hardening for legacy JSP pages */
body.dark-theme :where(button, .btn, a.btn, input[type="submit"], input[type="button"], input[type="reset"]) {
  color: #f8fafc !important;
  border-color: #475569 !important;
}

body.dark-theme :where(button.bg-indigo-600, button.bg-blue-600, a.bg-indigo-600, a.bg-blue-600, input[type="submit"].bg-indigo-600, input[type="submit"].bg-blue-600, .btn-primary, .api-button) {
  background-color: #f5c800 !important;
  color: #0c2558 !important;
  border-color: #f5c800 !important;
  text-shadow: none !important;
}

body.dark-theme :where(button.bg-indigo-600, button.bg-blue-600, a.bg-indigo-600, a.bg-blue-600, input[type="submit"].bg-indigo-600, input[type="submit"].bg-blue-600, .btn-primary, .api-button) * {
  color: inherit !important;
}

body.dark-theme :where(button.bg-indigo-600:hover, button.bg-blue-600:hover, a.bg-indigo-600:hover, a.bg-blue-600:hover, input[type="submit"].bg-indigo-600:hover, input[type="submit"].bg-blue-600:hover, .btn-primary:hover, .api-button:hover) {
  background-color: #f0b800 !important;
  color: #0c2558 !important;
}

body.dark-theme :where(.bg-green-600, .bg-green-700, .bg-red-600, .bg-red-700, .bg-gray-600, .bg-gray-700, .bg-slate-600, .bg-slate-700) {
  color: #ffffff !important;
}

body.dark-theme :where(button.text-red-500, button.text-red-600, button.text-red-700, a.text-red-500, a.text-red-600, a.text-red-700) {
  color: #fca5a5 !important;
  background-color: transparent !important;
}

body.dark-theme :where(button.text-indigo-500, button.text-indigo-600, button.text-indigo-700, a.text-indigo-500, a.text-indigo-600, a.text-indigo-700) {
  color: #93c5fd !important;
}

body.dark-theme .finda-search-box {
  background-color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
}

body.dark-theme .finda-search-box input,
body.dark-theme .finda-search-box select,
body.dark-theme .finda-search-box .region-picker-toggle {
  background-color: transparent !important;
  color: #0a1628 !important;
  border-color: transparent !important;
}

body.dark-theme .finda-search-box input::placeholder {
  color: #51637d !important;
}

body.dark-theme .finda-search-box button[type="submit"] {
  background-color: #f5c800 !important;
  color: #0c2558 !important;
  border-color: #f5c800 !important;
}

body.dark-theme .region-picker-panel,
body.dark-theme .region-picker-panel :where(button, div) {
  background-color: #102445 !important;
  color: #f8fafc !important;
  border-color: rgba(208,232,248,.18) !important;
}

body.dark-theme .region-picker-panel button:hover {
  background-color: #18365f !important;
  color: #ffffff !important;
}

body.dark-theme .finda-main-nav .finda-post-btn,
body.dark-theme a.finda-post-btn {
  background-color: #f5c800 !important;
  color: #0c2558 !important;
  border-color: #f5c800 !important;
  text-shadow: none !important;
}

/* Full contrast pass across all JSP pages and Tailwind dark-mode variants */
html.dark body,
body.dark,
html[data-theme="dark"] body {
  background-color: #07152e !important;
  color: #f8fafc !important;
}

html.dark :where(.dark\:bg-slate-800, .dark\:bg-slate-900, .dark\:bg-gray-800, .dark\:bg-gray-900),
body.dark :where(.dark\:bg-slate-800, .dark\:bg-slate-900, .dark\:bg-gray-800, .dark\:bg-gray-900),
html[data-theme="dark"] :where(.dark\:bg-slate-800, .dark\:bg-slate-900, .dark\:bg-gray-800, .dark\:bg-gray-900),
body.dark-theme :where(.dark\:bg-slate-800, .dark\:bg-slate-900, .dark\:bg-gray-800, .dark\:bg-gray-900) {
  background-color: #102445 !important;
  color: #f8fafc !important;
}

html.dark :where(.dark\:text-white, .dark\:text-slate-100, .dark\:text-gray-100),
body.dark :where(.dark\:text-white, .dark\:text-slate-100, .dark\:text-gray-100),
html[data-theme="dark"] :where(.dark\:text-white, .dark\:text-slate-100, .dark\:text-gray-100),
body.dark-theme :where(.dark\:text-white, .dark\:text-slate-100, .dark\:text-gray-100) {
  color: #f8fafc !important;
}

html.dark :where(.dark\:text-slate-300, .dark\:text-slate-400, .dark\:text-gray-300, .dark\:text-gray-400),
body.dark :where(.dark\:text-slate-300, .dark\:text-slate-400, .dark\:text-gray-300, .dark\:text-gray-400),
html[data-theme="dark"] :where(.dark\:text-slate-300, .dark\:text-slate-400, .dark\:text-gray-300, .dark\:text-gray-400),
body.dark-theme :where(.dark\:text-slate-300, .dark\:text-slate-400, .dark\:text-gray-300, .dark\:text-gray-400) {
  color: #c8d6ea !important;
}

html.dark :where(button, .btn, a.btn, a[role="button"], input[type="submit"], input[type="button"], input[type="reset"]),
body.dark :where(button, .btn, a.btn, a[role="button"], input[type="submit"], input[type="button"], input[type="reset"]),
html[data-theme="dark"] :where(button, .btn, a.btn, a[role="button"], input[type="submit"], input[type="button"], input[type="reset"]),
body.dark-theme :where(button, .btn, a.btn, a[role="button"], input[type="submit"], input[type="button"], input[type="reset"]) {
  color: #f8fafc !important;
  text-shadow: none !important;
}

html.dark :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button),
body.dark :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button),
html[data-theme="dark"] :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button),
body.dark-theme :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button) {
  background: #f5c800 !important;
  border-color: #f5c800 !important;
  color: #0c2558 !important;
}

html.dark :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button) *,
body.dark :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button) *,
html[data-theme="dark"] :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button) *,
body.dark-theme :where(button[class*="bg-indigo-"], button[class*="bg-blue-"], a[class*="bg-indigo-"], a[class*="bg-blue-"], input[type="submit"][class*="bg-indigo-"], input[type="submit"][class*="bg-blue-"], .auth-primary-button) * {
  color: inherit !important;
}

html.dark :where(button[class*="bg-green-"], button[class*="bg-red-"], button[class*="bg-slate-"], button[class*="bg-gray-"], a[class*="bg-green-"], a[class*="bg-red-"], a[class*="bg-slate-"], a[class*="bg-gray-"], .auth-success-button),
body.dark :where(button[class*="bg-green-"], button[class*="bg-red-"], button[class*="bg-slate-"], button[class*="bg-gray-"], a[class*="bg-green-"], a[class*="bg-red-"], a[class*="bg-slate-"], a[class*="bg-gray-"], .auth-success-button),
html[data-theme="dark"] :where(button[class*="bg-green-"], button[class*="bg-red-"], button[class*="bg-slate-"], button[class*="bg-gray-"], a[class*="bg-green-"], a[class*="bg-red-"], a[class*="bg-slate-"], a[class*="bg-gray-"], .auth-success-button),
body.dark-theme :where(button[class*="bg-green-"], button[class*="bg-red-"], button[class*="bg-slate-"], button[class*="bg-gray-"], a[class*="bg-green-"], a[class*="bg-red-"], a[class*="bg-slate-"], a[class*="bg-gray-"], .auth-success-button) {
  color: #ffffff !important;
}

html.dark :where(input, textarea, select, .form-control),
body.dark :where(input, textarea, select, .form-control),
html[data-theme="dark"] :where(input, textarea, select, .form-control),
body.dark-theme :where(input, textarea, select, .form-control) {
  background-color: #07152e !important;
  color: #f8fafc !important;
  border-color: rgba(208,232,248,.28) !important;
  caret-color: #f8fafc !important;
}

html.dark :where(input, textarea)::placeholder,
body.dark :where(input, textarea)::placeholder,
html[data-theme="dark"] :where(input, textarea)::placeholder,
body.dark-theme :where(input, textarea)::placeholder {
  color: #a8bbd4 !important;
  opacity: 1 !important;
}

/* Last-resort button readability guard for pages that do not load finda-brand.css. */
body.dark-theme :where(
  .profile-primary-action,
  button[class*="bg-indigo-"],
  button[class*="bg-blue-"],
  a[class*="bg-indigo-"],
  a[class*="bg-blue-"],
  input[type="submit"][class*="bg-indigo-"],
  input[type="submit"][class*="bg-blue-"],
  .btn-primary,
  .auth-primary-button,
  .api-button
),
html.dark :where(
  .profile-primary-action,
  button[class*="bg-indigo-"],
  button[class*="bg-blue-"],
  a[class*="bg-indigo-"],
  a[class*="bg-blue-"],
  input[type="submit"][class*="bg-indigo-"],
  input[type="submit"][class*="bg-blue-"],
  .btn-primary,
  .auth-primary-button,
  .api-button
) {
  background: #f5c800 !important;
  color: #0c2558 !important;
  border-color: #f5c800 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #0c2558 !important;
}

body.dark-theme :where(
  .profile-primary-action,
  button[class*="bg-indigo-"],
  button[class*="bg-blue-"],
  a[class*="bg-indigo-"],
  a[class*="bg-blue-"],
  input[type="submit"][class*="bg-indigo-"],
  input[type="submit"][class*="bg-blue-"],
  .btn-primary,
  .auth-primary-button,
  .api-button
) :where(span, i, svg, strong, b),
html.dark :where(
  .profile-primary-action,
  button[class*="bg-indigo-"],
  button[class*="bg-blue-"],
  a[class*="bg-indigo-"],
  a[class*="bg-blue-"],
  input[type="submit"][class*="bg-indigo-"],
  input[type="submit"][class*="bg-blue-"],
  .btn-primary,
  .auth-primary-button,
  .api-button
) :where(span, i, svg, strong, b) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

body.dark-theme :where(.profile-danger-action, .btn-danger, button[class*="bg-red-"], a[class*="bg-red-"]),
html.dark :where(.profile-danger-action, .btn-danger, button[class*="bg-red-"], a[class*="bg-red-"]) {
  color: #ffffff !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ===== ГЛОБАЛЬНО: в тёмной теме гасим захардкоженные светлые инлайн-фоны ===== */
body.dark-theme [style*="background:#fff"],
body.dark-theme [style*="background: #fff"],
body.dark-theme [style*="background-color:#fff"],
body.dark-theme [style*="background-color: #fff"],
body.dark-theme [style*="background:#f8"],
body.dark-theme [style*="background: #f8"],
body.dark-theme [style*="background-color:#f8"],
body.dark-theme [style*="background-color: #f8"],
body.dark-theme [style*="background:#f5"],
body.dark-theme [style*="background: #f5"],
body.dark-theme [style*="background-color:#f5"],
body.dark-theme [style*="background-color: #f5"],
body.dark-theme [style*="background:white"],
body.dark-theme [style*="background: white"] {
  background-color: #16213e !important;
  border-color: rgba(255,255,255,.10) !important;
}
