:root {
    color-scheme: light;
    --blue: #597f97;
    --blue-light: #c4cbd8;
    --slate: #6c747c;
    --navy: #183251;
    --warm-gray: #c8c4c4;
    --paper: #ffffff;
    --background: #f3f5f7;
    --danger: #8c3f44;
    --success: #315e50;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--navy);
}

a { color: var(--blue); font-weight: 650; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

.site-header {
    min-height: 68px;
    padding: 0 clamp(20px, 6vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--navy);
    color: white;
}

.brand { color: white; font-size: 1.25rem; font-weight: 750; letter-spacing: .02em; text-decoration: none; }
.header-note { color: var(--blue-light); font-size: .9rem; }
.page-main { width: 100%; flex: 1; padding: 48px 18px; display: grid; place-items: center; }

.auth-card {
    width: min(100%, 460px);
    padding: clamp(26px, 6vw, 42px);
    border: 1px solid var(--blue-light);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 18px 48px rgb(24 50 81 / 9%);
}

.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: .75rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy); font-size: clamp(1.65rem, 4vw, 2rem); line-height: 1.2; }
.intro { margin: 12px 0 24px; color: var(--slate); line-height: 1.55; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { margin-top: 8px; color: var(--navy); font-size: .9rem; font-weight: 650; }
.auth-form input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--warm-gray);
    border-radius: 8px;
    background: white;
    color: var(--navy);
    font: inherit;
}
.auth-form input:focus { border-color: var(--blue); outline: 3px solid rgb(89 127 151 / 18%); }
.password-field { position: relative; width: 100%; min-width: 0; }
.password-field input { padding-right: 54px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--blue);
    cursor: pointer;
}
.password-toggle:hover { background: #edf3f6; color: var(--navy); }
.password-toggle:focus-visible { outline: 3px solid rgb(89 127 151 / 30%); outline-offset: 1px; }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-toggle[hidden] { display: none; }
.field-hint { margin: -4px 0 2px; color: var(--slate); font-size: .8rem; }
.field-error { min-height: 0; margin: -5px 0 2px; color: var(--danger); font-size: .82rem; line-height: 1.4; }
.field-error:empty { display: none; }
.auth-form input.input-invalid { border-color: var(--danger); }
.auth-form input.input-invalid:focus { outline-color: rgb(140 63 68 / 18%); }

.button {
    min-height: 46px;
    margin-top: 12px;
    padding: 11px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blue);
    border-radius: 8px;
    background: var(--blue);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.button:hover { border-color: var(--navy); background: var(--navy); color: white; }
.button:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.button-secondary { border-color: var(--blue-light); background: white; color: var(--navy); }
.button-secondary:hover { background: var(--navy); color: white; }
.button-link { width: 100%; }
.form-footnote { margin: 20px 0 0; color: var(--slate); font-size: .9rem; text-align: center; }
.create-account-link { text-decoration: none; }
.form-footnote + .form-footnote { margin-top: 12px; }
.alert { margin: 18px 0; padding: 12px 14px; border-radius: 8px; font-size: .9rem; line-height: 1.5; }
.alert ul { margin: 0; padding-left: 19px; }
.alert li + li { margin-top: 4px; }
.alert-error { border: 1px solid #e4c4c6; background: #fcf2f2; color: var(--danger); }
.alert-success { border: 1px solid #b9d5c9; background: #eff8f3; color: var(--success); }
.site-footer { padding: 18px; color: var(--slate); font-size: .8rem; text-align: center; }

@media (max-width: 520px) {
    .site-header { min-height: 60px; }
    .header-note { font-size: .78rem; }
    .page-main { padding: 28px 14px; }
    .auth-card { border-radius: 12px; }
}
