.auth-page {
    min-height: calc(100vh - 82px);
    background:
        radial-gradient(circle at 0 100%, rgba(37, 99, 235, 0.18), transparent 28%),
        radial-gradient(circle at 100% 100%, rgba(239, 68, 68, 0.2), transparent 30%),
        linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #f1f5ff 100%);
    padding: 20px 16px 86px;
}

.auth-shell {
    width: min(940px, 100%);
    margin: 0 auto;
}

.auth-brand-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    margin-bottom: 24px;
}

.auth-brand-row img {
    width: 210px;
    max-width: 100%;
    border-right: 1px solid #cbd5e1;
    padding-right: 28px;
}

.auth-brand-row h1 {
    color: #020617;
    font-size: clamp(26px, 2.4vw, 36px);
    font-weight: 900;
    line-height: 1.1;
}

.auth-brand-row p {
    margin-top: 6px;
    color: #64748b;
    font-size: 17px;
}

.auth-card-wrap {
    display: grid;
    grid-template-columns: 390px minmax(350px, 1fr);
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.11);
    backdrop-filter: blur(18px);
}

.auth-showcase {
    position: relative;
    min-height: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #eaf3ff 0%, #dbeafe 55%, #fff 100%);
}

.auth-showcase::after {
    display: none;
}

.auth-showcase img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.auth-offer-showcase {
    isolation: isolate;
}

.auth-offer-slide {
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 550ms ease, transform 900ms ease;
}

.auth-offer-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.auth-offer-dots {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    gap: 7px;
}

.auth-offer-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
    transition: width 180ms ease, background 180ms ease;
}

.auth-offer-dots span.is-active {
    width: 18px;
    background: #fff;
}

