:root {
    --colorprimary: #8B493D;
    --colorsecundary: #E1D0C9;
    --fondofooter: #292929;
    --fondofootertransparent: rgba(41, 41, 41, 0.98);
    --fondo: #E8F0FE;
    --guardar: #3c8504;
    --editar: #e0c200;
    --eliminar: #f90000;
    --pdf: #B50801;
    --excel: #1d6f42;
    --powerpoint: #D04423;
    --word: #1a61c1;
    --imprimir: #000;
    --bg-color: rgba(255, 255, 255, 0);
    --colortexto: #000;
    --gradientefondobody: RGBA(255, 255, 255, 0.95);
    --sombraformcontrol: RGBA(255, 255, 255, 0.5);
    --fondoswal: rgba(255, 255, 255, 0.95);
    --fondoswal2: rgba(0, 0, 0, 0.8);
    --fondotabla: #fff;
    --fondotablaeven: grey;
    --botones: rgba(255, 255, 255, 0.6);
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Arial', 'sans-serif';
    outline: none;
    box-sizing: border-box;
}

body.dark {
    --colortexto: #fff;
    --gradientefondobody: RGBA(0, 0, 0, 0.95);
    --sombraformcontrol: RGBA(0, 0, 0, 0.5);
    --fondoswal: rgba(0, 0, 0, 0.2);
    --fondoswal2: rgba(255, 255, 255, 0.8);
    --fondotabla: rgba(0, 0, 0, 0.9);
    --fondotablaeven: rgba(0, 0, 0, 0.6);
    --botones: rgba(0, 0, 0, 0.6);
}

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/Apartamento IA.jpeg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

header {
    position: fixed;
    -ms-flex-item-align: start;
    align-self: flex-start;
    top: 0;
    background-color: var(--fondofooter);
    width: 100%;
    height: 110px;
    z-index: 9;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    text-align: center;
    width: 100%;
    color: #fff;
    text-shadow: 2px 2px #000;
    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;
}

@media screen and (max-width: 768px) {
    header img {
        max-height: 60px;
        margin: 10px;
    }
}

header .saludarsesion {
    position: absolute;
    right: 0;
    bottom: 0;
    text-align: center;
    font-weight: bold;
    font-size: 1em;
    padding: 10px;
    color: #fff;
    /* Glassmorphims */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
    /* ---------------- */
}

header .botonesheader {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 5px;
    padding: 10px;
    gap: 10px;
    position: absolute;
    top: 0;
    right: 0;
}

header .cerrarsesion {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform .3s ease-in-out;
}

header .cerrarsesion:hover {
    transform: scale(1.2);
}

header .cerrarsesion .texto {
    text-align: center;
    font-weight: bold;
    font-size: 0.7em;
    padding: 5px;
    border-radius: 20px;
    background-color: #fff;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

header .cerrarsesion .texto i {
    text-align: center;
    font-weight: bold;
    font-size: 2em;
    padding: 5px;
}


/* Modo Oscuro */
header .grupomodooscuro {
    text-align: center;
    font-weight: bold;
    font-size: 0.7em;
}

.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: #fff;
    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);
    }
}

/*------------------------------*/

/* 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);
}

body.dark .swal2-popup {
    background: var(--fondoswal);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 10px var(--fondoswal2);
    /* Bordes redondeados */
    border-radius: 20px;
}

.swal2-container {
    background-color: rgba(0, 0, 0, 0.8) !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-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;
} */


/* Estilos generales */
main {
    padding-top: 104px;
    margin: 0;
    width: 100%;
}

body .botonatras {
    position: fixed;
    top: 120px;
    left: 10px;
    z-index: 9;
    transition: transform 0.3s ease-in-out;
}

body .botonatras i {
    font-size: 2em;
    color: var(--colortexto);
}

body .botonatras:hover {
    transform: scale(1.2);
}

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;
}

footer {
    margin-top: auto;
    background-color: var(--fondofooter);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: distribute;
    justify-content: space-around;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 5px;
    width: 100%;
    height: 100%;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

footer img {
    height: 70px;
}

footer .section1 {
    padding: 10px;
}

footer .section2 {
    color: #fff;
    font-size: 1em;
}

footer .section2 p:nth-child(2) {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

footer .section2 .correo {
    margin-top: 10px;
    margin-bottom: 15px;
}

footer .section2 a {
    color: #fff;
    text-decoration: none;
}

footer .section2 .redes {
    display: flex;
    justify-content: center;
    align-items: center;
}

footer .section2 .redes a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 2em;
    border-radius: 5px;
    padding: 2px;
    background: transparent;
    margin-top: 20px;
    transition: scale .5s ease-in-out;
    position: relative;
    filter: drop-shadow(0 0 2px #fff);
}

.techo {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 25px solid var(--colorprimary);
    top: -25px;
    left: -6px;
}

footer .section2 .redes a:hover {
    transform: scale(1.2);
}

footer .section2 .redes a.instagram {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(115deg, rgb(249, 206, 52), rgb(238, 42, 123), rgb(98, 40, 215));
}

footer .section2 .redes a.facebook {
    color: #3b5998;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    margin-left: 20px;
    margin-right: 20px;
}

footer .section2 .redes a.youtube {
    color: #ff0000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

footer .section3 {
    padding: 10px;
}

footer .section3 img {
    transition: .8s ease-in-out;
}

footer .section3 img:hover {
    transform: rotate3d(0, 1, 0, 360deg);
}

footer .admin {
    position: absolute;
    bottom: 0;
    right: 10px;
    padding: 10px;
    height: 40px;
    color: #fff;
    font-size: 1em;
    background-color: var(--colorprimary);
    border-radius: 20px 20px 0 0;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: height .5s ease-in-out;
    box-shadow: 0 0 6px #000;
    border-right: 2px solid #fff;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
}

footer .admin:hover {
    height: 50px;
}