body {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background-image: url('/images/fondoERP-8.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-wrap {
    width: 450px;
    margin: 0;
    margin-right: 100px;
    position: relative;
    text-align: center;
    background: #25258f;
    background: url('/images/fondoLogin.jpg') no-repeat center;
    background-size: cover;
    box-shadow: 0 12px 15px 0 rgba(0, 0, 0, .24), 0 17px 50px 0 rgba(0, 0, 0, .19);
    border-radius: 10px;
    overflow: hidden;
    min-height: 520px;
}

.login-html {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 30px 30px;
    background: rgba(40, 57, 101, .9);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
}

/* ESTILOS PRINCIPALES DEL FORMULARIO - CORREGIDOS */
.login-form {
    min-height: 400px;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-form .group {
    margin-bottom: 20px;
}

.login-form .group .label {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    text-align: left;
    text-transform: uppercase;
}

.login-form .group .input {
    border: none;
    padding: 18px 25px;
    border-radius: 25px;
    background: rgba(255, 255, 255, .1);
    font-size: 16px;
    width: 100%;
    color: #fff;
    box-sizing: border-box;
}

.login-form .group .button {
    background-color: #1161ee;
    border: none;
    color: white;
    padding: 15px 25px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 18px;
    margin: 10px 2px;
    cursor: pointer;
    border-radius: 50px;
    transition: background-color 0.3s, transform 0.1s;
    width: 100%;
    text-transform: uppercase;
    font-weight: bold;
}

.login-form .group .button:hover {
    background-color: #45a049;
}

.login-form .group .button:active {
    transform: scale(0.95);
    background-color: #3e8e41;
}

/* TABS CORREGIDOS */
.login-html .tab {
    font-size: 24px;
    margin-right: 20px;
    padding-bottom: 8px;
    margin: 0 20px 15px 0;
    display: inline-block;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    color: #aaa;
    cursor: pointer;
}

.login-html .sign-in:checked + .tab,
.login-html .sign-up:checked + .tab {
    color: #fff;
    border-color: #1161ee;
}

/* CHECKBOX Y RECORDAR CONTRASEÑA */
.login-form .group:has(.check) {
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember-label1 {
    color: #d3d3d3;
    font-size: 15px;
    cursor: pointer;
}

.remember-label {
    color: #d3d3d3;
    font-size: 15px;
}

.remember-label:hover {
    color: #ffffff;
}

/* LÍNEA HR */
.hr {
    height: 2px;
    margin: 30px 0 25px 0;
    background: rgba(255, 255, 255, .2);
    border: none;
}

/* MENSAJE DE REGISTRO */
.messageRegister {
    font-size: 16px;
    color: #333;
    padding: 15px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

.messageRegister a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.messageRegister a:hover {
    text-decoration: underline;
}

/* SISTEMA DE PESTAÑAS */
.login-html .sign-in-htm,
.login-html .sign-up-htm {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    transition: all .4s linear;
}

.login-html .sign-in,
.login-html .sign-up {
    display: none;
}

.login-html .sign-in:checked + .tab + .sign-up + .tab + .login-form .sign-in-htm {
    transform: rotate(0);
}

.login-html .sign-up:checked + .tab + .login-form .sign-up-htm {
    transform: rotate(0);
}

/* Logo para móviles */
.mobile-logo {
    display: none; /* Oculto por defecto */
    padding: 15px 0;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

.mobile-logo img {
    max-width: 150px;
    height: auto;
}

/* MEDIA QUERIES CORREGIDAS */
@media (max-width: 1366px) {
    .login-wrap {
        margin-right: 60px;
        width: 430px;
    }
}

@media (max-width: 1200px) {
    .login-wrap {
        margin-right: 40px;
        width: 420px;
    }
}

@media (max-width: 1024px) {
    body {
        justify-content: center;
        padding: 40px 30px;
        background: linear-gradient(135deg, #051340 0%, #144B81 100%) fixed !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }
    
    .login-wrap {
        width: 450px;
        margin-right: 0;
        min-height: 500px;
        background: rgba(40, 57, 101, 0.95) !important;
    }
    
    .login-html {
        background: transparent !important;
    }
}

@media (max-width: 768px) {
    body {
        justify-content: center;
        padding: 30px 20px;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
        background: linear-gradient(135deg, #051340 0%, #144B81 100%) fixed !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }
    
    .login-wrap {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        min-height: 480px;
        background: rgba(40, 57, 101, 0.95) !important;
    }
    
    .mobile-logo {
        display: block; /* Mostrar en tablets */
    }
    
    .login-html {
        padding: 35px 25px;
        background: transparent !important;
    }
    
    .login-html .tab {
        font-size: 22px;
        margin: 0 15px 12px 0;
        padding-bottom: 8px;
    }
    
    .login-form .group .input {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .login-form .group .button {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .login-form {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 15px;
        background: linear-gradient(135deg, #051340 0%, #144B81 100%) fixed !important;
    }
    
    .login-wrap {
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
        min-height: 450px;
    }
    
    .mobile-logo {
        display: block; /* Mostrar en móviles */
        padding: 20px 0;
        margin-top: 15px;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 0 0 8px 8px;
    }
    
    .mobile-logo img {
        max-width: 120px;
    }
    
    .login-html {
        padding: 25px 20px;
    }
    
    .login-html .tab {
        font-size: 20px;
        margin: 0 12px 10px 0;
        padding-bottom: 6px;
    }
    
    .login-form .group .input {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .login-form .group .button {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .login-form .group {
        margin-bottom: 20px;
    }
    
    .login-form {
        min-height: 380px;
    }
    
    .remember-label1,
    .remember-label {
        font-size: 14px;
    }
}


/* ESTILOS PARA EL CARRUSEL (mantener estos) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    background: linear-gradient(to bottom, #16598E 0%, #051340 100%) !important;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 800px;
    max-height: 80vh;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background-color: #000f96;
    color: white;
    font-size: 18px;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100; /* Asegura que esté por encima de otros elementos */
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s ease-in-out;
}

.carousel-slide.prev {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 1;
}

.carousel-slide.next {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 5;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    max-height: 500px;
    transition: transform 0.5s ease;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    color: white;
    text-align: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.5s ease;
}

.carousel-slide.active .carousel-caption {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

.carousel-caption h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: bold;
}

.carousel-caption p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.carousel-slide.active .carousel-image {
    animation: zoomInSlide 0.5s forwards;
}

@keyframes zoomInSlide {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Preloader para imágenes */
.carousel-container {
    position: relative;
}

.carousel-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.carousel-preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #fff;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 15, 150, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background: rgba(0, 15, 150, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.8);
}

.indicator.active {
    background: rgba(0, 15, 150, 1);
    width: 15px;
    height: 15px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.carousel-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
}

.carousel-counter .current {
    color: #fff;
    font-size: 16px;
}

@media (max-width: 768px) {
    .carousel {
        height: 300px;
    }
    
    .carousel-btn {
        padding: 12px 16px;
        font-size: 18px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 250px;
    }
    
    .carousel-btn {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .carousel-indicators {
        bottom: 15px;
    }
}

/* UTILITIES */
*, :after, :before {
    box-sizing: border-box;
}

.clearfix:after, .clearfix:before {
    content: '';
    display: table;
}

.clearfix:after {
    clear: both;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}