:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #2b2b2b;
    background: #f4f1e9;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px;
    place-items: center;
    background:
        radial-gradient(circle at 2% 100%, rgba(201, 162, 75, .12), transparent 32rem),
        #f4f1e9;
}

.auth-layout {
    display: grid;
    width: min(1280px, 100%);
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.1fr);
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid rgba(31, 42, 68, .08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(22, 32, 58, .17);
}

.auth-visual {
    position: sticky;
    top: 24px;
    display: flex;
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(28px, 4vw, 54px);
    background:
        linear-gradient(180deg, rgba(15, 27, 49, .34) 0%, rgba(15, 27, 49, .74) 50%, #111d34 100%),
        url("img/background.jpg") center / cover,
        #16203a;
    color: #f7f5ef;
}

.auth-visual::after {
    position: absolute;
    right: -110px;
    bottom: -160px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(231, 194, 107, .25);
    border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(231, 194, 107, .04), 0 0 0 54px rgba(231, 194, 107, .035);
    content: "";
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 750;
    text-decoration: none;
}

.auth-brand img {
    width: 54px;
    height: 54px;
    border: 2px solid rgba(255, 255, 255, .78);
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.auth-visual-copy {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: auto 0;
    padding: 72px 0;
    animation: auth-rise-in .65s cubic-bezier(.2, .75, .25, 1) both;
}

.auth-visual-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(231, 194, 107, .45);
    border-radius: 16px;
    background: rgba(201, 162, 75, .14);
    color: #e7c26b;
    font-size: 22px;
}

.auth-kicker {
    margin: 24px 0 10px;
    color: #8a6d1f;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.auth-visual .auth-kicker {
    color: #e7c26b;
}

.auth-visual-copy h1 {
    max-width: 480px;
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.auth-visual-copy > p:last-child {
    max-width: 390px;
    margin: 18px 0 0;
    color: rgba(247, 245, 239, .82);
    font-size: 15px;
    line-height: 1.75;
}

.auth-progress {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin-bottom: 32px;
}

.auth-progress-step {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    color: rgba(247, 245, 239, .62);
}

.auth-progress-step > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid rgba(247, 245, 239, .28);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.auth-progress-step.is-active,
.auth-progress-step.is-complete {
    color: #fff;
}

.auth-progress-step.is-active > span,
.auth-progress-step.is-complete > span {
    border-color: #c9a24b;
    background: #c9a24b;
    color: #1f2a44;
}

.auth-progress-step strong,
.auth-progress-step small {
    display: block;
}

.auth-progress-step strong {
    font-size: 13px;
}

.auth-progress-step small {
    margin-top: 3px;
    color: rgba(247, 245, 239, .6);
    font-size: 11px;
}

.auth-progress-line {
    width: 1px;
    height: 18px;
    margin-left: 16px;
    background: rgba(247, 245, 239, .22);
}

.auth-visual-footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(247, 245, 239, .7);
    font-size: 12px;
}

.auth-visual-footer i {
    margin-right: 6px;
    color: #e7c26b;
}

.auth-card {
    min-width: 0;
    max-height: calc(100vh - 48px);
    max-height: calc(100svh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #c9a24b #f2f0eb;
    scrollbar-width: thin;
    background: #fff;
}

.auth-shell > .auth-card {
    width: min(100%, 480px);
    max-height: none;
    padding: 40px;
    border: 1px solid rgba(31, 42, 68, .08);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .2);
}

.auth-shell > .auth-card h1 {
    margin: 0;
    color: #1f2a44;
    font-size: clamp(27px, 7vw, 34px);
}

.auth-shell > .auth-card .auth-kicker {
    margin: 32px 0 8px;
}

.auth-shell > .auth-card .auth-copy {
    margin: 12px 0 24px;
}

.auth-card-inner {
    width: min(100%, 640px);
    margin: 0 auto;
    padding: clamp(32px, 5vw, 70px) clamp(24px, 5vw, 72px);
    animation: auth-rise-in .55s cubic-bezier(.2, .75, .25, 1) both;
}

.auth-card .auth-kicker {
    margin: 0 0 10px;
}

.auth-card h2 {
    margin: 0;
    color: #1f2a44;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(29px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.auth-copy {
    margin: 13px 0 24px;
    color: #62666f;
    font-size: 14px;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 9px;
}

.auth-form label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    color: #303744;
    font-size: 13px;
    font-weight: 700;
}

