/* DIMACEA | Extraído de index.html | bloque CSS 3 */

/* Ajustes específicos para que TODO el dashboard se lea bien en modo noche */
        body.dark #databasePanel .bg-slate-50,
        body.dark #sidebarScroll .bg-white.border.border-red-200.rounded-xl,
        body.dark #sidebarScroll .bg-white.border.border-blue-200.rounded-xl,
        body.dark #nonWorkList,
        body.dark #nonWorkListAll,
        body.dark #globalTargetDisplay,
        body.dark #nonWorkCount,
        body.dark #nonWorkCountAll {
            color: #e5e7eb !important;
        }

        body.dark #databasePanel .bg-slate-50,
        body.dark #sidebarScroll .bg-white.border.border-red-200.rounded-xl,
        body.dark #sidebarScroll .bg-white.border.border-blue-200.rounded-xl {
            background: #0f172a !important;
            border-color: #334155 !important;
        }

        body.dark #databasePanel .bg-slate-50 .text-slate-600,
        body.dark #databasePanel .bg-slate-50 .text-slate-400,
        body.dark #sidebarScroll .bg-white.border.border-red-200.rounded-xl .text-slate-400,
        body.dark #sidebarScroll .bg-white.border.border-red-200.rounded-xl .text-slate-600,
        body.dark #sidebarScroll .bg-white.border.border-blue-200.rounded-xl .text-slate-400,
        body.dark #sidebarScroll .bg-white.border.border-blue-200.rounded-xl .text-slate-600,
        body.dark #sidebarScroll .bg-white.border.border-blue-200.rounded-xl .text-slate-800 {
            color: #e5e7eb !important;
        }

        /* Tarjetas principales del dashboard */
        body.dark #noBuyCard,
        body.dark #buyCard,
        body.dark #weeklyCard,
        body.dark #deliveryCard,
        body.dark #topProductsCard,
        body.dark #topClientsCard,
        body.dark .section-scroll-card,
        body.dark .card {
            background: #111827 !important;
            border-color: #334155 !important;
        }

        /* Headers / info / filtros / footer internos */
        body.dark #noBuyCard .card-header,
        body.dark #buyCard .card-header,
        body.dark #weeklyCard .card-header,
        body.dark #deliveryCard .card-header,
        body.dark #noBuyInsightBox,
        body.dark #weeklyHitInfo,
        body.dark #weeklyHitFilters,
        body.dark #deliveryControlInfo,
        body.dark #deliveryControlFilters,
        body.dark #noBuyCard .card-footer-fixed,
        body.dark #buyCard .card-footer-fixed,
        body.dark #weeklyCard .card-footer-fixed,
        body.dark #deliveryCard .card-footer-fixed {
            background: #0f172a !important;
            color: #e5e7eb !important;
            border-color: #334155 !important;
        }

        /* Zonas con scroll */
        body.dark #noBuyCard .card-body,
        body.dark #buyCard .card-body,
        body.dark #weeklyCard .card-body,
        body.dark #deliveryCard .card-body,
        body.dark #weeklyCard #weeklyHitsList,
        body.dark #deliveryList,
        body.dark #tableBodyNoBuy,
        body.dark #tableBodyBuy {
            background: #111827 !important;
            color: #e5e7eb !important;
        }

        /* Encabezados sticky de tablas */
        body.dark #noBuyCard thead,
        body.dark #buyCard thead,
        body.dark #noBuyCard thead th,
        body.dark #buyCard thead th {
            background: #0f172a !important;
            color: #cbd5e1 !important;
            border-color: #334155 !important;
        }

        /* Filas y hover */
        body.dark #tableBodyNoBuy tr,
        body.dark #tableBodyBuy tr,
        body.dark #deliveryList>div,
        body.dark .mobile-week-card,
        body.dark .mobile-week-item {
            background: transparent !important;
            color: #e5e7eb !important;
            border-color: #334155 !important;
        }

        body.dark #tableBodyNoBuy tr:hover,
        body.dark #tableBodyBuy tr:hover,
        body.dark #deliveryList>div:hover,
        body.dark .mobile-week-card:hover {
            background: rgba(30, 41, 59, .6) !important;
        }

        /* Textos críticos que se perdían */
        body.dark #tableBodyNoBuy td,
        body.dark #tableBodyBuy td,
        body.dark .client-name,
        body.dark .client-code,
        body.dark .client-sub,
        body.dark .mobile-day-right,
        body.dark #weeklyHitInfo,
        body.dark #deliveryControlInfo,
        body.dark #weeklyHitFooter,
        body.dark #deliveryFooter,
        body.dark #footNoBuyCount,
        body.dark #footBuyCount,
        body.dark #footBuyAmount {
            color: #e5e7eb !important;
        }

        body.dark .text-slate-300,
        body.dark .text-slate-400,
        body.dark .text-slate-500,
        body.dark .text-slate-600,
        body.dark .text-slate-700,
        body.dark .text-slate-800 {
            color: #d1d5db !important;
        }

        /* Chips / badges en móvil */
        body.dark .mobile-meta-chip {
            background: #1f2937 !important;
            color: #e5e7eb !important;
            border-color: #475569 !important;
        }

        body.dark .mobile-amount-chip {
            background: #172554 !important;
            color: #bfdbfe !important;
            border-color: #1d4ed8 !important;
        }

        body.dark .badge-day {
            background: #1f2937 !important;
            color: #e5e7eb !important;
            border-color: #475569 !important;
        }

        body.dark .badge-core {
            filter: saturate(.95) brightness(.95);
        }

        /* Golpes de venta */
        body.dark .mobile-week-card {
            background: #111827 !important;
        }

        body.dark .mobile-week-item {
            background: #0f172a !important;
        }

        body.dark .weekly-filter-btn:not(.bg-violet-600),
        body.dark .weekly-day-filter-btn:not(.bg-slate-900) {
            background: #1f2937 !important;
            color: #e5e7eb !important;
            border-color: #475569 !important;
        }

        body.dark #weeklyHitSummary {
            background: #312e81 !important;
            color: #e0e7ff !important;
        }

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

        body.dark #weeklyHitsList .text-slate-500 {
            color: #cbd5e1 !important;
        }

        body.dark #weeklyHitsList .text-slate-700,
        body.dark #weeklyHitsList .text-slate-800 {
            color: #f3f4f6 !important;
        }

        /* Control de entregas */
        body.dark .delivery-chip {
            background: #1f2937 !important;
            color: #e5e7eb !important;
            border-color: #475569 !important;
        }

        body.dark #deliveryList .bg-white,
        body.dark #deliveryList .rounded-2xl,
        body.dark #deliveryList .bg-slate-50\/60 {
            background: #0f172a !important;
            color: #e5e7eb !important;
            border-color: #334155 !important;
        }

        body.dark #deliveryList .text-slate-700,
        body.dark #deliveryList .text-slate-800,
        body.dark #deliveryList .text-slate-600,
        body.dark #deliveryList .text-slate-500 {
            color: #e5e7eb !important;
        }

        body.dark #deliveryList .border-slate-100,
        body.dark #deliveryList .border-slate-200 {
            border-color: #334155 !important;
        }

        /* Días de preventa restante / cuadros superiores */
        body.dark .projection-box,
        body.dark .qty-box,
        body.dark .bg-white\/60,
        body.dark .bg-white\/80 {
            background: #111827 !important;
            color: #e5e7eb !important;
            border-color: #334155 !important;
        }

        body.dark .projection-box *,
        body.dark .qty-box * {
            color: inherit !important;
        }

        /* Scrollbars visibles en oscuro */
        body.dark .scroller::-webkit-scrollbar-track {
            background: #0f172a !important;
        }

        body.dark .scroller::-webkit-scrollbar-thumb {
            background: #475569 !important;
            border-radius: 999px;
        }
