/* Стили модального окна авторизации */

/* Оверлей модального окна */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.auth-modal-overlay.active {
    display: flex;
}

/* Контейнер модального окна */
.auth-modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Анимация появления */
.auth-modal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Анимация "тряски" при клике вне модального окна */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.auth-modal.shake {
    animation: shake 0.5s ease;
    /* Важно: не переопределяем transform здесь, чтобы не конфликтовать с show */
}

/* Заголовок модального окна */
.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.auth-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Вкладки */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: var(--secondary-color);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.auth-tab:first-child {
    border-right: 1px solid var(--border-color);
}

.auth-tab:hover {
    background: #e5e7eb;
}

.auth-tab.active {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Тело модального окна */
.auth-modal-body {
    padding: 24px;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.auth-field .form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.auth-field .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 42, 0.1);
}

/* Ряд полей в одну строку */
.auth-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-row-inline .auth-field:first-child {
    grid-column: 1;
}

.auth-row-inline .auth-field:last-child {
    grid-column: 2;
}

/* Кнопки */
.auth-form .btn {
    margin-top: 8px;
}

.btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-modal {
        max-width: 100%;
        margin: 10px;
    }

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

    .auth-row-inline .auth-field:last-child {
        grid-column: 1;
    }

    .auth-modal-body {
        padding: 20px;
    }

    .auth-field .form-input {
        padding: 10px 12px;
    }
}

/* ========== Кликабельная информация менеджера ========== */

/* Кликабельный блок информации о менеджере */
.manager-modal-user-info {
    cursor: pointer;
    padding: 12px 16px;
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    transition: all var(--transition-fast);
}

.manager-modal-user-info:hover {
    background: #e5e7eb;
    border-color: var(--primary-color);
}

.manager-modal-user-phone {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
    display: block;
}

/* ========== Модальное окно редактирования профиля менеджера ========== */

/* Оверлей */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
}

.profile-modal-overlay.active {
    display: flex;
}

/* Контейнер */
.profile-modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: profileModalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes profileModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Заголовок */
.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.profile-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Тело */
.profile-modal-body {
    padding: 24px;
    max-height: 450px;
    overflow-y: auto;
}

/* Стилизация скроллбара */
.profile-modal-body::-webkit-scrollbar {
    width: 8px;
}

.profile-modal-body::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-radius: 4px;
}

.profile-modal-body::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

.profile-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Форма профиля */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.profile-field .form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.profile-field .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 42, 0.1);
}

.profile-field .form-input:disabled {
    background: var(--secondary-color);
    color: var(--text-light);
    cursor: not-allowed;
}

/* Кнопка проверки Telegram - выравнивание по высоте с input */
.profile-field #btn-validate-telegram {
    padding: 12px 16px;
    height: auto;
}

/* Группа ввода Telegram */
.telegram-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.telegram-input-group .form-input {
    flex: 1;
}

.telegram-input-group .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ссылка на Telegram бота */
.telegram-bot-link {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
    transition: all var(--transition-fast);
}

.telegram-bot-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
    background-color: rgba(26, 95, 42, 0.05);
}

/* Информационная строка (ID пользователя) */
.profile-info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.profile-info-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-value {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Футер с кнопками */
.profile-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--secondary-color);
}

.profile-modal-footer .btn {
    min-width: 120px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .profile-modal {
        max-width: 100%;
        margin: 10px;
    }

    .profile-modal-body {
        padding: 20px;
    }

    .profile-field .form-input {
        padding: 10px 12px;
    }

    /* Telegram поле - вертикальное расположение в мобильном режиме */
    .telegram-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .telegram-input-group .form-input {
        width: 100%;
    }

    .telegram-input-group .btn {
        width: 100%;
        padding: 10px 16px;
    }

    .profile-modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .profile-modal-footer .btn {
        width: 100%;
    }
}

/* ========== Диалог выбора SIM-карты ========== */

/* Оверлей диалога */
.sim-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 20px;
}

.sim-dialog-overlay.active {
    opacity: 1;
}

/* Контейнер диалога */
.sim-dialog {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.sim-dialog-overlay.active .sim-dialog {
    transform: scale(1);
}

/* Заголовок диалога */
.sim-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary-color);
    color: white;
}

.sim-dialog-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.sim-dialog-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sim-dialog-close:hover {
    opacity: 1;
}

/* Тело диалога */
.sim-dialog-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Кнопка выбора SIM */
.sim-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--secondary-color);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.sim-option:hover {
    background: #e5e7eb;
    border-color: var(--primary-light);
}

.sim-option:active {
    transform: scale(0.98);
}

/* Иконка SIM */
.sim-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sim-icon-work {
    background: var(--accent-color);
}

/* Информация о SIM */
.sim-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sim-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.sim-number {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

/* Адаптивность */
@media (max-width: 400px) {
    .sim-dialog {
        max-width: 100%;
        margin: 10px;
    }

    .sim-option {
        padding: 12px 14px;
    }

    .sim-icon {
        width: 40px;
        height: 40px;
    }
}

/* ========== Редактор визиток ========== */

.business-card-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.business-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.business-card-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}


/* ========== Кнопка удаления профиля ========== */

.btn-delete-profile {
    width: 100%;
    margin-top: 16px;
    background: #dc2626;
    color: white;
    border: none;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-delete-profile:hover {
    background: #b91c1c;
}

.btn-delete-profile:active {
    transform: scale(0.98);
}


/* ========== Стили текстового поля визитки ========== */




