/* ============================================
   DASHBOARD DARK MODE - FINAL CSS OVERRIDE
   Принудительная фиксация стилей для Dark Mode
   ============================================ */

/* --- 1. ВИДЖЕТЫ СТАТИСТИКИ (Градиентные карточки) --- */
/* Эти карточки уже имеют градиенты, но усиливаем контраст в Dark Mode */
.dark .bg-gradient-to-br.from-blue-500 {
    background: linear-gradient(to bottom right, #3b82f6, #2563eb) !important;
}

.dark .bg-gradient-to-br.from-amber-500 {
    background: linear-gradient(to bottom right, #f59e0b, #d97706) !important;
}

/* --- 2. ОСНОВНЫЕ ВИДЖЕТЫ (Белые карточки) --- */
/* Принудительно меняем фон белых карточек на темный */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX): Ломает Tailwind dark: классы
.dark .bg-white {
    background-color: #1e293b !important;
}
*/

/* Границы карточек */
.dark .border-gray-200 {
    border-color: #334155 !important; /* slate-700 */
}

/* --- 3. ТЕКСТ ВНУТРИ ВИДЖЕТОВ --- */
.dark .text-gray-900 {
    color: #f1f5f9 !important; /* slate-100 */
}

.dark .text-gray-600 {
    color: #94a3b8 !important; /* slate-400 */
}

.dark .text-gray-800 {
    color: #e2e8f0 !important; /* slate-200 */
}

/* --- 4. БЕЙДЖИ СТАТУСОВ --- */
/* Новое дело */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.2) !important;
}
*/

.dark .text-blue-800 {
    color: #93c5fd !important; /* blue-300 */
}

/* В работе */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-amber-100 {
    background-color: rgba(245, 158, 11, 0.2) !important;
}
*/

.dark .text-amber-800 {
    color: #fcd34d !important; /* amber-300 */
}

/* Завершено */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.2) !important;
}
*/

.dark .text-green-800 {
    color: #86efac !important; /* green-300 */
}

/* --- 5. БАННЕР "ТРЕБУЕТ ВНИМАНИЯ" --- */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.15) !important;
}
*/

.dark .border-red-600 {
    border-color: #ef4444 !important; /* red-500 */
}

.dark .text-red-600 {
    color: #fca5a5 !important; /* red-300 */
}

/* --- 6. ПУСТОЙ БАННЕР "НАЙТИ ЮРИСТА" --- */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-slate-50 {
    background-color: #334155 !important;
}
*/

.dark .border-gray-300 {
    border-color: #475569 !important; /* slate-600 */
}

/* --- 7. БЫСТРЫЕ ДЕЙСТВИЯ (Вложенные карточки) --- */
/* Карточки внутри виджета "Быстрые действия" */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-white.dark\:bg-gray-700 {
    background-color: #334155 !important;
}
*/

.dark .border-gray-600 {
    border-color: #475569 !important; /* slate-600 */
}

/* Иконки внутри быстрых действий */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

.dark .bg-green-50 {
    background-color: rgba(34, 197, 94, 0.2) !important;
}
*/

.dark .text-blue-600 {
    color: #60a5fa !important; /* blue-400 */
}

.dark .text-green-600 {
    color: #4ade80 !important; /* green-400 */
}

/* --- 8. ССЫЛКИ И КНОПКИ --- */
.dark a.text-blue-600 {
    color: #60a5fa !important; /* blue-400 */
}

.dark a.text-blue-600:hover {
    color: #93c5fd !important; /* blue-300 */
}

/* --- 9. HOVER ЭФФЕКТЫ --- */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .hover\:bg-red-100:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
}
*/

.dark .hover\:border-blue-500:hover {
    border-color: #3b82f6 !important;
}

.dark .hover\:border-green-500:hover {
    border-color: #22c55e !important;
}

/* --- 10. СПЕЦИФИЧНЫЕ СЕЛЕКТОРЫ ДЛЯ КАРТОЧЕК ЗАКАЗОВ --- */
/* Карточки заказов на бирже */
.dark .border.border-gray-200.dark\:border-slate-700 {
    background-color: #1e293b !important; /* slate-800 */
    border-color: #334155 !important; /* slate-700 */
}

/* Текст внутри карточек заказов */
.dark .text-gray-900.dark\:text-white {
    color: #f1f5f9 !important; /* slate-100 */
}

.dark .text-gray-600.dark\:text-slate-400 {
    color: #94a3b8 !important; /* slate-400 */
}

/* --- 11. КНОПКИ --- */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX) - фоны кнопок лучше через dark:
.dark .bg-blue-900 {
    background-color: #1e40af !important;
}

.dark .bg-blue-900:hover {
    background-color: #1e3a8a !important;
}

.dark .bg-blue-600 {
    background-color: #2563eb !important;
}

.dark .bg-blue-600:hover {
    background-color: #1d4ed8 !important;
}
*/

/* --- 12. COMMAND CENTER HEADER (уже темный, но усиливаем) --- */
/* ЗАКОММЕНТИРОВАНО (BUG-05 FIX)
.dark .bg-slate-900 {
    background-color: #0f172a !important;
}
*/

.dark .text-slate-400 {
    color: #94a3b8 !important; /* slate-400 */
}

/* --- 13. ДОПОЛНИТЕЛЬНЫЕ ФИКСЫ ДЛЯ ВЛОЖЕННЫХ ЭЛЕМЕНТОВ --- */
/* SVG иконки */
.dark .text-gray-600 svg,
.dark .text-gray-900 svg {
    color: inherit !important;
}

/* Разделители */
.dark .border-dashed.border-gray-300 {
    border-color: #475569 !important; /* slate-600 */
}

/* --- 14. СПЕЦИФИЧНЫЕ КЛАССЫ ДЛЯ ТЕМНОЙ ТЕМЫ --- */
/* Убеждаемся, что dark: классы применяются */
/*
html.dark .bg-white,
html.dark .bg-slate-50,
html.dark .bg-red-50,
html.dark .bg-blue-50,
html.dark .bg-green-50,
html.dark .bg-amber-50 {
    background-color: #1e293b !important;
}
*/

/* Текст */
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700 {
    color: #f1f5f9 !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
    color: #94a3b8 !important;
}

/* Границы */
html.dark .border-gray-200,
html.dark .border-gray-300 {
    border-color: #334155 !important;
}