/* Dark Mode Styles */

/* Contenedores y cards */
.dark .bg-white {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
}

.dark .bg-gray-50 {
    background-color: #1f2937 !important;
}

.dark .bg-gray-100 {
    background-color: #1f2937 !important;
}

/* Textos */
.dark .text-gray-800,
.dark .text-gray-900 {
    color: #f3f4f6 !important;
}

.dark .text-gray-700 {
    color: #d1d5db !important;
}

.dark .text-gray-600 {
    color: #9ca3af !important;
}

.dark .text-gray-500 {
    color: #6b7280 !important;
}

.dark .text-gray-400 {
    color: #4b5563 !important;
}

/* Títulos y headings */
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
    color: #f3f4f6 !important;
}

.dark h1.font-semibold,
.dark h2.font-semibold,
.dark h3.font-semibold,
.dark .text-lg.font-semibold,
.dark .text-xl.font-bold,
.dark h1.font-bold {
    color: #f3f4f6 !important;
}

/* Texto por defecto en dark mode */
.dark {
    color: #f3f4f6;
}

/* Bordes */
.dark .border-gray-200 {
    border-color: #374151 !important;
}

.dark .border-gray-300 {
    border-color: #4b5563 !important;
}

.dark .divide-gray-200 > * + * {
    border-color: #374151 !important;
}

/* Inputs y forms */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="number"],
.dark input[type="date"],
.dark input[type="time"],
.dark input[type="file"],
.dark select,
.dark textarea {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #6b7280 !important;
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: #3b82f6 !important;
    background-color: #1f2937 !important;
}

/* Tables */
.dark table {
    color: #f3f4f6 !important;
    background-color: transparent !important;
}

.dark thead {
    background-color: #1f2937 !important;
}

.dark tbody {
    background-color: transparent !important;
}

.dark tbody tr {
    border-color: #374151 !important;
    background-color: transparent !important;
}

.dark tbody tr:hover {
    background-color: #374151 !important;
}

.dark thead th {
    color: #d1d5db !important;
}

.dark .bg-white tbody,
.dark tbody.bg-white,
.dark table.dataTable tbody,
.dark table tbody.bg-white {
    background-color: transparent !important;
}

.dark thead.bg-gray-50 {
    background-color: #1f2937 !important;
}

/* DataTables específico */
.dark .dataTables_wrapper {
    color: #f3f4f6 !important;
}

.dark .dataTables_wrapper .dataTables_length select,
.dark .dataTables_wrapper .dataTables_filter input {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark .dataTables_wrapper .dataTables_length label,
.dark .dataTables_wrapper .dataTables_filter label {
    color: #d1d5db !important;
}

.dark .dataTables_wrapper .dataTables_info {
    color: #9ca3af !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button.next {
    background-color: #1f2937 !important;
    background-image: none !important;
    background: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #374151 !important;
    border: 1px solid #374151 !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #475569 !important;
    background-image: none !important;
    background: #475569 !important;
    color: #ffffff !important;
    border-color: #64748b !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #374151 !important;
    background-image: none !important;
    background: #374151 !important;
    color: #f3f4f6 !important;
    border-color: #475569 !important;
}

/* DataTables Buttons - Sin degradados ni colores */
.dark .dt-button,
.dark .dt-buttons .dt-button,
.dark .buttons-copy,
.dark .buttons-csv,
.dark .buttons-excel,
.dark .buttons-pdf,
.dark .buttons-print,
.dark button.dt-button,
.dark a.dt-button {
    background-color: #475569 !important;
    background-image: none !important;
    background: #475569 !important;
    color: #f3f4f6 !important;
    border: 1px solid #64748b !important;
    box-shadow: none !important;
}

.dark .dt-button:hover,
.dark .dt-buttons .dt-button:hover,
.dark .buttons-copy:hover,
.dark .buttons-csv:hover,
.dark .buttons-excel:hover,
.dark .buttons-pdf:hover,
.dark .buttons-print:hover,
.dark button.dt-button:hover,
.dark a.dt-button:hover {
    background-color: #334155 !important;
    background-image: none !important;
    background: #334155 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
    box-shadow: none !important;
}

.dark .dt-button:active,
.dark button.dt-button:active,
.dark a.dt-button:active {
    background-color: #1e293b !important;
    background-image: none !important;
    background: #1e293b !important;
    box-shadow: none !important;
}

.dark .dt-buttons {
    background: transparent !important;
}

/* Sombras */
.dark .shadow,
.dark .shadow-sm,
.dark .shadow-md,
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3) !important;
}

