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

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body{
    background-color: #CFDCE3;
    background: linear-gradient(to right, #C7C7C7, #5F96E9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.container{
    background-color: #FFFFFF;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(81, 81, 81, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.container p{
    font-size: 20px;
    line-height: 22px;
    letter-spacing: -0.01em;
    margin: 20px 0;
    font-weight: 400;
    color: #ffffff;
}

.container span{
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.container a{
    color: #e11d48;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0 10px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.container a:hover{
    color: #be185d;
}

.container button{
    background: linear-gradient(135deg, #028879 0%, #065f5a 100%);
    color: #FFFFFF;
    font-size: 13px;
    padding: 12px 48px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(2, 136, 121, 0.15);
    font-family: 'Inter', sans-serif;
}

.container button:hover{
    background: linear-gradient(135deg, #065f5a 0%, #042f2e 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 136, 121, 0.25);
}

.container button:hover{
    background-color: #135475;
}

.container button.hidden{
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container button.hidden:hover{
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFFFFF;
    transform: translateY(-1px);
}

.container form{
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

.container input{
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    margin: 10px 0;
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 12px;
    width: 100%;
    outline: none;
    color: #1e293b;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.container input:focus{
    border-color: #028879;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 136, 121, 0.1);
    transform: translateY(-1px);
}

.container input::placeholder{
    color: #94a3b8;
    font-weight: 400;
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in{
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in{
    transform: translateX(100%);
}

.sign-up{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move{
    0%, 49.99%{
        opacity: 0;
        z-index: 1;
    }
    50%, 100%{
        opacity: 1;
        z-index: 5;
    }
}

.social-icons{
    margin: 20px 0;
}

.social-icons a{
    border: 1px solid #818180;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
    color: #535352;
}

.toggle-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.container.active .toggle-container{
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle{
    background-color: #165166;
    height: 100%;
    background: linear-gradient(to right, #15596d, #185d76);
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle{
    transform: translateX(50%);
}

.toggle-panel{
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left{
    transform: translateX(-200%);
}

.container.active .toggle-left{
    transform: translateX(0);
}

.toggle-right{
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right{
    transform: translateX(200%);
}

/* Contenedor para logo y título */
.header-container {
    display: flex;
    align-items: center;
    gap: -30px;
    margin-bottom: -15px;
    margin-bottom: -10px;
    width: 140%;
}

/* Estilo para el logo lateral */
.logo-side {
    width: 200px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    margin: -10px;

}

/* Ajuste para los títulos multi-línea */
.header-container h1 {
    margin: -25px;
    font-size: 32px;
    line-height: 1.1;
    text-align: left;
    white-space: normal;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
}

/* Títulos del toggle panel */
.toggle-panel h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.toggle-panel p {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.4;
    opacity: 0.9;
    margin: 15px 0 20px 0;
}

/* Ajuste para mantener el espaciado original */
.form-container span {
    margin-top: -10px;
}

/* ======================== RESPONSIVE STYLES ======================== */

/* Solo tablets y móviles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
        height: auto;
        min-height: 100vh;
    }

    .container {
        width: 95%;
        min-height: 500px;
        border-radius: 20px;
    }

    /* Mantener logo y título como originales pero más pequeños */
    .header-container {
        width: 100%;
        gap: 45px;
        margin-bottom: 20px;
        align-items: center;
        justify-content: flex-start;
        
    }

    .logo-side {
        width: 120px;
        margin: -40px;
    }

    .header-container h1 {
        font-size: 22px;
    }

    /* Formularios ocupan más espacio */
    .container form {
        padding: 0 25px;
    }

    /* Botones más accesibles en móvil */
    .container button {
        padding: 12px 35px;
        font-size: 13px;
        margin-top: 15px;
    }

    .container input {
        padding: 12px 18px;
        font-size: 14px;
        margin: 10px 0;
    }

    /* Toggle panel ajustado pero visible */
    .toggle-panel {
        padding: 0 15px;
    }

    .toggle-panel h1 {
        font-size: 18px;
        line-height: 1.1;
    }

    .toggle-panel p {
        font-size: 12px;
        margin: 15px 0;
    }

    .container button.hidden {
        padding: 10px 30px;
        font-size: 12px;
    }
}

/* Solo móviles pequeños */
@media screen and (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        width: 98%;
        min-height: 520px;
        border-radius: 18px;
    }

    .container form {
        padding: 0 22px;
    }

    .logo-side {
        width: 100px;
    }

    .header-container h1 {
        font-size: 18px;
        font-weight: 700;
    }

    .container button {
        padding: 12px 32px;
        font-size: 13px;
        border-radius: 12px;
    }

    .container input {
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 12px;
    }

    .toggle-panel {
        padding: 0 20px;
    }

    .toggle-panel h1 {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 6px;
    }

    .toggle-panel p {
        font-size: 12px;
        font-weight: 400;
        margin: 8px 0 12px 0;
        line-height: 1.3;
    }

    .container button.hidden {
        padding: 10px 28px;
        font-size: 12px;
        border-radius: 10px;
    }
}

/* Solo móviles muy pequeños */
@media screen and (max-width: 360px) {
    .container {
        min-height: 480px;
        width: 99%;
    }

    .logo-side {
        width: 90px;
    }

    .header-container h1 {
        font-size: 16px;
        font-weight: 700;
    }

    .toggle-panel {
        padding: 0 18px;
    }

    .toggle-panel h1 {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.1;
        margin-bottom: 4px;
    }

    .toggle-panel p {
        font-size: 11px;
        font-weight: 400;
        margin: 6px 0 10px 0;
        line-height: 1.2;
    }

    .container button.hidden {
        padding: 8px 24px;
        font-size: 11px;
    }
}

#alertaDesactivada {
  position: fixed;      
  top: 10%;             
  left: 50%;            
  transform: translate(-50%, -50%); /* centra la alerta */
  z-index: 1050;        
  min-width: 300px;     
  max-width: 90%;
  display: none;       
  animation: slideInTop 0.5s ease forwards; 
}

#alertaActivada {
  position: fixed;      
  top: 10%;             
  left: 50%;            
  transform: translate(-50%, -50%); /* centra la alerta */
  z-index: 1050;        
  min-width: 300px;     
  max-width: 90%;
  display: none;       
  animation: slideInTop 0.5s ease forwards; 
}

#alertaAcceso {
  position: fixed;      
  top: 10%;             
  left: 50%;            
  transform: translate(-50%, -50%); /* centra la alerta */
  z-index: 1050;        
  min-width: 300px;     
  max-width: 90%;
  display: none;       
  animation: slideInTop 0.5s ease forwards; 
}

#alertaCredenciales {
  position: fixed;      
  top: 10%;             
  left: 50%;            
  transform: translate(-50%, -50%); /* centra la alerta */
  z-index: 1050;        
  min-width: 300px;     
  max-width: 90%;
  display: none;       
  animation: slideInTop 0.5s ease forwards; 
}

#alertaExpiro {
  position: fixed;      
  top: 10%;             
  left: 50%;            
  transform: translate(-50%, -50%); /* centra la alerta */
  z-index: 1050;        
  min-width: 300px;     
  max-width: 90%;
  display: none;       
  animation: slideInTop 0.5s ease forwards; 
}

#alertaSesion {
  position: fixed;      
  top: 10%;             
  left: 50%;            
  transform: translate(-50%, -50%); /* centra la alerta */
  z-index: 1050;        
  min-width: 300px;     
  max-width: 90%;
  display: none;       
  animation: slideInTop 0.5s ease forwards; 
}

/* Animación desde arriba hacia abajo */
@keyframes slideInTop {
  0% {
    transform: translate(-50%, -150%); /* empieza arriba fuera de pantalla */
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%);  /* termina centrada */
    opacity: 1;
  }
}