/* =========================================
   Estilos generales
   ========================================= */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to bottom, #313945, #1c1e4d); /* gris oscuro → azul profundo */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #313945;
}

/* =========================================
   Contenedor principal
   ========================================= */
.container {
    perspective: 1000px;
}

.card {
    width: 350px;
    height: 420px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s, width 0.5s, height 0.5s;
}

.card.flipped {
    transform: rotateY(180deg);
}

/* Tamaño más grande para registro */
.card.registro {
    width: 500px;
    height: 700px;
}

/* =========================================
   FRONT (LOGIN)
   ========================================= */
.card .front {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-sizing: border-box;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: rotateY(0deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* =========================================
   BACK (REGISTRO)
   ========================================= */
.card .back {
    position: absolute;
    width: 100%;
    height: 120%;
    top: -30px;
    left: 0;
    background: #f5f5f5;
    border-radius: 15px;
    padding: 25px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}


/* Inputs y texto dentro del FRONT y BACK */
.card input,
.card label,
.card h2,
.card p {
    max-width: 100%;
    margin-bottom: 12px;
}

/* Inputs */
.card input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* =========================================
   Títulos y mensajes
   ========================================= */
h2 {
    margin-bottom: 20px;
    color: #1c1e4d; /* Azul profundo */
    text-align: center;
}

.mensaje {
    color: #d32f2f; /* rojo institucional para error */
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

/* =========================================
   Contenedor de contraseña con ojito
   ========================================= */
.password_container {
    position: relative;
}

.password_container input {
    padding-right: 40px;
}

.toggle_password {
    position: absolute;
    right: 10px;
    top: 40%; /* ajustado para subir el ojito */
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #313945;
}


/* =========================================
   Botones
   ========================================= */
button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 25px;
    background: #313945; /* gris institucional */
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: #1c1e4d; /* azul profundo */
}

/* =========================================
   Links
   ========================================= */
a {
    color: #1c1e4d;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #313945;
}

/* =========================================
   Checkbox Recordarme
   ========================================= */
label input[type="checkbox"] {
    margin-right: 5px;
}



/* =========================================
   Card Recuperar Contraseña
   ========================================= */
.recuperar_contra {
    width: 350px;
    min-height: 420px;
    background: #ffffff;
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.5s ease;
}

/* =======================
   Títulos
   ======================= */
.recuperar_contra h2 {
    color: #1c1e4d;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

/* =======================
   Mensajes de error o éxito
   ======================= */
.recuperar_contra p.mensaje {
    color: #d32f2f;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

/* =======================
   Inputs
   ======================= */
.recuperar_contra input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
}

/* =======================
   Botón
   ======================= */
.recuperar_contra button {
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    border: none;
    background: #313945;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.recuperar_contra button:hover {
    background: #1c1e4d;
}

/* =======================
   Link volver
   ======================= */
.recuperar_contra a {
    display: block;
    margin-top: 15px;
    color: #1c1e4d;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.recuperar_contra a:hover {
    color: #313945;
    text-decoration: underline;
}

/* =======================
   Contenedor de input tipo “ojito” si se quiere agregar
   ======================= */
.password_container {
    position: relative;
}

.password_container input {
    padding-right: 40px;
}

.toggle_password {
    position: absolute;
    right: 10px;
    top: 40%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #313945;
}

/* =======================
   Responsive
   ======================= */
@media (max-width: 450px) {
    .recuperar_contra {
        width: 90%;
        padding: 20px;
    }
}




/* =========================================
   Responsive
   ========================================= */
@media(max-width: 400px){
    .card {
        width: 90% !important;
        height: auto !important;
    }
}