/* Alertas y mensajes */
.dark .bg-blue-50 {
    background-color: #1e3a5f !important;
}

.dark .bg-green-50 {
    background-color: #064e3b !important;
}

.dark .bg-red-50 {
    background-color: #7f1d1d !important;
}

.dark .bg-yellow-50 {
    background-color: #78350f !important;
}

.dark .text-blue-800,
.dark .text-blue-900 {
    color: #93c5fd !important;
}

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

.dark .text-red-800,
.dark .text-red-900 {
    color: #fca5a5 !important;
}

.dark .text-yellow-800,
.dark .text-yellow-900 {
    color: #fde047 !important;
}

/* Badges y tags */
.dark .bg-gray-200 {
    background-color: #374151 !important;
}

/* Links - Solo para links sin clases específicas de color */
.dark a:not([class*="bg-"]):not([class*="btn"]):not([class*="text-slate"]):not([class*="text-gray"]):not([class*="text-red"]) {
    color: #c6d1e0 !important;
}

.dark a:not([class*="bg-"]):not([class*="btn"]):not([class*="text-slate"]):not([class*="text-gray"]):not([class*="text-red"]):hover {
    color: #93c5fd !important;
}

/* Stats cards hover */
.dark .stat-number {
    color: #f3f4f6 !important;
}

/* Footer */
.dark footer {
    background-color: #1f2937 !important;
    border-top-color: #374151 !important;
}

/* Modal & SweetAlert2 */
.dark .swal2-popup {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
}

.dark .swal2-title {
    color: #f3f4f6 !important;
}

.dark .swal2-content {
    color: #d1d5db !important;
}

/* Chart.js - sin filtros para mantener colores originales de la paleta gris y dorado */

/* Cards especiales con gradientes */
.dark .bg-gradient-to-r {
    opacity: 0.95;
}

/* Scrollbar personalizado para dark mode */
.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Mejoras para imágenes en dark mode */
.dark img:not([class*="logo"]) {
    opacity: 0.9;
}

.dark img:hover {
    opacity: 1;
}

/* Botones secundarios */
.dark .bg-slate-600 {
    background-color: #475569 !important;
}

.dark .bg-slate-600:hover {
    background-color: #334155 !important;
}

/* Iconos de acción - Mantener visibilidad en dark mode */
.dark .text-slate-500 {
    color: #94a3b8 !important;
}

.dark .text-slate-600 {
    color: #cbd5e1 !important;
}

.dark .text-slate-700 {
    color: #e2e8f0 !important;
}

.dark .text-slate-900 {
    color: #f1f5f9 !important;
}

.dark a.text-slate-600:hover,
.dark a.text-slate-500:hover {
    color: #f1f5f9 !important;
}

/* Labels de formularios */
.dark label {
    color: #d1d5db !important;
}

.dark .text-gray-700.font-medium,
.dark .text-sm.font-medium.text-gray-700 {
    color: #d1d5db !important;
}

/* Vista de botones activos/inactivos */
.dark .vista-btn {
    background-color: #374151 !important;
    color: #d1d5db !important;
}

.dark .vista-btn.bg-slate-600 {
    background-color: #475569 !important;
    color: #ffffff !important;
}
