:root {
    color-scheme: light;
    --page: #f5f7fb;
    --text: #172033;
    --body: #334155;
    --muted: #64748b;
    --border: #cbd5e1;
    --red: #ff0000;
    --red-hover: #d90000;
    --red-pressed: #b30000;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; }
.login-shell { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; min-height: 100svh; }
.branding { background: #000; color: #fff; padding: 65px; display: grid; grid-template-rows: auto 1fr auto; gap: 30px; text-align: center; min-width: 0; }
.brand-header, .brand-message { width: 100%; max-width: 520px; margin-inline: auto; }
.brand-logo { display: block; width: 170px; height: 130px; object-fit: contain; margin-inline: auto; }
.brand-header h1 { margin: 18px 0 0; font-size: 36px; line-height: 1.25; font-weight: 600; }
.brand-description { margin: 14px 0 0; font-size: 17px; line-height: 27px; color: #cbd5e1; }
.brand-message { align-self: center; padding-block: 24px; }
.brand-message h2 { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 600; }
.brand-message p { margin: 12px 0 0; color: #afc2d4; font-size: 16px; line-height: 25px; }
.brand-footer { margin: 0; color: #8fa6ba; font-size: 13px; line-height: 1.5; }
.login-panel { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-width: 0; padding: 50px clamp(24px, 4vw, 70px); }
.login-card { width: 100%; max-width: 420px; padding: 42px; background: #fff; border-radius: 14px; box-shadow: 0 4px 25px rgb(0 0 0 / 13%); }
.login-card h2 { margin: 0; color: var(--text); font-size: 30px; line-height: 1.3; font-weight: 600; }
.login-subtitle { margin: 10px 0 35px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.field label { display: block; color: var(--body); font-size: 14px; font-weight: 600; }
.field input { display: block; width: 100%; height: 48px; margin-top: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); font: inherit; font-size: 15px; }
.field input:focus { border-color: var(--red); outline: 1px solid var(--red); }
.username-field { margin-bottom: 22px; }
.password-help { margin: 6px 0 16px; text-align: right; font-size: 13px; line-height: 1.6; }
.password-help summary { display: inline-block; color: #1565d8; text-decoration: underline; cursor: pointer; list-style: none; }
.password-help summary::-webkit-details-marker { display: none; }
.password-help p { margin: 8px 0 0; text-align: left; padding: 10px 12px; background: var(--page); border-radius: 6px; color: var(--body); }
a { color: #1565d8; text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid #1565d8; outline-offset: 4px; }
.sign-in-button { display: block; width: 100%; height: 52px; padding: 0 20px; border: 0; border-radius: 9px; background: var(--red); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sign-in-button:hover { background: var(--red-hover); }
.sign-in-button:active { background: var(--red-pressed); }
.sign-in-button:disabled { opacity: .55; cursor: wait; }
.support-text { margin: 26px 0 0; text-align: center; color: #7c8a9a; font-size: 12px; line-height: 1.6; }
.validation-summary-valid { display: none; }
.validation-summary-errors { margin: 4px 0 14px; min-height: 22px; color: #c62828; font-size: 13px; line-height: 1.5; }
.validation-summary ul { margin: 0; padding-left: 18px; }
.status-message { margin: -12px 0 24px; padding: 12px 14px; border-radius: 9px; background: #eaf5ef; color: #166534; font-size: 14px; line-height: 1.5; }
.status-message p { margin: 0 0 8px; }
.login-progress { margin-top: 18px; }
.login-progress[hidden] { display: none; }
.progress-track { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: #fee2e2; }
.progress-track::after { content: ""; display: block; height: 100%; width: 40%; background: var(--red); animation: progress 1s ease-in-out infinite alternate; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (max-width: 1100px) { .branding { padding: 48px 35px; } .login-panel { padding: 40px 24px; } .login-card { padding: 32px; } }
@media (max-width: 760px) {
    .login-shell { grid-template-columns: 1fr; }
    .branding { padding: 28px 24px; gap: 0; grid-template-rows: auto; }
    .brand-logo { width: 110px; height: 90px; }
    .brand-header h1 { margin-top: 12px; font-size: 28px; }
    .brand-description { margin-top: 10px; font-size: 15px; line-height: 23px; max-width: 430px; margin-inline: auto; }
    .brand-message { display: none; }
    .brand-footer { margin-top: 20px; font-size: 12px; }
    .login-panel { padding: 28px 20px 40px; }
    .login-card { padding: 30px 26px; }
    .field input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .progress-track::after { animation: none; width: 100%; } }

