.auth-page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% 18%, rgba(109, 60, 232, 0.11), transparent 27%),
        radial-gradient(circle at 90% 78%, rgba(217, 50, 128, 0.07), transparent 25%),
        #f8f7fc;
}

.auth-header {
    background: transparent;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #596377;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--purple);
}

.back-link span {
    font-size: 18px;
}

.auth-main {
    display: flex;
    flex: 1;
    align-items: center;
    padding: 46px 0 70px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.88fr) minmax(440px, 1.12fr);
    gap: clamp(64px, 9vw, 128px);
    align-items: center;
}

.auth-card {
    padding: clamp(31px, 4vw, 47px);
    border: 1px solid rgba(109, 60, 232, 0.11);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
}

.auth-card h1,
.auth-context h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.13;
}

.auth-card h1 {
    font-size: clamp(34px, 4vw, 47px);
}

.auth-intro {
    margin: 13px 0 30px;
    color: var(--muted);
    font-size: 14px;
}

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

.auth-main-plus {
    align-items: flex-start;
    padding-top: 30px;
}

.auth-layout-plus {
    grid-template-columns: minmax(680px, 1.45fr) minmax(320px, .55fr);
    gap: clamp(42px, 5vw, 76px);
    align-items: start;
}

.auth-card-plus {
    padding: clamp(28px, 3vw, 40px);
}

.auth-form-plus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.account-fields {
    display: grid;
    gap: 20px;
}

.plus-form-panel {
    display: grid;
    gap: 18px;
    min-width: 0;
    padding: 22px;
    border: 1px solid #e2def0;
    border-radius: 17px;
    background: #fbfaff;
}

.plus-account-panel {
    grid-column: 1;
    grid-row: 1;
}

.plus-order-panel {
    grid-column: 2;
    grid-row: 1;
}

.form-panel-heading {
    display: flex;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e1f0;
}

.form-panel-heading div {
    display: grid;
    gap: 2px;
}

.form-panel-heading strong {
    color: var(--ink);
    font-size: 15px;
}

.form-panel-heading small {
    color: #858d9c;
    font-size: 10px;
}

.auth-form-plus .auth-submit {
    grid-column: 1 / -1;
    width: min(100%, 360px);
    justify-self: end;
}

.billing-fields {
    display: grid;
    gap: 18px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.form-section-heading {
    display: grid;
    gap: 4px;
}

.form-section-heading strong {
    color: var(--ink);
    font-size: 16px;
}

.form-section-heading span,
.optional-label {
    color: #858d9c;
    font-size: 11px;
    font-weight: 500;
}

.billing-company-fields,
.auth-address-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-address-fields {
    grid-template-columns: minmax(0, 1.4fr) minmax(90px, .7fr) minmax(70px, .45fr);
}

.billing-company-fields[hidden] {
    display: none;
}

.form-field label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 55px;
    margin-top: 7px;
    padding: 0 16px;
    border: 1.5px solid #cfd4df;
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field select {
    cursor: pointer;
}

.form-field input::placeholder {
    color: #a0a7b4;
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(109, 60, 232, 0.11);
}

.field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.field-heading a {
    color: var(--purple-dark);
    font-size: 11px;
    font-weight: 600;
    text-underline-offset: 3px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 88px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 15px;
    height: 39px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: #5f6879;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--purple);
    background: var(--purple-pale);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 1px;
}

.auth-submit {
    width: 100%;
    min-height: 56px;
    margin-top: 5px;
    font-size: 15px;
}

.auth-submit span {
    font-size: 20px;
}

.auth-note {
    margin: 24px 0 0;
    color: #858d9c;
    font-size: 11px;
    text-align: center;
}

.auth-note a {
    color: var(--purple-dark);
    font-weight: 600;
    text-underline-offset: 3px;
}

.legal-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #667085;
    font-size: 11px;
    line-height: 1.55;
}

.legal-consent input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--purple);
}

.legal-consent a,
.auth-legal-footer a {
    color: var(--purple-dark);
    font-weight: 650;
    text-underline-offset: 3px;
}

.auth-form-plus .legal-consent {
    grid-column: 1 / -1;
    justify-self: end;
    max-width: 570px;
}

.auth-legal-footer p {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
}

.auth-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #f3b9c4;
    border-radius: 10px;
    color: #9f1933;
    background: #fff1f3;
    font-size: 13px;
}

.auth-name-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field-help {
    display: block;
    margin-top: 5px;
    color: #858d9c;
    font-size: 10px;
}

