:root {
    --botones: rgba(255, 255, 255, 0.1);
    --colortexto: #000;
    --colortextoinvertido: #fff;
    --colorprimary: #E6B652;
    --colorprimaryheader: rgba(22, 27, 30, 1);
    --colorsecundary: rgba(255, 255, 0, 0.8);
    --colorsecundaryheader: rgba(255, 255, 0, 0.8);
    --excel: #1d6f42;
    --fondo: #F8FAFD;
    --fondofooter: #040301;
    --fondoswal: rgba(255, 255, 255, 0.95);
    --fondoswal2: rgba(19, 19, 20, 0.8);
    --fondotabla: rgba(255, 255, 255, 0.4);
    --fondotablaeven: rgba(51, 136, 196, 0.1);
    --fondoqleditor: RGBA(255, 255, 255, 0.7);
    --gradientefondobody: rgba(255, 255, 255, 0.85);
    --guardar: #3c8504;
    --editar: #e0c200;
    --eliminar: #f90000;
    --imprimir: #000;
    --pdf: #B50801;
    --powerpoint: #D04423;
    --word: #1a61c1;
    --bordecontrol: rgba(0, 0, 0, 1);
    --bordeelemento: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    outline: none;
    font-family: 'Arial', 'sans-serif';
}

body.dark {
    --botones: rgba(19, 19, 20, 0.1);
    --colorprimary: #E6B652;
    --colorprimaryheader: rgba(43, 43, 44, 0.5);
    --colorsecundary: rgba(255, 255, 0, 0.4);
    --colorsecundaryheader: rgba(255, 255, 0, 0.5);
    --colortexto: #fff;
    --colortextoinvertido: #000;
    --fondo: #131314;
    --fondoqleditor: rgba(0, 0, 0, 0.7);
    --fondoswal: rgba(0, 0, 0, 0.2);
    --fondoswal2: rgba(255, 255, 255, 0.8);
    --fondotabla: rgba(0, 0, 0, 0.4);
    --fondotablaeven: rgba(1, 1, 1, 0.7);
    --gradientefondobody: rgba(0, 0, 0, 0.75);
    --sombraformcontrol: rgba(0, 0, 0, 0.5);
    --bordecontrol: rgba(255, 255, 255, 1);
    --bordeelemento: rgba(255, 255, 255, 0.8);
}

