/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #dbefff, #f5fbff);
}

/* Contenedor principal */
.contenedor {
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: row;
    background-color: white;
    border-radius: 25px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

/* Caja del formulario */
.caja-registro {
    display: flex;
    width: 100%;
    background: linear-gradient(135deg, #9efcff, #36b2fa);
    align-items: center;
}

/* Formulario */
.formulario-registro {
    width: 50%;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff, #c3eeff);
    border-radius: 0 25px 25px 0;
    box-shadow: inset 0px 5px 15px rgba(0, 0, 0, 0.05);
}

.formulario-registro h2 {
    font-size: 2.2rem;
    margin-bottom: 1.8rem;
    color: #2c3e50;
    text-align: center;
}

.formulario-registro input {
    width: 100%;
    padding: 0.9rem 1rem;
    margin-bottom: 1.2rem;
    border: 1.5px solid #cce7f5;
    border-radius: 12px;
    font-size: 1rem;
    background-color: #f9fdff;
    transition: all 0.3s ease;
}

.formulario-registro input:focus {
    border-color: #5ab4f3;
    outline: none;
    box-shadow: 0 0 8px rgba(90, 180, 243, 0.4);
}

.formulario-registro button {
    width: 60%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #61dafb, #2980b9);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 1.5rem auto 0 auto;
}

.formulario-registro button:hover {
    background: linear-gradient(135deg, #2980b9, #61dafb);
    transform: translateY(-2px);
}

.formulario-registro p {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.95rem;
}

.formulario-registro a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.formulario-registro a:hover {
    text-decoration: underline;
}

/* Imagen lado izquierdo */
.imagen {
    width: 50%;
    background: linear-gradient(transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-size: 5rem;
    color: white;
}

.imagen a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 2rem;
}

/* Animación de aparición */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos SweetAlert personalizados */
.swal-custom-popup {
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsividad */
@media (max-width: 768px) {
    .contenedor {
        flex-direction: column;
        border-radius: 20px;
    }

    .caja-registro {
        flex-direction: column-reverse;
    }

    .formulario-registro,
    .imagen {
        width: 100%;
    }

    .formulario-registro {
        border-radius: 25px 25px 0 0;
        padding: 2rem;
    }

    .imagen {
        font-size: 2.5rem;
        border-radius: 0;
        padding: 1.5rem;
    }

    .formulario-registro button {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .formulario-registro h2 {
        font-size: 1.8rem;
    }

    .formulario-registro input,
    .formulario-registro button {
        font-size: 1rem;
    }

    .imagen {
        font-size: 2rem;
    }

    .formulario-registro button {
        width: 90%;
    }
}

/* Estilos para el contenedor de contraseña */
.password-container {
    position: relative;
    width: 100%;
  }
  
  /* Estilo para el ícono del ojo */
  .password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 2;
  }
  
  /* Ajuste para que el input no quede detrás del ícono */
  .casilla_r {
    padding-right: 40px !important; /* Espacio para el ícono */
    width: 100%;
  }

  input[type="text"] {
    -webkit-text-security: none !important;
  }

/* Estilos para el botón de carga */
.btn_registro.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn_registro.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}