/* Общие стили */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400; /* Regular */
  src: url('/static/fonts/poppins/Poppins-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  font-style: normal;
  src: url('/static/fonts/poppins/Poppins-Bold.ttf') format('truetype');
}

/* Подключение шрифта Inter */
/* Обычный стиль (Regular) */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-Regular.woff2') format('woff2'),
         url('/static/fonts/inter/Inter-Regular.woff') format('woff'),
         url('/static/fonts/inter/Inter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Полужирный стиль (Bold) */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-Bold.woff2') format('woff2'),
         url('/static/fonts/inter/Inter-Bold.woff') format('woff'),
         url('/static/fonts/inter/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Курсив (Italic) */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-Italic.woff2') format('woff2'),
         url('/static/fonts/inter/Inter-Italic.woff') format('woff'),
         url('/static/fonts/inter/Inter-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

/* Полужирный курсив (Bold Italic) */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter/Inter-BoldItalic.woff2') format('woff2'),
         url('/static/fonts/inter/Inter-BoldItalic.woff') format('woff'),
         url('/static/fonts/inter/Inter-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* ДЛЯ АДМИНИСТРАТИВНОГО ИНТЕРФЕЙСА СТАТИСТИКИ */

.hidden {
    display: none;
}

#admin-message-box {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8); /* Цвет фона сообщения */
    color: white; /* Цвет текста */
    border: 5px solid #ff0000; /* Красная рамка */
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    z-index: 9997; /* z-index исправлен на более высокое значение */
    text-align: center;
    width: 80%;
    max-width: 500px;
    word-wrap: break-word;
    animation: fadeIn 1s ease-in-out;
    display: none; /* Скрываем по умолчанию */
}

/* ОБЩИЕ СТИЛИ */
body {
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.1;
    color: #333;
    background-color: #f7f7f7;
    margin: 5px;
    padding: 5px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overscroll-behavior-y: none; /* Запрещает pull-to-refresh и растягивание контента */
}

.fixed-header {
    position: fixed;
    top: 0;
    /*left: 0;
    right: 0; /* Добавлено для обеспечения полной ширины */
    width: 100%;
    background-color: white;
    z-index: 1002;
    padding-bottom: 10px;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    box-sizing: border-box;
    
}

.scanner-container p {
    font-size: 12px;
    text-align: center;
    color: #333;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 4px;
}

.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 10px 0 10px;
    /*width: 100%;*/
    box-sizing: border-box;
    gap: 10px;
}

.filter-input {
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 150px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-size: 18px;
}

.content {
    margin-top: -50px;
}

/* Стили для контейнера выбора даты */
.filter-container .date-picker-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px;
    border: 2px solid #007BFF;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    gap: 5px; /* Добавлен gap для управления пространством между элементами */
}

.filter-container .date-picker-block label {
    margin-right: 10px; /* Отступ справа от метки для поля ввода */
}

.filter-container .date-picker-block #preset-select {
    padding: 2px;
    margin: 0px 2px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 18px;
    background-color: #f9f9f9;
    cursor: pointer;
}



.filter-container .date-picker-block #selected-period {
    font-size: 16px; /* Установите нужный размер шрифта */
}

/* Отзывчивость */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
    }

    .filter-container .date-picker-block {
        flex-direction: column;
        padding: 5px;
        width: 100%; /* Полная ширина на маленьких экранах */
    }

    .filter-container .filter-input {
        width: 100%; /* Полная ширина на маленьких экранах */
        max-width: none;
    }
}

.refresh-area {
    overscroll-behavior-y: auto;
}

/* Не разрешаем pull-to-refresh в области шапки (где бургер) */
.fixed-header.refresh-area {
  overscroll-behavior-y: none;
}

.cell {
    -webkit-tap-highlight-color: transparent; /* Прозрачный цвет подсветки при клике */
}

h2 {
    color: #444;
    margin-top: 2px;
    margin-bottom: 2px;
    text-align: center;
    font-size: medium;
}

/* Основные стили для заголовков h3 и h4 */
h3 {
    font-size: 1.5em; /* Размер шрифта для h3 */
    font-weight: bold; /* Жирный шрифт */
    color: #333; /* Цвет текста */
    margin-bottom: -24px;
    margin-top: 1px;
}

h4 {
    font-size: 1.2em; /* Размер шрифта для h4 */
    font-weight: normal; /* Обычный вес шрифта */
    color: #666; /* Цвет текста */
    margin-bottom: 8px; /* Отступ снизу */
}

/* Основные стили для заголовка h5 */
h5 {
    font-size: 1em; /* Размер шрифта для h5 */
    font-weight: normal; /* Обычный вес шрифта */
    color: #999; /* Цвет текста */
    margin-bottom: 4px; /* Отступ снизу */
    margin-top: 0; /* Отсутствие отступа сверху */
}

/* Стили для статуса онлайн и офлайн */

.network-status {
    font-size: 12px;
    display: flex;
    align-items: center;
}

.indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Добавление тени */
}

.indicator.online {
    background-color: #5cb85c; /* Зеленый цвет для онлайн */
}

.indicator.offline {
    background-color: red; /* Красный цвет для офлайн */
}

/* Стили для кнопок */

.action-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 4px;
    gap: 15px;
}

button {
    background-color: #5cb85c;
    color: white;
    font-size: larger;
    padding: 4px 6px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    /* Дополнительные стили для визуального отображения отключенной кнопки */
}

.upload-button {
    width: 35px; /* Устанавливает ширину кнопки */
    height: 35px; /* Устанавливает высоту кнопки для квадратного вида */
    display: flex; /* Использует flexbox для центрирования текста */
    align-items: center; /* Центрирует текст вертикально */
    justify-content: center; /* Центрирует текст горизонтально */
    background-color: #007bff; /* Цвет фона кнопки */
    color: white; /* Цвет текста */
    border: none; /* Убирает рамку */
    border-radius: 5px; /* Добавляет округлые углы */
    cursor: pointer; /* Изменяет курсор на указатель при наведении */
    transform: rotate(-10deg); /* Поворачивает текст под углом */
    font-size: 10px; /* Уменьшает размер текста */
    padding: 0; /* Убирает внутренние отступы */
    overflow: hidden; /* Убирает текст, выходящий за пределы кнопки */
}

.upload-button:hover {
    background-color: #0056b3; /* Цвет кнопки при наведении */
}

.image-modal-update {
    position: absolute; /* Абсолютное позиционирование для размещения рядом с крестиком */
    top: 20px; /* Выравнивание по высоте с крестиком */
    right: 80px; /* Смещение влево от крестика */
    width: 70px; /* Установите ширину кнопки */
    height: 35px; /* Установите высоту кнопки для квадратного вида */
    display: flex; /* Используем flexbox для центрирования текста */
    align-items: center; /* Центрируем текст вертикально */
    justify-content: center; /* Центрируем текст горизонтально */
    background-color: #007bff; /* Цвет фона кнопки */
    color: white; /* Цвет текста */
    border: none; /* Убираем рамку */
    border-radius: 5px; /* Добавляем округлые углы */
    cursor: pointer; /* Изменяем курсор на указатель при наведении */
    font-size: 12px; /* Размер текста */
    padding: 0; /* Убираем внутренние отступы */
    z-index: 1002; /* Выше других элементов */
    transition: background-color 0.3s; /* Плавный переход для фона */
}