body {
    font-family: 'Arial', 'sans-serif';
    font-size: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    min-height: 100vh;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    background-attachment: fixed;
    background-image: linear-gradient(0deg, var(--gradientefondobody), var(--gradientefondobody)), url('../images/fondo.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Estilos Sweealert personalizados */
.swal2-popup {
    /* Transparencia */
    background: var(--fondoswal);
    /* Bordes redondeados */
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 10px var(--fondoswal2);
}

.swal2-close {
    color: var(--colortexto) !important;
}

body.dark .swal2-popup {
    background: var(--fondoswal);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 10px var(--fondoswal2);
    /* Bordes redondeados */
    border-radius: 20px;
}

.swal2-shown .swal2-container {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.swal2-toast-shown .swal2-popup {
    font-size: 1.2em !important;
}

.swal2-toast-shown .swal2-container {
    background-color: transparent !important;
}

.swal2-title,
.swal2-content,
.swal2-html-container {
    color: var(--colortexto) !important;
    /* Texto blanco para mayor contraste */
}

div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line] {
    background-color: transparent !important;
}

div:where(.swal2-icon).swal2-success .swal2-success-fix {
    background-color: transparent !important;
}

.swal2-select {
    color: var(--colortexto) !important;
}

.swal2-select option {
    color: #000 !important;
}

/* .swal2-styled.swal2-confirm {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--colortexto);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
    font-weight: bold;
} */

a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    text-decoration: none;
}

a,
textarea,
select,
input,
button {
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

:focus {
    outline-color: transparent;
    outline-style: none;
}

/* Aplica estilos por defecto a todos los elementos de formulario con autocompletar */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    -webkit-box-shadow: none !important;
    -webkit-text-fill-color: var(--colortexto) !important;
    transition: all 86400000s ease-in-out 0s !important;
}

input:-internal-autofill-selected,
textarea:-internal-autofill-selected,
select:-internal-autofill-selected {
    background-color: transparent !important;
    color: var(--colortexto) !important;
}

header {
    position: fixed;
    -ms-flex-item-align: start;
    align-self: flex-start;
    top: 0;
    background-color: var(--fondofooter);
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
    width: 100%;
    -webkit-box-shadow: 0 -4px 0 var(--colorsecundaryheader) inset;
    box-shadow: 0 -4px 0 var(--colorsecundaryheader) inset;
    z-index: 99;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

header h1 {
    text-align: center;
    width: 100%;
    color: #fff;
    font-size: 16pt;
}

header .logo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

header img {
    height: 80px;
    margin: 10px;
}

header .inicio {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    margin-right: 10px;
    margin-top: 10px;
    margin-bottom: 5px;
}

header .botonesheader {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 5px;
}

header .fotousuario {
    border-radius: 50%;
    background-color: var(--colorsecundary);
    height: 54px;
    width: 54px;
    cursor: pointer;
    border: 4px solid #fff;
    overflow: hidden;
}

header .fotousuario img {
    height: 100%;
    width: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
    margin: auto;
    -webkit-transition: 0.5s;
    transition: 0.5s;
}

header .fotousuario img:hover {
    -webkit-transform: scale(1.5);
    transform: scale(1.5);
}

header .botoncerrarsesion {
    border-radius: 50%;
    background-color: var(--fondofooter);
    height: 54px;
    width: 54px;
    border: 4px solid #fff;
    cursor: pointer;
    margin-left: 10px;
    position: relative;
}

header .botoncerrarsesion .iconosalir {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    color: #ffffff;
    text-shadow: 2px 2px 2px #000;
    font-size: 3em;
}

/* Contenedor del Tooltip */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tiptext {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #ffffff;
    text-align: center;
    border-radius: 20px;
    padding: 6px 0;
    position: absolute;
    z-index: 1;
    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.tooltip .tiptext p {
    margin: 5px;
    font-size: 1.2em;
}

.tooltip .tiptext::after {
    content: "";
    position: absolute;
    border-width: 5px;
    border-style: solid;
}

.tooltip:hover .tiptext {
    visibility: visible;
}

.tooltip.bottom .tiptext {
    margin: 0;
    top: 150%;
    left: 50%;
}

.tooltip.bottom .tiptext::after {
    margin-left: 0;
    bottom: 100%;
    left: 50%;
    border-color: transparent transparent #2e2e2e transparent;
}

.tooltip.bottom.grupos {
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8em;
}

.grupospropios {
    border-bottom: 1px solid white;
    padding: 5px;
}

.grupospropios:last-child {
    border-bottom: none;
}

header .inicio .saludousuario {
    color: #000000;
    background-color: #ffffff;
    padding: 5px 5px 0 5px;
    border-radius: 10px 10px 0 0;
    font-size: 1em;
    text-align: right;
    padding-bottom: 5px;
    padding-top: 5px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

/*Header Index*/

.headerinicio {
    position: relative;
    background-color: var(--fondofooter);
    width: 100%;
    height: 100px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 0;
}

.headerinicio h1 {
    text-align: center;
    width: 100%;
    color: #ffffff;
    font-size: 16pt;
    margin: auto;
}

.headerinicio .logo {
    left: 10px;
    top: 0;
}

.headerinicio img {
    height: 80px;
    margin: 10px;
}

/* Modo Oscuro */
header .grupomodooscuro {
    text-align: center;
    font-weight: bold;
    font-size: 0.7em;
    margin: 10px;
}

.grupomodooscuro .switch {
    font-size: 2em;
    background: #343D5B;
    border-radius: 50px;
    position: relative;
    border: 2px solid #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.8) inset, 0 -2px 4px -1px rgba(0, 0, 0, 0.8) inset;
    outline: none;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 5px;
    margin: auto;
    filter: drop-shadow(0 0 5px orange);
    transition: background .3s ease-in-out;
}

.grupomodooscuro .switch.active {
    background: orange;
    filter: drop-shadow(0 0 5px #000);
    position: relative;
}

/*Estrellas*/
.grupomodooscuro .switch::before {
    content: "";
    width: 2px;
    height: 2px;
    top: 5px;
    right: 5px;
    position: absolute;
    -webkit-box-shadow: -3px 2px #fff, -26px 6px #fff, -8px 10px #fff, -4px 25px #fff, -20px 28px #fff, -8px 10px #fff, -20px -1px #fff, -1px 15px #fff, -28px 22px #fff;
    box-shadow: -3px 2px #fff, -26px 6px #fff, -8px 10px #fff, -4px 25px #fff, -20px 28px #fff, -8px 10px #fff, -20px -1px #fff, -1px 15px #fff, -28px 22px #fff;
    -webkit-animation: animStar 1s both infinite alternate;
    animation: animStar 1s both infinite alternate;
}

@-webkit-keyframes animStar {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes animStar {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/*Bola del switch*/
.grupomodooscuro .switch::after {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    position: absolute;
    background: #f1f1f1;
    top: 50%;
    transform: translateY(-50%);
    left: 5px;
    right: unset;
    border-radius: 100px;
    -webkit-box-shadow: 0 0 2px 2px rgba(0, 0, 0, .2);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, .2);
    z-index: 5;
    transition: left .3s ease-in-out;
}

.grupomodooscuro .switch.active::after {
    left: calc(100% - 35px);
}

.grupomodooscuro .switch span {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: #ffffff;
    z-index: 1;
    text-shadow: 1px 1px 4px #000;
}

/* Nubes */
.grupomodooscuro .switch.active::before {
    width: 10px;
    height: 3px;
    top: -35px;
    left: -5px;
    z-index: 0;
    margin: 60px auto;
    border-radius: 50%;
    position: absolute;
    box-shadow:
        -3px 7px 0 1px #fff,
        -20px -7px 0 1px #fff,
        -1px -18px 0 1px #fff;
    -webkit-animation: animNube 1.5s both infinite alternate;
    animation: animNube 1.5s both infinite alternate;
}

@-webkit-keyframes animNube {
    from {
        -webkit-transform: translateY(-1px);
        transform: translateY(-1px);
    }

    to {
        -webkit-transform: translateY(1px);
        transform: translateY(1px);
    }
}

@keyframes animNube {
    from {
        -webkit-transform: translateY(-1px);
        transform: translateY(-1px);
    }

    to {
        -webkit-transform: translateY(1px);
        transform: translateY(1px);
    }
}

/*------------------------------*/

main {
    margin-top: 140px;
    width: 100%;
}

h1.titulo {
    text-align: center;
    width: 90%;
    margin: 5px auto;
    color: var(--colortexto);
}

.botonatras {
    position: fixed;
    top: 130px;
    left: 10px;
    font-size: 3em;
    color: var(--colorprimary);
    text-shadow: 0 2px 2px #000;
    -webkit-text-stroke: 0.5px #fff;
    -webkit-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
    z-index: 3;
}

.botonatras:hover {
    -webkit-transform: scale(1.2);
    transform: scale(1.2);
}

footer {
    -ms-flex-item-align: end;
    align-self: flex-end;
    position: relative;
    width: 100%;
    background-color: var(--fondofooter);
    color: #fff;
    text-align: center;
    font-size: 1.2em;
    padding: 10px;
    border-top: 5px solid var(--colorsecundary);
    -webkit-box-shadow: 0 -2px 5px #000;
    box-shadow: 0 -2px 5px #000;
    z-index: 0;
}

@media screen and (max-width: 768px) {
    header img {
        height: 60px;
        margin: 10px;
    }

    .headerinicio h1 {
        display: none;
    }

    header .inicio .saludousuario {
        font-size: 0.8em;
    }

    .tooltip.bottom .tiptext {
        margin-left: -40px;
    }

    main {
        margin-top: 150px;
    }

    .botonatras {
        top: 150px;
    }
}

@media screen and (max-width: 320px) {
    header img {
        width: 100%;
        height: auto;
        margin: auto;
    }
}