
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    min-height: 100%;
}

body {
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #954043;
    padding: 20px 16px;
    overflow-y: auto;
    box-sizing: border-box;
}

.card {
    background: #e8e3df;
    width: min(100%, 440px);
    margin: auto;
    padding: 34px 28px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 18px;
    display: block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.card h1 {
    color: #444;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.2px;
}

.card .input-group {
    position: relative;
    margin-bottom: 18px;
}

.card .input-group input {
    width: 100%;
    height: 50px;
    padding: 12px 16px 12px 46px;
    border-radius: 12px;
    border: 1.5px solid #777;
    outline: none;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.card .input-group input:hover {
    border-color: #b54747;
}

.card .input-group input:focus {
    border-color: #b54747;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(181, 71, 71, 0.15);
}

.card .input-group > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 15px;
    pointer-events: none;
}

.card .input-group input.password-input,
.card .input-group:has(.toggle-password) input {
    padding-right: 48px;
}

/* Ocultar botón nativo del navegador */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="text"]::-ms-reveal,
input[type="text"]::-ms-clear {
    display: none;
}
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button {
    display: none !important;
}

.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    transition:
        color 0.2s,
        background-color 0.2s;
}

.toggle-password:hover {
    color: #b54747;
    background: rgba(181, 71, 71, 0.08);
}

.card .btn {
    width: 100%;
    min-height: 48px;
    padding: 13px 20px;
    border: none;
    border-radius: 12px;
    background: #b54747;
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(181, 71, 71, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.card .btn:hover {
    background: #9e3c3c;
    box-shadow: 0 6px 18px rgba(181, 71, 71, 0.35);
    transform: translateY(-1px);
}

.card .btn:active {
    transform: translateY(0);
}

.error-msg {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    min-height: 20px;
    margin: 4px 0 10px;
    text-align: center;
    line-height: 1.35;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 480px) {
    .card {
        padding: 32px 22px;
        border-radius: 20px;
    }

    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 14px;
    }

    .card h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

[hidden] { display: none !important; }
.mfa-panel { text-align: left; color: #333; }
.mfa-panel p { margin: 12px 0; font-size: 0.95rem; line-height: 1.5; }
.mfa-panel label { display: block; margin: 16px 0 8px; font-size: 0.95rem; }
.mfa-panel .input-group input { padding: 12px 16px; border-color: #777; }
#mfa-secret { display: block; overflow-wrap: anywhere; font-size: 1rem; padding: 12px; background: #fff; border-radius: 8px; }
#mfa-qr { display: block; width: min(100%, 256px); height: auto; margin: 16px auto; image-rendering: pixelated; }
#mfa-recovery-codes { width: 100%; padding: 12px; font-size: 1rem; line-height: 1.6; resize: vertical; color: #333; background: #fff; border: 1px solid #777; }
.text-button { padding: 12px 4px; min-height: 44px; background: transparent; border: 0; font: inherit; color: #853131; text-decoration: underline; cursor: pointer; }
.error-msg { color: #a12727; }
.card button:focus-visible, .card input:focus-visible, .card textarea:focus-visible { outline: 3px solid #853131; outline-offset: 3px; }
