/* Authentication and access-denied screens. */
.auth-page { background: var(--canvas); }
.auth-split { background: #f2f3f5; padding: 16px; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr); grid-template-areas: "scene form"; min-height: calc(100svh - 32px); max-width: 1920px; margin: 0 auto; padding: 8px; background: var(--surface); border: 1px solid rgb(29 29 31 / 5%); border-radius: 28px; direction: ltr; }
.auth-scene { grid-area: scene; position: relative; isolation: isolate; overflow: hidden; min-height: 720px; border-radius: 21px; padding: clamp(28px, 3.3vw, 64px); display: flex; flex-direction: column; justify-content: flex-end; background: #121b26; color: white; }
.auth-scene-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 48% 44%; }
.auth-scene::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(7 13 22 / 35%) 0%, transparent 36%, rgb(7 13 22 / 25%) 54%, rgb(7 13 22 / 95%) 100%); }
.auth-scene-copy { position: relative; padding-top: 160px; }
.auth-scene-eyebrow { font-size: 0.625rem; font-weight: 550; letter-spacing: 0.2em; color: #d6dde6; margin: 0 0 22px; text-align: start; }
.auth-scene h2 { color: #fff; margin: 0 0 20px; font-size: clamp(2.25rem, 3.7vw, 4.4rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.035em; }
.auth-scene h2 span { display: block; }
.auth-scene-description { color: #d6dde6; font-size: 0.9375rem; line-height: 1.75; max-width: 390px; margin: 0; text-wrap: pretty; }
.auth-scene-rule { display: flex; margin-top: 28px; height: 2px; width: 96px; background: rgb(255 255 255 / 22%); }
.auth-scene-rule span { display: block; width: 32px; background: #fff; }
.auth-form-panel { grid-area: form; display: flex; flex-direction: column; min-width: 0; direction: ltr; }
[dir="rtl"] .auth-form-panel, [dir="rtl"] .auth-scene { direction: rtl; }
[dir="rtl"] .auth-scene-eyebrow { text-align: right; }
.auth-header { display: flex; align-items: center; padding: 30px 40px 12px; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.035em; line-height: 1.15; direction: ltr; }
.auth-brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--ink); color: white; font-size: 1.2rem; flex-shrink: 0; }
.brand-descriptor { display: block; margin-top: 5px; font-size: 0.5rem; font-weight: 550; letter-spacing: 0.18em; color: var(--ink-muted); }
.auth-main { display: grid; place-items: center; flex: 1; padding: 34px 48px 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-heading { text-align: start; margin-bottom: 30px; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-secondary); font-size: 0.75rem; font-weight: 500; margin: 0 0 12px; }
.auth-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--ink-secondary); }
.login-heading h1 { margin-bottom: 12px; font-size: clamp(1.875rem, 2.4vw, 2.5rem); font-weight: 650; line-height: 1.2; letter-spacing: -0.04em; }
.login-subtitle { color: var(--ink-secondary); font-size: 0.875rem; line-height: 1.6; margin: 0; }
.login-card .form-group { margin-bottom: 19px; }
.login-card .form-label { color: var(--ink); font-size: 0.8125rem; font-weight: 500; margin-bottom: 8px; }
.login-card .form-control { min-height: 50px; border: 1px solid #e3e5e9; border-radius: 11px; background-color: #f8f9fb; font-size: 1rem; padding: 11px 14px; box-shadow: none; }
.login-card .form-control::placeholder { color: #858a93; font-size: 0.875rem; }
.login-card .form-control:hover { border-color: #c3c7cf; }
.login-card .form-control:focus { background-color: #fff; border-color: var(--accent); box-shadow: var(--focus-ring); }
.password-field { position: relative; }
.password-field .form-control { padding-inline-end: 48px; }
.password-toggle { display: grid; place-items: center; position: absolute; inset-inline-end: 3px; inset-block-start: 3px; width: 44px; height: 44px; background: transparent; border: 0; border-radius: 8px; color: var(--ink-muted); }
.password-toggle:hover { color: var(--accent); background: var(--surface-secondary); }
/* The image and refresh action form a single quiet verification control. */
.captcha-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 10px; align-items: stretch; }
.captcha-challenge { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 68px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-secondary); }
.captcha-image { display: block; width: min(180px, calc(100% - 48px)); height: 58px; object-fit: contain; user-select: none; }
.btn-refresh-captcha { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; color: var(--ink-secondary); background: transparent; }
.btn-refresh-captcha:hover { color: var(--ink); background: var(--surface-hover); border-radius: 8px; }
.btn-refresh-captcha:disabled { opacity: 0.5; cursor: wait; }
.login-card .captcha-input { min-width: 0; min-height: 68px; padding-inline: 10px; text-align: center; direction: ltr; font-size: 1.25rem; font-variant-numeric: tabular-nums; letter-spacing: 0.2em; }
.login-card .captcha-input::placeholder { font-size: 1.25rem; letter-spacing: 0.2em; color: var(--ink-muted); }
.captcha-help-text { font-size: 0.75rem; color: var(--ink-muted); margin: 8px 0 0; }
.captcha-feedback { color: var(--danger); font-size: 0.8125rem; margin: 6px 0 0; }
.captcha-feedback:empty { display: none; }
.login-remember { margin: 3px 0 23px; font-size: 0.8125rem; color: var(--ink-secondary); }
.btn-login { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; border: 1px solid var(--ink); border-radius: 11px; background: var(--ink); color: #fff; font-size: 0.9375rem; font-weight: 500; box-shadow: 0 3px 5px rgb(0 0 0 / 6%); }
.btn-login:hover, .btn-login:active, .btn-login:focus-visible { background: #34343a; border-color: #34343a; color: #fff; }
.btn-login:disabled { background: var(--ink); border-color: var(--ink); }
.loading-spinner { display: none; }
.btn-login.loading .loading-spinner { display: inline-block; }
.btn-login.loading > .bi { display: none; }
.login-security { display: flex; justify-content: center; align-items: center; gap: 7px; color: var(--ink-muted); font-size: 0.6875rem; margin: 18px 0 0; }
.auth-panel-bottom { display: flex; flex-direction: column; align-items: center; padding: 0 20px 16px; }
.language-switcher-login { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 4px; background: #f4f5f7; border: 1px solid #eceef1; border-radius: 10px; }
.language-btn { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 11px; border-radius: 7px; color: var(--ink-secondary); font-size: 0.75rem; transition: background-color var(--motion); }
.language-btn:hover { color: var(--ink); background: rgb(255 255 255 / 70%); }
.language-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-footer { padding: 14px 0 0; color: var(--ink-muted); font-size: 0.625rem; text-align: center; direction: ltr; }
.auth-footer span { margin-inline: 5px; }
.error-page { display: flex; align-items: center; justify-content: center; padding: 24px; }
.error-container { text-align: center; max-width: 540px; padding: 36px 40px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-md); }
.error-icon { font-size: 3rem; color: var(--accent); margin-bottom: 16px; }
.error-code { font-size: 4rem; font-weight: 650; letter-spacing: -0.04em; }
.error-message { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.error-container p { color: var(--ink-muted); margin-bottom: 28px; }
@media (min-width: 1600px) {
    .auth-main { padding-block: 48px; }
    .login-card { max-width: 410px; }
}
@media (max-width: 1099.98px) and (min-width: 800px) {
    .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(405px, 1fr); }
    .auth-header { padding-inline: 28px; }
    .auth-main { padding-inline: 28px; }
    .auth-scene { padding: 30px; }
    .auth-scene h2 { font-size: 2.375rem; }
}
@media (max-width: 799.98px) {
    .auth-split { padding: 0; background: var(--surface); }
    .auth-layout { display: flex; flex-direction: column; min-height: 100svh; padding: 0; border: 0; border-radius: 0; }
    .auth-scene { min-height: 0; height: 190px; margin: 12px 12px 0; padding: 25px; border-radius: 18px; flex-shrink: 0; }
    .auth-scene-image { object-position: center 42%; }
    .auth-scene::after { background: linear-gradient(180deg, rgb(7 13 22 / 10%), rgb(7 13 22 / 80%)); }
    .auth-scene-copy { padding-top: 0; margin-top: auto; }
    .auth-scene-eyebrow { font-size: 0.5rem; margin-bottom: 10px; }
    .auth-scene h2 { font-size: 1.875rem; margin: 0; line-height: 1.15; }
    .auth-scene-description, .auth-scene-rule { display: none; }
    .auth-form-panel { flex: 1; }
    .auth-header { width: 100%; max-width: 436px; margin-inline: auto; padding: 28px 28px 0; }
    .auth-brand { font-size: 1.125rem; }
    .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 1.0625rem; }
    .brand-descriptor { font-size: 0.4375rem; }
    .auth-main { padding: 30px 28px 24px; }
    .login-heading { margin-bottom: 26px; }
    .login-heading h1 { font-size: 1.875rem; }
    .auth-eyebrow { display: none; }
    .auth-panel-bottom { padding-bottom: 24px; }
    .language-btn { min-height: 40px; }
    .error-container { padding: 28px 22px; border-radius: 22px; }
}
@media (max-width: 359.98px) {
    .auth-header { padding-inline: 22px; }
    .auth-main { padding-inline: 22px; }
    .captcha-code-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .login-card .captcha-input { min-height: 50px; }
    .language-btn { padding-inline: 9px; }
}