.image-modal-update:hover {
    background-color: #0056b3; /* Цвет кнопки при наведении */
}


/* Стили для контейнера кнопки submit */
.submit-container {
    width: 100%; /* Задаёт ширину контейнера кнопки */
    display: flex;
    justify-content: center; /* Выравнивает содержимое по центру */
    margin-top: 20px; /* Небольшой отступ сверху для визуального разделения */
}

.changeStatusButton:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.openDocumentButton {
    background-color: #5cb85c;
    color: white;
    font-size: larger;
    padding: 4px 6px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.openDocumentButton:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

#scrollToTopButton {
    position: fixed;
    top: 240px;
    right: 20px;
    display: none;
    background-color: rgb(0 123 255 / 64%);
    color: white;
    border: none;
    padding: 2px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 45px;
    outline: none; /* Отключаем выделение контура */
}

#scrollToTopButton:hover {
    background-color: rgb(0 123 255 / 64%);
}

#scrollToTopButton:focus {
    outline: none; /* Убираем фокусную рамку при клике */
    box-shadow: none; /* Убираем тень, если она есть */
}

/* Стили для формы логина */
.login-form-container {
    width: 100%;
    max-width: 320px;
    margin-top: 50px;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-input{
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-submit {
    width: 50%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-sizing: border-box;
    color: white;
    background-color: #5cb85c;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.login-input {
    border: 1px solid #ddd;
}

.login-submit:hover {
    background-color: #4cae4c;
}

.register-link {
    text-align: center;
    margin-top: -10px;
    font-size: 18px;
    color: #666;
}

.register-link p {
    margin: 10px 0;
}

.register-link a {
    color: #007BFF;
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}

.register-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}


/*СТИЛИ ДЛЯ ФИЛЬТРА ПО ЯЧЕЙКАМ ЖУРНАЛА*/

.active-filters-container {
    display: flex;
    margin-top: 140px;
    margin-bottom: 40px;
    font-size: 12px;
    flex-direction: row;
    flex-wrap: wrap;
}
    
.filter-tag {
    display: inline-flex;
    align-items: center;
    margin: 5px;
    padding: 5px 10px;
    background-color: #eee;
    border-radius: 5px;
}

.filter-tag span {
    margin-right: 5px;
}

.filter-tag .remove-filter {
    cursor: pointer;
    color: red;
}

/* Добавленный стиль для отмеченных ячеек */
.filtered {
    background-color: #d3f3d3; /* светло-зеленый цвет для выделения */
    border: 1px solid #a3d1a3; /* зеленая рамка */
    border-radius: 4px; /* скругленные углы */
}

.status-dropdown {
    position: fixed;
    top: 33%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 2px solid #ccc;
    padding: 10px;
    z-index: 1000;
    width: 250px; /* Ширина окна */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Более выраженная тень */
    border-radius: 10px; /* Закругленные углы */
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.1;
    background-color: rgba(255, 255, 255, 0.95); /* Прозрачный белый фон */
}

.status-dropdown-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 1px;
    text-align: center;
    color: #333; /* Цвет заголовка */
}

.status-option {
    padding: 10px 15px;
    margin: 1px 0;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s;
    line-height: 0.8;
}

.status-option:hover {
    background-color: #f0f0f0;
}

.status-option.selected {
    background-color: #e0e0e0;
    font-weight: bold;
}

.status-option input {
    margin-right: 10px;
}

.status-dropdown-footer {
    text-align: center;
    margin-top: 15px;
}

/* Стиль для крестика закрытия */
.status-dropdown .close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    cursor: pointer;
    font-size: 25px;
    font-weight: bold;
    color: #888;
    transition: color 0.3s;
}

.status-dropdown .close-btn:hover {
    color: #333;
}


/* Стили для уведомления */
.notification-modal {
    position: fixed;
    top: 10px;
    /* left: 50%; */
    /* transform: translateX(-50%); */
    width: auto;
    max-width: 90%;
    /* padding: 15px 20px; */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #333;
    font-size: 16px;
    z-index: 1011;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification-content {
    background-color: white; /* Базовый цвет, будет изменён JS */
    padding: 15px 20px; /* Поля внутри уведомления */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Тень */
    text-align: center; /* Центрирование текста */
    /*width: 100%; /* Полная ширина уведомления */
    max-width: 600px; /* Максимальная ширина */
    /*margin: 0px auto; /* Вертикальные отступы и центрирование */
    color: #333; /* Цвет текста */
    font-size: 16px; /* Размер шрифта */
}

.notification-content p {
    margin: 0;
    color: #333;
    font-size: 20px;
}

/* Дополнительные стили для уведомлений типа warning 
.notification-modal.warning .notification-content {
    border: 2px solid red; /* Красная окантовка 
    color: red; /* Красный цвет текста 
}
*/

/* Стили для специальных предупреждений, привязанных к полю ввода */
.input-warning {
    position: absolute;
    background-color: white;
    border: 2px solid red;
    padding: 2px 5px; /* Уменьшаем отступы сверху и снизу */
    border-radius: 5px;
    color: red;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.input-warning-content {
    margin: 0;
    color: black;
    font-size: 12px;
    /*line-height: 1.2; /* Уменьшаем межстрочное расстояние */
    word-break: break-word; /* Перенос длинного текста */
    text-align: left; /* Выравнивание текста по левому краю */
    font-weight: bold;
}


/* Ключевые кадры для анимации появления уведомления */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* стили для модального окна кнопки Открыть */
.confirmation-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirmation-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 80%;
    max-width: 300px;
}

.confirmation-modal .modal-content p {
    margin: 0 0 20px 0; /* добавляет пространство внизу текста */
    color: #333; /* цвет текста */
    font-size: 20px; /* размер шрифта */
}

.confirmation-modal .modal-content button {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    background-color: #007BFF;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease; /* плавный переход при наведении */
}

.confirmation-modal .modal-content button:hover {
    background-color: #0056b3;
}

.confirmation-modal .modal-content .form-group {
    margin-bottom: 15px;
}

.confirmation-modal .modal-content .login-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-sizing: border-box;
    border: 1px solid #ddd;
}

.confirmation-modal .modal-content .login-submit {
    width: auto;
    padding: 10px 20px;
    margin: 5px;
    background-color: #5cb85c;
}

.confirmation-modal .modal-content .login-submit:hover {
    background-color: #4cae4c;
}

