:root {
    color-scheme: light;
    --auth-blue: #005af7;
    --auth-navy: #092d60;
    --auth-text: #152c49;
    --auth-muted: #607087;
    --auth-border: #d7e0eb;
}

*, *::before, *::after { box-sizing: border-box; }

.auth-page {
    margin: 0;
    background: #f3f6fb;
    color: var(--auth-text);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.auth-page button, .auth-page input { font: inherit; }
.auth-page input { font-size: 16px; }
.auth-page a { color: var(--auth-blue); text-underline-offset: 3px; }
.auth-page a:hover { color: #0044bc; }
.auth-page :focus-visible { outline: 3px solid var(--auth-blue); outline-offset: 4px; }

.auth-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
}

.auth-header, .auth-footer { display: flex; align-items: center; justify-content: space-between; }
.auth-header { min-height: 104px; gap: 20px; }
.auth-brand { flex-shrink: 0; }
.auth-header-note { font-size: 13px; color: var(--auth-muted); }

.auth-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    width: 100%;
    min-height: 620px;
    margin: auto 0;
    background: #fff;
    border: 1px solid #e3e9f2;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 60px -30px #173b6a40;
}

.auth-form-panel { align-self: center; min-width: 0; padding: 44px clamp(28px, 4.5vw, 64px); }
.auth-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.15em; }
.auth-form-heading .auth-eyebrow { color: var(--auth-blue); margin-bottom: 12px; }
.auth-form-heading { margin-bottom: 28px; }
.auth-form-heading h1 { font-size: clamp(28px, 2.6vw, 36px); letter-spacing: -0.035em; line-height: 1.18; color: var(--auth-navy); margin: 0 0 12px; font-weight: 700; }
.auth-form-heading p { margin: 0; color: var(--auth-muted); }
.auth-form { display: grid; gap: 18px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.auth-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    background: #fff;
    color: var(--auth-text);
    padding: 12px 14px;
    transition: border-color 150ms, box-shadow 150ms;
}
.auth-input::placeholder { color: #7b8798; font-size: 14px; }
.auth-input:hover { border-color: #9daec5; }
.auth-input:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 3px #005af712; outline: none; }
.auth-password { position: relative; }
.auth-password .auth-input { padding-right: 70px; }
.auth-password-toggle { position: absolute; top: 4px; bottom: 4px; right: 4px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--auth-muted); cursor: pointer; font-size: 12px !important; font-weight: 600 !important; }
.auth-password-toggle:hover { background: #edf3fc; color: var(--auth-blue); }
.auth-password-toggle[hidden] { display: none; }
.auth-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.auth-remember { display: flex; align-items: center; gap: 8px; color: var(--auth-muted); font-size: 13px; cursor: pointer; width: fit-content; }
.auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--auth-blue); }

.auth-submit, .auth-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 150ms, border-color 150ms;
}
.auth-submit { border: 1px solid var(--auth-blue); background: var(--auth-blue); color: #fff; }
.auth-submit:hover { background: #0049d2; border-color: #0049d2; }
.auth-submit:active { background: #003daF; }
.auth-provider { border: 1px solid var(--auth-border); background: #fff; color: var(--auth-text) !important; }
.auth-provider:hover { border-color: #9daec5; background: #f7f9fd; }
.auth-provider img { width: 20px; height: 20px; object-fit: contain; }
.auth-providers { display: grid; gap: 10px; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--auth-muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e5eaf1; }
.auth-switch { margin: 26px 0 0; text-align: center; font-size: 13px; color: var(--auth-muted); }
.auth-switch a { font-weight: 600; margin-left: 4px; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-validation.validation-summary-valid, .auth-field-error.field-validation-valid { display: none; }
.auth-validation.validation-summary-errors { padding: 12px 14px; margin: 0 0 20px; border: 1px solid #f4c8c5; border-radius: 9px; background: #fff3f2; color: #a62c27; font-size: 13px; }
.auth-validation ul { padding-left: 18px; margin: 0; }
.auth-field-error { display: block; margin-top: 6px; font-size: 12px; color: #b02d28; }
.auth-input.input-validation-error { border-color: #c63b34; }

.auth-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; padding: 36px; isolation: isolate; background: #102c49; color: #fff; }
.auth-story-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 54% center; z-index: -2; }
.auth-story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #08234570 0%, #0823450d 25%, #071e3bb8 60%, #061c38f5 100%); z-index: -1; }
.auth-story-top { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; }
.auth-story-dot { width: 8px; height: 8px; border-radius: 50%; background: #b4d1ff; box-shadow: 0 0 0 4px #ffffff20; }
.auth-story-content { padding-top: 120px; }
.auth-story-content .auth-eyebrow { color: #b4d1ff; margin-bottom: 16px; }
.auth-story h2 { margin: 0; font-size: clamp(36px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 650; }
.auth-story p { max-width: 330px; font-size: 15px; line-height: 1.7; color: #e1e9f6; margin: 22px 0 0; }
.auth-story-topics { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 32px 0 0; padding: 20px 0 0; border-top: 1px solid #ffffff38; color: #d6e3f7; font-size: 12px; }
.auth-footer { min-height: 76px; gap: 16px; color: var(--auth-muted); font-size: 12px; }
.auth-skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: #fff; padding: 12px; border-radius: 8px; }
.auth-skip-link:focus { top: 12px; }

@media (max-width: 900px) {
    .auth-shell { width: min(760px, calc(100% - 40px)); }
    .auth-card { grid-template-columns: 1.2fr 1fr; }
    .auth-form-panel { padding: 36px 28px; }
    .auth-story { padding: 28px; }
    .auth-story h2 { font-size: 38px; }
    .auth-field-row { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 680px) {
    .auth-shell { max-width: 460px; width: calc(100% - 32px); }
    .auth-header { min-height: 88px; }
    .auth-header-note { display: none; }
    .auth-card { grid-template-columns: 1fr; min-height: 0; border-radius: 18px; }
    .auth-form-panel { padding: 32px 24px; }
    .auth-story { display: none; }
    .auth-form-heading h1 { font-size: 30px; }
    .auth-footer { min-height: 68px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-input, .auth-submit, .auth-provider { transition: none; }
}
