.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 14%, rgba(129, 79, 216, 0.16), transparent 24%),
        radial-gradient(circle at 84% 12%, rgba(112, 93, 144, 0.14), transparent 28%),
        linear-gradient(180deg, #07040b 0%, #0d0914 100%);
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-page::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
}

.auth-page::after {
    background:
        radial-gradient(circle at center, rgba(129, 79, 216, 0.1), transparent 34%),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 58%);
    opacity: 0.7;
}

.auth-main {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 122px 0 56px;
}

.auth-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.auth-page-register .auth-shell {
    align-items: start;
}

.auth-card,
.auth-aside {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(180deg, rgba(20, 16, 28, 0.94), rgba(12, 9, 17, 0.96)),
        rgba(12, 9, 17, 0.96);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
}

.auth-card::before,
.auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(129, 79, 216, 0.1), transparent 36%);
}

.auth-card > *,
.auth-aside > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    padding: 30px;
}

.auth-card-header {
    margin-bottom: 26px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(129, 79, 216, 0.34);
    background: rgba(129, 79, 216, 0.12);
    color: #c5a4ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-title {
    margin-top: 18px;
    font-family: "Sora", sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.auth-text {
    margin-top: 12px;
    color: #c0b9cc;
    line-height: 1.65;
}

.auth-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.auth-chip,
.auth-ip-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.auth-chip {
    color: #ded9e8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-ip-chip {
    color: #0f0029;
    background: linear-gradient(135deg, #ab83ef 0%, #814fd8 100%);
}

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

.form-grid {
    display: grid;
    gap: 14px;
}

.form-row-two {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: #f1eef7;
}

.form-caption {
    color: #988ea9;
    font-size: 12px;
    line-height: 1.5;
}

.form-input {
    width: 100%;
    min-height: 54px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #f0edf6;
    font: inherit;
    padding: 14px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input::placeholder {
    color: #827795;
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(129, 79, 216, 0.66);
    box-shadow: 0 0 0 4px rgba(129, 79, 216, 0.12);
}

.form-input.is-valid {
    border-color: rgba(46, 204, 113, 0.56);
}

.form-input.is-invalid {
    border-color: rgba(255, 92, 88, 0.58);
}

.password-field {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    min-width: 88px;
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f0edf6;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    border-color: rgba(129, 79, 216, 0.48);
    background: rgba(255, 255, 255, 0.08);
}

.field-hint {
    min-height: 16px;
    color: #8a7f9c;
    font-size: 12px;
    line-height: 1.45;
}

.field-hint[data-state="valid"] {
    color: #84d5a7;
}

.field-hint[data-state="invalid"] {
    color: #ff9490;
}

.form-message {
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    font-size: 14px;
    line-height: 1.6;
}

.form-message[data-type="error"] {
    color: #ffd2d0;
    border-color: rgba(255, 92, 88, 0.42);
    background: rgba(255, 92, 88, 0.12);
}

.form-message[data-type="success"] {
    color: #dbffe8;
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(46, 204, 113, 0.12);
}

.auth-consent {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(129, 79, 216, 0.26);
    background: rgba(129, 79, 216, 0.08);
    color: #d8d0e5;
    font-size: 13px;
    line-height: 1.55;
}

.auth-consent input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #9b6cf0;
}

.auth-consent a {
    color: #c5a4ff;
    font-weight: 800;
}

.auth-consent a:hover {
    color: #e6d8ff;
}

.auth-submit {
    width: 100%;
    min-height: 56px;
    border: none;
}

.auth-submit:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.auth-link {
    color: #c5a4ff;
    font-weight: 700;
}

.auth-link:hover {
    color: #e6d8ff;
}

.auth-legal {
    color: #968ca8;
    font-size: 12px;
    line-height: 1.6;
}

.auth-aside {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.auth-page-register .auth-aside {
    justify-content: flex-start;
    gap: 18px;
}

.auth-aside-hero {
    display: grid;
    gap: 18px;
}

.auth-aside-title {
    font-family: "Sora", sans-serif;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.auth-page-register .auth-aside-title {
    font-size: clamp(24px, 3vw, 32px);
}

.auth-aside-text {
    color: #cac3d6;
    line-height: 1.66;
    max-width: 540px;
}

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

.auth-page-register .auth-feature-grid {
    grid-template-columns: 1fr;
}

.auth-feature-card {
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.auth-feature-label {
    display: block;
    color: #988eaa;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-feature-value {
    color: #f5f2fa;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
}

.auth-points {
    list-style: none;
    display: grid;
    gap: 12px;
}

.auth-points li {
    position: relative;
    padding-left: 18px;
    color: #ded8e8;
    line-height: 1.68;
}

.auth-points li::before {
    content: "";
    position: absolute;
    top: 0.7em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ab83ef;
    box-shadow: 0 0 10px rgba(171, 131, 239, 0.35);
}

.auth-note,
.auth-support {
    border-radius: 20px;
    padding: 16px 18px;
}

.auth-note {
    border: 1px solid rgba(129, 79, 216, 0.26);
    background: rgba(129, 79, 216, 0.08);
    color: #d1b7ff;
    line-height: 1.66;
}

.auth-support {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.auth-support-title {
    font-family: "Sora", sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
}

.auth-support-text {
    color: #bfb8cb;
    line-height: 1.7;
}

.auth-support-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    justify-content: flex-start;
}

.auth-support-actions .btn {
    min-height: 46px;
    padding: 12px 18px;
    min-width: 200px;
    justify-content: center;
}

.auth-page-register .auth-legal {
    margin-top: 2px;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
}

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

    .auth-wrap {
        padding: 0 16px;
    }

    .auth-card,
    .auth-aside {
        padding: 24px 20px;
        border-radius: 22px;
    }

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

    .auth-links {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .auth-context,
    .auth-support-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-chip,
    .auth-ip-chip,
    .auth-support-actions .btn,
    .auth-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page::before,
    .auth-page::after {
        transition: none;
    }
}
