body.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
}
#layoutAuthentication { min-height: 100vh; display: flex; flex-direction: column; }
#layoutAuthentication_content { flex: 1 0 auto; display: flex; align-items: center; }
#layoutAuthentication_content > main { width: 100%; }
.login-card {
    width: 100%;
    max-width: 400px;
    margin: 2.5rem auto;
    border: none;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(2, 6, 23, .35);
    overflow: hidden;
}
.login-brand { text-align: center; padding: 1.9rem 1.5rem .6rem; }
.login-brand img { width: 58px; height: 58px; object-fit: contain; }
.login-brand .app-name { font-size: 1rem; font-weight: 600; color: #334155; margin-top: .45rem; }
.login-body { padding: 1.4rem 1.75rem 1.85rem; }
.login-title { font-size: 1.3rem; font-weight: 700; color: #0f172a; margin-bottom: .1rem; }
.login-subtitle { font-size: .85rem; color: #64748b; margin-bottom: 1.35rem; }
/* floating labels (Bootstrap 5.1: no input-group support, so the eye sits inside the field) */
.login-card .form-floating > .form-control { height: calc(3.4rem + 2px); }
.login-card .form-floating > label { color: #64748b; }
.login-card .form-floating > .form-control:focus ~ label,
.login-card .form-floating > .form-control:not(:placeholder-shown) ~ label,
.login-card .form-floating > .form-control:-webkit-autofill ~ label {
    color: #2563eb; opacity: .9; transform: scale(.8) translateY(-.8rem) translateX(.15rem);
}
.login-card .form-floating > .form-control:not(:focus):not(:placeholder-shown) ~ label { color: #64748b; }
.login-pw > .form-control { padding-right: 3rem; }
.login-pw-toggle {
    position: absolute; top: 50%; right: .55rem; transform: translateY(-50%); z-index: 3;
    width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #64748b;
    display: inline-flex; align-items: center; justify-content: center;
}
.login-pw-toggle:hover { background: rgba(15, 23, 42, .06); color: #0f172a; }
.login-pw-toggle svg { width: 17px; height: 17px; }
.login-card .btn-primary { padding: .6rem 1rem; font-weight: 600; }
.login-footer-text, .login-footer-text * { color: rgba(255, 255, 255, .8) !important; }

/* Animated IT-asset background (desktop only) */
#loginFx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#layoutAuthentication { position: relative; z-index: 1; }
@media (min-width: 992px) {
    /* Split layout: card pinned left, animation fills the right. */
    #layoutAuthentication_content > main > .container-xl { max-width: none; }
    #layoutAuthentication_content .row { justify-content: flex-start !important; }
    .login-card { margin-left: clamp(28px, 6vw, 120px); margin-right: 0; }
}
@media (max-width: 991.98px) {
    #loginFx { display: none; }   /* mobile: just the centered card */
}

/* ── shared by the sign-in steps (change password, forgot / reset password) ── */
.login-links { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.login-links a { font-size: .82rem; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-who { display: flex; align-items: center; gap: .6rem; background: #f1f5f9; border-radius: 10px; padding: .55rem .75rem; margin-bottom: 1.1rem; }
.login-who .lw-av { width: 32px; height: 32px; border-radius: 50%; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: 0 0 auto; }
.login-who .lw-name { font-size: .85rem; font-weight: 600; color: #0f172a; line-height: 1.15; }
.login-who .lw-user { font-size: .75rem; color: #64748b; }
.pw-rules { list-style: none; padding: 0; margin: -.35rem 0 1rem; font-size: .78rem; color: #64748b; }
.pw-rules li { display: flex; align-items: center; gap: .4rem; padding: .08rem 0; }
.pw-rules li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #cbd5e1; flex: 0 0 auto; box-sizing: border-box; }
.pw-rules li.ok { color: #15803d; }
.pw-rules li.ok::before { border: 0; background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.3l2.6 2.6L12 5.5'/%3E%3C/svg%3E") center/12px no-repeat; }
.pw-rules li.bad { color: #b91c1c; }
.pw-rules li.bad::before { border-color: #ef4444; }
.pw-rules li.later::before { border-style: dashed; border-color: #94a3b8; }

/* ── two-step sign-in (includes/login_mfa.php) ── */
.mfa-steps { padding-left: 1.1rem; font-size: .85rem; color: #334155; margin-bottom: 1rem; }
.mfa-steps li { margin-bottom: .6rem; }
.mfa-qr-wrap { display: flex; justify-content: center; margin: .6rem 0 .4rem; }
#mfaQr { padding: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
#mfaQr img, #mfaQr canvas { display: block; }
.mfa-key { display: inline-block; margin-top: .2rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; letter-spacing: .04em;
           color: #0f172a; background: #f1f5f9; border-radius: 6px; padding: .2rem .45rem; cursor: pointer; word-break: break-all; }
.mfa-key.copied { background: #dcfce7; }
.mfa-code-in { font-size: 1.25rem !important; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.mfa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: .75rem 1rem; }
.mfa-codes code { font-size: .95rem; color: #0f172a; letter-spacing: .05em; text-align: center; }
.mfa-ways { display: flex; flex-direction: column; gap: .25rem; }
