/* =========================================
   CONTENEDOR PRINCIPAL
   ========================================= */
.auth-centered-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 60px;
    position: relative;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.auth-centered-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* =========================================
   IMAGEN DE FONDO PRINCIPAL
   ========================================= */
.auth-image-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    transform: scale(1.1);
}

/* =========================================
   LAYOUT WRAPPER
   ========================================= */
.auth-layout-wrapper {
    position: relative;
    width: 100%;
    max-width: 750px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========================================
   FLECHAS DE NAVEGACION
   ========================================= */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav svg {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.9);
}

.carousel-prev { left: -65px; }
.carousel-next { right: -65px; }

/* =========================================
   CONTENEDOR PRINCIPAL - TARJETAS
   ========================================= */
.auth-main-container {
    position: relative;
    width: 100%;
    height: 580px;
    perspective: 1000px;
}

.auth-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* =========================================
   SLIDES - TARJETAS CON BORDES DECORATIVOS
   ========================================= */
.auth-carousel-slide {
    position: absolute;
    width: 300px;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 40px 25px 25px 25px;
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.auth-carousel-slide {
    background-image: linear-gradient(160deg, rgba(15, 15, 15, 0.85) 0%, rgba(5, 5, 5, 0.95) 100%);
}

.slide-login {
    background-image: linear-gradient(160deg, rgba(15, 15, 15, 0.85) 0%, rgba(5, 5, 5, 0.95) 100%), 
                      url('/ucp/public/media/login1.png');
}

.slide-register {
    background-image: linear-gradient(160deg, rgba(15, 15, 15, 0.85) 0%, rgba(5, 5, 5, 0.95) 100%), 
                      url('/ucp/public/media/register1.png');
}

.slide-reset {
    background-image: linear-gradient(160deg, rgba(15, 15, 15, 0.85) 0%, rgba(5, 5, 5, 0.95) 100%), 
                      url('/ucp/public/media/reset1.png');
}

.slide-reset-confirm {
    background-image: linear-gradient(160deg, rgba(15, 15, 15, 0.85) 0%, rgba(5, 5, 5, 0.95) 100%), 
                      url('/ucp/public/media/rescue1.jpg');
}

/* =========================================
   BORDES DECORATIVOS CON IMÁGENES
   ========================================= */
.border-decoration {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.border-left {
    left: -12px;
    top: 12px;
    bottom: 18px;
    width: 18px;
    background: url('/ucp/public/media/borde-lateral1.png') repeat-y;
    background-size: 100% 100%;
    opacity: 0.9;
}

.border-right {
    right: -12px;
    top: 12px;
    bottom: 18px;
    width: 18px;
    background: url('/ucp/public/media/borde-lateral1.png') repeat-y;
    background-size: 100% 100%;
    opacity: 0.9;
}

.border-bottom {
    left: 0;
    right: 0;
    bottom: -12px;
    height: 18px;
    background: url('/ucp/public/media/borde-inferior1.png') repeat-x;
    background-size: 100% 100%;
    opacity: 0.9;
}

/* =========================================
   ESTADOS DEL CARRUSEL
   ========================================= */
.auth-carousel-slide.center {
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 1;
    filter: blur(0);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-carousel-slide.left {
    left: calc(50% - 210px);
    transform: translateX(-50%) scale(0.88);
    z-index: 5;
    opacity: 0.5;
    filter: blur(4px);
    pointer-events: none;
}

.auth-carousel-slide.right {
    left: calc(50% + 210px);
    transform: translateX(-50%) scale(0.88);
    z-index: 5;
    opacity: 0.5;
    filter: blur(4px);
    pointer-events: none;
}

/* =========================================
   TÍTULOS (EXTERNO E INTERNO)
   ========================================= */
.slide-title-outer {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-title-inner {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-align: center;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-carousel-slide.left .slide-title-outer,
.auth-carousel-slide.right .slide-title-outer {
    transform: translateX(-50%) scale(0.9);
}

.auth-carousel-slide.left .slide-title-inner,
.auth-carousel-slide.right .slide-title-inner {
    transform: scale(0.9);
}

.auth-carousel-slide.center .slide-title-outer {
    transform: translateX(-50%) scale(1);
}

.auth-carousel-slide.center .slide-title-inner {
    transform: scale(1);
}

/* =========================================
   ELEMENTOS INTERNOS DEL SLIDE
   ========================================= */
.auth-slide-logo {
    text-align: center;
    margin-top: 0px;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.auth-slide-logo img {
    width: 200px !important;
    max-width: 90% !important;
    height: auto !important;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    display: block;
    margin: 0 auto;
}

/* =========================================
   FORMULARIOS
   ========================================= */
.auth-carousel-slide form {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.form-group { margin-bottom: 14px; }

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
}

.form-input-wrapper { position: relative; }

.form-input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.4);
    transition: fill 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.form-input:focus + .input-icon,
.form-input-wrapper:focus-within .input-icon {
    fill: rgba(255, 255, 255, 0.9);
}

.form-input::placeholder { color: rgba(255, 255, 255, 0.3); }

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* =========================================
   MODAL DE MENSAJES (CON ANIMACIÓN DE DESLIZAMIENTO)
   ========================================= */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.auth-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: linear-gradient(160deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 320px;
    text-align: center;
    position: relative;
    /* ANIMACIÓN DE APARICIÓN: Desliza desde la derecha */
    transform: translateX(120%) scale(0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.auth-modal-overlay.show .auth-modal-content {
    /* ANIMACIÓN DE APARICIÓN: Posición final centrada */
    transform: translateX(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.auth-modal-close:hover {
    color: #ffffff;
}

/* Sección del icono con borde inferior - padding inferior reducido */
.auth-modal-icon {
    width: 168px;
    height: 168px;
    margin: 0 auto;
    padding: 32px 24px 8px 24px; /* Reducido de 24px a 8px en padding-bottom */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-modal-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: grayscale(100%);
}

/* Sección del texto - padding superior reducido para acercarlo al icono */
.auth-modal-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 12px 24px 12px 24px; /* Reducido de 24px a 12px en padding-top */
    font-weight: 500;
    word-wrap: break-word;
}

/* Sección del botón con más padding inferior */
.auth-modal-btn-wrapper {
    padding: 4px 24px 28px 24px; /* Aumentado de 24px a 28px en padding-bottom */
}

.auth-modal-btn {
    width: auto;
    display: inline-block;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-width: 140px;
}

.auth-modal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Variantes en escala de grises (sin colores) */
.auth-modal-error,
.auth-modal-success {
    /* Mismo estilo para ambos - escala de grises */
}

.auth-modal-error .auth-modal-btn,
.auth-modal-success .auth-modal-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-modal-error .auth-modal-btn:hover,
.auth-modal-success .auth-modal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .auth-centered-container { padding: 30px 80px; }
    .carousel-prev { left: -55px; }
    .carousel-next { right: -55px; }
    
    .auth-carousel-slide.left { left: calc(50% - 190px); }
    .auth-carousel-slide.right { left: calc(50% + 190px); }
}

@media (max-width: 700px) {
    .auth-centered-container { padding: 20px; }
    
    .carousel-prev { left: 5px; width: 40px; height: 40px; }
    .carousel-next { right: 5px; width: 40px; height: 40px; }
    
    .auth-main-container { height: 540px; }
    
    .auth-carousel-slide { 
        width: 280px;
        height: 500px; 
        padding: 35px 20px 25px 20px; 
    }
    
    .auth-carousel-slide.left { left: calc(50% - 180px); }
    .auth-carousel-slide.right { left: calc(50% + 180px); }
    
    .auth-slide-logo img { 
        width: 175px !important; 
    }
    
    .border-left { left: -10px; width: 14px; }
    .border-right { right: -10px; width: 14px; }
    .border-bottom { bottom: -10px; height: 14px; }
    
    .slide-title-outer {
        font-size: 14px;
        top: -35px;
    }
    
    .slide-title-inner {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    /* Ajustar modal para tablets */
    .auth-modal-icon {
        width: 140px;
        height: 140px;
        padding: 28px 20px 20px 20px;
    }
    
    .auth-modal-content {
        max-width: 280px;
    }
    
    .auth-modal-text {
        padding: 20px;
        font-size: 15px;
    }
    
    .auth-modal-btn-wrapper {
        padding: 18px 20px 20px 20px;
    }
}

@media (max-width: 520px) {
    .auth-carousel-slide { 
        width: 260px;
        height: 480px; 
        padding: 30px 18px 22px 18px; 
    }
    
    .auth-carousel-slide.left { left: calc(50% - 170px); }
    .auth-carousel-slide.right { left: calc(50% + 170px); }
    
    .auth-slide-logo img { 
        width: 150px !important; 
    }
    
    .carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .border-decoration {
        display: none;
    }
    
    .slide-title-outer {
        font-size: 13px;
        top: -30px;
    }
    
    /* Ajustar modal para pantallas muy pequeñas */
    .auth-modal-icon {
        width: 120px;
        height: 120px;
        padding: 24px 16px 18px 16px;
    }
    
    .auth-modal-content {
        max-width: 260px;
    }
    
    .auth-modal-text {
        padding: 18px 16px;
        font-size: 14px;
    }
    
    .auth-modal-btn-wrapper {
        padding: 16px;
    }
    
    .auth-modal-btn {
        padding: 10px 24px;
        min-width: 120px;
        font-size: 13px;
    }
}
/* =========================================
   RESPONSIVE - ALTA RESOLUCIÓN 2K (≥2560px)
   ========================================= */
@media (min-width: 2560px) {
    .auth-centered-container {
        padding: 45px 90px; /* Ajustado para no ser tan grande */
    }
    
    .auth-layout-wrapper {
        max-width: 1125px; /* 750px * 1.5 en vez de 2x */
    }
    
    .carousel-nav {
        width: 60px;
        height: 60px;
        border-radius: 10px;
    }
    
    .carousel-nav svg {
        width: 30px;
        height: 30px;
    }
    
    .carousel-prev { left: -85px; }
    .carousel-next { right: -85px; }
    
    .auth-main-container {
        height: 870px; /* 580px * 1.5 */
    }
    
    .auth-carousel-slide {
        width: 450px; /* 300px * 1.5 en vez de 600px */
        height: 780px; /* 520px * 1.5 */
        padding: 60px 38px 38px 38px;
        border-radius: 16px;
    }
    
    .auth-carousel-slide.left {
        left: calc(50% - 315px);
    }
    
    .auth-carousel-slide.right {
        left: calc(50% + 315px);
    }
    
    .border-left {
        left: -18px;
        top: 18px;
        bottom: 27px;
        width: 27px;
    }
    
    .border-right {
        right: -18px;
        top: 18px;
        bottom: 27px;
        width: 27px;
    }
    
    .border-bottom {
        bottom: -18px;
        height: 27px;
    }
    
    .slide-title-outer {
        font-size: 24px; /* 16px * 1.5 */
        top: -60px;
        letter-spacing: 4.5px;
    }
    
    .slide-title-inner {
        font-size: 24px;
        margin-bottom: 22px;
        letter-spacing: 3.75px;
    }
    
    .auth-slide-logo {
        margin-bottom: 12px;
        padding-bottom: 15px;
    }
    
    .auth-slide-logo img {
        width: 300px !important; /* 200px * 1.5 */
    }
    
    .form-group {
        margin-bottom: 21px;
    }
    
    .form-label {
        font-size: 16px; /* 11px * 1.5 */
        letter-spacing: 1.8px;
        margin-bottom: 9px;
    }
    
    .form-input-wrapper .input-icon {
        left: 21px;
        width: 24px;
        height: 24px;
    }
    
    .form-input {
        padding: 16px 21px 16px 63px;
        font-size: 21px; /* 14px * 1.5 */
        border-radius: 9px;
    }
    
    .btn-primary {
        padding: 18px;
        font-size: 18px; /* 12px * 1.5 */
        letter-spacing: 3.75px;
        border-radius: 9px;
        margin-top: 15px;
    }
    
    .auth-modal-content {
        max-width: 480px; /* 320px * 1.5 */
        border-radius: 24px;
    }
    
    .auth-modal-close {
        top: 18px;
        right: 18px;
        font-size: 42px;
        width: 48px;
        height: 48px;
    }
    
    .auth-modal-icon {
        width: 252px; /* 168px * 1.5 */
        height: 252px;
        padding: 48px 36px 12px 36px;
    }
    
    .auth-modal-text {
        font-size: 24px; /* 16px * 1.5 */
        padding: 18px 36px;
    }
    
    .auth-modal-btn-wrapper {
        padding: 6px 36px 42px 36px;
    }
    
    .auth-modal-btn {
        padding: 18px 48px;
        font-size: 21px;
        border-radius: 12px;
        min-width: 210px;
    }
}

/* =========================================
   RESPONSIVE - ALTA RESOLUCIÓN 4K (≥3840px)
   ========================================= */
@media (min-width: 3840px) {
    /* Escalado 2x para 4K */
    .auth-centered-container {
        padding: 60px 120px;
    }
    
    .auth-layout-wrapper {
        max-width: 1500px;
    }
    
    .carousel-nav {
        width: 90px;
        height: 90px;
        border-radius: 16px;
    }
    
    .carousel-nav svg {
        width: 44px;
        height: 44px;
    }
    
    .carousel-prev { left: -130px; }
    .carousel-next { right: -130px; }
    
    .auth-main-container {
        height: 1160px;
    }
    
    .auth-carousel-slide {
        width: 600px;
        height: 1040px;
        padding: 80px 50px 50px 50px;
        border-radius: 24px;
    }
    
    .auth-carousel-slide.left {
        left: calc(50% - 420px);
    }
    
    .auth-carousel-slide.right {
        left: calc(50% + 420px);
    }
    
    .border-left {
        left: -24px;
        top: 24px;
        bottom: 36px;
        width: 36px;
    }
    
    .border-right {
        right: -24px;
        top: 24px;
        bottom: 36px;
        width: 36px;
    }
    
    .border-bottom {
        bottom: -24px;
        height: 36px;
    }
    
    .slide-title-outer {
        font-size: 32px;
        top: -80px;
        letter-spacing: 6px;
    }
    
    .slide-title-inner {
        font-size: 32px;
        margin-bottom: 30px;
        letter-spacing: 5px;
    }
    
    .auth-slide-logo {
        margin-bottom: 16px;
        padding-bottom: 20px;
    }
    
    .auth-slide-logo img {
        width: 400px !important;
    }
    
    .form-group {
        margin-bottom: 28px;
    }
    
    .form-label {
        font-size: 22px;
        letter-spacing: 2.4px;
        margin-bottom: 12px;
    }
    
    .form-input-wrapper .input-icon {
        left: 28px;
        width: 32px;
        height: 32px;
    }
    
    .form-input {
        padding: 22px 28px 22px 84px;
        font-size: 28px;
        border-radius: 12px;
    }
    
    .btn-primary {
        padding: 24px;
        font-size: 24px;
        letter-spacing: 5px;
        border-radius: 12px;
        margin-top: 20px;
    }
    
    .auth-modal-content {
        max-width: 640px;
        border-radius: 32px;
    }
    
    .auth-modal-close {
        top: 24px;
        right: 24px;
        font-size: 56px;
        width: 64px;
        height: 64px;
    }
    
    .auth-modal-icon {
        width: 336px;
        height: 336px;
        padding: 64px 48px 16px 48px;
    }
    
    .auth-modal-text {
        font-size: 32px;
        padding: 24px 48px;
    }
    
    .auth-modal-btn-wrapper {
        padding: 8px 48px 56px 48px;
    }
    
    .auth-modal-btn {
        padding: 24px 64px;
        font-size: 28px;
        border-radius: 16px;
        min-width: 280px;
    }
}