/* Authentication screens */

body.page-auth {
    background: #f3e8d3;
    color: var(--geo-ink);
    min-height: 100vh;
}

body.page-auth main {
    background:
        radial-gradient(circle at 92% 3%, rgba(22, 69, 135, 0.11), transparent 27rem),
        linear-gradient(145deg, #f8efdf 0%, var(--geo-yellow) 100%);
    display: block;
    min-height: 100vh;
    padding: 0.75rem;
}

body.page-auth main *,
body.page-auth main *::before,
body.page-auth main *::after {
    box-sizing: border-box;
}

.auth-page {
    display: grid;
    gap: 0.75rem;
    grid-template-rows: auto minmax(0, 1fr);
    margin: 0 auto;
    max-width: 1760px;
    min-height: calc(100vh - 1.5rem);
}

.auth-navbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(22, 69, 135, 0.13);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(19, 39, 68, 0.11);
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 0.55rem 0.65rem;
}

.auth-navbar__brand {
    align-items: center;
    border-radius: 12px;
    color: var(--geo-ink);
    display: inline-flex;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.2rem 0.35rem;
    text-decoration: none;
}

.auth-navbar__brand img {
    background: #fff;
    border: 1px solid rgba(22, 69, 135, 0.16);
    border-radius: 50%;
    box-shadow: 0 5px 14px rgba(19, 39, 68, 0.1);
    flex: 0 0 44px;
    height: 44px;
    object-fit: contain;
    padding: 2px;
    width: 44px;
}

.auth-navbar__copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.auth-navbar__copy strong {
    color: var(--geo-ink);
    font-family: var(--geo-body-font);
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-navbar__copy small {
    color: var(--geo-muted);
    font-family: var(--geo-body-font);
    font-size: 0.68rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.auth-navbar__back {
    align-items: center;
    border: 1px solid var(--geo-line);
    border-radius: 11px;
    color: var(--geo-blue);
    display: inline-flex;
    font-family: var(--geo-body-font);
    font-size: 0.8rem;
    font-weight: 800;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.auth-navbar__back svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 17px;
}

.auth-navbar__back:hover,
.auth-navbar__back:focus-visible {
    background: var(--geo-blue-soft);
    border-color: rgba(22, 69, 135, 0.22);
    color: var(--geo-blue);
    transform: translateX(-1px);
}

.auth-stage {
    align-items: center;
    background:
        radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.1), transparent 27rem),
        linear-gradient(140deg, #245393 0%, var(--geo-blue-deep) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(51, 43, 28, 0.1);
    color: #f8fbff;
    display: grid;
    gap: clamp(2.5rem, 7vw, 8rem);
    grid-template-columns: minmax(0, 0.88fr) minmax(390px, 1.12fr);
    min-height: 0;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 6rem);
    position: relative;
}

.auth-stage::after {
    border: 1px solid currentColor;
    border-radius: 50%;
    content: "";
    height: 27rem;
    opacity: 0.06;
    pointer-events: none;
    position: absolute;
    right: -11rem;
    top: -14rem;
    width: 27rem;
}

.auth-stage--centered {
    grid-template-columns: minmax(0, 680px);
    justify-content: center;
}

.auth-intro,
.auth-card {
    position: relative;
    z-index: 1;
}

.auth-intro__eyebrow,
.auth-card__eyebrow {
    display: block;
    font-family: var(--geo-body-font);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.auth-intro__eyebrow {
    color: rgba(255, 255, 255, 0.68);
}

.auth-intro h1 {
    color: #fff;
    font-family: var(--geo-display-font);
    font-size: clamp(4.8rem, 8vw, 8rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin: 0;
    max-width: 8ch;
}

.auth-intro p {
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--geo-body-font);
    font-size: clamp(1rem, 1.35vw, 1.22rem);
    line-height: 1.65;
    margin: 1.75rem 0 0;
    max-width: 42ch;
}

.auth-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
    box-shadow: 0 22px 58px rgba(8, 27, 56, 0.24);
    color: var(--geo-ink);
    justify-self: end;
    max-width: 580px;
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    width: 100%;
}

.auth-card--message {
    justify-self: center;
    max-width: 680px;
    text-align: center;
}

.auth-card__eyebrow {
    color: var(--geo-blue);
    margin-bottom: 0.65rem;
}

.auth-card h2 {
    color: var(--geo-ink);
    font-family: var(--geo-display-font);
    font-size: clamp(2.8rem, 4.6vw, 4.2rem);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 0.98;
    margin: 0;
}

.auth-card__lead {
    color: var(--geo-muted);
    font-family: var(--geo-body-font);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0.8rem 0 1.5rem;
}

.auth-form {
    display: grid;
    gap: 1.05rem;
}

.auth-field {
    display: grid;
    gap: 0.35rem;
}