/* Медиа запросы для адаптивности */
@media (max-width: 768px) {
    
    .active-filters-container {
        display: flex;
        margin-top: 220px;
        font-size: 12px;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filtered {
        background-color: #d3f3d3; /* светло-зеленый цвет для выделения */
        border: 1px solid #a3d1a3; /* зеленая рамка */
        border-radius: 4px; /* скругленные углы */
    }
    
    .table-row {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 10px;
        border-bottom: 2px solid #08c91e; /* Добавляем границу снизу для строк */
    }

    .table-row > .table-cell:nth-child(1):before {
        content: "Document ID: ";
        font-weight: bold;
    }
    
    .table-row > .table-cell:nth-child(2):before {
        content: "Статус: ";
        font-weight: bold;
    }
    
    .table-row > .table-cell:nth-child(3):before {
        content: "Номер: ";
        font-weight: bold;
    }
    
    .table-row > .table-cell:nth-child(4):before {
        content: "Дата: ";
        font-weight: bold;
    }

    .table-row > .table-cell:nth-child(5):before {
        content: "Дата отгр.: ";
        font-weight: bold;
    }

    .table-row > .table-cell:nth-child(6):before {
        content: "Зона: ";
        font-weight: bold;
    }

    .table-row > .table-cell:nth-child(7):before {
        content: "Комментарий: ";
        font-weight: bold;
    }

    .table-row > .table-cell:nth-child(8):before {
        content: "Клиент: ";
        font-weight: bold;
    }

    .table-row > .table-cell:nth-child(9):before {
        content: "Адрес дост.: ";
        font-weight: bold;
    }

    .table-row > .table-cell:nth-child(10):before {
        content: "Менеджер: ";
        font-weight: bold;
    }

    .table-cell {
        width: 100%;
        padding: 5px;
        box-sizing: border-box;
        border-bottom: 1px solid #ddd;
        display: block;
        margin-bottom: 0px;
    }

    .table-cell-action {
        width: 100%; /* Устанавливаем ширину на 100%, чтобы использовать доступное пространство */
        display: flex; /* Используем flex для выравнивания кнопки */
        justify-content: center; /* Центрируем кнопку горизонтально */
        padding-top: 10px; /* Опционально: добавляем немного отступа сверху */
    }
    
    .mobile-hide {
        display: none; /* Скрываем заголовки на мобильных устройствах */
    }
    
    .content {
        margin-top: -50px;
        width: 100%;
    }
    
    .status-dropdown {

        top: 45%;
        
    }
}


@media (max-width: 480px) {
    .video-frame {
        margin: 5px auto;
    }
    
    .mobile-hide {
        display: none; /* Скрываем заголовки на мобильных устройствах */
    }
    
    .table-cell, .table-cell-action {
        padding: 1px 10px ; /* Корректируем отступы, чтобы всё хорошо выглядело на очень маленьких устройствах */
        margin: 1px 1px ;
        font-size: smaller;
        
    }
}

@media (max-width: 250px) {
    .login-form-container {
        max-width: 90%; /* Увеличиваем максимальную ширину формы */
        padding: 15px; /* Можно увеличить отступы, если нужно */
        margin-top: 30px; /* Уменьшаем верхний отступ */
        font-size: 20px;
    }

    .login-submit {
        width: 50%; /* Полная ширина для кнопки */
        padding: 10px; /* Увеличиваем отступы */
        font-size: 25px; /* Увеличиваем размер шрифта */
        margin-bottom: 20px; /* Увеличиваем нижний отступ */
        margin-top: 20px; /* Увеличиваем верхний отступ */
    }
    
    .login-input {
        padding: 10px; /* Увеличиваем отступы */
        margin-bottom: 20px; /* Увеличиваем нижний отступ */
        font-size: 25px; /* Увеличиваем размер шрифта для лучшей читаемости */
    }
}

/* Стили для document_details.html */
.document-details {
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 5px auto;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    margin-top: 225px;
   
}

.document-details h2 {
    text-align: center;
    color: #333;
    margin-bottom: 5px;
    position: relative;
    font-size: medium;
}

/* Стили для номера документа */
.document-number {
    color: black; /* Цвет для номера документа */
    font-weight: bold;
}

/* Стили для даты документа */
.document-date {
    color: gray; /* Цвет для даты документа */
}

/* Стили для разделителя */
.separator {
    color: #333; /* Цвет палочки-разделителя */
    padding: 0 5px; /* Отступы слева и справа для разделителя */
}

/* ЖУРНАЛ */
/* Стили для таблицы с документами */
.document-details-table_jur {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 10px 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 5px 0px;
    box-sizing: border-box;
   
}

.document-details-table_jur .waffle {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

/* Стили для заголовков ячеек */
.document-details-table_jur .header {
    background-color: #f9f9f9;
    font-weight: bold;
}

/* Стили для ячеек */
.document-details-table_jur .cell {
    flex: 1; /* Задаём гибкость ячейки */
    text-align: left;
    vertical-align: middle;
    /*border: 1px solid #ddd;*/
    font-size: 12px;
    color: #4b4b4b;
    padding: 1px 8px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* или word-break: break-all; */
    cursor: pointer;
    /*display: flex;*/
    flex-wrap: wrap;
}

/* Скрытие столбца Document ID */
.document-details-table_jur th:nth-child(2),
.document-details-table_jur td:nth-child(2) {
    display: none;
}

/* Стили для последней ячейки в строке */
.document-details-table_jur .cell:last-child,
.document-details-table_jur .table-cell-action:last-child {
    border: none;
}

/* Стили для секционных разделов */
.document-details-table_jur .section {
    border-bottom: 3px solid #444;
}

/* Стили для статусов документов */
/* Общие стили для контейнера статуса */
.document-details-table_jur .status-container {
    display: flex;
    align-items: center; /* Выравнивание по центру */
    justify-content: center; /* Выравнивание по центру */
    text-align: center;
    font-weight: bold;
    color: #000;
    padding: 4px 8px; /* Предоставляет внутренние отступы */
    font-size: 16px;
    border-radius: 5px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    /*flex: none; /* Отключаем наследование flex */
}

/* Специфические стили для каждого статуса */
.status-к_сборке {
    background-color: #ff666647;
}

.status-собирается {
    background-color: #ffcc66;
}

.status-собран {
    background-color: #66cc66;
}

.status-отправлен {
    background-color: #66cc66;
}


/* Стили для половинного размера */
.document-details-table_jur .half-width {
    /*border-bottom: 5px solid #eee;*/
    /*padding-left: 5px; /* Добавим отступ слева для визуального разделения */
    width: 95px;
}

.document-details-table_jur .label-before {
    width: 150px;
    margin-right: -55px;
}
    
/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    
    .document-details {
        margin-top: 260px;
    }
    
    .document-details-table_jur .waffle {
        width: 100%;
        table-layout: auto;
    }

    .document-details-table_jur thead {
        display: none; /* Скрываем заголовки таблицы на мобильных устройствах */
    }

    .document-details-table_jur tbody tr {
        display: table-row;
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 10px;
        border-bottom: 2px solid #08c91e;
    }

    /* Применяем :before только к ячейкам с классом label-before */
    /* Применяем иконку только к ячейкам с data-label="Комментарий" */
    .document-details-table_jur .label-before[data-label="Комментарий"]:before {
        content: "💬"; /* Иконка для комментария */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }
    
    /* Иконка для зоны (обозначение города) */
    .half-width.filterable[data-label="Зона"]:before {
        content: "🏙️"; /* Иконка города */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }

    /* Иконка для отгрузки */
    .half-width.label-before.filterable[data-label="Отгр."]:before {
        content: "🚚"; /* Иконка отгрузки */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }
    
    /* Иконка для адреса доставки */
    .document-details-table_jur .label-before[data-label="Адрес дост."]:before {
        content: "";
        display: inline-block;
        width: 16px; /* Задайте ширину и высоту, подходящие для вашего SVG */
        height: 16px;
        background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50,5 C70,5 90,25 90,45 C90,70 50,95 50,95 C50,95 10,70 10,45 C10,25 30,5 50,5 Z" fill="%23ff4f4f"/><circle cx="50" cy="40" r="10" fill="%23ffffff"/></svg>');
        background-size: contain;
        margin-right: 5px;
        vertical-align: middle;
    }
    
    /* Иконка для клиента */
    .label-before.filterable[data-label="Клиент"]:before {
        content: '\f007'; /* Unicode для иконки пользователя в Font Awesome */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        display: inline-block;
        margin-right: 5px;
        
    }

    /* Иконка для менеджера */
    .label-before.filterable[data-label="Менеджер"]:before {
        content: '\f007'; /* Unicode для иконки пользователя в Font Awesome */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        display: inline-block;
        margin-right: 5px;
        color: #28a745; /* Зеленый цвет для менеджера */
    }

    /* Применяем текст только к другим ячейкам */
    .document-details-table_jur .label-before:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }

    .document-details-table_jur .cell {
        width: 100%;
        padding: 5px;
        box-sizing: border-box;
        border: 0px;
        font-size: 16px;
        border-bottom: 0px solid #ddd;
        display: block;
        margin-bottom: 0px;
    }

    .document-details-table_jur .table-cell-action {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        padding-top: 10px;
    }
    
    .document-details-table_jur .mobile-hide {
        display: none;
    }
    
    /* Стили для половинного размера */
    .document-details-table_jur .half-width {
        display: inline-block;
        width: 50%;
        box-sizing: border-box;
        padding-left: 2px; /* Добавим отступ слева для визуального разделения */
    }
    
    /* Стили для объединения двух ячеек на одной строке */
    .document-details-table_jur .half-width-container {
        display: flex;
        width: 100%;
    }
    .document-details-table_jur .label-before {
        /*width: 122px;*/
        margin-right: 0px;
    }
    
}

