body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}
.hidden {
    display: none !important;
}
.login-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    box-sizing: border-box;
}
.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #58a6ff;
    margin-bottom: 24px;
}
.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #8b949e;
}
.form-input {
    width: 100%;
    padding: 10px 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.form-input:focus {
    outline: none;
    border-color: #58a6ff;
}
.form-input-totp {
    text-align: center;
    font-size: 20px;
    letter-spacing: 4px;
    font-family: monospace;
    font-weight: 600;
}

/* Password wrapper con ojito */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.password-input-wrapper .form-input {
    padding-right: 42px;
}
.btn-toggle-eye {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #8b949e;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.btn-toggle-eye:hover {
    color: #58a6ff;
    background-color: rgba(88, 166, 255, 0.1);
}
.eye-icon {
    display: block;
}

.btn-submit {
    width: 100%;
    padding: 11px 16px;
    background: #238636;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.2s ease;
}
.btn-submit:hover {
    background: #2ea043;
}
.alert-box {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.4;
}
.alert-error {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid #f85149;
    color: #ff7b72;
}

/* Estilos de Configuración MFA (QR y Clave) */
.mfa-setup-box {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}
.mfa-setup-title {
    font-size: 14px;
    font-weight: 600;
    color: #58a6ff;
    margin-bottom: 6px;
}
.mfa-setup-desc {
    font-size: 12px;
    color: #8b949e;
    margin: 0 0 12px 0;
    line-height: 1.4;
}
.mfa-qr-container {
    background: #ffffff;
    padding: 12px;
    border-radius: 8px;
    display: inline-block;
    margin: 0 auto 12px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.mfa-qr-img {
    width: 160px;
    height: 160px;
    display: block;
}
.mfa-manual-key-box {
    margin-top: 8px;
}
.mfa-manual-label {
    display: block;
    font-size: 11px;
    color: #8b949e;
    margin-bottom: 4px;
}
.mfa-key-copy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.mfa-secret-code {
    font-family: monospace;
    font-size: 12px;
    color: #58a6ff;
    background: #0d1117;
    border: 1px solid #30363d;
    padding: 6px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    word-break: break-all;
}
.btn-copy-secret {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s ease;
}
.btn-copy-secret:hover {
    background: #30363d;
    color: #ffffff;
}
.btn-back-login {
    width: 100%;
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 13px;
    margin-top: 12px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.15s ease;
}
.btn-back-login:hover {
    color: #58a6ff;
    text-decoration: underline;
}