.auth-form label span {
    color: #777b82;
    font-size: 11px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    min-height: 49px;
    padding: 12px 14px;
    border: 1px solid #d9dce1;
    border-radius: 9px;
    background: #fbfbfa;
    color: #252a33;
    font: inherit;
    font-size: 14px;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.auth-form input::placeholder {
    color: #9a9da3;
}

.auth-form input:hover {
    border-color: #aeb5c0;
}

.auth-form input:focus {
    border-color: #1f2a44;
    outline: 0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31, 42, 68, .1);
}

.auth-submit,
.auth-text-button,
.auth-back,
.auth-home {
    font: inherit;
}

.auth-submit {
    display: inline-flex;
    min-height: 51px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 15px;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;
    background: #c9a24b;
    color: #1f2a44;
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    background: #b58e36;
    box-shadow: 0 7px 16px rgba(31, 42, 68, .14);
}

.auth-submit:active {
    transform: translateY(0);
    background: #9c7a2d;
}

.auth-submit:disabled,
.auth-text-button:disabled {
    cursor: wait;
    opacity: .62;
}

.auth-submit:focus-visible,
.auth-text-button:focus-visible,
.auth-back:focus-visible,
.auth-home:focus-visible {
    outline: 2px solid #1f2a44;
    outline-offset: 3px;
}

.auth-alert {
    margin: 14px 0;
    padding: 13px 15px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.auth-error {
    border: 1px solid #e6c2b8;
    background: #fff4f0;
    color: #802f1d;
}

.auth-notice {
    border: 1px solid #e5d398;
    background: #fff9e8;
    color: #574516;
}

.auth-delivery-status {
    display: grid;
    gap: 9px;
    margin: 16px 0;
}

.auth-delivery-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px;
    border: 1px solid #dfe7df;
    border-radius: 9px;
    background: #f6faf6;
    color: #28513a;
}

.auth-delivery-item.is-failed {
    border-color: #e6c2b8;
    background: #fff7f4;
    color: #802f1d;
}

.auth-delivery-icon {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 50%;
    background: rgba(40, 81, 58, .1);
    font-size: 11px;
}

.auth-delivery-item.is-failed .auth-delivery-icon {
    background: rgba(128, 47, 29, .1);
}

.auth-delivery-item strong,
.auth-delivery-item small {
    display: block;
}

.auth-delivery-item strong {
    font-size: 12px;
}

.auth-delivery-item small {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.55;
}

.auth-resend {
    margin-top: 5px;
    text-align: center;
}

.auth-text-button {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #1f2a44;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-loading {
    display: grid;
    gap: 9px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e6e8eb;
    border-radius: 9px;
    background: #fafaf9;
}

.auth-loading[hidden] {
    display: none;
}

.auth-loading-message {
    color: #535967;
    font-size: 12px;
    font-weight: 650;
}

.auth-skeleton {
    display: block;
    width: 62%;
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg, #e8e9eb 25%, #f5f5f4 45%, #e8e9eb 65%);
    background-size: 220% 100%;
    animation: auth-shimmer 1.25s linear infinite;
}

.auth-skeleton-wide {
    width: 100%;
}

.auth-footnote {
    margin: 25px 0 7px;
    color: #777b82;
    font-size: 11px;
    line-height: 1.6;
}

.auth-back,
.auth-home {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    color: #1f2a44;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.auth-back {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-home {
    display: flex;
    gap: 7px;
    margin-top: 9px;
    color: #70757e;
}

.auth-home:hover,
.auth-back:hover {
    color: #8a6d1f;
}