@media (max-width: 480px) {
    .document-details-table_jur .cell, .document-details-table_jur .table-cell-action {
        padding: 3px 10px;
        margin: 1px 1px;
        font-size: 16px;
    }
}

/* ТАБЛИЦА 1 */
.document-details-table_1 .status-container {
    display: flex;
    align-items: center; /* Выравнивание по центру */
    justify-content: center; /* Выравнивание по центру */
    text-align: center;
    font-weight: bold;
    color: #000;
    padding: 4px 8px; /* Предоставляет внутренние отступы */
    font-size: 16px;
    border-radius: 5px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    /*flex: none; /* Отключаем наследование flex */
}

.document-details-table_1 {
    display: none;
}

.document-details-table_1 .row {
    display: flex;
    align-items: center;
    /*padding: 8px 16px;*/
    border-bottom: 1px solid #eee;
}

.document-details-table_1 .row:nth-child(odd) {
    background-color: #f9f9f9;
}

.document-details-table_1 .row:last-child {
    border-bottom: none;
}

.document-details-table_1 .cell {
    flex: 1; /* Задаём гибкость ячейки, но добавляем ограничения ниже */
    text-align: left;
    font-size: 18px;
    color: #666;
    padding: 2px 8px; /* Предоставляет внутренние отступы */
    white-space: normal; /* Позволяет тексту переноситься на новую строку */
    word-wrap: break-word; /* Позволяет словам переноситься, если они не умещаются целиком */
    overflow-wrap: break-word; /* Помогает управлять переносом длинных слов */
    cursor: pointer;
}

.document-details-table_1 .cell.double {
    flex: 2;
    width: 50%;
}

/* Стили для .cell_messengers (ваши существующие) */
.document-details-table_1 .cell_messengers {
    flex: 1;
    width: 100%; /* Занимаем всю ширину */
    text-align: left;
    font-size: 14px; /* Более крупный шрифт для мессенджеров */
    color: #444;
    padding: 5px 8px;
    white-space: nowrap; /* Не переносим текст */
    word-wrap: break-word;
    display: flex;
    align-items: center;
    margin-top: 5px;
    text-decoration: none;
}

