/**
 * Temas de Color - Sistema de Reportes Municipales
 * Modo Claro y Modo Oscuro con temas específicos
 */

/* ========================================
   LIGHT MODE THEMES
   ======================================== */

/* Theme Light (Default for Light Mode) */
body.theme-light {
    --bg-main: #f8f9fc !important;
    --bg-card: #ffffff !important;
    --bg-hover: #eaecf4 !important;
    --text-main: #5a5c69 !important;
    --text-muted: #858796 !important;
    --mobile-nav-bg: #ffffff !important;
    background-color: #f8f9fc !important;
    color: #5a5c69 !important;
}

/* Theme Blue (Light Mode) */
body.theme-blue {
    --bg-main: #e3f2fd !important;
    --bg-card: #ffffff !important;
    --bg-hover: #bbdefb !important;
    --text-main: #0d47a1 !important;
    --text-muted: #1565c0 !important;
    --mobile-nav-bg: #ffffff !important;
    background-color: #e3f2fd !important;
    color: #0d47a1 !important;
}

/* Theme Cyan (Light Mode) */
body.theme-cyan {
    --bg-main: #e0f7fa !important;
    --bg-card: #ffffff !important;
    --bg-hover: #b2ebf2 !important;
    --text-main: #006064 !important;
    --text-muted: #00838f !important;
    --mobile-nav-bg: #ffffff !important;
    background-color: #e0f7fa !important;
    color: #006064 !important;
}

/* ========================================
   DARK MODE THEMES
   ======================================== */

/* Theme Purple Dark (Default for Dark Mode) */
body.theme-purple {
    --bg-main: #5a4a7d !important;
    --bg-card: #6b5a8d !important;
    --bg-hover: #7a6a9d !important;
    --text-main: #ffffff !important;
    --text-muted: #e0d4ff !important;
    --mobile-nav-bg: #4a3a6d !important;
    background-color: #5a4a7d !important;
    color: #ffffff !important;
}

/* Theme Blue Dark */
body.theme-blue-dark {
    --bg-main: #2c3e50 !important;
    --bg-card: #34495e !important;
    --bg-hover: #3d566e !important;
    --text-main: #ffffff !important;
    --text-muted: #e0e6ed !important;
    --mobile-nav-bg: #1a252f !important;
    background-color: #2c3e50 !important;
    color: #ffffff !important;
}

/* Theme Cyan Dark */
body.theme-cyan-dark {
    --bg-main: #2c5f7d !important;
    --bg-card: #3c6f8d !important;
    --bg-hover: #4c7f9d !important;
    --text-main: #ffffff !important;
    --text-muted: #d0f0fa !important;
    --mobile-nav-bg: #1c4f6d !important;
    background-color: #2c5f7d !important;
    color: #ffffff !important;
}

/* ========================================
   DARK MODE TEXT AND LABEL OVERRIDES
   ======================================== */