.auth-field label {
    color: var(--geo-ink);
    font-family: var(--geo-body-font);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.auth-field input {
    background: #fff;
    border: 1px solid #ccd6e2;
    border-radius: 11px;
    color: var(--geo-ink);
    font-family: var(--geo-body-font);
    font-size: 0.95rem;
    min-height: 48px;
    padding: 0.75rem 0.85rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    width: 100%;
}

.auth-field input:focus {
    border-color: var(--geo-blue);
    box-shadow: 0 0 0 3px rgba(22, 69, 135, 0.12);
    outline: 0;
}

.auth-submit {
    align-items: center;
    background: var(--geo-blue);
    border: 1px solid var(--geo-blue);
    border-radius: 11px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--geo-body-font);
    font-size: 0.82rem;
    font-weight: 800;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.1rem;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    text-decoration: none;
    width: 100%;
}

.auth-submit:hover,
.auth-submit:focus-visible {
    background: var(--geo-blue-deep);
    box-shadow: 0 9px 22px rgba(22, 69, 135, 0.22);
    color: #fff;
    transform: translateY(-1px);
}

.auth-secondary-link {
    color: var(--geo-blue);
    display: block;
    font-family: var(--geo-body-font);
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 1rem;
    text-align: center;
    text-decoration: none;
}

.auth-secondary-link:hover,
.auth-secondary-link:focus-visible {
    color: var(--geo-blue-deep);
    text-decoration: underline;
}

.auth-card__note {
    background: var(--geo-yellow-soft);
    border: 1px solid rgba(22, 69, 135, 0.1);
    border-radius: 14px;
    color: #475467;
    font-family: var(--geo-body-font);
    font-size: 0.78rem;
    line-height: 1.55;
    margin-top: 1.35rem;
    padding: 0.9rem 1rem;
}

.auth-card__note a {
    color: var(--geo-blue);
    font-weight: 800;
}

.auth-alert,
.auth-field .errorlist {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 11px;
    color: #9f1239;
    font-family: var(--geo-body-font);
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-alert {
    margin: 0;
    padding: 0.75rem 0.85rem;
}

.auth-alert[hidden] {
    display: none;
}

.auth-alert--security {
    background: #eef5fd;
    border-color: #c7d9ef;
    color: var(--geo-blue);
}

.auth-alert a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
}

.auth-field .errorlist {
    list-style: none;
    margin: 0.1rem 0 0;
    padding: 0.55rem 0.7rem;
}

.auth-field .helptext,
.auth-field .helptext ul {
    color: var(--geo-muted);
    font-family: var(--geo-body-font);
    font-size: 0.72rem;
    line-height: 1.45;
}

.auth-field .helptext ul {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
}

.auth-password-guidance__title {
    color: #526074;
    display: block;
    font-weight: 750;
    margin-top: 0.15rem;
}

.auth-field .helptext .auth-password-guidance {
    display: grid;
    gap: 0.28rem;
    list-style: none;
    margin: 0.42rem 0 0;
    padding: 0;
}

.auth-field .helptext .auth-password-guidance li {
    align-items: flex-start;
    display: flex;
    gap: 0.4rem;
}

.auth-field .helptext .auth-password-guidance li::before {
    align-items: center;
    background: var(--geo-blue-soft);
    border-radius: 50%;
    color: var(--geo-blue);
    content: "✓";
    display: inline-flex;
    flex: 0 0 16px;
    font-size: 0.58rem;
    font-weight: 900;
    height: 16px;
    justify-content: center;
    margin-top: 0.05rem;
    width: 16px;
}

.auth-message-icon {
    align-items: center;
    background: var(--geo-blue-soft);
    border-radius: 50%;
    color: var(--geo-blue);
    display: inline-flex;
    height: 54px;
    justify-content: center;
    margin-bottom: 1.1rem;
    width: 54px;
}

.auth-message-icon svg {
    fill: none;
    height: 26px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 26px;
}

@media (max-width: 850px) {
    body.page-auth main {
        padding: 0.5rem;
    }

    .auth-page {
        min-height: calc(100vh - 1rem);
    }

    .auth-stage {
        gap: 2rem;
        grid-template-columns: 1fr;
        padding: clamp(2rem, 8vw, 4rem);
    }

    .auth-intro h1 {
        max-width: 10ch;
    }

    .auth-intro p {
        margin-top: 1rem;
    }

    .auth-card {
        justify-self: stretch;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .auth-navbar__copy {
        display: none;
    }

    .auth-navbar__back span {
        display: none;
    }

    .auth-navbar__back {
        justify-content: center;
        padding: 0;
        width: 42px;
    }

    .auth-stage {
        border-radius: 22px;
        padding: 2.25rem 1.15rem;
    }

    .auth-intro h1 {
        font-size: clamp(4rem, 21vw, 6rem);
    }

    .auth-card {
        border-radius: 18px;
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-navbar__back,
    .auth-submit {
        transition-duration: 0.01ms !important;
    }
}
