/* Auth forms layout */
.auth-page {
    padding: 24px 0 64px;
    font-family: "Inter", "Roboto", sans-serif, serif;
}

.auth-page__inner {
    display: flex;
    justify-content: center;
}

.auth-page__shell {
    width: 100%;
    max-width: 648px;
}

.auth-page__title {
    margin: 0 0 28px;
    text-align: center;
    font-size: 40px;
    line-height: 1.05;
    font-weight: 700;
    color: #101010;
}

.auth-page__links {
    justify-content: center;
    gap: 18px 28px;
    margin-top: 18px;
}

.auth-page__links .select-auth__item {
    margin-right: 0 !important;
}

.auth-page__links .nav-link {
    padding: 0;
    color: #8a8a8a;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.auth-page__links .nav-link:hover {
    color: var(--accent-red, #d30e17);
}

/* Auth forms shell */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form__switch {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 6px;
}

.auth-form__switch.type-recovery p {
    margin: 0;
    color: var(--accent-red, #d30e17);
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
}

.auth-form__switch-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.auth-form__switch.type-recovery span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
    border: 2px solid var(--accent-red, #d30e17);
    border-radius: 999px;
    background: #fff;
    color: var(--accent-red, #d30e17);
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form__switch.type-recovery span:hover {
    box-shadow: 0 10px 26px rgba(211, 14, 23, 0.12);
}

.auth-form__switch.type-recovery span.active {
    background: var(--accent-red, #d30e17);
    color: #fff;
    border-color: var(--accent-red, #d30e17);
}

.auth-form__switch.type-recovery span.active::after {
    opacity: 0;
}

.auth-form__field {
    margin: 0;
}

.auth-form__field .row {
    margin: 0;
    display: block;
}

.auth-form__field .row > [class*="col"] {
    padding: 0;
}

.auth-form__field .form-label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-form .form-control {
    width: 100%;
    min-height: 60px;
    padding: 18px 22px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #121212;
    font-size: 16px;
    line-height: 1.2;
    box-shadow: 0 10px 24px rgba(22, 27, 45, 0.08);
}

.auth-form .form-control::placeholder {
    color: #6f6f6f;
}

.auth-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(211, 14, 23, 0.14), 0 12px 28px rgba(22, 27, 45, 0.1);
}

.auth-form .invalid-feedback {
    margin: 0;
    color: var(--accent-red, #d30e17);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.auth-form__agreements {
    margin-top: -2px;
}

/* Auth agreements block */
.auth-page .eula {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-page .eula > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-page .eula input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    border: 1.5px solid var(--accent-red, #d30e17);
    border-radius: 4px;
    background: #fff;
    position: relative;
    cursor: pointer;
}

.auth-page .eula input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--accent-red, #d30e17);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-page .eula label {
    margin: 0;
    color: var(--accent-red, #d30e17);
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

.auth-page .eula a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Auth actions */
.auth-form__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.auth-form__button.btn,
.auth-form__button.btn_red {
    width: 100%;
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--accent-red, #d30e17);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    box-shadow: none;
}

.auth-form__button.btn:hover,
.auth-form__button.btn_red:hover {
    background: var(--accent-red-hover, #b40c14);
    color: #fff;
}

.auth-form__button.btn:disabled,
.auth-form__button.btn_red:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-form__actions .loader {
    display: none;
}

.auth-page .success {
    display: none;
    margin-top: 18px;
    text-align: center;
    color: #1f1f1f;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
}

.auth-page .success.active {
    display: block;
}

/* Auth forms responsive */
@media (max-width: 767px) {
    .auth-page {
        padding: 10px 18px 40px;
    }

    .auth-page__title {
        margin-bottom: 18px;
        font-size: 26px;
        line-height: 1.05;
    }

    .auth-form {
        gap: 12px;
    }

    .auth-form__switch {
        align-items: stretch;
        gap: 14px;
    }

    .auth-form__switch.type-recovery p {
        width: 100%;
        text-align: center;
        font-size: 18px;
    }

    .auth-form__switch-buttons {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }

    .auth-form__switch.type-recovery span {
        min-height: 50px;
        padding: 0 18px;
        font-size: 15px;
    }

    .auth-form .form-control {
        min-height: 56px;
        padding: 16px 18px;
        font-size: 15px;
    }

    .auth-page__links {
        gap: 14px 20px;
        margin-top: 16px;
    }

    .auth-page__links .nav-link,
    .auth-page .eula label {
        font-size: 14px;
    }
}