/* Make ALL labels white in dark mode themes */
body.theme-purple label,
body.theme-purple .form-label,
body.theme-purple .col-form-label,
body.theme-purple small,
body.theme-blue-dark label,
body.theme-blue-dark .form-label,
body.theme-blue-dark .col-form-label,
body.theme-blue-dark small,
body.theme-cyan-dark label,
body.theme-cyan-dark .form-label,
body.theme-cyan-dark .col-form-label,
body.theme-cyan-dark small {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Make filter labels and form text white and BOLD */
body.theme-purple #filterForm label,
body.theme-purple #filterForm .form-label,
body.theme-purple #filterForm small,
body.theme-blue-dark #filterForm label,
body.theme-blue-dark #filterForm .form-label,
body.theme-blue-dark #filterForm small,
body.theme-cyan-dark #filterForm label,
body.theme-cyan-dark #filterForm .form-label,
body.theme-cyan-dark #filterForm small {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Make all text in dark mode white by default */
body.theme-purple,
body.theme-blue-dark,
body.theme-cyan-dark {
    color: #ffffff !important;
}

/* Override text-muted to be bright in dark mode */
body.theme-purple .text-muted,
body.theme-blue-dark .text-muted,
body.theme-cyan-dark .text-muted {
    color: #e0e0e0 !important;
}

/* Make card text white */
body.theme-purple .card,
body.theme-purple .card-body,
body.theme-purple .card-header,
body.theme-blue-dark .card,
body.theme-blue-dark .card-body,
body.theme-blue-dark .card-header,
body.theme-cyan-dark .card,
body.theme-cyan-dark .card-body,
body.theme-cyan-dark .card-header {
    color: #ffffff !important;
}

/* Make table text white */
body.theme-purple .table,
body.theme-blue-dark .table,
body.theme-cyan-dark .table {
    color: #ffffff !important;
}

/* Make dropdown text white */
body.theme-purple .dropdown-item,
body.theme-blue-dark .dropdown-item,
body.theme-cyan-dark .dropdown-item {
    color: #ffffff !important;
}

/* Make modal text white */
body.theme-purple .modal-content,
body.theme-blue-dark .modal-content,
body.theme-cyan-dark .modal-content {
    color: #ffffff !important;
}

/* Make alert text bright */
body.theme-purple .alert,
body.theme-blue-dark .alert,
body.theme-cyan-dark .alert {
    color: #ffffff !important;
}

/* Make form control text white */
body.theme-purple .form-control,
body.theme-purple .form-select,
body.theme-blue-dark .form-control,
body.theme-blue-dark .form-select,
body.theme-cyan-dark .form-control,
body.theme-cyan-dark .form-select {
    color: #ffffff !important;
}

/* EXCEPTION: SweetAlert inputs should NEVER be white - override dark theme */
body.theme-purple .swal2-input,
body.theme-purple .swal2-textarea,
body.theme-purple .swal2-select,
body.theme-blue-dark .swal2-input,
body.theme-blue-dark .swal2-textarea,
body.theme-blue-dark .swal2-select,
body.theme-cyan-dark .swal2-input,
body.theme-cyan-dark .swal2-textarea,
body.theme-cyan-dark .swal2-select {
    color: #1565c0 !important; /* Azul oscuro visible */
    background-color: #ffffff !important;
    border: 2px solid #4e73df !important;
    font-weight: 500 !important;
}

/* Make placeholder text bright */
body.theme-purple .form-control::placeholder,
body.theme-blue-dark .form-control::placeholder,
body.theme-cyan-dark .form-control::placeholder {
    color: #d0d0d0 !important;
    opacity: 0.8;
}

/* Make small text bright */
body.theme-purple small,
body.theme-blue-dark small,
body.theme-cyan-dark small {
    color: #e0e0e0 !important;
}

/* Make heading text white */
body.theme-purple h1,
body.theme-purple h2,
body.theme-purple h3,
body.theme-purple h4,
body.theme-purple h5,
body.theme-purple h6,
body.theme-purple .h1,
body.theme-purple .h2,
body.theme-purple .h3,
body.theme-purple .h4,
body.theme-purple .h5,
body.theme-purple .h6,
body.theme-blue-dark h1,
body.theme-blue-dark h2,
body.theme-blue-dark h3,
body.theme-blue-dark h4,
body.theme-blue-dark h5,
body.theme-blue-dark h6,
body.theme-blue-dark .h1,
body.theme-blue-dark .h2,
body.theme-blue-dark .h3,
body.theme-blue-dark .h4,
body.theme-blue-dark .h5,
body.theme-blue-dark .h6,
body.theme-cyan-dark h1,
body.theme-cyan-dark h2,
body.theme-cyan-dark h3,
body.theme-cyan-dark h4,
body.theme-cyan-dark h5,
body.theme-cyan-dark h6,
body.theme-cyan-dark .h1,
body.theme-cyan-dark .h2,
body.theme-cyan-dark .h3,
body.theme-cyan-dark .h4,
body.theme-cyan-dark .h5,
body.theme-cyan-dark .h6 {
    color: #ffffff !important;
}

/* Make paragraph text white */
body.theme-purple p,
body.theme-blue-dark p,
body.theme-cyan-dark p {
    color: #ffffff !important;
}

/* Make list text white */
body.theme-purple li,
body.theme-blue-dark li,
body.theme-cyan-dark li {
    color: #ffffff !important;
}

/* Make span text white */
body.theme-purple span,
body.theme-blue-dark span,
body.theme-cyan-dark span {
    color: #ffffff !important;
}

/* Make div text white */
body.theme-purple div,
body.theme-blue-dark div,
body.theme-cyan-dark div {
    color: #ffffff !important;
}

/* EXCEPTION: SweetAlert content should be dark for visibility */
body.theme-purple .swal2-popup,
body.theme-purple .swal2-popup div,
body.theme-purple .swal2-popup span,
body.theme-purple .swal2-popup p,
body.theme-purple .swal2-title,
body.theme-purple .swal2-content,
body.theme-purple .swal2-html-container,
body.theme-blue-dark .swal2-popup,
body.theme-blue-dark .swal2-popup div,
body.theme-blue-dark .swal2-popup span,
body.theme-blue-dark .swal2-popup p,
body.theme-blue-dark .swal2-title,
body.theme-blue-dark .swal2-content,
body.theme-blue-dark .swal2-html-container,
body.theme-cyan-dark .swal2-popup,
body.theme-cyan-dark .swal2-popup div,
body.theme-cyan-dark .swal2-popup span,
body.theme-cyan-dark .swal2-popup p,
body.theme-cyan-dark .swal2-title,
body.theme-cyan-dark .swal2-content,
body.theme-cyan-dark .swal2-html-container {
    color: #333333 !important;
    background-color: #ffffff !important;
}

/* Override text-gray classes to white in dark mode */
body.theme-purple .text-gray-800,
body.theme-purple .text-gray-600,
body.theme-purple .text-gray-400,
body.theme-purple .text-gray-300,
body.theme-blue-dark .text-gray-800,
body.theme-blue-dark .text-gray-600,
body.theme-blue-dark .text-gray-400,
body.theme-blue-dark .text-gray-300,
body.theme-cyan-dark .text-gray-800,
body.theme-cyan-dark .text-gray-600,
body.theme-cyan-dark .text-gray-400,
body.theme-cyan-dark .text-gray-300 {
    color: #ffffff !important;
}

/* Make DataTables text white */
body.theme-purple .dataTables_wrapper,
body.theme-blue-dark .dataTables_wrapper,
body.theme-cyan-dark .dataTables_wrapper {
    color: #ffffff !important;
}

body.theme-purple .dataTables_wrapper .dataTables_length,
body.theme-purple .dataTables_wrapper .dataTables_filter,
body.theme-purple .dataTables_wrapper .dataTables_info,
body.theme-purple .dataTables_wrapper .dataTables_paginate,
body.theme-blue-dark .dataTables_wrapper .dataTables_length,
body.theme-blue-dark .dataTables_wrapper .dataTables_filter,
body.theme-blue-dark .dataTables_wrapper .dataTables_info,
body.theme-blue-dark .dataTables_wrapper .dataTables_paginate,
body.theme-cyan-dark .dataTables_wrapper .dataTables_length,
body.theme-cyan-dark .dataTables_wrapper .dataTables_filter,
body.theme-cyan-dark .dataTables_wrapper .dataTables_info,
body.theme-cyan-dark .dataTables_wrapper .dataTables_paginate {
    color: #ffffff !important;
}

/* Make sidebar text bright */
body.theme-purple .sidebar .nav-item .nav-link,
body.theme-blue-dark .sidebar .nav-item .nav-link,
body.theme-cyan-dark .sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.theme-purple .sidebar .nav-item .nav-link:hover,
body.theme-purple .sidebar .nav-item .nav-link.active,
body.theme-blue-dark .sidebar .nav-item .nav-link:hover,
body.theme-blue-dark .sidebar .nav-item .nav-link.active,
body.theme-cyan-dark .sidebar .nav-item .nav-link:hover,
body.theme-cyan-dark .sidebar .nav-item .nav-link.active {
    color: #ffffff !important;
}

/* Make topbar text white */
body.theme-purple .topbar .nav-link,
body.theme-blue-dark .topbar .nav-link,
body.theme-cyan-dark .topbar .nav-link {
    color: #ffffff !important;
}

/* Make mobile nav text bright */
body.theme-purple .mobile-bottom-nav .nav-item,
body.theme-blue-dark .mobile-bottom-nav .nav-item,
body.theme-cyan-dark .mobile-bottom-nav .nav-item {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.theme-purple .mobile-bottom-nav .nav-item.active,
body.theme-blue-dark .mobile-bottom-nav .nav-item.active,
body.theme-cyan-dark .mobile-bottom-nav .nav-item.active {
    color: #ffffff !important;
}

/* Make footer text bright */
body.theme-purple .footer,
body.theme-purple .sticky-footer,
body.theme-blue-dark .footer,
body.theme-blue-dark .sticky-footer,
body.theme-cyan-dark .footer,
body.theme-cyan-dark .sticky-footer {
    color: #e0e0e0 !important;
}

/* ========================================
   MAP FIXES FOR DARK THEMES
   ======================================== */

/* Ensure map container is visible in dark themes */
body.theme-purple #map,
body.theme-purple #map-detail,
body.theme-blue-dark #map,
body.theme-blue-dark #map-detail,
body.theme-cyan-dark #map,
body.theme-cyan-dark #map-detail {
    background-color: #f0f0f0 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Leaflet controls in dark mode - MÁXIMA ESPECIFICIDAD Y VISIBILIDAD */
body.theme-purple .leaflet-control-zoom a,
body.theme-blue-dark .leaflet-control-zoom a,
body.theme-cyan-dark .leaflet-control-zoom a,
body.theme-purple .leaflet-control-fullscreen a,
body.theme-blue-dark .leaflet-control-fullscreen a,
body.theme-cyan-dark .leaflet-control-fullscreen a,
body.theme-purple .leaflet-bar a,
body.theme-blue-dark .leaflet-bar a,
body.theme-cyan-dark .leaflet-bar a,
body.theme-purple .leaflet-control-zoom-in,
body.theme-blue-dark .leaflet-control-zoom-in,
body.theme-cyan-dark .leaflet-control-zoom-in,
body.theme-purple .leaflet-control-zoom-out,
body.theme-blue-dark .leaflet-control-zoom-out,
body.theme-cyan-dark .leaflet-control-zoom-out,
body.theme-purple .leaflet-control-fullscreen-button,
body.theme-blue-dark .leaflet-control-fullscreen-button,
body.theme-cyan-dark .leaflet-control-fullscreen-button {
    background-color: #ffffff !important;
    color: #000000 !important; /* NEGRO para contraste sobre fondo blanco */
    /* CRÍTICO: Agregar propiedades de display y centrado */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-indent: 0 !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 30px !important;
    width: 30px !important;
    height: 30px !important;
    /* Evitar inversión de colores */
    filter: none !important;
    -webkit-filter: none !important;
    /* Forzar que el texto sea visible */
    text-shadow: none !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Asegurar que el texto dentro del enlace sea negro */
body.theme-purple .leaflet-control-zoom a *,
body.theme-blue-dark .leaflet-control-zoom a *,
body.theme-cyan-dark .leaflet-control-zoom a *,
body.theme-purple .leaflet-control-fullscreen a *,
body.theme-blue-dark .leaflet-control-fullscreen a *,
body.theme-cyan-dark .leaflet-control-fullscreen a * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

body.theme-purple .leaflet-control-zoom a:hover,
body.theme-blue-dark .leaflet-control-zoom a:hover,
body.theme-cyan-dark .leaflet-control-zoom a:hover,
body.theme-purple .leaflet-control-fullscreen a:hover,
body.theme-blue-dark .leaflet-control-fullscreen a:hover,
body.theme-cyan-dark .leaflet-control-fullscreen a:hover,
body.theme-purple .leaflet-bar a:hover,
body.theme-blue-dark .leaflet-bar a:hover,
body.theme-cyan-dark .leaflet-bar a:hover {
    background-color: #f4f4f4 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

body.theme-purple .leaflet-popup-content-wrapper,
body.theme-blue-dark .leaflet-popup-content-wrapper,
body.theme-cyan-dark .leaflet-popup-content-wrapper {
    background-color: #ffffff !important;
    color: #333333 !important;
}

body.theme-purple .leaflet-popup-tip,
body.theme-blue-dark .leaflet-popup-tip,
body.theme-cyan-dark .leaflet-popup-tip {
    background-color: #ffffff !important;
}

/* ========================================
   LIGHT MODE SPECIFIC OVERRIDES
   ======================================== */

body.theme-light .card,
body.theme-blue .card,
body.theme-cyan .card {
    border-color: #e3e6f0 !important;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

body.theme-light .card-header,
body.theme-blue .card-header,
body.theme-cyan .card-header {
    background-color: #f8f9fc !important;
    border-bottom: 1px solid #e3e6f0 !important;
}

body.theme-light .form-control,
body.theme-light .form-select,
body.theme-blue .form-control,
body.theme-blue .form-select,
body.theme-cyan .form-control,
body.theme-cyan .form-select {
    background-color: #ffffff !important;
    border-color: #d1d3e2 !important;
}

body.theme-light .table-bordered,
body.theme-blue .table-bordered,
body.theme-cyan .table-bordered {
    border-color: #e3e6f0 !important;
}

body.theme-light .table-bordered td,
body.theme-light .table-bordered th,
body.theme-blue .table-bordered td,
body.theme-blue .table-bordered th,
body.theme-cyan .table-bordered td,
body.theme-cyan .table-bordered th {
    border-color: #e3e6f0 !important;
}

body.theme-light .sidebar,
body.theme-blue .sidebar,
body.theme-cyan .sidebar {
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
}

body.theme-light .sidebar .nav-item .nav-link,
body.theme-blue .sidebar .nav-item .nav-link,
body.theme-cyan .sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.theme-light .sidebar .nav-item .nav-link:hover,
body.theme-light .sidebar .nav-item .nav-link.active,
body.theme-blue .sidebar .nav-item .nav-link:hover,
body.theme-blue .sidebar .nav-item .nav-link.active,
body.theme-cyan .sidebar .nav-item .nav-link:hover,
body.theme-cyan .sidebar .nav-item .nav-link.active {
    color: #ffffff !important;
}

body.theme-light .topbar,
body.theme-blue .topbar,
body.theme-cyan .topbar {
    background-color: #ffffff !important;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

body.theme-light .dropdown-menu,
body.theme-blue .dropdown-menu,
body.theme-cyan .dropdown-menu {
    background-color: #ffffff !important;
    border-color: #e3e6f0 !important;
}

body.theme-light .dropdown-item:hover,
body.theme-blue .dropdown-item:hover,
body.theme-cyan .dropdown-item:hover {
    background-color: #f8f9fc !important;
}

body.theme-light .mobile-bottom-nav,
body.theme-blue .mobile-bottom-nav,
body.theme-cyan .mobile-bottom-nav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .alert-info,
body.theme-blue .alert-info,
body.theme-cyan .alert-info {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

body.theme-light .alert-warning,
body.theme-blue .alert-warning,
body.theme-cyan .alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

body.theme-light .alert-success,
body.theme-blue .alert-success,
body.theme-cyan .alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

body.theme-light .alert-danger,
body.theme-blue .alert-danger,
body.theme-cyan .alert-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

body.theme-light .modal-content,
body.theme-blue .modal-content,
body.theme-cyan .modal-content {
    background-color: #ffffff !important;
}

body.theme-light .modal-header,
body.theme-blue .modal-header,
body.theme-cyan .modal-header {
    background-color: #f8f9fc !important;
    border-bottom-color: #e3e6f0 !important;
}

body.theme-light .footer,
body.theme-light .sticky-footer,
body.theme-blue .footer,
body.theme-blue .sticky-footer,
body.theme-cyan .footer,
body.theme-cyan .sticky-footer {
    background-color: #ffffff !important;
    color: #858796 !important;
}

/* ========================================
   THEME BLUE - TEXT COLOR OVERRIDES
   ======================================== */

/* Make all text dark blue for better contrast */
body.theme-blue,
body.theme-blue .card,
body.theme-blue .card-body,
body.theme-blue .card-header,
body.theme-blue h1,
body.theme-blue h2,
body.theme-blue h3,
body.theme-blue h4,
body.theme-blue h5,
body.theme-blue h6,
body.theme-blue .h1,
body.theme-blue .h2,
body.theme-blue .h3,
body.theme-blue .h4,
body.theme-blue .h5,
body.theme-blue .h6,
body.theme-blue p,
body.theme-blue span,
body.theme-blue div,
body.theme-blue label,
body.theme-blue .form-label,
body.theme-blue .text-gray-800,
body.theme-blue .text-gray-600 {
    color: #1a237e !important; /* Azul muy oscuro para máximo contraste */
}

body.theme-blue .text-muted,
body.theme-blue small {
    color: #283593 !important; /* Azul oscuro para texto secundario */
}

body.theme-blue .dropdown-item {
    color: #1a237e !important;
}

body.theme-blue .table {
    color: #1a237e !important;
}

body.theme-blue .form-control,
body.theme-blue .form-select {
    color: #1a237e !important;
}

body.theme-blue .topbar .nav-link {
    color: #1a237e !important;
}

body.theme-blue .mobile-bottom-nav .nav-item {
    color: #283593 !important;
}

body.theme-blue .mobile-bottom-nav .nav-item.active {
    color: var(--primary-color) !important;
}

/* Sidebar text in theme-blue */
body.theme-blue .sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.9) !important; /* Blanco en sidebar */
}

body.theme-blue .sidebar .nav-item .nav-link:hover,
body.theme-blue .sidebar .nav-item .nav-link.active {
    color: #ffffff !important;
}

body.theme-blue .sidebar-heading {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.theme-blue .sidebar-brand-text {
    color: #ffffff !important;
}

/* ========================================
   THEME CYAN - TEXT COLOR OVERRIDES
   ======================================== */

/* Make all text dark cyan for better contrast */
body.theme-cyan,
body.theme-cyan .card,
body.theme-cyan .card-body,
body.theme-cyan .card-header,
body.theme-cyan h1,
body.theme-cyan h2,
body.theme-cyan h3,
body.theme-cyan h4,
body.theme-cyan h5,
body.theme-cyan h6,
body.theme-cyan .h1,
body.theme-cyan .h2,
body.theme-cyan .h3,
body.theme-cyan .h4,
body.theme-cyan .h5,
body.theme-cyan .h6,
body.theme-cyan p,
body.theme-cyan span,
body.theme-cyan div,
body.theme-cyan label,
body.theme-cyan .form-label,
body.theme-cyan .text-gray-800,
body.theme-cyan .text-gray-600 {
    color: #004d40 !important; /* Cyan muy oscuro para máximo contraste */
}

body.theme-cyan .text-muted,
body.theme-cyan small {
    color: #00695c !important; /* Cyan oscuro para texto secundario */
}

body.theme-cyan .dropdown-item {
    color: #004d40 !important;
}

body.theme-cyan .table {
    color: #004d40 !important;
}

body.theme-cyan .form-control,
body.theme-cyan .form-select {
    color: #004d40 !important;
}

body.theme-cyan .topbar .nav-link {
    color: #004d40 !important;
}

body.theme-cyan .mobile-bottom-nav .nav-item {
    color: #00695c !important;
}

body.theme-cyan .mobile-bottom-nav .nav-item.active {
    color: var(--primary-color) !important;
}

/* Sidebar text in theme-cyan */
body.theme-cyan .sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.9) !important; /* Blanco en sidebar */
}

body.theme-cyan .sidebar .nav-item .nav-link:hover,
body.theme-cyan .sidebar .nav-item .nav-link.active {
    color: #ffffff !important;
}

body.theme-cyan .sidebar-heading {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.theme-cyan .sidebar-brand-text {
    color: #ffffff !important;
}

/* ========================================
   THEME LIGHT - TEXT COLOR OVERRIDES
   ======================================== */

/* Make all text dark for better contrast in light theme */
body.theme-light,
body.theme-light .card,
body.theme-light .card-body,
body.theme-light .card-header,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5,
body.theme-light h6,
body.theme-light .h1,
body.theme-light .h2,
body.theme-light .h3,
body.theme-light .h4,
body.theme-light .h5,
body.theme-light .h6,
body.theme-light p,
body.theme-light span,
body.theme-light div,
body.theme-light label,
body.theme-light .form-label,
body.theme-light .text-gray-800,
body.theme-light .text-gray-600 {
    color: #2c3e50 !important; /* Azul oscuro para máximo contraste */
}

body.theme-light .text-muted,
body.theme-light small {
    color: #5a5c69 !important; /* Gris oscuro para texto secundario */
}

body.theme-light .dropdown-item {
    color: #2c3e50 !important;
}

body.theme-light .table {
    color: #2c3e50 !important;
}

body.theme-light .form-control,
body.theme-light .form-select {
    color: #2c3e50 !important;
}

body.theme-light .topbar .nav-link {
    color: #2c3e50 !important;
}

body.theme-light .mobile-bottom-nav .nav-item {
    color: #5a5c69 !important;
}

body.theme-light .mobile-bottom-nav .nav-item.active {
    color: var(--primary-color) !important;
}

/* Sidebar text in theme-light */
body.theme-light .sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.9) !important; /* Blanco en sidebar */
}

body.theme-light .sidebar .nav-item .nav-link:hover,
body.theme-light .sidebar .nav-item .nav-link.active {
    color: #ffffff !important;
}

body.theme-light .sidebar-heading {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.theme-light .sidebar-brand-text {
    color: #ffffff !important;
}


/* ========================================
   SWEETALERT2 MODAL FIXES - CRITICAL
   ======================================== */

/* Fix SweetAlert2 modals - ensure text and icons are visible in all themes */
.swal2-popup {
    background-color: #ffffff !important;
    color: #333333 !important;
}

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

.swal2-content,
.swal2-html-container {
    color: #333333 !important;
}

/* CRITICAL: Fix input text visibility with maximum specificity */
.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-radio,
.swal2-checkbox,
input.swal2-input,
textarea.swal2-textarea,
select.swal2-select {
    background-color: #ffffff !important;
    color: #0d47a1 !important; /* Dark blue for excellent visibility */
    border: 2px solid #4e73df !important;
    font-weight: 500 !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: #858796 !important;
    opacity: 1 !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: #2e59d9 !important;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25) !important;
    color: #0d47a1 !important; /* Darker blue when typing */
    background-color: #ffffff !important;
}

/* Override any theme-specific rules for SweetAlert */
body.theme-purple .swal2-input,
body.theme-purple .swal2-textarea,
body.theme-purple .swal2-select,
body.theme-blue-dark .swal2-input,
body.theme-blue-dark .swal2-textarea,
body.theme-blue-dark .swal2-select,
body.theme-cyan-dark .swal2-input,
body.theme-cyan-dark .swal2-textarea,
body.theme-cyan-dark .swal2-select,
body[class*="theme-"] .swal2-input,
body[class*="theme-"] .swal2-textarea,
body[class*="theme-"] .swal2-select {
    background-color: #ffffff !important;
    color: #0d47a1 !important;
    border: 2px solid #4e73df !important;
    font-weight: 500 !important;
}

/* Fix any div or span inside SweetAlert */
.swal2-popup div,
.swal2-popup span,
.swal2-popup p,
.swal2-popup label {
    color: #333333 !important;
}

/* Override dark theme text rules for SweetAlert */
body.theme-purple .swal2-popup,
body.theme-purple .swal2-popup div,
body.theme-purple .swal2-popup span,
body.theme-purple .swal2-popup p,
body.theme-purple .swal2-title,
body.theme-purple .swal2-content,
body.theme-purple .swal2-html-container,
body.theme-blue-dark .swal2-popup,
body.theme-blue-dark .swal2-popup div,
body.theme-blue-dark .swal2-popup span,
body.theme-blue-dark .swal2-popup p,
body.theme-blue-dark .swal2-title,
body.theme-blue-dark .swal2-content,
body.theme-blue-dark .swal2-html-container,
body.theme-cyan-dark .swal2-popup,
body.theme-cyan-dark .swal2-popup div,
body.theme-cyan-dark .swal2-popup span,
body.theme-cyan-dark .swal2-popup p,
body.theme-cyan-dark .swal2-title,
body.theme-cyan-dark .swal2-content,
body.theme-cyan-dark .swal2-html-container {
    color: #333333 !important;
    background-color: #ffffff !important;
}

.swal2-icon {
    color: #333333 !important;
    border-color: #333333 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(165, 220, 134, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #a5dc86 !important;
}

.swal2-icon.swal2-error {
    border-color: #f27474 !important;
    color: #f27474 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #f27474 !important;
}

.swal2-icon.swal2-warning {
    border-color: #facea8 !important;
    color: #f8bb86 !important;
}

.swal2-icon.swal2-info {
    border-color: #9de0f6 !important;
    color: #3fc3ee !important;
}

.swal2-icon.swal2-question {
    border-color: #c9dae1 !important;
    color: #87adbd !important;
}

/* Fix buttons in SweetAlert */
.swal2-confirm,
.swal2-cancel,
.swal2-deny {
    color: #ffffff !important;
}

.swal2-styled.swal2-confirm {
    background-color: #4e73df !important;
}

.swal2-styled.swal2-cancel {
    background-color: #858796 !important;
}

.swal2-styled.swal2-deny {
    background-color: #e74a3b !important;
}

/* Fix close button */
.swal2-close {
    color: #333333 !important;
}

.swal2-close:hover {
    color: #000000 !important;
}

/* Fix modal backdrop */
.swal2-container {
    background-color: rgba(0, 0, 0, 0.4) !important;
}

/* ========================================
   LEAFLET MAP CONTROLS FIXES
   ======================================== */

/* Fix zoom controls (+/-) - ensure they're always visible */
.leaflet-control-zoom a {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    font-weight: bold !important;
    font-size: 18px !important;
    line-height: 26px !important;
    text-align: center !important;
}

.leaflet-control-zoom a:hover {
    background-color: #f4f4f4 !important;
    color: #000000 !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    width: 30px !important;
    height: 30px !important;
}

/* Ensure + and - symbols are visible */
.leaflet-control-zoom-in::before {
    content: '+' !important;
    display: block !important;
    color: #333333 !important;
}

.leaflet-control-zoom-out::before {
    content: '−' !important;
    display: block !important;
    color: #333333 !important;
}

/* Fix attribution control */
.leaflet-control-attribution {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #333333 !important;
}

.leaflet-control-attribution a {
    color: #4e73df !important;
}

/* Fix search control if present */
.leaflet-control-search {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
}

.leaflet-control-search input {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* ========================================
   SEARCH MODAL FIXES
   ======================================== */

/* Fix search results modal */
.search-result-item {
    background-color: #ffffff !important;
    color: #333333 !important;
}

.search-result-item:hover {
    background-color: #f8f9fc !important;
}

.search-result-item .text-muted {
    color: #858796 !important;
}

/* Fix modal backdrop */
.swal2-container {
    background-color: rgba(0, 0, 0, 0.4) !important;
}