/* Стили для имени менеджера на десктопе */
.document-details-table_1 .cell.double.manager-name {
    flex: 1; /* Имя занимает больше места */
    padding: 5px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стили для кнопки на десктопе */
.document-details-table_1 .cell.manager-btn {
    flex: none; /* Кнопка занимает минимум места */
    padding: 5px 8px;
}

.document-details-table_1 .cell.manager-btn .cell_messengers {
    width: auto;
    flex: none;
    margin-top: 0;
    padding: 0;
}

/* Hover-эффект для иконок мессенджеров */
.document-details-table_1 .cell_messengers i.fa-whatsapp:hover {
    color: darkgreen;
}

/* Дополнительные стили для значков мессенджеров */
.document-details-table_1 .cell_messengers i {
    font-size: 30px; /* Размер шрифта для иконок */
    margin-left: 150px; /* Отступы слева для иконок */
    color: green; /* Основной цвет иконок */
}

.document-details-table_1 .cell_messengers i.gray-icon {
    color: gray;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Новые стили для .cell.double и .cell_messengers в этом контексте */
.document-details-table_1 .cell.double[data-label="Manager"] {
    display: flex; /* Делаем flex-контейнер */
    align-items: center; /* Выравниваем по вертикали */
    padding: 5px 8px; /* Сохраняем отступы */
}

.document-details-table_1 .cell.double[data-label="Manager"] > *:first-child {
    flex: 1; /* Имя менеджера занимает доступное пространство */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-details-table_1 .cell.double .cell_messengers {
    width: auto; /* Убираем width: 100% */
    flex: none; /* Не растягиваем */
    margin-top: 0; /* Убираем отступ сверху */
    padding: 0; /* Убираем лишние отступы */
}

.toggle-target {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;                 /* iOS Safari */
  -webkit-tap-highlight-color: transparent;  /* iOS/Android: убрать серый подсвет */
  touch-action: manipulation;                /* быстрее тап, без лишних жестов */
}

.toggle-target:focus { outline: none; }
.toggle-target:focus-visible {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

/* На случай, если движок красит активное состояние — гасим именно для шапки */
.toggle-target:active {
  background-color: inherit !important;
}

.toggle-button {
    cursor: pointer;
    color: blue;
    display: inline-block;
    margin: 0;
    margin-top: 2px;
}

.toggle-button::after {
    content: ' ▼';
}

.toggle-button.active::after {
    content: ' ▲';
}

/* СТИЛИ СКАНЕРА */
#qr-scanner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: black;
}

/* Направляющие для центральной части видео */
.guide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid green;
    box-sizing: border-box;
    z-index: 3;
}

.corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

#scan-result {
    white-space: normal;  /* Разрешить перенос текста на новую строку */
    word-wrap: break-word;  /* Переносить длинные слова, если они не помещаются */
    word-break: break-all;  /* Переносить любые длинные строки */
    text-align: center;  /* Опционально: центрирование текста */
    /*font-size: 1.5em;  /* Размер текста, можно подправить под дизайн */
    margin: 10px;
}

/* Линия сканирования с динамическим шлейфом */
.scan-line {
    position: absolute;
    width: 100%; /* Узкая полоска */
    height: 100%; /* Покрывает весь контейнер */
    background: linear-gradient(
        to top,
        rgba(0, 255, 0, 0.2) 0%,    /* Полоска */
        rgba(0, 255, 0, 0) 10%, /* Шлейф */
        rgba(0, 255, 0, 0) 100%   /* Прозрачность */
    );
    background-size: 100% 200%; /* Увеличиваем размер градиента */
    background-position: 0% -100%; /* Скрываем весь шлейф */
    top: 0;
    left: 50%; /* Центруем по горизонтали */
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    opacity: 0; /* Скрыто по умолчанию */
    transition: opacity 0.3s ease; /* Плавное появление */
}

/* Активное состояние */
.scan-line.active {
    opacity: 1; /* Делает видимым */
    animation: scan-move 4s linear infinite; /* Анимация движения и шлейфа */
}

/* Анимация движения и шлейфа */
@keyframes scan-move {
    100% {
        background-position: 0% -100%; /* Шлейф скрыт сверху */
    }
    0% {
        background-position: 0% 0%; /* Шлейф полностью прорисован */
    }
}

/* Кнопки */
.start-button_scan, .stop-button_scan {
    padding: 10px 20px;
    font-size: 16px;
    margin-top: 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.start-button_scan:hover, .stop-button_scan:hover {
    background-color: #0056b3;
}

/*ТАБЛИЦА 2*/
/* Основные стили для таблицы */
.document-details-table_2 {
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 10px auto;
    border: 1px solid #ccc;
    padding: 7px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.document-details-table_2 .waffle {
    border-collapse: collapse;
    table-layout: auto; 
    width: 100%;
}

/*.document-details-table_1 .cell.active,*/
.document-details-table_2 .row.active {
    background-color: #006400; /* Темно зеленый цвет при активации */
    color: #fff;
}

.document-details-table_2 .spacer-row td {
    height: 10px; /* Регулируйте размер отступа здесь */
    background-color: transparent;
    border: none;
}

/* Шапка таблицы */
.document-details-table_2 .cell.header {
    background-color: #f1f1f1;
    text-align: left;
    font-weight: bold;
}

/*.document-details-table_2 .cell.header.number-cell,
.document-details-table_2 .cell.number-cell {
    background-color: #e0e0e0; /* Серый цвет для ячеек с № 
}

/*.document-details-table_2 .cell.number-cell.active {
    background-color: #006400; /* Темно-зеленый цвет для активных ячеек с № */
    /*color: #fff; /* Белый цвет текста 
}
*/

/* Стили для контейнера строки в таблице */
.document-details-table_2 .row {
    display: flex; /* Располагаем элементы в строку */
    align-items: center; /* Выравниваем элементы по центру по вертикали */
    width: 100%; /* Занимаем всю ширину ячейки */
}

/* Стили для контейнера изображений */
.document-details-table_2 .image-container {
    flex: 0 0 auto; /* Не позволяем контейнеру растягиваться или сжиматься */
    width: 40px; /* Фиксированная ширина для изображения */
    height: 40px; /* Фиксированная высота для изображения */
    margin-right: 10px; /* Отступ справа от изображения */
    background: white;
    margin: 1px 10px 1px 1px;
    overflow: hidden; /* Обрезка изображения по границам контейнера */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Стили для блока информации о товаре */
.document-details-table_2 .item-info {
    flex-grow: 1; /* Растягиваем на оставшееся пространство */
    padding-left: 10px; /* Отступ слева для разделения текста от изображения */
}

/* Легкий серый фон */
.document-details-table_2 [data-label="1"] {
    background-color: #f0f0f0; 
}


.document-details-table_2 [data-label="2"] {
    align-items: center; 
}

.document-details-table_2 .item-info [data-label="1"] span:first-child {
    flex: 1;
    text-align: left; /* Выравнивание первого span слева */
    color: blue;
}

/* Переопределение синего на белый для активной строки */
.document-details-table_2 .row.active .item-info [data-label="1"] span:first-child {
    color: #fff;
}

.document-details-table_2 .item-info [data-label="1"] span:last-child {
    margin-left: auto;
    text-align: right; /* Выравнивание второго span справа */
}


.document-details-table_2 .item-info [data-label="2"] span:first-child {
    flex: 1;
    text-align: left; /* Выравнивание первого span слева */
}

.document-details-table_2 .item-info [data-label="2"] span:last-child {
    margin-left: 15px;
    text-align: right; /* Выравнивание второго span справа */
    font-weight: bold;
}

/* Убираем серый фон при активации строки row */
.document-details-table_2 .row.active [data-label="1"] {
    background-color: transparent; /* Убираем серый фон при активации строки */
}

/* Дополнительные стили для шапки с удвоенной ячейкой */
.document-details-table_2 .cell.header.double {
    text-align: left;
    font-weight: bold;
}

/* Стили для строк */
.document-details-table_2 .row-headers-background {
    padding: 0;
    width: 50px; /* Ширина ячейки для изображения */
}

.row-header-wrapper {
    padding: 5px;
    text-align: center;
}

.image-container, .no-image {
    width: 40px; /* Фиксированная ширина для контейнера */
    height: 40px; /* Фиксированная высота для контейнера */
    border: 1px solid #ddd; /* Добавление рамки вокруг контейнера */
    border-radius: 4px; /* Закругленные углы */
    overflow: hidden; /* Обрезка содержимого по границам */
    cursor: pointer;
    transition: transform 0.2s ease-in-out; /* Плавное увеличение при наведении */
    background: white;
    margin: 1px 10px 1px 1px;
}

.image-container:hover {
    transform: scale(1.5); /* Увеличение контейнера при наведении */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Сохраняет пропорции изображения при заполнении контейнера */
    display: block;
    border-radius: 4px;
}

/* Стили ячеек */
.document-details-table_2 .cell {
    padding: 5px;
    text-align: left;
    cursor: pointer;
    word-wrap: break-word; /* Перенос слов, если они слишком длинные */
    white-space: normal; /* Перенос текста на новую строку */
    word-break: break-all; /* Перенос слов по буквам */
    border: 1px solid #ccc; /* Добавляет границу для каждой ячейки */
    font-size: 14px; /* Уменьшение размера шрифта для компактного вида */
    color: #666;
    display: flex;
    flex-wrap: wrap;
}

/* Установка ширины столбцов */
.document-details-table_2 .number-column {
    width: auto; /* Ширина столбца "№" */
}

.document-details-table_2 .article-column {
    width: 20%; /* Ширина столбца "Артикул" */
}

.document-details-table_2 .name-column {
    width: auto; /* Автоматическая ширина для наименования товара */
}

.document-details-table_2 .quantity-column {
    width: 75px; /* Ширина столбца "Количество" */
}

.document-details-table_2 .unit-column {
    width: 75px; /* Ширина столбца "Ед. изм." */
}

/* Обрезание углов загруженного фото */
.clipped-corners {
    clip-path: inset(1% round 5px); /* Внутренний отступ и радиус углов */
}

.bold-text {
    font-weight: bold;
}

/* Стили для модального окна изображения */
.image-modal {
	display: none; 
	position: fixed; 
	z-index: 1010; 
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto; 
	background-color: rgba(255, 255, 255, 0.5); 
	animation: fadeIn 0.5s ease-in-out; /* Плавное появление модального окна */
	cursor: pointer;
}

.image-modal-content {
	margin: auto;
	display: block;
	width: 80%;
	max-width: 700px;
	border-radius: 4px;
	animation: zoomIn 0.5s ease-in-out; /* Плавное увеличение изображения */
}

.image-modal-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #ddd;
	font-size: 40px;
	font-weight: bold;
	transition: color 0.3s;
	cursor: pointer;
	z-index: 1002;
}

.image-modal-close:hover,
.image-modal-close:focus {
	color: #bbb;
	text-decoration: none;
	cursor: pointer;
}

.fade-in {
    animation: fadeIn 0.3s;
}

.fade-out {
    animation: fadeOut 0.3s;
}

.zoom-in {
    animation: zoomIn 0.3s;
}

.zoom-out {
    animation: zoomOut 0.3s;
}


@keyframes fadeIn {
	from {opacity: 0;}
	to {opacity: 1;}
}

@keyframes zoomIn {
	from {transform: scale(0);}
	to {transform: scale(1);}
}

@keyframes fadeOut {
	from {opacity: 1;}
	to {opacity: 0;}
}

@keyframes zoomOut {
	from {transform: scale(1);}
	to {transform: scale(0);}
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .document-details-table_2 .waffle {
        width: 100%;
        table-layout: auto;
    }

    .document-details-table_2 thead {
        display: table-header-group; /* Отображать шапку таблицы на мобильных устройствах */
    }

    .document-details-table_2 tbody tr {
        display: table-row; /* Отображать строки таблицы как table-row */
    }

    .document-details-table_2 .row-headers-background {
        width: 30px; /* Уменьшение ширины ячейки для изображения на мобильных устройствах */
    }
    

    .product-image {
        font-size: x-small;
        
    }

    .document-details-table_2 .cell {
        padding: 3px; /* Уменьшение отступов для компактного вида */
        border-bottom: 1px solid #ddd;
        display: table-cell; /* Отображать ячейки таблицы как table-cell */
        text-align: left;
        border: 1px solid #ccc; /* Добавляет границу для каждой ячейки */
    }

    .document-details-table_2 .cell:before {
        content: none; /* Убрать контент перед ячейками */
    }

    .document-details-table_2 .cell.double {
        display: table-cell;
        text-align: left;
    }
    
    .document-details-table_2 .item-info [data-label="1"] span:first-child {
        flex: 1;
        text-align: left; /* Выравнивание первого span слева */
        color: blue;
    }
    
    /* Переопределение синего на белый для активной строки */
    .document-details-table_2 .row.active .item-info [data-label="1"] span:first-child {
        color: #fff;
    }
    
    .document-details-table_2 .item-info [data-label="1"] span:last-child {
        margin-left: auto;
        text-align: right; /* Выравнивание второго span справа */
    }
    
    .document-details-table_2 .item-info [data-label="2"] span:first-child {
        flex: 1;
        text-align: left; /* Выравнивание первого span слева */
    }
    
    .document-details-table_2 .item-info [data-label="2"] span:last-child {
        margin-left: 15px;
        text-align: right; /* Выравнивание второго span справа */
        font-weight: bold;
    }
    
    .document-details-table_1 .cell {
        flex: 1; /* Задаём гибкость ячейки */
        text-align: left;
        font-size: 12px; /* Уменьшение размера шрифта */
        color: #666;
        padding: 1px 8px; /* Уменьшение отступов */
        white-space: normal; /* Позволяет тексту переноситься на новую строку */
        word-wrap: break-word; /* Позволяет словам переноситься, если они не умещаются целиком */
        overflow-wrap: break-word; /* Помогает управлять переносом длинных слов */
        cursor: pointer;
        display: flex;
        flex-wrap: wrap;
    }
    
    /* Стили для имени менеджера на мобильных */
    .document-details-table_1 .cell.double.manager-name {
        flex: 1;
        white-space: normal; /* Разрешаем перенос текста */
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-width: 0; /* Предотвращаем переполнение */
    }

    /* Стили для кнопки на мобильных */
    .document-details-table_1 .cell.manager-btn {
        flex: none;
        display: flex;
        align-items: center;
    }

    .document-details-table_1 .cell.manager-btn .cell_messengers {
        width: auto;
        flex: none;
        margin-top: 0;
        padding: 0;
        display: flex;
        align-items: center;
    }
    
    /* Уточняем стили для .cell.double на мобильных */
    .document-details-table_1 .cell.double[data-label="Manager"] {
        display: flex;
        align-items: center;
        flex-wrap: nowrap; /* Предотвращаем перенос кнопки */
        padding: 5px 0px;
    }

    .document-details-table_1 .cell.double[data-label="Manager"] > *:first-child {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .document-details-table_1 .cell.double .cell_messengers {
        width: auto;
        flex: none;
        margin-top: 0;
        padding: 0;
        display: flex; /* Сохраняем flex для иконки */
        align-items: center;
    }

    /* Уменьшаем размер иконки на мобильных для компактности */
    .document-details-table_1 .cell.double .cell_messengers i {
        font-size: 30px;
        margin-left: 4px;
    }
    
    /* Стили для .cell_messengers */
    .document-details-table_1 .cell_messengers {
        flex: 1;
        width: 100%; /* Занимаем всю ширину */
        text-align: left;
        font-size: 14px; /* Более крупный шрифт для мессенджеров */
        color: #444;
        padding: 5px 8px;
        white-space: nowrap; /* Не переносим текст */
        word-wrap: break-word;
        display: flex;
        align-items: center;
        margin-top: 5px;
    }
    
    /* Дополнительные стили для значков мессенджеров */
    .document-details-table_1 .cell_messengers i {
        font-size: 30px; /* Размер шрифта для иконок */
        margin-left: 50px; /* Отступы слева для иконок */
        color: green; /* Основной цвет иконок */
    }
    
    /* Hover-эффект для иконок мессенджеров */
    .document-details-table_1 .cell_messengers i.fa-whatsapp:hover {
        color: darkgreen;
    }
    
    /* Стили для .cell.double */
    .document-details-table_1 .cell_messengers.double_messengers {
        flex: 2;
        width: 50%;
        text-align: center; /* Центрируем содержимое */
        padding: 1px 8px;
    }
    
    /* Иконка для даты отгрузки (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Shipment Date"]:not(.double):before {
        content: "🚚"; /* Иконка для даты отгрузки */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }

    /* Иконка для зоны (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Zone"]:not(.double):before {
        content: "🏙️"; /* Иконка для зоны */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }

    /* Иконка для комментария (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Comment"]:not(.double):before {
        content: "💬"; /* Иконка для комментария */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }

    /* Иконка для статуса (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Status"]:not(.double):before {
        content: "⚙️"; /* Иконка для статуса */
        font-weight: bold;
        display: inline;
        margin-right: 5px;
    }

    /* Иконка для клиента (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Client"]:not(.double):before {
        content: '\f007'; /* Unicode для иконки пользователя в Font Awesome */
        font-family: 'Font Awesome 5 Free'; /* Имя шрифта */
        font-weight: 900; /* Используем жирные иконки */
        display: inline-block;
        margin-right: 5px;
    }

    /* Иконка для адреса доставки (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Delivery Address"]:not(.double):before {
        content: "";
        display: inline-block;
        width: 16px; /* Задайте ширину и высоту, подходящие для вашего SVG */
        height: 16px;
        background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50,5 C70,5 90,25 90,45 C90,70 50,95 50,95 C50,95 10,70 10,45 C10,25 30,5 50,5 Z" fill="%23ff4f4f"/><circle cx="50" cy="40" r="10" fill="%23ffffff"/></svg>');
        background-size: contain;
        margin-right: 5px;
        vertical-align: middle;
    }

    /* Иконка для менеджера (только для первой ячейки) */
    .document-details-table_1 .cell[data-label="Manager"]:not(.double):before {
        content: '\f007'; /* Unicode для иконки пользователя в Font Awesome */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        display: inline-block;
        margin-right: 5px;
        color: #28a745; /* Зеленый цвет для менеджера */
    }
    
    
    
    h3 {
        font-size: medium;
        margin-top: 1px;
    }

    h4 {
        font-size: 12px;
        margin-bottom: 1px;
        margin-top: 25px;
    }
    
    .image-container, .no-image {
        width: 30px; /* Уменьшенная фиксированная ширина для контейнера на мобильных устройствах */
        height: 30px; /* Уменьшенная фиксированная высота для контейнера на мобильных устройствах */
        margin: 1px 5px; /* Уменьшенные отступы */
    }

    .product-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Обрезка изображения, чтобы оно соответствовало контейнеру */
    }
    
    /* Установка ширины столбцов */
    .document-details-table_2 .number-column {
        width: 85%; /* Ширина столбца "№" */
    }
    
}

