* { box-sizing: border-box; }
body { margin: 0; color: #142743; background: #f5f8fc; font: 1rem/1.5 system-ui, sans-serif; }
a { color: #174f9d; text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #5797e8; outline-offset: 3px; }

.auth-layout { display: grid; min-height: 100svh; }
.auth-brand { display: none; }
.auth-main { display: grid; place-items: center; padding: 32px 18px; }
.auth-panel { width: min(100%, 464px); }
.auth-card { padding: clamp(22px, 5vw, 36px); background: white; border: 1px solid #dfe8f3; border-radius: 24px; box-shadow: 0 16px 44px #17365a0c; }
.auth-mobile-logo { display: block; width: fit-content; margin: 0 auto 14px; }
.auth-mobile-logo img { display: block; width: 150px; height: auto; }
.login-title { margin: 0; font-size: clamp(1.65rem, 4vw, 2rem); font-weight: 750; line-height: 1.15; }
.login-subtitle { margin: 9px 0 0; color: #50627b; font-size: .92rem; }
.auth-form label { display: inline-block; font-weight: 650; }
.form-control { display: block; width: 100%; min-width: 0; min-height: 49px; padding: 10px 13px; border: 1px solid #a9b9ce; border-radius: 12px; color: inherit; background: white; }
.form-control:focus { border-color: #2564b4; outline: 2px solid #2564b455; outline-offset: 0; }
.form-control.is-invalid { border-color: #bf273a; }
.input-group { display: flex; }
.input-group .form-control { border-radius: 12px 0 0 12px; }
.pw-toggle { display: grid; flex: 0 0 48px; place-items: center; border: 1px solid #a9b9ce; border-left: 0; border-radius: 0 12px 12px 0; background: #f0f5fc; color: #294b76; }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle svg[hidden] { display: none; }
.auth-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 22px; font-size: .9rem; }
.auth-options label { display: inline-flex; align-items: center; gap: 7px; }
.auth-options input { width: 18px; height: 18px; margin: 0; accent-color: #1755a5; }
.auth-actions { display: grid; gap: 10px; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 9px 18px; border: 1px solid transparent; border-radius: 999px; font-weight: 650; text-align: center; text-decoration: none; }
.btn-primary { color: white; background: #1755a5; }
.btn-secondary { color: #174f9d; border-color: #c7d7ec; background: #edf4fd; }
.btn:not([disabled]):hover { filter: brightness(.94); }
.btn[disabled] { opacity: .65; cursor: wait; }
.auth-support { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 17px 0 0; }
.auth-support .btn { gap: 7px; font-size: .85rem; }
.auth-support svg { display: block; width: 22px; height: 22px; fill: currentColor; }
.auth-footer { margin: 17px 0 0; text-align: center; font-size: .78rem; color: #52647d; }
.auth-alert { padding: 12px 14px; margin: 0 0 16px; border-radius: 12px; font-size: .9rem; }
.auth-alert-success { background: #e9f7f0; color: #155635; }
.auth-toast { position: fixed; inset: max(12px, env(safe-area-inset-top)) 12px auto auto; width: min(calc(100% - 24px), 360px); z-index: 10; display: flex; align-items: start; gap: 12px; padding: 14px; border: 1px solid #ecc3ca; border-radius: 14px; background: #fff4f5; color: #851b2c; box-shadow: 0 12px 30px #14274326; }
.auth-toast[hidden] { display: none; }
.auth-toast > div { flex: 1; }
.auth-toast button, .auth-dialog button { border: 0; border-radius: 999px; min-width: 36px; min-height: 36px; color: inherit; background: #ffffffb3; }
.auth-dialog { width: min(calc(100% - 32px), 810px); padding: 12px; max-height: calc(100svh - 32px); border: 0; border-radius: 18px; color: inherit; }
.auth-dialog::backdrop { background: #0e2346b3; }
.auth-dialog form { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.auth-dialog img { display: block; width: 100%; height: auto; }
.mt-4 { margin-top: 20px; }
.mb-2 { margin-bottom: 7px; }
.mb-4 { margin-bottom: 20px; }
.d-flex { display: flex; flex-wrap: wrap; gap: 10px; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

@media (min-width: 960px) {
    .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth-brand { display: grid; place-items: center; padding: 36px; color: white; background: linear-gradient(#122e5a9c, #0b234ae8), url("background-login.webp") center / cover; text-align: center; }
    .auth-brand img { display: block; width: 208px; height: auto; margin: 0 auto 12px; }
    .auth-brand-title { max-width: 470px; margin: 0; font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1.15; font-weight: 750; }
    .auth-mobile-logo { display: none; }
}