.auth-panel {
    border-radius: 22px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

.auth-mobile-logo {
    display: none;
}

.auth-kicker {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.auth-panel h2 {
    margin-top: 8px;
    color: #020617;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.08;
}

.auth-panel > p {
    margin-top: 8px;
    color: #64748b;
    line-height: 1.55;
}

.auth-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.auth-switch a {
    display: grid;
    min-height: 40px;
    place-items: center;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

.auth-switch a.is-active {
    border-color: #ef233c;
    color: #020617;
}

.google-button,
.auth-submit {
    display: grid;
    width: 100%;
    min-height: 46px;
    place-items: center;
    border-radius: 14px;
    font-weight: 900;
}

.google-button {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 13px;
    margin-top: 14px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #1f1f1f;
    font-size: 14px;
    letter-spacing: 0;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.16);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.google-button:hover {
    border-color: #c6c9ce;
    background: #f8fafd;
    box-shadow: 0 2px 5px rgba(60, 64, 67, 0.18);
}

.google-mark {
    display: block;
    width: 22px;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.5 0 6.7 1.2 9.2 3.7l6.9-6.9C35.9 2.4 30.5 0 24 0 14.6 0 6.5 5.4 2.6 13.3l8 6.2C12.5 13.6 17.8 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.1 24.5c0-1.6-.1-3.1-.4-4.5H24v8.5h12.4c-.5 2.8-2.1 5.2-4.6 6.8l7.1 5.5c4.1-3.8 7.2-9.4 7.2-16.3z'/%3E%3Cpath fill='%23FBBC05' d='M10.6 28.5c-.5-1.4-.8-2.9-.8-4.5s.3-3.1.8-4.5l-8-6.2C1 16.5 0 20.1 0 24s1 7.5 2.6 10.7l8-6.2z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.5 0 11.9-2.1 15.9-5.8l-7.1-5.5c-2 1.3-4.5 2.1-8.8 2.1-6.2 0-11.5-4.1-13.4-9.8l-8 6.2C6.5 42.6 14.6 48 24 48z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 16px 0 12px;
    color: #64748b;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: #e2e8f0;
}

.auth-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 4px;
}

.auth-mode-tabs button {
    min-height: 34px;
    border-radius: 9px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.auth-mode-tabs button.is-active {
    background: #eaf2ff;
    color: #2563eb;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.auth-field {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 28px;
    align-items: center;
    min-height: 44px;
    gap: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    background: #fff;
    padding: 0 14px;
}

.auth-field svg {
    width: 20px;
    height: 20px;
    color: #334155;
}

.auth-field input {
    width: 100%;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.auth-field input::placeholder {
    color: #94a3b8;
}

.auth-field [data-toggle-password] {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #475569;
}

.auth-field [data-toggle-password] svg {
    display: none;
    grid-area: 1 / 1;
}

.auth-field [data-toggle-password] svg.is-visible {
    display: block;
}

.auth-field [data-toggle-password]:hover {
    color: #0f172a;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.auth-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.auth-options input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.auth-options a,
.auth-alt a {
    color: #2563eb;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-submit {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
    background: linear-gradient(135deg, #ef233c 0%, #ff3b45 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(239, 35, 60, 0.28);
}

.auth-alt {
    margin-top: 14px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.auth-mobile-trust {
    display: none;
}

.auth-toast {
    position: fixed;
    right: 18px;
    bottom: 92px;
    z-index: 90;
    max-width: 320px;
    border-radius: 14px;
    background: #0f172a;
    padding: 12px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.auth-backend-alert {
    margin-top: 12px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.35;
}

.auth-backend-error {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c;
}

.auth-backend-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.auth-inline-form {
    margin-top: 12px;
    text-align: center;
}

.auth-inline-form button {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-turnstile {
    display: grid;
    min-height: 65px;
    place-items: center;
    overflow: hidden;
}

@media (max-width: 1023px) {
    .auth-page {
        padding-top: 18px;
    }

    .auth-card-wrap {
        grid-template-columns: 1fr;
        width: min(480px, 100%);
        margin: 0 auto;
        border-radius: 28px;
        padding: 10px;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        border-radius: 24px;
        padding: 26px 22px;
    }

    .auth-panel h2 {
        font-size: 30px;
        text-align: center;
    }

    .auth-panel > p,
    .auth-kicker {
        display: block;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .auth-page {
        min-height: calc(100vh - 106px);
        padding: 14px 12px 88px;
    }

    .auth-panel {
        padding: 22px 16px 18px;
    }

    .auth-mobile-logo {
        display: block;
        width: 150px;
        margin: 0 auto 18px;
    }

    .auth-panel h2 {
        font-size: 28px;
        text-align: center;
    }

    .auth-panel > p {
        font-size: 13px;
        text-align: center;
    }

    .auth-kicker {
        display: none !important;
    }

    .auth-options {
        align-items: flex-start;
        font-size: 11.5px;
    }

    .auth-field,
    .google-button,
    .auth-submit {
        min-height: 50px;
    }

    .auth-toast {
        right: 12px;
        bottom: 86px;
        left: 12px;
        max-width: none;
        text-align: center;
    }
}

/* Final auth layout refinement */
.auth-mobile-topbar {
    display: none;
}

@media (min-width: 1024px) {
    .auth-page {
        display: grid;
        align-items: center;
        min-height: calc(100vh - 82px);
        padding: 22px 18px 34px;
    }

    .auth-shell {
        width: min(1120px, 100%);
    }

    .auth-card-wrap {
        grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.9fr);
        align-items: stretch;
        min-height: 520px;
        gap: 16px;
    }

    .auth-showcase {
        height: 100%;
        min-height: 496px;
        aspect-ratio: auto;
    }

    .auth-showcase img {
        object-fit: cover;
        object-position: center;
    }

    .auth-panel {
        align-self: center;
    }
}

@media (max-width: 640px) {
    .auth-body > header,
    .auth-body > .drawer-overlay,
    .auth-body > .mobile-drawer {
        display: none !important;
    }

    .auth-page {
        min-height: 100vh;
        padding: 14px 12px 88px;
    }

    .auth-mobile-topbar {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        align-items: center;
        margin: 0 auto 14px;
    }

    .auth-mobile-topbar a {
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
        border-radius: 999px;
        color: #0f172a;
    }

    .auth-mobile-topbar svg {
        width: 24px;
        height: 24px;
    }

    .auth-mobile-topbar img {
        justify-self: center;
        width: 150px;
        max-width: 100%;
    }

    .auth-card-wrap {
        border: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    .auth-panel {
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    }

    .auth-mobile-logo {
        display: none !important;
    }

    .auth-mobile-trust {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 20px;
        color: #1d4ed8;
    }

    .auth-mobile-trust span {
        display: grid;
        justify-items: center;
        gap: 7px;
        min-width: 0;
        color: #0f172a;
        text-align: center;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.15;
    }

    .auth-mobile-trust svg {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        background: #eff6ff;
        padding: 6px;
        color: #2563eb;
    }
}

/* Reset password and complete profile screens */
.auth-simple-wrap {
    width: min(860px, 100%);
    margin: 0 auto;
}

.profile-card-wrap {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.profile-stepper {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-stepper span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: #eaf2ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.profile-stepper span.is-done,
.profile-stepper span.is-active {
    background: #2563eb;
    color: #fff;
}

.profile-stepper span.is-done {
    font-size: 0;
}

.profile-stepper span.is-done::before {
    content: "";
    width: 12px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.profile-stepper i {
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #93c5fd);
}

.profile-step-labels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 16px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.profile-step-labels small:last-child {
    text-align: right;
}

.profile-photo-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: 18px 0 14px;
}

.profile-photo-button {
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8fafc, #eaf2ff);
    color: #64748b;
    overflow: hidden;
}

.profile-photo-button svg {
    width: 28px;
    height: 28px;
}

.profile-photo-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-photo-button span {
    position: absolute;
    right: 0;
    bottom: 5px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.profile-photo-row strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.profile-photo-row small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.profile-field {
    grid-template-columns: 22px 118px minmax(0, 1fr);
}

.profile-field span {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.dob-field {
    position: relative;
}

.dob-picker-button {
    display: grid !important;
    width: 22px !important;
    height: 22px !important;
    place-items: center !important;
    color: #334155 !important;
}

.dob-picker-button svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
}

.dob-native-input {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
}

.profile-safe-note {
    display: inline-grid;
    grid-template-columns: 20px auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.profile-safe-note svg {
    display: block;
    width: 20px;
    height: 20px;
    color: #2563eb;
}

.profile-safe-note span {
    display: block;
    min-width: 0;
}

.auth-skip-link {
    justify-self: end;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
}

@media (min-width: 1024px) {
    .auth-simple-wrap {
        grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
        min-height: 430px;
    }

    .auth-simple-wrap .auth-showcase {
        min-height: 406px;
    }

    .profile-card-wrap {
        grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.98fr);
        min-height: 610px;
    }

    .profile-showcase {
        min-height: 586px;
    }

    .profile-panel {
        padding: 24px 28px;
    }
}

@media (max-width: 640px) {
    .auth-simple-wrap,
    .profile-card-wrap {
        width: min(480px, 100%);
    }

    .auth-reset .auth-panel {
        margin-top: 30px;
    }

    .profile-panel {
        padding-top: 18px;
    }

    .profile-stepper {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 10px;
        max-width: 290px;
        margin: 0 auto 7px;
    }

    .profile-step-labels {
        max-width: 290px;
        margin: 0 auto 15px;
        font-size: 10.5px;
    }

    .profile-photo-row {
        grid-template-columns: 78px minmax(0, 1fr);
        max-width: 300px;
        margin: 18px auto 12px;
    }

    .profile-form {
        gap: 9px;
    }

    .profile-field {
        grid-template-columns: 22px minmax(0, 1fr);
        grid-template-rows: auto auto;
        min-height: 58px;
        column-gap: 11px;
        row-gap: 2px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .profile-field > svg,
    .profile-field .dob-picker-button {
        grid-row: 1 / span 2;
    }

    .profile-field span,
    .profile-field input {
        grid-column: 2;
    }

    .profile-field span {
        font-size: 12px;
    }

    .profile-field input {
        font-size: 12px;
    }

    .profile-safe-note {
        display: inline-grid;
        grid-template-columns: 18px auto;
        max-width: 300px;
        margin: 12px auto 0;
        font-size: 11px;
        line-height: 1.2;
        white-space: nowrap;
        width: 100%;
    }

    .profile-safe-note svg {
        width: 18px;
        height: 18px;
    }
}

.auth-panel > .profile-safe-note {
    display: flex !important;
    width: max-content !important;
    max-width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 12px auto 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.auth-panel > .profile-safe-note svg {
    display: block !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

.auth-panel > .profile-safe-note span {
    display: block !important;
    flex: 0 1 auto !important;
    line-height: 18px !important;
}
