@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f1f5f9;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Custom Nav Link Classes Requested by the User */
.custom-nav-link {
    color: #8ba2b5 !important; /* Gris Claro Azulado */
    transition: all 0.2s ease;
}

.custom-nav-link i {
    color: #8ba2b5 !important;
    transition: all 0.2s ease;
}

/* Hover State */
.custom-nav-link:hover {
    background-color: #3a5284 !important; /* Azul Principal (Tema) */
    color: #ffffff !important; /* Blanco de Contraste */
}

.custom-nav-link:hover i {
    color: #ffffff !important;
}

/* Active State */
.custom-nav-link.active {
    background-color: #3a5284 !important; /* Azul Principal (Tema) */
    color: #ffffff !important; /* Blanco de Contraste */
    font-weight: 600;
}

.custom-nav-link.active i {
    color: #ffffff !important;
}

/* Active Parent State */
.custom-nav-link.has-active-child {
    background-color: #2c4875 !important; /* Azul Oscuro */
    color: #ffffff !important; /* Blanco de Contraste */
}

.custom-nav-link.has-active-child i {
    color: #ffffff !important;
}

/* Dropdown menu items transitions */
.submenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-out;
}

.submenu.open {
    max-height: 500px;
    opacity: 1;
}

/* Card Micro-animations */
.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Modal Animations */
.modal-overlay {
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease;
}

.modal-content-anim {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modules Views Toggle and Transitions */
.module-view {
    display: none !important;
}

.module-view.active {
    display: block !important;
    animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Table Styles for Spacious and Clear Data Layout */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: #f8f9fa !important; /* Fondo Blanco Hueso */
    color: #495057 !important;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    padding: 1rem 1.25rem !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.custom-table td {
    padding: 1.1rem 1.25rem !important; /* Espaciado generoso */
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 0.85rem;
    color: #495057;
    vertical-align: middle;
}

.custom-table tbody tr {
    transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
    background-color: #f8fafc !important; /* Hover suave */
}

/* Adjust cell item structures */
.custom-table td div {
    line-height: 1.4;
}

/* Hide scrollbar for sidebar navigation menu to preserve layout alignment */
.sidebar-menu::-webkit-scrollbar {
    display: none;
}
.sidebar-menu {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Custom Leaflet Overrides */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    font-family: 'Outfit', sans-serif !important;
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 5px 10px -2px rgba(0, 0, 0, 0.05) !important;
}

.custom-map-icon {
    background: none !important;
    border: none !important;
}

.leaflet-container {
    font-family: 'Outfit', sans-serif !important;
}

/* Z-Index Hierarchy fixes to prevent page elements from overlapping main topbar and sidebars */
.topbar {
    z-index: 1000 !important;
}
.sidebar {
    z-index: 1010 !important;
}
.modal-overlay {
    z-index: 2000 !important;
}

/* Custom Utility Classes for Dynamic JS styling (Tailwind CDN JIT fallbacks) */
.border-red-500 {
    border-color: #b91c1c !important; /* Rojo oscuro más intenso */
    border-width: 2px !important; /* Borde más grueso (2px) para mayor visibilidad */
}
.focus\:border-red-500:focus {
    border-color: #991b1b !important; /* Rojo aún más oscuro al enfocar */
    outline: 2px solid transparent !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.3) !important; /* Anillo de enfoque rojo más grueso */
}
.text-red-650 {
    color: #b91c1c !important;
}

/* ==========================================
   HIGH FIDELITY DUAL-COLUMN SIDEBAR STYLES
   ========================================== */

/* Columna 1 - Navegación Principal Fija */
.col-1 {
    width: 80px;
    background-color: #141d2f !important; /* Azul Oscuro más profundo */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.25rem;
    padding-bottom: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    user-select: none;
    z-index: 10;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #8ba2b5 !important;
    text-decoration: none !important;
    border-left: 3px solid transparent;
}

.category-icon-box {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn i {
    font-size: 1.15rem;
    color: #8ba2b5;
    transition: all 0.25s ease;
}

.category-btn span {
    font-size: 9px;
    font-weight: 600;
    margin-top: 5px;
    transition: color 0.2s ease;
    letter-spacing: 0.3px;
}

/* Hover Category Button */
.category-btn:hover {
    color: #ffffff !important;
}

.category-btn:hover .category-icon-box {
    background-color: rgba(255, 255, 255, 0.05);
}

.category-btn:hover i {
    color: #ffffff;
}

/* Active Category Button in Columna 1 (Medium Blue selection effect) */
.category-btn.active {
    color: #ffffff !important;
    border-left-color: #3a5284;
}

.category-btn.active .category-icon-box {
    background-color: #3a5284 !important; /* Azul Medio de SegiSoft */
    box-shadow: 0 4px 12px rgba(58, 82, 132, 0.3);
}

.category-btn.active i {
    color: #ffffff !important;
}

.category-btn.active span {
    color: #ffffff !important;
    font-weight: 700;
}

/* Columna 2 - Controles y Enlaces Flotantes */
.col-2 {
    flex-grow: 1;
    background-color: #1e2d4a !important; /* Azul Oscuro de SegiSoft */
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Columna 2 Enlaces */
.col2-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    margin: 2px 0;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #8ba2b5 !important;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.col2-nav-link i.link-icon {
    font-size: 0.95rem;
    color: #8ba2b5;
    transition: all 0.2s ease;
}

.col2-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff !important;
}

.col2-nav-link:hover i.link-icon {
    color: #ffffff !important;
}

/* Selected Link State in Columna 2 */
.col2-nav-link.active {
    background-color: #3a5284 !important; /* Azul Medio de SegiSoft */
    color: #ffffff !important;
    font-weight: 600;
}

.col2-nav-link.active i.link-icon {
    color: #ffffff !important;
}

/* Collapsible nested containers in Columna 2 (like Auditorías) */
.col2-submenu {
    margin-top: 2px;
    margin-bottom: 4px;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.col2-submenu-item {
    display: flex;
    align-items: center;
    padding: 0.45rem 0.85rem 0.45rem 1.25rem;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #8ba2b5 !important;
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.col2-submenu-item:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.02);
}

.col2-submenu-item.active {
    color: #ffffff !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.06);
}

/* Custom rounded corners and layout borders */
.rounded-xl-custom {
    border-radius: 12px;
}

/* Unified Sidebar Footer style */
.sidebar-footer-unified {
    background-color: #141d2f !important; /* Mismo fondo que Columna 1 para mantener el balance visual */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