/* Стили для кнопки печати в documents_details.html */
.printer-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 6px;
    /*margin-left: 10px;*/
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.printer-button:hover {
    background-color: #0056b3;
}

.printer-button i {
    font-size: 16px;
    margin-right: 5px;
}


/* Стили для группы ввода */
.input-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid #007bff;
    border-radius: 5px;
    overflow: hidden;
    width: 40%; /* Растягиваем на всю ширину для мобильных устройств */
    max-width: 300px; /* Максимальная ширина для ограничений */
    margin: 0 auto; /* Центрируем элемент */
}

/* Стиль кнопок изменения значения */
.btn-increment {
    background-color: green; /* Зеленый фон для кнопки "+" */
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
    flex: 1;
}

.btn-decrement {
    background-color: red; /* Красный фон для кнопки "-" */
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
    flex: 1;
}

/* Стиль кнопки при наведении */
.btn-increment:hover {
    background-color: darkgreen; /* Темно-зеленый при наведении для кнопки "+" */
}

.btn-decrement:hover {
    background-color: darkred; /* Темно-красный при наведении для кнопки "-" */
}

/* Стиль для поля ввода */
#placeInput {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 18px;
    flex: 1;
}

/* Отключение выделения текста для кнопок */
.btn-increment,
.btn-decrement,
#placeInput {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Медиазапросы для мобильных устройств */
@media (max-width: 480px) {
    .input-group {
        max-width: 90%;
    }

    .btn-increment,
    .btn-decrement {
        padding: 5px 10px;
        font-size: 20px;
        margin: 2px;
    }

    #placeInput {
        padding: 2px;
        font-size: 18px;
    }
}


