* { box-sizing: border-box; }
:root { color-scheme: light; }
.legacy-login { display: none; }
body {
    min-width: 320px;
    min-height: 100svh;
    margin: 0;
    color: #111927;
    background: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
}
.auth-card {
    display: grid;
    grid-template-columns: 46% 54%;
    min-height: 100svh;
}
.auth-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    padding: 70px clamp(38px, 5vw, 84px);
    background-color: #e4ecf1;
}
.auth-hero-inner { width: min(100%, 430px); }
.auth-art { position: absolute; right: clamp(10px, 2vw, 28px); bottom: -20px; width: clamp(350px, 32vw, 460px); max-width: calc(100% - 28px); pointer-events: none; }
.auth-art img { display: block; width: 100%; height: auto; }
.auth-lockup { display: flex; flex-direction: column; align-items: center; width: 212px; }
.auth-logo { display: block; width: 212px; max-width: 100%; height: 176px; object-fit: cover; object-position: center; mix-blend-mode: multiply; }
.auth-brand {
    display: block;
    width: 170px;
    margin-top: 9px;
    padding: 15px 0 0 .34em;
    border-top: 1px solid #687582;
    color: #17212d;
    font-size: 21px;
    letter-spacing: .34em;
    line-height: 1;
    text-align: center;
}
.auth-tagline {
    margin: clamp(48px, 6vh, 76px) 0 0;
    font-size: clamp(38px, 3.9vw, 56px);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.08;
}
.auth-description { max-width: 340px; margin: 10px 0 0; color: #304152; font-size: 18px; line-height: 1.5; }
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 60px 48px;
    background: #fff;
}
.auth-content { width: min(100%, 430px); }
.auth-eyebrow { margin: 0 0 24px; color: #b72130; font-size: 12px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.auth-heading {
    margin: 0;
    font-size: clamp(32px, 3vw, 42px);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.14;
}
.auth-intro { margin: 7px 0 0; color: #4b5868; font-size: 20px; line-height: 1.35; }
.auth-form { margin-top: 42px; }
.auth-field { margin-bottom: 23px; }
.auth-field > label {
    display: block;
    margin-bottom: 7px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
}
.auth-field input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: 0;
    background: #f0f1f3;
    color: #17212d;
    font: inherit;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-field input::placeholder { color: #657284; opacity: 1; }
.auth-field input:-webkit-autofill {
    -webkit-text-fill-color: #17212d;
    box-shadow: 0 0 0 100px #f0f1f3 inset;
}
.auth-field input:focus { border-color: #bb2432; box-shadow: 0 0 0 3px #bb24321f; }
.auth-field input[aria-invalid='true'] { border-color: #b32631; }
.auth-password { position: relative; }
.auth-password input { padding-right: 75px; }
.auth-password-toggle {
    position: absolute;
    inset: 0 0 0 auto;
    display: grid;
    place-items: center;
    width: 64px;
    height: 54px;
    border: 0;
    border-left: 2px solid #fff;
    border-radius: 0 999px 999px 0;
    background: transparent;
    color: #314155;
    cursor: pointer;
}
.auth-password-toggle svg { width: 22px; height: 22px; }
.auth-password-toggle:hover { background: #e8eaed; }
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -2px 0 19px;
    font-size: 14px;
}
.auth-remember { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #495667; cursor: pointer; white-space: nowrap; }
.auth-remember input { width: 20px; height: 20px; margin: 0; accent-color: #111927; }
.auth-options a, .auth-footer a { color: #111927; text-decoration: underline; text-underline-offset: 3px; }
.auth-options a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.auth-submit {
    display: block;
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.auth-submit:hover { background: #292929; transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; color: #667383; font-size: 13px; }
.auth-copyright { white-space: nowrap; }
.auth-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-error { margin: 6px 14px 0; color: #a9232e; font-size: 13px; line-height: 1.4; }
.auth-message { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: #e6f4eb; color: #165c32; font-size: 14px; }
.auth-password-toggle:focus-visible, .auth-submit:focus-visible, .auth-options a:focus-visible, .auth-footer a:focus-visible, .auth-remember input:focus-visible { outline: 3px solid #bb243280; outline-offset: 3px; }
@media (min-width: 1024px) {
    body {
        background-color: #f1f5f9;
        background-image: radial-gradient(#cbd5e1 .8px, transparent .8px);
        background-size: 24px 24px;
    }
    .auth-card { display: none; }
    .legacy-login { display: grid; min-height: 100svh; place-items: center; padding: 24px; font-family: Inter, Arial, sans-serif; }
    .legacy-card {
        position: relative;
        width: min(100%, 450px);
        overflow: hidden;
        padding: 50px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .15);
    }
    .legacy-card::before { position: absolute; inset: 0 0 auto; height: 5px; background: #e31b23; content: ''; }
    .legacy-logo { margin-bottom: 35px; text-align: center; }
    .legacy-logo img { display: block; width: 60px; height: 48px; margin: 0 auto; object-fit: cover; mix-blend-mode: multiply; }
    .legacy-heading { margin: 0 0 8px; color: #0f172a; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; text-align: center; }
    .legacy-subheading { margin: 0 0 35px; color: #64748b; font-size: 14px; font-weight: 500; line-height: 1.5; text-align: center; }
    .legacy-field { margin-bottom: 24px; }
    .legacy-field label { display: block; color: #64748b; font-size: 14px; font-weight: 700; letter-spacing: .05em; line-height: 1.4; text-transform: uppercase; }
    .legacy-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .legacy-label-row a { color: #111927; font-size: 12px; font-weight: 700; text-decoration: none; }
    .legacy-label-row a:hover { text-decoration: underline; }
    .legacy-input-wrap { position: relative; margin-top: 6px; }
    .legacy-input-wrap > i { position: absolute; top: 50%; left: 16px; color: #6b7280; font-size: 20px; transform: translateY(-50%); pointer-events: none; }
    .legacy-input-wrap input { display: block; width: 100%; height: 38px; padding: 0 12px 0 48px; border: 1px solid #e2e8f0; border-radius: 8px; outline: 0; background: #fff; color: #111927; font: inherit; font-size: 14px; }
    .legacy-input-wrap input:focus { border-color: #d32f2f; box-shadow: 0 0 0 4px rgba(211, 47, 47, .15); }
    .legacy-input-wrap input[aria-invalid='true'] { border-color: #b32631; }
    .legacy-remember { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 24px; color: #64748b; font-size: 14px; font-weight: 500; cursor: pointer; }
    .legacy-remember input { width: 16px; height: 16px; margin: 0; accent-color: #d32f2f; }
    .legacy-submit { display: block; width: 100%; min-height: 42px; padding: 8px 24px; border: 0; border-radius: 6px; background: #d32f2f; box-shadow: 0 3px 8px rgba(0, 0, 0, .14); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
    .legacy-submit:hover { background: #b71c1c; }
    .legacy-footer { margin-top: 45px; padding-top: 25px; border-top: 1px solid #f1f5f9; color: #94a3b8; font-size: 12px; line-height: 1.5; text-align: center; }
    .legacy-footer p { margin: 0; }
    .legacy-copyright { color: #111927; font-weight: 600; }
    .legacy-motto { margin-top: 4px !important; color: #e31b23; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
    .legacy-footer a { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: #6b7280; font-size: 12px; text-decoration: none; }
    .legacy-footer a:hover { color: #b71c1c; text-decoration: underline; }
    .legacy-error { margin: 6px 0 0; color: #b32631; font-size: 12px; font-weight: 700; }
    .legacy-message { margin-bottom: 16px; padding: 10px 12px; border-radius: 8px; background: #e6f4eb; color: #165c32; font-size: 13px; }
    .legacy-login a:focus-visible, .legacy-login input:focus-visible, .legacy-submit:focus-visible { outline: 3px solid #d32f2f80; outline-offset: 2px; }
}
@media (min-width: 1200px) and (min-height: 900px) {
    .auth-art { width: min(36vw, 520px); }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .auth-hero { padding-inline: 34px; }
    .auth-tagline { font-size: 38px; }
    .auth-description { font-size: 16px; }
    .auth-panel { padding-inline: 32px; }
    .auth-heading { font-size: 32px; }
    .auth-intro { font-size: 17px; }
    .auth-footer { flex-wrap: wrap; }
}
@media (min-width: 768px) and (max-height: 850px) {
    .auth-tagline { margin-top: 28px; }
}
@media (max-width: 767px) {
    .auth-card { display: block; }
    .auth-hero { min-height: 287px; padding: 34px 24px 60px; align-items: center; justify-content: center; text-align: center; }
    .auth-hero-inner { width: auto; }
    .auth-lockup { width: 150px; margin: 0 auto; }
    .auth-logo { width: 150px; height: 125px; margin: 0 auto; }
    .auth-brand { width: 120px; margin: 5px auto 0; padding: 10px 0 0 .32em; font-size: 15px; letter-spacing: .32em; }
    .auth-tagline, .auth-description, .auth-eyebrow, .auth-copyright, .auth-art { display: none; }
    .auth-panel {
        position: relative;
        display: block;
        min-height: calc(100svh - 259px);
        margin-top: -28px;
        padding: 72px 40px 0;
        border-radius: 38px 38px 0 0;
    }
    .auth-content { width: min(100%, 420px); margin: 0 auto; }
    .auth-heading { font-size: 31px; }
    .auth-intro { font-size: 17px; }
    .auth-form { margin-top: 39px; }
    .auth-field { margin-bottom: 23px; }
    .auth-options { font-size: 13px; }
    .auth-footer { justify-content: center; margin-top: 34px; font-size: 14px; }
}
@media (max-width: 359px) {
    .auth-panel { padding-inline: 25px; }
    .auth-heading { font-size: 28px; }
    .auth-options { font-size: 12px; }
    .auth-remember { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-field input, .auth-submit { transition: none; }
}
