

/* ── INICIAR SESIÓN ── */

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Alerta sesión expirada y error */
.alert {
    width: 400px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Formulario */
form {
    background: #ffffff;
    padding: 40px 35px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 400px;
    display: flex;
    flex-direction: column;
}

form::before {
    content: 'Iniciar Sesión';
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

/* Labels */
form label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    margin-top: 12px;
}

/* Inputs */
form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

form input[type="text"]:focus,
form input[type="password"]:focus {
    outline: none;
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.15);
    background: #fff;
}

/* Botón */
form button[type="submit"] {
    margin-top: 25px;
    padding: 12px;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 52, 96, 0.35);
}

form button[type="submit"]:active {
    transform: translateY(0);
}

/* Inputs hidden no deben afectar layout */
form input[type="hidden"] {
    display: none;
}


.alerta-login-error {
    color: #dc3545;
    font-weight: bold;
    text-align: center;
    margin-top: 1rem;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
}

.alerta-login-exito {
    color: #28a745;
    font-weight: bold;
    text-align: center;
    margin-top: 1rem;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
}

/* ── ENLACE OLVIDÉ CONTRASEÑA ── */
.link-olvide {
    font-size: 12px;
    color: #0f3460;
    text-align: right;
    text-decoration: none;
    margin-top: 4px;
    margin-bottom: -8px;
    align-self: flex-end;
}

.link-olvide:hover {
    text-decoration: underline;
}

/* ── MODAL OLVIDÉ CONTRASEÑA ── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.activo {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 24px;
    width: 380px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-titulo {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.modal-desc {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.modal-confirmacion {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* ── FORM DENTRO DEL MODAL (sin estilos de tarjeta) ── */
form.form-reset {
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    gap: 10px;
}

form.form-reset::before {
    display: none;
}

/* ── FORM NUEVA CONTRASEÑA ── */
form.form-nueva-contrasena::before {
    content: 'Nueva contraseña';
}

/* ── BOTONES DEL MODAL ── */
.modal-acciones {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
    margin-top: 6px;
}

.btn-modal-cerrar {
    background: none;
    border: 1px solid #ccc;
    border-radius: 7px;
    padding: 8px 18px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-modal-cerrar:hover {
    background: #f0f0f0;
}

.modal-acciones .btn-modal-enviar {
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 7px;
    margin: 0;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-modal-enviar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 52, 96, 0.35);
}

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 768px) {
    body {
        justify-content: flex-start;
        padding-top: 30px;
        padding-bottom: 30px;
        overflow-y: auto;
    }
    form {
        width: 90%;
    }
    .alert {
        width: 90%;
    }
    .modal-box {
        width: 90%;
    }
}