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

:root {
    --body-color: #ffffff;
    --sidebar-color: #FFF;
    --primary-color: #2a5069;
    --primary-color-shadow: rgba(42, 80, 105, 0.3);
    --primary-color-disable: #1f3e52c7;
    --primary-color-hover: #1c3a4d;
    --primary-color-shadow-hover: rgba(28, 58, 77, 0.3);
    --secundary-color: #cae6e9;
    --secundary-color-shadow: rgba(202, 230, 233, 0.3);
    --secundary-color-disable: #98b4b6;
    --secundary-color-hover: #a8c8cb;
    --secundary-color-shadow-hover: rgba(168, 200, 203, 0.3);

    --primary-color-light: #ebebeb;
    --toggle-color: #DDD;
    --text-color: #707070;

    --tran-02: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.4s ease;
    --tran-05: all 0.4s ease;
}

* {
    .poppins-light {
        font-family: "Poppins", sans-serif;
        font-weight: 300;
        font-style: normal;
    }

    .poppins-regular {
        font-family: "Poppins", sans-serif;
        font-weight: 400;
        font-style: normal;
    }

    .poppins-medium {
        font-family: "Poppins", sans-serif;
        font-weight: 500;
        font-style: normal;
    }

    .poppins-semibold {
        font-family: "Poppins", sans-serif;
        font-weight: 600;
        font-style: normal;
    }

    .poppins-bold {
        font-family: "Poppins", sans-serif;
        font-weight: 700;
        font-style: normal;
    }

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}


body {
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    background-color: var(--body-color);
    transition: var(--tran-05);
}



.card {
    background-color: var(--sidebar-color);
    color: var(--text-color);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: var(--tran-05);

}

.card-header {
    background-color: var(--sidebar-color);
    color: var(--text-color);
    transition: var(--tran-05);
}

.card.dark {
    color: var(--text-color);
    /*con blur*/
}

.card-header.dark {
    color: var(--text-color);
    /*con blur*/
}

.body-color {
    background-color: var(--body-color);
    color: var(--text-color);
}

.sidebar-color {
    background-color: var(--sidebar-color);
    color: var(--text-color);
}

.primary-color {
    background: var(--primary-color);
    color: var(--text-color);
}

.primary-color-light {
    background-color: var(--primary-color-light);
    color: var(--text-color);
}

.toggle-color {
    background-color: var(--toggle-color);
    color: var(--text-color);
}

.text-color {
    background: var(--text-color);
    color: var(--text-color);
}






/*Sidebar*/

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background-color: var(--sidebar-color);
    transition: var(--tran-05);
    z-index: 49;

    box-shadow: 5px 0px 10px rgba(0, 0, 0, 0.2);


}

.sidebar.close {
    width: 88px;

}

.sidebar .text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--tran-04);
    white-space: nowrap;
    opacity: 1;

}

.sidebar.close .text {
    opacity: 0;

}

