/* ========= МОДАЛКА ========= */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.auth-modal._active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.auth-modal__container {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 512px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9999;
}

/* ========= ХЕДЕР ========= */

.auth-modal__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding: 30px 40px 20px;
    position: relative;
}

.auth-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.auth-modal__status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.auth-modal__status-icon  svg circle{
     fill: rgb(24, 165, 58);
}
.auth-modal__status-icon  svg path{
    fill: rgb(24, 165, 58);
}


.auth-modal__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #000000;
}

.auth-modal__back {
    border: none;
    background: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px 0 0;
    flex-shrink: 0;
}

.auth-modal__back:hover {
    color: #111827;
}

.auth-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #CDCDCD;
    transition: color 0.2s;
    position: absolute;
    right: 10px;
    top: 10px;
}

.auth-modal__close .icon-close {
    width: 35px;
    height: 35px;
}

.auth-modal__close:hover {
    color: #111827;
}

.auth-modal__body {
    padding: 0 40px 30px;
}

/* ========= БАЗОВЫЕ ЭЛЕМЕНТЫ ФОРМЫ ========= */

.auth-form__field {
    margin-bottom: 10px;
}

.auth-form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.auth-form__input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #CDCDCD;
    border-radius: 5px;
    font-size: 14px;
    color: #000000;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}


.auth-form__input::placeholder {
    color: #9ca3af;
}

/* Красная рамка вместо текстовой ошибки */
.auth-form__input._error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.auth-form__checkbox._error {
    outline: 2px solid #ef4444;
    border-radius: 4px;
}

/* Любые текстовые ошибки скрываем, чтобы не двигали вёрстку */
.auth-form__error {
    display: none !important;
}

/* Чекбоксы */

.auth-form__checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.auth-form__checkbox-input {
    margin-right: 8px;
    margin-top: 2px;
    cursor: pointer;
}

.auth-form__checkbox-text {
    font-size: 14px;
    color: #000;
    line-height: 1.5;
}

/* Ряды / сетка */

.auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.auth-form__row--2col {
    display: flex;
    gap: 12px;
}

.auth-form__row--2col .auth-form__field {
    flex: 1;
}

/* Телефон + код — 50/50 */

.auth-form__row--code {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.auth-form__field--grow {
    flex: 1;
}

.auth-form__field--code {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: center;
}

/* Ссылки */

.auth-form__link {
    font-size: 14px;
    color: #5D80BC;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-modal__container .error-text{
    padding-top: 20px;
    color: red;
}
.auth-form__link:hover {
    color: #5D80BC;
}

.auth-form__link--small {
    font-size: 13px;
}

/* Стрелка назад */

.icon-arrow {
    width: 19px;
    height: 19px;
    display: inline-block;
    flex-shrink: 0;
}

.icon-arrow path {
    fill: #CDCDCD;
    transition: fill 0.2s ease;
}

.icon-arrow:hover path {
    fill: #9E9E9E;
}

/* Кнопка основная */

.auth-form__button {
    padding: 10px 16px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    background: #5D80BC;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.auth-form__button:hover {
    background: #5D80BC;
}

.auth-form__button:active {
    background: #1e40af;
}

/* Шаги */

.auth-step {
    display: none;
}

.auth-step._active {
    display: block;
}

/* Текст "Для входа..." */

.auth-form__text {
    font-size: 14px;
    color: #000;
    margin: 0 0 20px;
    width: 82%;
}

/* Email + "Изменить" */

.auth-email-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    font-size: 14px;
}

.auth-email-row__value {
    font-weight: 600;
    color: #111827;
    word-break: break-all;
}

/* Телефон и статус */

.auth-phone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.auth-phone__input {
    flex: 1;
}

.auth-phone__status {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.auth-phone__status._success {
    color: #18A53A;
    font-weight: 500;
}

/* Кнопка / поле кода */

.auth-form__code-btn {
    white-space: nowrap;
    padding: 8px 0;
    border: none;
    background: none;
    font-size: 14px;
    color: #5D80BC;
    cursor: pointer;
}

.auth-form__code-btn:hover {
    color: #5D80BC;
}
.auth-inn-suggestions__name {
    font-weight: 600;
    margin-bottom: 2px;
}

.auth-inn-suggestions__line {
    font-size: 12px;
    color: #6b7280;
}
.auth-form__checkbox-text  a{
    color: #5D80BC;
}
.auth-form__code-input {
    margin-top: 4px;
}

/* Пароль + глаз */

.auth-password {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password__input {
    width: 100%;
    padding-right: 40px;
}

.auth-password__toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: #6b7280;
}

.auth-password__toggle::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('/local/templates/main/img/icon-hide .png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.auth-password__toggle._visible::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('/local/templates/main/img/icon-hide-eye.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Таймер SMS */

.auth-form__sms-timer {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

/* Подсказки по ИНН */

.auth-inn-suggestions {
    margin-top: 4px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    max-height: 220px;
    overflow-y: auto;
    font-size: 13px;
    z-index: 1000;
}

.auth-inn-suggestions__item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.auth-inn-suggestions__item:last-child {
    border-bottom: none;
}

.auth-inn-suggestions__item:hover {
    background: #f3f4f6;
}

/* Блок компании */

.company-section {
    margin-top: 10px;
}

.company-info{
    margin-bottom: 10px;
}
.company-info p {
    margin: 2px 0;
}
/* Информационный блок под ИНН */
.auth-inn-hint {
    margin-top: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 10px;
    line-height: 1.4;
    color: #6b7280;
}

.auth-inn-hint__icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    border: 1px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
}

.auth-inn-hint__text {
    flex: 1;
}
/* Статус в шаге "Письмо отправлено" */

.auth-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-status__icon {
    margin-top: 3px;
}

.auth-status__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-status__text {
    margin: 0;
    font-size: 14px;
    color: #000000;
}

.auth-status__hint {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

/* Адаптив */
.bnt_40 {
    width: 40%;
}
.auth-form__checkbox-desc {
    display: block;
    font-size: 10px;
    color: #00000099;
}

.company-info__item + .company-info__item {
    margin-top: 10px;
}

.company-info__label {
    font-size: 11px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
    color: #9CA3AF;
    margin-bottom: 2px;
}

.company-info__value {
    font-size: 13px;
    line-height: 1.4;
    color: #000;
}
.auth-modal__container .parsley-errors-list{
    display: none;
}
.company-info__value--name {
    font-weight: 600;
}

.company-info__edit {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
}

/* чтобы ссылка выглядела как на макете */
.company-info__edit {
    font-size: 13px;
}
@media (max-width: 600px) {
    .auth-modal__container{
        width: 95%;
    }
    .auth-modal__header,
    .auth-modal__body {
        padding: 20px 16px;
    }
    .auth-modal__header{
        padding-bottom: 0px;
    }
    .bnt_40 {
        width: 100%;
    }
}