@keyframes auth-rise-in {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes auth-shimmer {
    to { background-position: -220% 0; }
}

@media (max-width: 820px) {
    .auth-shell {
        padding: 14px;
    }

    .auth-layout {
        min-height: calc(100svh - 28px);
        grid-template-columns: minmax(260px, .78fr) minmax(360px, 1.22fr);
    }

    .auth-visual {
        min-height: calc(100svh - 28px);
        padding: 28px;
    }

    .auth-card {
        max-height: calc(100svh - 28px);
    }
}

@media (max-width: 680px) {
    .auth-shell {
        padding: 0;
        background: #fff;
    }

    .auth-layout {
        display: flex;
        min-height: 100svh;
        flex-direction: column;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-shell > .auth-card {
        width: calc(100% - 32px);
        padding: 28px 22px;
        border-radius: 16px;
    }

    .auth-visual {
        position: relative;
        top: auto;
        min-height: 0;
        flex: 0 0 auto;
        padding: 22px 24px 20px;
        background-position: center 55%;
    }

    .auth-brand img {
        width: 44px;
        height: 44px;
    }

    .auth-visual-copy {
        padding: 28px 0 24px;
    }

    .auth-visual-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 18px;
    }

    .auth-visual-copy .auth-kicker {
        margin-top: 16px;
    }

    .auth-visual-copy h1 {
        max-width: 420px;
        font-size: clamp(27px, 8vw, 38px);
    }

    .auth-visual-copy > p:last-child {
        margin-top: 10px;
        font-size: 13px;
    }

    .auth-progress {
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
        margin: 0 0 20px;
    }

    .auth-progress-step {
        gap: 8px;
    }

    .auth-progress-step > span {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .auth-progress-step small {
        font-size: 10px;
    }

    .auth-progress-line {
        width: clamp(10px, 8vw, 38px);
        height: 1px;
        margin: 0;
    }

    .auth-visual-footer {
        font-size: 11px;
    }

    .auth-card {
        max-height: none;
        overflow: visible;
    }

    .auth-card-inner {
        padding: 30px 24px 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.auth-shell {
    padding: clamp(12px, 2.2vw, 30px);
    font-family: "DM Sans", Inter, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 4% 92%, rgba(201, 162, 75, .14), transparent 30rem),
        radial-gradient(circle at 100% 0%, rgba(16, 45, 116, .08), transparent 34rem),
        #f2f4f8;
}

.auth-layout {
    width: min(1240px, 100%);
    min-height: min(780px, calc(100svh - 60px));
    grid-template-columns: minmax(350px, .95fr) minmax(430px, 1.05fr);
    border: 1px solid rgba(16, 45, 116, .1);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(8, 27, 73, .15);
}

.auth-visual {
    position: relative;
    top: auto;
    min-height: min(780px, calc(100svh - 60px));
    padding: clamp(30px, 4.3vw, 56px);
    background:
        linear-gradient(180deg, rgba(8, 27, 73, .28), rgba(8, 27, 73, .74) 54%, #081b49 100%),
        url("img/background.jpg") center / cover,
        #081b49;
}

.auth-brand {
    gap: 13px;
    font-size: 15px;
    letter-spacing: .01em;
}

.auth-brand img {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, .8);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .17);
}

.auth-visual-copy {
    padding: 62px 0;
}

.auth-visual-mark {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    background: rgba(244, 197, 66, .16);
    color: #f4c542;
}

.auth-visual .auth-kicker,
.auth-card .auth-kicker {
    font-size: 11px;
    letter-spacing: .15em;
}

.auth-visual-copy h1,
.auth-card h2 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

.auth-visual-copy h1 {
    font-size: clamp(35px, 4vw, 51px);
    line-height: 1.08;
}

.auth-visual-copy > p:last-child {
    font-size: 14px;
}

.auth-card {
    display: flex;
    max-height: min(780px, calc(100svh - 60px));
    align-items: center;
    overflow-y: auto;
}

.auth-card-inner {
    width: min(100%, 620px);
    padding: clamp(35px, 5vw, 70px) clamp(28px, 5.2vw, 76px);
}

.auth-card .auth-kicker {
    margin-bottom: 11px;
    color: #8a6d1f;
}

.auth-card h2 {
    font-size: clamp(31px, 3.6vw, 42px);
    letter-spacing: -.035em;
}

.auth-copy {
    margin: 13px 0 25px;
    color: #687386;
    font-size: 14px;
    line-height: 1.7;
}

.auth-form {
    gap: 9px;
}

.auth-form label {
    margin-top: 8px;
    color: #283653;
    font-size: 12px;
}

.auth-form input {
    min-height: 51px;
    border-color: #dce3ed;
    border-radius: 11px;
    background: #f9fafc;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
}

.auth-form input:focus {
    border-color: #234b98;
    box-shadow: 0 0 0 4px rgba(35, 75, 152, .1);
}

.auth-submit {
    min-height: 52px;
    margin-top: 18px;
    padding: 13px 18px;
    border-radius: 11px;
    background: #102d74;
    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    text-decoration: none;
}

.auth-submit:hover {
    background: #081b49;
}

.auth-submit:active {
    background: #061438;
}

.auth-link-button {
    width: 100%;
}

.auth-alert {
    border-radius: 11px;
}

.auth-error {
    border-color: #f1c7c0;
    background: #fff5f2;
}

.auth-notice {
    border-color: #e9d99f;
    background: #fffaf0;
}

.auth-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 5px;
    color: #7a8494;
    font-size: 11px;
}

.auth-form-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-form-meta span i {
    color: #4d8a67;
}

.auth-form-meta a,
.auth-signup-note a {
    color: #102d74;
    font-weight: 750;
    text-decoration: none;
}

.auth-form-meta a:hover,
.auth-signup-note a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-login-assurance {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 13px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
}

.auth-login-assurance > i {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 11px;
    background: rgba(244, 197, 66, .17);
    color: #f4c542;
}

.auth-login-assurance strong,
.auth-login-assurance small {
    display: block;
}

.auth-login-assurance strong {
    color: #fff;
    font-size: 12px;
}

.auth-login-assurance small {
    margin-top: 4px;
    color: rgba(255, 255, 255, .68);
    font-size: 10px;
}

.auth-setup-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 19px 0 8px;
    padding: 15px;
    border: 1px solid #f0e2b5;
    border-radius: 12px;
    background: #fffaf0;
    color: #8a6d1f;
}