.sidebar .image {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.sidebar li .icon {
    min-width: 60px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar li .icon,
.sidebar li .text {
    color: var(--text-color);
    transition: var(--tran-02);
}

.sidebar li {
    list-style: none;
    height: 50px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: start;
}

.sidebar header {
    position: relative;
}

.sidebar .image-text img {
    width: 40px;
    border-radius: 6px;
}

.sidebar header .image-text {
    display: flex;
    align-items: center;
}

header .image-text .header-text {
    display: flex;
    flex-direction: column;

}

.header-text .empresa {
    font-weight: 600;
}

.header-text .sistema {
    margin-top: -2px;
}

.sidebar header .toggle {
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    font-size: 20px;
    color: var(--text-color);
    cursor: pointer;
    height: 25px;
    width: 25px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--sidebar-color);
    font-size: 15px;
    transition: var(--tran-03);

}


.sidebar.close header .toggle {
    transform: translateY(-50%);
}

body.dark2 .sidebar header .toggle {
    color: var(--text-color);
}

.sidebar .menu {
    margin-top: 35px;
}

.sidebar .search-box {
    background: var(--primary-color-light);
    border-radius: 6px;
    transition: var(--tran-05);
}

.search-box input {
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    background: var(--primary-color-light);
    transition: var(--tran-05);

}

.sidebar li a {
    text-decoration: none;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transform: var(--tran-04);
}

.sidebar li a:hover {
    background: var(--primary-color);
}


.sidebar li a:hover .icon,
.sidebar li a:hover .text {
    color: var(--sidebar-color);
}

.sidebar .menu-bar {
    height: calc(100% - 150px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;

}

.menu-bar .mode {
    background: var(--primary-color-light);
    position: relative;
    border-radius: 6px;
}

.menu-bar .mode .moon-sun {
    height: 50px;
    width: 60px;
    display: flex;
    align-items: center;
}

.menu-bar .mode i {
    position: absolute;
}

.menu-bar .mode i.sun {
    opacity: 0;
    transition: var(--tran-03);
}

body.dark2 .menu-bar .mode i.sun {
    opacity: 1;
}

body.dark2 .menu-bar .mode i.moon {
    opacity: 0;
}

.menu-bar .mode .toggle-switch {
    position: absolute;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    right: 0;
    border-radius: 6px;
    background: var(--primary-color-light);
    transition: var(--tran-03);
}

.toggle-switch .switch {
    height: 22px;
    width: 44px;
    background: var(--toggle-color);
    position: relative;
    border-radius: 25px;
    transition: var(--tran-03);

}

.switch::before {
    height: 15px;
    width: 15px;
    content: '';
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background: var(--sidebar-color);
    transition: var(--tran-03);
}

body.dark2 .switch::before {
    left: 25px;
    transition: var(--tran-03);
}

.home {
    position: relative;
    left: 250px;
    height: 100vh;
    width: calc(100% - 250px);
    background: var(--body-color);
    transition: var(--tran-05);
}

.home .text {
    font-size: 30px;
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 40px;
}

.sidebar.close~.home {
    left: 88px;
    width: calc(100% - 88px);
}

.searchopacity {
    opacity: 0;
    transition: var(--tran-03);
}

.text-icon {
    color: var(--primary-color);
    font-size: 24px;
}

.dark2 .text-icon {
    color: var(--text-color);
}

/* Menu desplegable*/
.dropdown-menu {
    display: none;
    background-color: var(--sidebar-color);
}

.dropdown-menu ul {
    list-style-type: none;
    padding: 0;
}

.dropdown-menu ul li {
    padding: 10px;
    background-color: var(--sidebar-color);
    cursor: pointer;
}

body.dark2 .dropdown-menu ul li {
    padding: 10px;
    background-color: var(--sidebar-color);
}

.dropdown-menu ul li:hover {
    padding: 10px;
    background-color: var(--primary-color);
    color: #fff;
}




.dropdown-menu ul li a {
    text-decoration: none;
}

/* Mostrar el menú desplegable al hacer clic en el icono */
.fa-chevron-down.active2+.dropdown-menu {
    display: block;
}



.menu-bar {
    overflow-y: auto;
    /* Esto permite que el contenido se desplace verticalmente cuando excede el alto máximo */
    scrollbar-width: none;
    /* Oculta la barra de desplazamiento en navegadores basados en WebKit */
    -ms-overflow-style: none;
    /* Oculta la barra de desplazamiento en Internet Explorer y Edge */
}



.menu-bar::-webkit-scrollbar {
    display: none;
    /* Oculta la barra de desplazamiento en navegadores basados en WebKit */
}


.text-color-normal {
    color: var(--text-color);
    transition: all 0.2s ease !important;
}

.text-color-normal:hover {
    color: #fff;
    transition: all 0.2s ease !important;
}

.text-color-normal-perfil {
    color: var(--text-color);
}

.cabecera {
    transition: var(--tran-05);
    left: 250px;
    right: 0;
    padding-right: 1.25rem; /* tw-pe-5 equivalente */
}

/* Ajustar el navbar cuando el sidebar está cerrado */
.sidebar.close ~ .home .cabecera {
    left: 88px;
    width: calc(100% - 88px) !important;
}

/* Ajustar el navbar cuando el sidebar está abierto */
.sidebar:not(.close) ~ .home .cabecera {
    left: 250px;
    width: calc(100% - 250px) !important;
}

/* Aumentar padding derecho en dispositivos móviles para evitar que se corte el perfil */
@media (max-width: 768px) {
    .cabecera {
        padding-right: 2rem !important; /* Más espacio en móvil */
    }
    
    .sidebar.close ~ .home .cabecera {
        padding-right: 2rem !important;
    }
    
    .sidebar:not(.close) ~ .home .cabecera {
        padding-right: 2rem !important;
    }
}

/* Aún más espacio en dispositivos muy pequeños */
@media (max-width: 480px) {
    .cabecera {
        padding-right: 2.5rem !important;
    }
    
    .sidebar.close ~ .home .cabecera {
        padding-right: 2.5rem !important;
    }
    
    .sidebar:not(.close) ~ .home .cabecera {
        padding-right: 2.5rem !important;
    }
}



.text-green {
    color: #688f4e;
}

.text-green:active {
    color: green;
    opacity: 80%;
}

.btn-warning-custom {
    background-color: #f7b52e;
    border-color: #f7b52e;
    color: #000;
}

.btn-warning-custom:hover {
    background-color: #ffca61;
    border-color: #ffca61;
    color: #000;
}

.text-general {
    color: #707070;
}

.btn-close {
    --bs-btn-close-color: #000;
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    --bs-btn-close-opacity: 0.5;
    --bs-btn-close-hover-opacity: 0.75;
    --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --bs-btn-close-focus-opacity: 1;
    --bs-btn-close-disabled-opacity: 0.25;
    --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: .25em .25em;
    color: var(--bs-btn-close-color);
    background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat;
    border: 0;
    border-radius: .375rem;
    opacity: var(--bs-btn-close-opacity);
}

.border-color-light-gray {
    border: 1px, solid, #F2F2F2;
}

.text-414141 {
    color: #414141;
}

.border-color-light-green-opacity {
    border-color: rgba(104, 143, 78, 0.25);
}



@media (prefers-color-scheme: light) {
    .btn-gris {
        background-color: #f4f4f4;
    }

    .btn-gris:hover {
        background-color: #d4d4d4;
    }
}

@media (prefers-color-scheme: dark) {


    .btn-gris {
        background-color: #f4f4f4;
    }

    .btn-gris:hover {
        background-color: #d4d4d4;
    }
}

.sidebar li.active .icon,
.sidebar li.active .text {
    color: var(--primary-color);
    transition: var(--tran-02);
}

.sidebar li .icon,
.sidebar li .text {
    color: var(--primary-color);
    transition: var(--tran-02);
}

.active {
    background: var(--secundary-color);
}

.btn-verde {
    background-color: var(--primary-color);
}

.btn-verde:hover {
    background-color: var(--primary-color-hover);
}

.btn-agregar {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 9px -4px var(--secundary-color-shadow);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-agregar:hover,
.btn-agregar:focus,
.btn-agregar:focus-visible {
    background-color: var(--primary-color-hover);
    color: #fff;
    box-shadow: 0 8px 9px -4px var(--primary-color-shadow), 0 4px 18px 0 var(--primary-color-shadow);
}

.btn-agregar:active {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-agregar:focus {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 9px -4px var(--primary-color-shadow-hover), 0 4px 18px 0 var(--primary-color-shadow-hover);
}

.btn-agregar.disabled,
.btn-agregar:disabled,
fieldset:disabled .btn-agregar {
    background-color: var(--primary-color-disable);

    box-shadow: 0 4px 9px -4px var(--primary-color-disable);
}



.btn-guardar {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 9px -4px var(--primary-color-shadow);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}



.btn-guardar:hover,
.btn-guardar:focus,
.btn-guardar:focus-visible {
    background-color: var(--primary-color-hover);
    color: #fff;
    box-shadow: 0 8px 9px -4px var(--secundary-color-shadow), 0 4px 18px 0 var(--secundary-color-shadow);
}

.btn-guardar:active {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-guardar:focus {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 9px -4px var(--primary-color-shadow-hover), 0 4px 18px 0 var(--primary-color-shadow-hover);
}

.btn-guardar.disabled,
.btn-guardar:disabled,
fieldset:disabled .btn-guardar {
    background-color: var(--primary-color-disable);

    box-shadow: 0 4px 9px -4px var(--primary-color-disable);
}

.btn-limpiar {
    background-color: var(--secundary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 9px -4px var(--secundary-color-shadow);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-limpiar:hover,
.btn-limpiar:focus,
.btn-limpiar:focus-visible {
    background-color: var(--secundary-color-hover);
    color: var(--primary-color);
    box-shadow: 0 8px 9px -4px var(--secundary-color-shadow), 0 4px 18px 0 var(--secundary-color-shadow);
}

.btn-limpiar:active {
    background-color: var(--secundary-color);
    color: var(--primary-color);
}

.btn-limpiar:focus {
    background-color: var(--secundary-color);
    color: var(--primary-color);
    box-shadow: 0 8px 9px -4px var(--secundary-color-shadow-hover), 0 4px 18px 0 var(--secundary-color-shadow-hover);
}

.btn-limpiar.disabled,
.btn-limpiar:disabled,
fieldset:disabled .btn-limpiar {
    background-color: var(--secundary-color-disable);

    box-shadow: 0 4px 9px -4px var(--secundary-color-disable);
}

.loader {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: url('../images/loading.gif') 50% 50% no-repeat rgba(241, 242, 243, 255);

}

/* ==========================================================
   FIX FULLCALENDAR — QUE NO ROMPA EL EVENTO COMPACTO
   Semana y Mes: mostrar ●  10:00 a.m. bien alineado
   ========================================================== */

/* 1. Evitar centrado vertical de FullCalendar */
.fc-timegrid-event-harness > .fc-timegrid-event {
    align-items: flex-start !important;
}

/* 2. Evitar centrado forzado del contenido del evento */
.fc-timegrid-event .fc-event-main {
    display: block !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

/* 3. Nuestro contenedor debe comportarse normal */
.fcx {
    display: block !important;
}

/* 4. Estilo compacto consistente para Semana + Mes */
.fc-view-timeGridWeek .fcx-row.fcx-compact,
.fc-view-dayGridMonth .fcx-row.fcx-compact {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* 5. Dot siempre visible */
.fc-view-timeGridWeek .fcx-dot,
.fc-view-dayGridMonth .fcx-dot,
.fc-view-dayGridMonth .fcx-dot-mini {
    flex-shrink: 0 !important;
    display: inline-block !important;
    margin-top: 0 !important;
}

/* 6. Robot siempre visible y negro */
.fcx-icon-robot {
    display: inline-block !important;
    color: #000 !important;
    font-size: 13px;
    margin-left: 1px;
    margin-right: 2px;
}

/* 7. Ocultar el título en Semana + Mes */
.fc-view-timeGridWeek .fcx-title,
.fc-view-dayGridMonth .fcx-title {
    display: none !important;
}