.free-plan-card {
    width: min(100%, 480px);
    margin-top: 35px;
    padding: 27px 30px;
    border: 1px solid #ded8f4;
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 18px 38px rgba(41, 34, 71, .08);
}

.free-plan-card strong {
    color: var(--purple);
    font-size: 18px;
}

.free-plan-card ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.free-plan-card li::before {
    margin-right: 10px;
    color: var(--purple);
    content: "✓";
    font-weight: 800;
}

.auth-context {
    max-width: 590px;
}

.auth-context h2 {
    max-width: 580px;
    font-size: clamp(38px, 5vw, 62px);
}

.auth-context > p {
    max-width: 560px;
    margin: 22px 0 0;
    color: #626c7d;
    font-size: 16px;
}

.context-preview {
    width: min(100%, 500px);
    margin-top: 38px;
    padding: 23px;
    border: 1px solid rgba(91, 74, 150, 0.13);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 18px 38px rgba(41, 34, 71, 0.08);
    transform: rotate(-1deg);
}

.context-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
    color: #6d7687;
    font-size: 11px;
    font-weight: 600;
}

.context-header strong {
    color: var(--purple);
}

.context-result {
    display: grid;
    grid-template-columns: 28px 1fr 60px;
    gap: 11px;
    align-items: center;
    padding: 9px 0;
    border-top: 1px solid #e7e8ee;
}

.result-place {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--purple);
    font-size: 10px;
    font-weight: 800;
}

.context-result:nth-child(3) .result-place {
    color: #645a7f;
    background: #ddd7ef;
}

.result-name,
.result-score {
    height: 8px;
    border-radius: 5px;
    background: #d4d7df;
}

.result-name {
    width: 70%;
}

.result-name-short {
    width: 55%;
}

.result-score {
    background: #c7bce9;
}

.result-score-short {
    width: 80%;
}

.context-chart {
    display: flex;
    height: 70px;
    align-items: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding: 0 8px;
    border-bottom: 1px solid #dfe1e8;
}

.context-chart i {
    flex: 1;
    border-radius: 5px 5px 0 0;
    background: #b8a7ed;
}

.context-chart .chart-bar-1 {
    height: 43%;
}

.context-chart .chart-bar-2 {
    height: 68%;
}

.context-chart .chart-bar-3 {
    height: 52%;
}

.context-chart .chart-bar-4 {
    height: 84%;
}

.context-chart .chart-bar-5 {
    height: 71%;
}

.context-chart i:nth-child(2),
.context-chart i:nth-child(4) {
    background: var(--purple);
}

.context-chart i:nth-child(5) {
    background: var(--pink);
}

.context-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 24px;
    color: #5d6678;
    font-size: 11px;
    font-weight: 600;
}

.context-facts span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.context-facts span::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pink);
    content: "";
}

.auth-footer {
    color: #8b92a0;
    font-size: 11px;
}

.auth-footer p {
    margin: 0;
    padding: 0 0 25px;
}

@media (max-width: 1150px) {
    .auth-layout-plus {
        grid-template-columns: 1fr;
    }

    .auth-layout-plus .auth-card {
        width: 100%;
    }

    .auth-layout-plus .auth-context {
        display: none;
    }
}

@media (max-width: 900px) {
    .auth-main {
        padding-top: 30px;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 64px;
    }

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

    .auth-layout-plus .auth-card {
        width: 100%;
    }

    .auth-layout-plus {
        grid-template-columns: 1fr;
    }

    .auth-context {
        margin: 0 auto;
        text-align: center;
    }

    .context-preview {
        margin-right: auto;
        margin-left: auto;
    }

    .context-facts {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .auth-main {
        padding: 22px 0 54px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .auth-name-fields {
        grid-template-columns: 1fr;
    }

    .auth-form-plus {
        grid-template-columns: 1fr;
    }

    .plus-account-panel,
    .plus-order-panel {
        grid-column: 1;
    }

    .plus-account-panel {
        grid-row: 1;
    }

    .plus-order-panel {
        grid-row: 2;
    }

    .auth-form-plus .auth-submit {
        grid-column: 1;
        justify-self: stretch;
    }

    .billing-company-fields,
    .auth-address-fields {
        grid-template-columns: 1fr;
    }

    .auth-context {
        text-align: left;
    }

    .context-preview {
        transform: none;
    }

    .context-facts {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .password-toggle,
    .form-field input,
    .form-field select {
        transition: none;
    }
}
