:root {
    color-scheme: light;
    --auth-ink: #17203a;
    --auth-ink-soft: #5f687c;
    --auth-muted: #8a91a3;
    --auth-line: #dfe3ec;
    --auth-line-strong: #cdd3df;
    --auth-surface: #ffffff;
    --auth-canvas: #f3f5f9;
    --auth-primary: #3159d9;
    --auth-primary-dark: #2446ba;
    --auth-danger: #c94545;
    --auth-danger-soft: #fff1f0;
    --auth-focus: rgba(49, 89, 217, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--auth-canvas);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
    font-family: "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.auth-shell {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(460px, 0.96fr) minmax(520px, 1.04fr);
    gap: 0;
    background: var(--auth-surface);
}

.auth-visual {
    position: relative;
    min-height: calc(100svh - 32px);
    margin: 16px 0 16px 16px;
    padding: clamp(30px, 4vw, 58px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    border-radius: 28px;
    color: #ffffff;
    background:
        linear-gradient(150deg, rgba(12, 25, 85, 0.15), rgba(28, 69, 197, 0.08)),
        radial-gradient(circle at 75% 74%, #214ee0 0, #122d9c 39%, #091449 78%, #07113d 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.16;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.27'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.auth-visual::after {
    content: "";
    position: absolute;
    width: 290px;
    height: 290px;
    right: -90px;
    top: -100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 0 72px rgba(255, 255, 255, 0.025), 0 0 0 142px rgba(255, 255, 255, 0.018);
}

.auth-visual-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.auth-visual-glow-one {
    width: 270px;
    height: 270px;
    left: -150px;
    bottom: 15%;
    background: rgba(93, 213, 223, 0.12);
}

.auth-visual-glow-two {
    width: 190px;
    height: 190px;
    right: 19%;
    top: 32%;
    background: rgba(92, 123, 255, 0.24);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    width: fit-content;
}

.auth-brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
}

.auth-brand-mark svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-brand-copy {
    display: grid;
    gap: 2px;
}

.auth-brand-copy strong {
    font-size: 1.04rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.auth-brand-copy small {
    font-size: 0.67rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.055em;
    opacity: 0.62;
    text-transform: uppercase;
}

.auth-brand-light {
    position: relative;
    z-index: 4;
}

.auth-brand-light .auth-brand-mark {
    color: #1d43b4;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(4, 10, 48, 0.22);
}

.auth-visual-copy {
    position: relative;
    z-index: 4;
    width: min(580px, 92%);
    margin-top: clamp(64px, 10vh, 126px);
}

.auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-eyebrow span {
    width: 30px;
    height: 1px;
    background: #82d6dc;
}

.auth-visual-copy h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(2.8rem, 5vw, 5.4rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.auth-visual-copy > p {
    max-width: 510px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.98rem, 1.25vw, 1.14rem);
    line-height: 1.7;
}

.auth-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.auth-benefit {
    min-height: 42px;
    padding: 0 14px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.065);
    backdrop-filter: blur(12px);
    font-size: 0.72rem;
    font-weight: 600;
}

.auth-benefit svg {
    width: 24px;
    height: 24px;
    padding: 4px;
    flex: 0 0 auto;
    fill: none;
    stroke: #95e1e3;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-visual-art {
    position: absolute;
    z-index: 2;
    right: clamp(-64px, -3vw, -24px);
    bottom: clamp(-80px, -5vw, -38px);
    width: min(68%, 720px);
    pointer-events: none;
}

.auth-visual-art::before {
    content: "";
    position: absolute;
    inset: 16% 12% 6% 10%;
    z-index: -1;
    border-radius: 50%;
    background: rgba(69, 106, 255, 0.32);
    filter: blur(70px);
}

.auth-visual-art picture {
    display: block;
}

.auth-visual-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 42%;
    opacity: 0.96;
    filter: saturate(0.92) contrast(1.02);
    -webkit-mask-image: radial-gradient(ellipse 54% 50% at 51% 53%, #000 61%, transparent 100%);
    mask-image: radial-gradient(ellipse 54% 50% at 51% 53%, #000 61%, transparent 100%);
}

.auth-visual-index {
    position: absolute;
    z-index: 4;
    left: clamp(30px, 4vw, 58px);
    bottom: 34px;
    color: rgba(255, 255, 255, 0.26);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.auth-panel {
    position: relative;
    min-height: 100svh;
    padding: 36px clamp(34px, 5vw, 88px) 30px;
    display: flex;
    flex-direction: column;
    background: var(--auth-surface);
}

.auth-panel-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    color: var(--auth-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.auth-panel-top a {
    padding: 9px 13px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    color: var(--auth-primary);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-panel-top a:hover {
    border-color: #bec8df;
    background: #f8f9fc;
    transform: translateY(-1px);
}

.auth-form-wrap {
    width: min(100%, 456px);
    margin: auto;
    padding: clamp(52px, 8vh, 84px) 0 42px;
}

.auth-brand-mobile {
    display: none;
    margin-bottom: 42px;
}

.auth-brand-mobile .auth-brand-mark {
    color: #ffffff;
    background: var(--auth-primary);
    box-shadow: 0 12px 28px rgba(49, 89, 217, 0.22);
}

.auth-form-heading {
    margin-bottom: 34px;
}

.auth-kicker {
    margin-bottom: 12px;
    color: var(--auth-primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-form-heading h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.auth-form-heading p {
    margin: 14px 0 0;
    color: var(--auth-ink-soft);
    font-size: 0.91rem;
    line-height: 1.65;
}

.auth-messages {
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
}

.auth-messages li {
    padding: 12px 14px;
    border: 1px solid #c8d9cb;
    border-radius: 12px;
    color: #30633d;
    background: #eff9f1;
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-messages li.error {
    border-color: #efc4c1;
    color: #9d3636;
    background: var(--auth-danger-soft);
}

.auth-alert {
    margin-bottom: 22px;
    padding: 14px;
    display: flex;
    gap: 11px;
    border: 1px solid #efc7c4;
    border-radius: 13px;
    color: #9c3939;
    background: var(--auth-danger-soft);
    font-size: 0.76rem;
    line-height: 1.45;
}

.auth-alert > svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.auth-alert strong {
    display: block;
    margin-bottom: 2px;
    color: #822d2d;
}

.auth-alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-form {
    display: grid;
    gap: 21px;
}

.auth-field {
    display: grid;
    gap: 9px;
}

.auth-field label,
.auth-label-row label {
    color: #2c3449;
    font-size: 0.76rem;
    font-weight: 700;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap input {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 46px;
    border: 1px solid var(--auth-line);
    border-radius: 13px;
    outline: 0;
    color: var(--auth-ink);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(20, 29, 55, 0.025);
    font-size: 0.87rem;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input-wrap input::placeholder {
    color: #a2a8b7;
    font-weight: 500;
}

.auth-input-wrap input:hover {
    border-color: var(--auth-line-strong);
}

.auth-input-wrap input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-focus);
}

.auth-field.has-error .auth-input-wrap input {
    border-color: #dd7c77;
    background: #fffafa;
}

.auth-input-icon {
    position: absolute;
    z-index: 1;
    left: 16px;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    fill: none;
    stroke: #9098aa;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: stroke 0.2s ease;
}

.auth-input-wrap:focus-within .auth-input-icon {
    stroke: var(--auth-primary);
}

.auth-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    color: #8991a2;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: var(--auth-primary);
    background: #f0f3fb;
    outline: 0;
}

.auth-password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-password-toggle .eye-closed {
    display: none;
}

.auth-password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.auth-password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.auth-field-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--auth-muted);
    font-size: 0.67rem;
    line-height: 1.4;
}

.auth-field-error {
    display: block;
    color: var(--auth-danger);
    font-size: 0.69rem;
    line-height: 1.4;
}

.auth-submit {
    width: 100%;
    height: 56px;
    margin-top: 4px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b65e5 0%, var(--auth-primary-dark) 100%);
    box-shadow: 0 13px 28px rgba(42, 77, 190, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 16px 34px rgba(42, 77, 190, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(49, 89, 217, 0.24);
    outline-offset: 3px;
}

.auth-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.auth-submit:hover svg {
    transform: translateX(3px);
}

.auth-submit.is-loading {
    cursor: wait;
    filter: saturate(0.7);
}

.auth-support {
    margin-top: 30px;
    padding-top: 22px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border-top: 1px solid #edf0f5;
}

.auth-support-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--auth-primary);
    background: #edf1ff;
}

.auth-support-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-support div {
    display: grid;
    gap: 3px;
    color: var(--auth-muted);
    font-size: 0.68rem;
    line-height: 1.45;
}

.auth-support strong {
    color: #485066;
    font-size: 0.71rem;
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    color: #a0a6b4;
    font-size: 0.65rem;
    font-weight: 600;
}

.auth-footer-security {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-footer-security svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #72a286;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: minmax(410px, 0.86fr) minmax(500px, 1.14fr);
    }

    .auth-visual {
        padding: 38px;
    }

    .auth-visual-copy {
        margin-top: 88px;
    }

    .auth-visual-copy h1 {
        font-size: clamp(2.8rem, 5vw, 4.4rem);
    }

    .auth-benefits {
        display: grid;
        justify-items: start;
    }

    .auth-visual-art {
        width: 76%;
        right: -76px;
    }
}

@media (max-width: 920px) {
    .auth-shell {
        display: block;
        background: var(--auth-surface);
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100svh;
        padding: 28px clamp(24px, 8vw, 72px) 26px;
    }

    .auth-brand-mobile {
        display: inline-flex;
    }

    .auth-form-wrap {
        padding-top: 36px;
    }
}

@media (max-width: 560px) {
    .auth-panel {
        padding: 22px 20px 20px;
    }

    .auth-panel-top {
        font-size: 0.7rem;
    }

    .auth-panel-top > span {
        display: none;
    }

    .auth-form-wrap {
        padding: 28px 0 34px;
    }

    .auth-brand-mobile {
        margin-bottom: 48px;
    }

    .auth-brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 12px;
    }

    .auth-form-heading {
        margin-bottom: 30px;
    }

    .auth-form-heading h2 {
        font-size: 2.05rem;
    }

    .auth-input-wrap input,
    .auth-submit {
        height: 54px;
    }

    .auth-field-meta {
        display: grid;
    }

    .auth-footer {
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: 9px;
    }
}

@media (max-height: 760px) and (min-width: 921px) {
    .auth-visual-copy {
        margin-top: 46px;
    }

    .auth-visual-copy h1 {
        font-size: clamp(2.7rem, 4.4vw, 4rem);
    }

    .auth-visual-copy > p {
        margin-top: 18px;
        line-height: 1.55;
    }

    .auth-benefits {
        margin-top: 18px;
    }

    .auth-form-wrap {
        padding: 36px 0 24px;
    }

    .auth-form-heading {
        margin-bottom: 24px;
    }

    .auth-support {
        margin-top: 22px;
        padding-top: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