.auth-setup-callout > i {
    margin-top: 3px;
}

.auth-setup-callout p {
    display: grid;
    gap: 4px;
    margin: 0;
    color: #554820;
    font-size: 12px;
    line-height: 1.5;
}

.auth-setup-callout p span {
    color: #77705e;
}

.auth-signup-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e9edf3;
    color: #707b8d;
    font-size: 11px;
    line-height: 1.5;
}

.auth-signup-note i {
    color: #4d8a67;
}

.auth-home {
    min-height: 40px;
    margin-top: 19px;
    color: #778294;
    font-size: 11px;
}

.auth-home:hover,
.auth-back:hover {
    color: #8a6d1f;
}

.auth-progress-step > span {
    border-color: rgba(255, 255, 255, .34);
}

.auth-progress-step.is-active > span,
.auth-progress-step.is-complete > span {
    border-color: #f4c542;
    background: #f4c542;
}

@media (max-width: 820px) {
    .auth-shell {
        padding: 12px;
    }

    .auth-layout {
        min-height: calc(100svh - 24px);
        grid-template-columns: minmax(260px, .8fr) minmax(340px, 1.2fr);
    }

    .auth-visual {
        min-height: calc(100svh - 24px);
        padding: 28px;
    }

    .auth-card {
        max-height: calc(100svh - 24px);
    }
}

@media (max-width: 680px) {
    .auth-shell {
        padding: 0;
        background: #fff;
    }

    .auth-layout {
        min-height: 100svh;
    }

    .auth-visual {
        min-height: 0;
        padding: 20px 23px 22px;
    }

    .auth-visual-copy {
        padding: 27px 0 22px;
    }

    .auth-visual-copy h1 {
        font-size: clamp(29px, 8vw, 38px);
    }

    .auth-login-assurance {
        margin-bottom: 18px;
    }

    .auth-card {
        max-height: none;
        overflow: visible;
    }

    .auth-card-inner {
        padding: 30px 24px 38px;
    }
}

@media (max-width: 380px) {
    .auth-form-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}