#backButton {
    display: inline-flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 5px;
    cursor: pointer;
    /*font-size: 16px;*/
}

#backButton i {
    margin-right: 8px; /* Отступ справа для иконки */
}

#backButton:hover {
    background-color: #0056b3;
}

/*КЛАССЫ ДЛЯ ИНДИКАТОРА ЗАГРУЗКИ*/

#loadingIndicator,
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    z-index: 9999;
    font-size: 18px;
    display: none; /* Скрыть индикатор по умолчанию */
    text-align: center;
}

#loadingOverlay,
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none; /* Скрыть оверлей по умолчанию */
}

/* Показываем при наличии .active — и для id, и для классов */
#loadingOverlay.active,
.loading-overlay.active,
#loadingIndicator.active,
.loading-indicator.active {
    display: block;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px; /* Центрирование и отступ снизу */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
}

.loading-text div {
    margin-bottom: 5px; /* Отступ между строками текста */
}

/* Уникальные стили для счётчиков */
.assembly-info-movable {
    position: fixed;
    top: 94px;
    right: -110px; /* Полностью скрытый блок */
    padding: 4px;
    background-color: rgba(144, 238, 144, 0.85); /* Полупрозрачный светло-зеленый фон */
    color: #004d00; /* Темно-зеленый цвет текста для хорошего контраста */
    border-radius: 5px 0 0 5px; /* Закругленные углы слева */
    z-index: 1002;
    font-size: 10px; /* Миниатюрный размер текста */
    width: 100px; /* Ширина блока */
    text-align: left; /* Выравнивание текста */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Тень для лучшего отделения от фона */
    transition: right 0.3s ease-in-out; /* Плавный переход при выдвижении */
    backdrop-filter: blur(5px); /* Глянцевый эффект */
}

.assembly-info-movable.open {
    right: 0; /* Блок полностью выезжает при открытии */
}

.assembly-toggle-button {
    position: absolute;
    left: -52px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    background-color: rgba(144, 238, 144, 0.85); /* Полупрозрачный светло-зеленый фон */
    color: #004d00; /* Темно-зеленый цвет текста */
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
}

.assembly-toggle-button.active {
    background-color: rgba(250, 0, 0, 0.85); /* Красный фон при активации */
    color: white; /* Белый текст при активации */
    z-index: 999;
}

.assembly-toggle-button::after {
    content: '▼';
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.3s ease-in-out; /* Плавный поворот треугольника */
    transform: rotate(0deg); /* Треугольник горизонтальный по умолчанию */
}

.assembly-info-movable.open .assembly-toggle-button::after {
   transform: rotate(180deg); /* Поворот треугольника при выдвижении */
}

.assembly-info-movable h3 {
    color: #004d00; /* Темно-зеленый цвет текста */
    text-shadow: 1px 1px 2px white; /* Белая тень для текста для дополнительного контраста */
    margin: 0 0 5px 0;
    padding-bottom: 2px;
    border-bottom: 1px solid #004d00; /* Полоска под заголовком */
    font-size: 12px; /* Размер шрифта для заголовков */
}

.assembly-info-movable p {
    margin: 2px 0;
    font-size: 10px; /* Размер текста для параграфов */
}

.assembly-info-movable span {
    font-weight: bold;
}

/* Дополнительная полоска над заголовком "Лидер сборок" */
.assembly-info-movable .header-divider {
    border-top: 1px solid #020202; /* Полоска над заголовком */
    margin-bottom: 4px;
}

/* Добавляем тень для лучшего отделения от фона */
.assembly-info-movable {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Стили для бутербродного меню */
/* Стили для мобильного меню */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -315px;
    width: 245px;
    height: 100vh;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
    box-sizing: border-box;
    z-index: 1002;
    transition: right 0.5s ease-in-out;
    border-radius: 0px 0px 0px 10px;
}

.mobile-menu.visible {
    right: 0; /* Положение для показа меню */
}

.mobile-menu a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 8px; /* Увеличенный паддинг для более крупной области клика */
    font-weight: bold;
    font-size: medium;
    margin-top: 25px; /* Исправление на положительное значение */
    margin-bottom: -20px;
    margin-right: -24px;
    border-radius: 5px; /* Скругленные углы */
    background-color: #f5f5f5; /* Легкий фон вокруг ссылки */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease; /* Плавные переходы для анимации */
}

.mobile-menu a:hover {
   background-color: #add8e6; /* Изменение фона при наведении */
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Легкая тень */
   transform: translateY(-2px); /* Легкий подъем вверх */
}

/* Эффекты при клике на ссылку */
.mobile-menu a:active {
    background-color: #add8e6; /* Более темный фон при нажатии */
    transform: translateY(0); /* Возвращение в исходное положение */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Изменение тени при клике */
}

