/* --- FONDO Y CONTENEDOR PRINCIPAL --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f1f5f9; /* Un gris azulado muy limpio y sólido */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center; /* Centrado absoluto */
    margin: 0;
}

/* --- TARJETA DE LOGIN --- */
.login-card {
    width: 100%;
    max-width: 450px; /* Más ancha para que nada se aplaste */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 3rem 2.5rem;
}

/* --- TEXTOS DEL ENCABEZADO --- */
.brand-logo {
    color: #0f172a;
    font-size: 2rem; /* Tamaño más imponente */
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.brand-accent {
    color: #2563eb; /* Azul corporativo */
}
.text-muted.small {
    font-size: 0.9rem;
    color: #64748b !important;
}

/* --- LIMPIEZA DE LA LIBRERÍA 2FA --- */
/* Ocultamos el "Login" y textos genéricos que inyecta la librería */
.two-factor-form-container h1,
.two-factor-form-container h2 {
    display: none; 
}
.two-factor-form-container p {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- CAMPOS DEL FORMULARIO --- */
form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}
form input[type="text"], 
form input[type="password"], 
form input[type="number"] {
    width: 100%; /* Ocupar todo el ancho */
    padding: 0.85rem 1rem;
    font-size: 1rem; /* Texto de input legible */
    color: #1e293b;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-sizing: border-box; /* Evita que el padding rompa el ancho */
}
form input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* --- BOTONES ALINEADOS --- */
form .form-actions, 
form div:has(input[type="submit"]),
form div:has(button) {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Espacio exacto entre botones */
    margin-top: 2rem;
}
.btn-primary, 
form input[type="submit"],
button[type="submit"] {
    width: 100%;
    background-color: #0f172a !important;
    border: none !important;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
}
.btn-primary:hover, 
form input[type="submit"]:hover {
    background-color: #1e293b !important;
}

/* --- ENLACES Y BOTONES SECUNDARIOS --- */
form a, button[name="cancel"] {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
}
form a:hover, button[name="cancel"]:hover {
    color: #0f172a;
}

/* --- OCULTAR BOTONES INNECESARIOS DE LA LIBRERÍA (Back / Cancel) --- */
.two-factor-form-container [name="wizard_goto_step"], 
.two-factor-form-container [name="cancel"] {
    display: none !important;
}

/* Ajuste fino para centrar el botón principal "Next" ahora que está solo */
.two-factor-form-container .form-actions, 
.two-factor-form-container div:has(input[type="submit"]),
.two-factor-form-container div:has(button[type="submit"]) {
    align-items: center;
    margin-top: 1.5rem;
}