*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Убираем ограничение переполнения для html и body */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Подключение шрифта */
@font-face {
    font-family: 'DIN Pro';
    src: url('https://example.com/fonts/DINPro-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'DIN Pro', sans-serif;
    color: #2b2765;
    margin: 0;
    padding-top: 60px; /* Соответствует высоте хедера */
}

/* Стили для хедера */
#header {
    width: 100%;
    height: 60px;
    background-color: #5C4B9A; /* Фиолетовый цвет */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Стили для логотипа */
#logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Контейнер занимает всю ширину */
    margin: 80px 0 20px 0; /* Отступы сверху учитывают фиксированный хедер */
}

#logo img {
    max-width: 300px; /* Максимальная ширина логотипа */
    width: 100%; /* Адаптивная ширина */
    height: auto;
    display: block;
}

/* Стили для страницы ввода имени */
#namePage {
    text-align: center;
    margin-bottom: 20px;
}

#namePage input {
    padding: 10px;
    width: 60%;
    max-width: 300px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    background-color: #e6e6fa;
}

#namePage button {
    padding: 10px 20px;
    background-color: #5C4B9A;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'DIN Pro', sans-serif;
}

#namePage button:hover {
    background-color: #4a3980;
}

/* Стили для инструкций */
.instruction-wrapper {
    margin-bottom: 20px;
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.instruction {
    font-size: 24px; /* Увеличен размер шрифта */
    line-height: 1.5;
    text-align: center;
    font-family: 'DIN Pro', sans-serif;
    color: #2b2765;
    font-weight: 300;
}

.instruction1 {
    font-family: 'DIN Pro', sans-serif;
    color: #2b2765;
    max-width: 880px;
    font-size: 24px;
    font-weight: 300;
    margin: 0 auto 20px auto;
    text-align: center;
}

/* Стили для выпадающих меню */
.dropdown-wrapper {
    display: flex;
    flex-direction: column; /* Направление по вертикали */
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.dropdown-container {
    display: flex; /* Flexbox для размещения элементов в строку */
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    max-width: 800px;
}

.dropdown-element {
    flex: 1 1 200px; /* Элементы занимают пропорционально доступное пространство */
    min-width: 200px;
}

.select2 {
    width: 100% !important;
}

/* Стили для кнопок */
.button-group {
    margin-top: 20px;
    text-align: center; /* Центрирование кнопок */
}

.button-group button {
    margin-right: 10px;
    padding: 10px 20px;
    background-color: #5C4B9A;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'DIN Pro', sans-serif;
}

.button-group button:last-child {
    margin-right: 0; /* Удаление отступа у последней кнопки */
}

.button-group button:hover {
    background-color: #4a3980;
}

/* Настройка обёртки таблицы */
.table-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 20px;
    box-sizing: border-box;
    /* overflow-x: auto; Для горизонтальной прокрутки */
    /* overflow-y: auto; Для вертикальной прокрутки */
    /* max-height: 400px; Установите высоту контейнера для тестирования */
    /* position: relative; Нужно для FixedHeader */
}

/* Обёртка таблицы DataTables */
#resultTable_wrapper {
    width: 100% !important; /* Заполняет доступную ширину */
    margin: 20px 0 !important; /* Отступы сверху и снизу */
    padding: 0; /* Удаление внутренних отступов */
    box-sizing: border-box;
}

/* Настройка самой таблицы */
table.dataTable {
    width: 100% !important; /* Заполняет всю ширину контейнера */
    table-layout: auto; /* Автоматическая схема таблицы для адаптивности */
    box-sizing: border-box;
}

table.dataTable th,
table.dataTable td {
    /* Отключаем перенос текста */
    white-space: nowrap; /* Запрещает перенос текста */
    word-wrap: normal;
    overflow-wrap: normal;
    padding: 8px; /* Уменьшение внутренних отступов */
}

table.dataTable th {
    background-color: #f2f2f2;
    color: #333;
    text-align: left;
}

.column-filter {
    width: 100%; /* Заполняет всю ширину столбца */
    box-sizing: border-box;
    padding: 4px; /* Уменьшение внутренних отступов */
}

/* Дополнительные стили для кнопок и селектов */
button {
    padding: 10px 20px;
    font-family: 'DIN Pro', sans-serif;
    color: white;
    background-color: #5C4B9A;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #4a3980;
}

select {
    width: 100%;
    border: 1px solid #ccc;
    padding: 5px;
}

/* Цвет для активных и неактивных выпадающих окон */
.select2-container--default .select2-selection--single {
    background-color: #e6e6fa;
    border-color: #ccc;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #5C4B9A;
    font-family: 'DIN Pro', sans-serif;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    border-left: 1px solid #ccc;
}

/* Цвет для отключенного выпадающего списка */
.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #e6e6fa !important;
    color: #5C4B9A;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #5C4B9A; /* Фиолетовый цвет */
    font-family: 'DIN Pro', sans-serif;
}


#resultTable tbody tr.archived-row td:nth-child(3) {
    background-color: #EA4335 !important; /* Желтый фон для ячейки "Архивный" */
    color: white !important; /* Черный текст для лучшей читаемости */
}

#resultTable tbody tr.archived-row td:nth-child(19) {
    background-color: #EA4335 !important; /* Желтый фон для ячейки "Архивный" */
    color: white !important; /* Черный текст для лучшей читаемости */
}

#resultTable tbody tr.archived-row {
    background-color: #FEEFC3 !important; /* Принудительно устанавливает красный фон */
}

#resultTable tbody tr.rent-row td:nth-child(16) {
    background-color: #EA4335 !important; /* Желтый фон для ячейки "Архивный" */
    color: white !important; /* Черный текст для лучшей читаемости */
}

#resultTable tbody tr.rent-row td:nth-child(17) {
    background-color: #EA4335 !important; /* Желтый фон для ячейки "Архивный" */
    color: white !important; /* Черный текст для лучшей читаемости */
}


#resultTable tbody tr.rent-row {
    background-color: #FEEFC3 !important; /* Принудительно устанавливает красный фон */
}

#resultTable tbody tr.late-row td:nth-child(10) {
    background-color: #EA4335 !important; /* Желтый фон для ячейки "Архивный" */
    color: white !important; /* Черный текст для лучшей читаемости */
}

#resultTable tbody tr.late-row td:nth-child(17) {
    background-color: #EA4335 !important; /* Желтый фон для ячейки "Архивный" */
    color: white !important; /* Черный текст для лучшей читаемости */
}


#resultTable tbody tr.late-row {
    background-color: #FEEFC3 !important; /* Принудительно устанавливает красный фон */
}


/* Медиазапросы для улучшения адаптивности */
@media (max-width: 768px) {
    #logo img {
        max-width: 200px;
    }

    #namePage input {
        width: 80%;
    }

    .dropdown-container {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
        margin-bottom: 10px;
    }

    .button-group button:last-child {
        margin-bottom: 0;
    }
}