/* Стили для кнопки меню и крестика */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1100;
    transition: transform 0.5s ease-in-out; /* Плавное переключение крестика */
    /* гарантируем быстрый тап */
    -webkit-touch-callout: none;
    user-select: none;
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0; /* Прячем среднюю линию для эффекта крестика */
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(45deg);
    position: relative;
    top: 7px; /* Поднимаем верхнюю линию */
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(-45deg);
    position: relative;
    top: -7px; /* Опускаем нижнюю линию */
}

/* ---------- Добавляем единое правило блокировки скролла ---------- */
/* Блокируем вертикальный скролл, когда бургер открыт */
body.menu-open {
    /* было: overflow-y:hidden; */
    overflow: hidden;     /* надежнее против iOS rubber-band */
    touch-action: none;   /* попытка на уровне CSS; JS дополнит preventDefault */
}

/* Невидимая расширенная зона тапа (Apple HIG ~44x44 pt) */
.hamburger-menu::before {
  content: '';
  position: absolute;
  top: -12px;    /* 20 + 12 + 12 ≈ 44 */
  left: -10px;   /* 24 + 10 + 10 ≈ 44 */
  width: 44px;
  height: 44px;
  pointer-events: auto;   /* ловим тап зоной */
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease; /* Анимация для линии меню */
    pointer-events: none; /* чтобы тап всегда ловил контейнер, а не полоски */
}

.mobile-menu-divider {
    border-bottom: 1px solid #ddd;
    margin-top: 40px;
    margin-bottom: 0px;
}

/* Отключение эффекта акцента на мобильных устройствах */
.mobile-menu a, .hamburger-menu {
    -webkit-tap-highlight-color: transparent; /* Отключение акцента в Safari */
    outline: none; /* Убираем обводку */
    touch-action: manipulation; /* Улучшает отзывчивость */
}

/* Профайл пользователя в меню*/
/* 👤 кнопка внутри мобильного меню */
.mobile-profile-button {
  font-size: 24px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  background-color: transparent;
  border-bottom: 1px solid #ddd;
  margin-top: 22px;
}

/* 👤 кнопка-профиль вне меню (вместо бургера) */
#profileToggleButtonStandalone {
  position: absolute;
  right: 14px;
  top: 10px;
  z-index: 1100;
  font-size: 20px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  width: auto; /* не тянется на 100% */
  border-bottom: none;
}

/* Модальное окно */
.profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-modal.hidden {
  display: none;
}

.profile-modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

/* Кнопка закрытия */
.close-button {
  position: absolute;
  right: 20px;
  top: -10px;
  font-size: 40px;
  cursor: pointer;
}

#profileName {
  font-size: 20px;
  margin-left: -55px;
  margin-top: 0px;
}

/* Контейнер с аватаром и текстом */
.profile-info-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}

/* Аватар */
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}

/* Текстовая часть */
/* выравнивание текста без отступов */
.profile-text p, 
.profile-text h2 {
  margin: 6px 0;
  line-height: 1.4;
  font-size: 16px;
  white-space: nowrap;
}

/* Секция с аватаром и кнопками */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Кнопки под аватаром */
.avatar-controls {
  display: flex;
  gap: 8px;
}

.avatar-controls button {
  font-size: 18px;
  padding: 6px 10px;
  border: none;
  background-color: #f5f5f5;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.avatar-controls button:hover {
  background-color: #ddd;
}

.avatar-controls button:active {
  background-color: #ccc;
}

/* Полноэкранный режим модалки (псевдо-страница) */
.profile-modal.fullscreen-profile {
  background-color: white;
  /*justify-content: flex-start;*/
  align-items: flex-start;
  padding-top: 20px;
  overflow-y: auto;
}

.profile-name-inline {
  display: inline-block;
  max-width: 60%;         /* 🔧 Регулируй при необходимости */
  font-size: 14px;
  font-weight: normal;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.profile-open > *:not(#profileModal) {
  display: none !important;
}

.telegram-hint {
  display: block;
  margin: -15px 0 8px;
  font-size: 0.75rem;
  color: #5a6268;
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.telegram-hint .example {
  font-weight: 600;
  color: #495057;
  font-style: normal;
}

/* Показываем меню на мобильных устройствах */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex; /* Показываем на мобильных устройствах */
    }
}

/* Бэкдроп под мобильным меню — перекрывает фон и ловит тапы */
#menuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 999;           /* ниже .mobile-menu(1001), выше контента */
  pointer-events: auto;
}

/* Адаптация для мобильных экранов */
@media (max-width: 480px) {
  /*.profile-info-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }*/
  .profile-modal-content {
    padding: 16px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  .profile-text p,
  .profile-text h2 {
    white-space: normal;
    font-size: 14px;
  }

  .avatar-controls button {
    font-size: 16px;
    padding: 4px 8px;
  }

  /*.profile-text p, .profile-text h2 {
    white-space: normal;
    text-align: center;
  }*/
}

.messenger-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cell_messengers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    min-width: 44px;   /* рекомендованный tappable размер */
    min-height: 44px;
    border-radius: 8px;
}

.cell_messengers i {
    font-size: 26px;
    margin-left: 0 !important; /* Убираем огромный отступ */
}

.cell_messengers.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.telegram-send-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.telegram-send-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.telegram-send-modal textarea {
    width: 100%;
    height: 120px;
    margin-top: 10px;
    /*padding: 8px;*/
    font-size: 14px;
    resize: vertical;
}

.telegram-send-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.telegram-send-buttons button {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.telegram-send-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cancel-button {
    background-color: #d9534f;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.cancel-button:hover {
    background-color: #c9302c;
}

.emoji {
  font-size: 20px;
  margin-right: 6px;
  line-height: 1;
  display: inline-block;
  width: 1.2em;
  text-align: center;
  flex-shrink: 0;
}

.prefix {
  font-size: 16px;
  margin-right: 8px;
  margin-bottom: 15px;
}

.input-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Иконки фиксированы по размеру и не сжимаются */
.input-with-icon .emoji,
.input-with-icon svg {
  flex-shrink: 0;
  font-size: 20px;
  vertical-align: middle;
}

/* Убираем margin-bottom — он не нужен при flex-центровке */
.input-with-icon .emoji,
.input-with-icon svg {
  margin-bottom: 15px;
}

.notification-modal.success .notification-content {
    background-color: rgba(144, 238, 144, 0.8); /* светло-зеленый */
}
.notification-modal.error .notification-content {
    background-color: rgba(255, 99, 71, 0.8); /* светло-красный */
}

.notification-modal.warning .notification-content {
    background-color: rgba(255, 165, 0, 0.8); /* оранжевый */
}
.notification-modal.info .notification-content {
    background-color: rgba(135, 206, 250, 0.8); /* голубой */
}

/* ===== ModalManager custom modal (scoped, non-conflicting) ===== */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9997;
}

#customModal.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

#customModal.modal.show {
  opacity: 1;
  visibility: visible;
}

#customModal .modal-content {
  background: white;
  border-radius: 8px;
  max-width: 1250px;
  width: 90%;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: customModalFadeIn 0.3s ease;
}

@keyframes customModalFadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

#customModal .modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: #000000;
  /*background: transparent;*/
  border: none;
  font-size: 24px;
  cursor: pointer;
}