html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    background-color: #c0c0c0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header, footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.header-container img.logo {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

@media (min-width: 769px) {
    .header-container {
        flex-direction: row;
    }

    .header-container img.logo {
        width: 50px;
        margin-right: 15px;
        margin-bottom: 0;
    }
}

header h1, footer p {
    margin: 10px;
}

nav ul {
    list-style: none;
    padding: 10px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li {
    margin: 5px;
    position: relative;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: block;
    padding: 10px 20px;
    background-color: #555;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #777;
}

nav ul li a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: 5px;
}

main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #c0c0c0;
    width: 100%;
    box-sizing: border-box;
}

footer {
    width: 100%;
}

/* Стили для кнопки назад */
#backButton {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#backButton:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

#backButton:active {
    transform: scale(0.95);
}

#backButton .back-icon {
    display: none;
}

@media (max-width: 768px) {
    #backButton {
        top: 15px;
        left: 15px;
        width: 55px;
        height: 55px;
        padding: 0;
        border-radius: 50%;
        font-size: 24px;
        justify-content: center;
    }

    #backButton .back-text {
        display: none;
    }

    #backButton .back-icon {
        display: inline;
    }
}

@media (max-width: 480px) {
    #backButton {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Стили для контейнеров filters и stats */
#filters-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

#filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    background-color: #336699;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

#filters form {
    flex: 1 1 calc(20% - 10px);
    display: flex;
    flex-direction: column;
    margin: 5px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    max-width: 330px;
    box-sizing: border-box;
}

#filters label {
    margin-bottom: 5px;
    color: #000;
}

#filters select, #filters input {
    font-size: 16px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
}

.modal-content select, .modal-content input {
    font-size: 16px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#resetFilterButton {
    margin-top: 10px;
}
#resetFiltersButton {
    margin-top: 10px;
}

.stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    background-color: #336699;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.stats .stat, .stat-nohover {
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 5px;
    flex: 1 1 calc(20% - 10px);
}

.stats .stat span, .stat-nohover span {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.stats .stat:last-child , .stat-nohover:last-child {
    margin-right: 0;
}

.stats .stat:hover {
    background-color: #0055B3; /* светло-зеленый */
    cursor: pointer;
}

@media (max-width: 768px) {
    .stats .stat {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .stats .stat {
        flex: 1 1 100%;
    }
}

/* Стили для форм */
form {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

form input,
form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 18px;
    box-sizing: border-box;
}

form button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

form button:hover {
    background-color: #555;
}
hr {
    border: 1px solid #ccc;
    margin: 5px 0;
}

.section {
    margin-bottom: 20px;
}

.section h3 {
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
}

.form-group-row,
.form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-group {
    flex: 1 1 calc(50% - 10px);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .form-group {
        flex: 1 1 100%;
    }
}

.hidden-field {
    display: none;
}



.post-group {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    position: relative;
    flex: 1 1 calc(33.33% - 10px);
}

.post-group .post-number {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #121212;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}


#postsContainer .post-group {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    position: relative;
    flex: 1 1 calc(33.33% - 10px);
}

#postsContainer .post-group .post-number {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #121212;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}


.form-group-row,
.form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-group {
    flex: 1 1 calc(50% - 10px);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .form-group {
        flex: 1 1 100%;
    }
}

.hidden-field {
    display: none;
}


/* Стили для кнопок */
button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 5px;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

/* Стили для модальных окон */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: 20px;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 90%;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
}

.form-group {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
}

.form-group-row {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hidden-field {
    display: none;
}

#postsContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#postsContainer .post-group {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    position: relative;
    flex: 1 1 calc(33.33% - 10px);
}

#postsContainer .post-group .post-number {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #121212;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}



.error-message {
    color: red;
    font-size: 0.875em; /* Smaller font size */
    margin-top: 4px;
}

input.error {
    border: 2px solid red;
}

/* Стили для тостов */
.toast {
    font-size: 2vw;
    position: fixed;
    top: 10%;
    left: 50%;
    background: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translate(-50%, -20px); /* Центрирование по оси X и небольшое смещение вверх по оси Y */
    z-index: 9999; /* Убедитесь, что тост находится поверх всех остальных элементов */
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0); /* Центрирование по оси X и нормальное положение по оси Y */
}

.toast.error {
    background-color: #fa260f;
}

/* Стили для таблицы */
.table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background-color: #222;
    table-layout: fixed; /* Фиксированная ширина таблицы */
}
.table th, .table td {
    border: 1px solid #444;
    text-align: center;
    vertical-align: middle;
    padding: 3px;
    color: #ddd;
}
.table th {
    background-color: #121212;
}
.table th.day, .table td.day {
    width: 20px; /* Ширина ячеек для дней */
}
.region-header {
    background-color: #121212;
    color: white;
    padding: 10px;
    font-size: 1.5em;
    margin-top: 20px;
}
.district-header {
    background-color: #575757;
    color: white;
    padding: 10px;
    font-size: 1.25em;
    margin-top: 10px;
}
.table td.bg-success {
    background-color: green !important;
    color: white;
}
.table td.diagonal-red {
    background: linear-gradient(45deg, green 50%, red 50%);
}
.table td.diagonal-red::before {
    content: attr(title);
    position: absolute;
    background-color: white;
    color: black;
    padding: 0.5em;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    display: none;
}
.table td.diagonal-red:hover::before {
    display: block;
}








.custom-checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin: 5px;
}

.custom-checkbox__inp {
    display: none;
}

.custom-checkbox__inner {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 16px;
    color: #333;
    border: 2px solid #333;
    border-radius: 5px;
    padding: 10px 20px;
    transition: background-color 0.3s, border-color 0.3s;
    cursor: pointer;
    box-sizing: border-box;
    flex-direction: column;
}

.custom-checkbox__inner.checked {
    background-color: #121212;
    color: white;
    border-color: #121212;
}

.custom-checkbox__inner:hover {
    background-color: #e0e0e0;
}

.custom-checkbox__inner.checked:hover {
    background-color: #333;
}

.custom-checkbox__inner-name {
    font-size: 18px;
    font-weight: bold; /* Жирный шрифт для ФИО */
}

.custom-checkbox__inner-phone {
    font-size: 16px;
    margin-top: 5px;
}



/* Стили для чекбоксов */
.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 5px 0;
}

.checkbox__inp {
    display: none;
}

.checkbox__inner {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    border: 2px solid #333;
    border-radius: 5px;
    padding: 5px;
    transition: background-color 0.3s, border-color 0.3s;
    margin-right: 10px;
}

.checkbox__inner.checked {
    background-color: #333;
    color: white;
}

.checkbox__inner-label {
    margin-left: 10px;
}

/* Стили для Select2, похожие на современные React-селекты */

/* Контейнер Select2 */
.select2-container {
    width: 100% !important;
    display: block;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* Современный шрифт */
}

/* Основной блок выбора (выпадающее меню) */
.select2-selection {
    height: 40px; /* Достаточная высота */
    border: 1px solid #ccc;
    border-radius: 8px; /* Округленные углы для современного вида */
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

/* Когда выпадающее меню активно */
.select2-selection--single {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    height: 40px; /* Совпадает с высотой стандартных инпутов */
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
}

.select2-selection--single:hover,
.select2-selection--single:focus {
    border-color: #1085FF; /* Подсвечивание при фокусе */
}

/* Внутренний текст в Select2 */
.select2-selection__rendered {
    color: #333;
    font-size: 16px;
    line-height: 40px;
    padding-left: 10px;
}

/* Стрелка в Select2 */
.select2-selection__arrow {
    height: 100%;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-selection__arrow b {
    border-color: #999 transparent transparent transparent;
    border-width: 5px 5px 0 5px;
    border-style: solid;
    display: inline-block;
    margin-top: 5px;
}

/* Стили для выпадающего списка */
.select2-dropdown {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Добавляем легкую тень */
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Стиль строки поиска */
.select2-search--dropdown .select2-search__field {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 10px;
    width: 95%; /* Почти полная ширина */
    margin: 10px auto;
    display: block;
    outline: none;
}

/* Стиль каждой опции */
.select2-results__option {
    padding: 10px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select2-results__option:hover {
    background-color: #f0f0f0; /* Подсветка при наведении */
}

/* Активная выделенная опция */
.select2-results__option--highlighted[aria-selected] {
    background-color: #1085FF;
    color: #fff;
}

/* Множественный выбор */
.select2-selection--multiple {
    border: 1px solid #ccc;
    border-radius: 8px;
    min-height: 40px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Выбранные элементы в Select2 с множественным выбором */
.select2-selection--multiple .select2-selection__choice {
    background-color: #1085FF;
    border-radius: 8px;
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.select2-selection--multiple .select2-selection__choice__remove {
    margin-left: 8px;
    color: #fff;
    cursor: pointer;
}

.select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #333;
}

/* Текст-заглушка (placeholder) */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
    font-size: 16px;
}

.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: #999;
    font-size: 16px;
}

/* Стили выпадающего списка */
.select2-results__option {
    font-size: 16px;
    padding: 10px;
    color: #333;
    cursor: pointer;
}

.select2-results__option--highlighted {
    background-color: #1085FF;
    color: #fff;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.select2-results__option[aria-selected="true"] {
    background-color: #1085FF;
    color: white;
}

/* При фокусе */
.select2-container--default .select2-selection--single:focus {
    border-color: #1085FF;
}

/* Переходы для улучшения UX */
.select2-selection {
    transition: border-color 0.3s ease;
}

.select2-selection--multiple {
    transition: border-color 0.3s ease;
}


/* Media queries for responsiveness */
@media (max-width: 768px) {

    .stats div {
        flex: 1 1 calc(50% - 10px);
    }

    #filters form {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .stats div {
        flex: 1 1 100%;
    }

    #filters form {
        flex: 1 1 100%;
    }
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}





.object-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}
.object-title {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}
.object-info, #latestContract, #objectsPosts{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.object-info div, #latestContract div, #objectsPosts div {
    flex: 0 0 48%;
    margin-bottom: 10px;
}

.object-info-string{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    flex: 0 0 48%;
    margin-bottom: 20px;
}

.guard-object-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.guard-object-card {
    border: 1px solid #ccc;
    padding: 16px;
    border-radius: 8px;
    width: 100%; /* Make each card take the full width */
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-direction: row;
    background-color: #f0f0f0; /* Сделаем фон чуть темнее */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Плавный переход для эффекта */
}

.guard-object-card:hover {
    background-color: #e0e0e0; /* Еще темнее при наведении */
    cursor: pointer; /* Указатель в виде "руки" при наведении */
    border-color: #aaa; /* Изменение цвета рамки при наведении */
}

.guard-object-card .info {
    flex-grow: 1;
}

.guard-object-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.guard-object-card p {
    margin: 8px 0 0; /* Remove top margin, add margin to bottom */
    font-size: 16px;
}

.guard-object-card .button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 16px; /* Ensure the button stays on the right */
}

.guard-object-card .button:hover {
    background-color: #d32f2f;
}

@media (max-width: 600px) {
    .guard-object-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .guard-object-card .button {
        align-self: center;
        margin-top: 16px;
        margin-left: 0; /* Remove the left margin for mobile */
    }
}



.guard-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.guard-card {
    border: 1px solid #ccc;
    padding: 16px;
    border-radius: 8px;
    width: 100%; /* Make each card take the full width */
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-direction: row;
    background-color: #f0f0f0; /* Сделаем фон чуть темнее */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Плавный переход для эффекта */
}

.guard-card:hover {
    background-color: #e0e0e0; /* Еще темнее при наведении */
    cursor: pointer; /* Указатель в виде "руки" при наведении */
    border-color: #aaa; /* Изменение цвета рамки при наведении */
}


.guard-card .info {
    flex-grow: 1;
}

.guard-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.guard-card p {
    margin: 8px 0 0; /* Remove top margin, add margin to bottom */
    font-size: 16px;
}

.guard-card .button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 16px; /* Ensure the button stays on the right */
}

.guard-card .button:hover {
    background-color: #d32f2f;
}

@media (max-width: 600px) {
    .guard-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .guard-card .button {
        align-self: center;
        margin-top: 16px;
        margin-left: 0; /* Remove the left margin for mobile */
    }
}






.guard-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.guard-name {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}

.guard-name h2 {
    margin:0;
    background-color: #313131;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
}

.guard-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.guard-info div {
    flex: 0 0 48%;
    margin-bottom: 10px;
}

.dates {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.dates div {
    flex: 0 0 48%;
    margin-bottom: 10px;
    white-space: nowrap; /* Prevent dates from breaking */
}

.modal.show {
    display: flex;
}

.modal-header,
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    margin-top: 20px;
    margin-bottom: 20px;
}

.additional-phone-container {
    display: flex;
    flex-direction: column;
    align-items: left;
    margin-top: 10px; /* Add margin between fields */
}

.remove-phone-btn {
    margin-left: 10px;
    background-color: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Стили для карточек */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* Выравнивание по левой стороне */
}

.district .card-container {
    justify-content: flex-start; /* Выравнивание по левой стороне */
}

.region {
    background-color: #121212;
    width: 100%;
    margin-bottom: 20px;
    color: #fff;
    border-radius: 10px;
}

.region h2 {
    background-color: #121212; /* Темный фон для заголовка региона */
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.district {
    background-color: #575757;
    color: #fff;
    width: 100%;
    border-radius: 10px;
}

.district h3 {
    background-color: #575757;
    color: #fff;
    padding: 8px;
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Добавляем тень для визуального эффекта */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}



.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px;
    flex: 1 1 320px; /* Минимальная ширина карточки */
    max-width: 320px; /* Максимальная ширина карточки */
    height: 230px; /* Фиксированная высота карточки */
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Равномерное распределение содержимого */
    align-items: center;
    text-align: center;
}

/* Styles */
.card.expiring-soon {
    background-color: #f4e04d ; /* Yellow for expiring cards */
    color: #333; /* Dark gray text */
}

.card.expiring-soon a {
    color: #B19E10; 
}

.card.expiring-soon p {
    color: #333;
}

.card.expiring-soon h2 {
    background-color: #B19E10;
}

.card.expiring-soon:hover {
    background-color: #f4e04d ; /* Light yellow */
}

.card.expired {
    background-color: #f44336; /* Dark gray for inactive cards */
    color: #333; /* Light gray text */
}

.card.expired a {
    color: #A90F03; /* Light gray text */
}

.card.expired p {
    color: #333; /* Light gray text */
}

.card.expired h2 {
    background-color: #A90F03; /* Light gray text */
}

.card.expired:hover {
    background-color: #FF685C; /* Dark gray for inactive cards */
}

/* Styles for yellow cards */
.card.expiring,
.card.check-expiring,
.card.med-expiring {
    background-color: #f4e04d ; /* Yellow for expiring cards */
    color: #333; /* Dark gray text */
}

.card.expiring a,
.card.check-expiring a,
.card.med-expiring a{
    color: #B19E10;
}

.card.expiring p,
.card.check-expiring p,
.card.med-expiring p {
    color: #333; /* Dark gray text */
}

.card.expiring h2,
.card.check-expiring h2,
.card.med-expiring h2 {
    background-color: #B19E10; /* Dark gray header background */
}

.card.expiring:hover,
.card.check-expiring:hover,
.card.med-expiring:hover {
    background-color: #FFEE73 ; /* More saturated yellow on hover */
}


.card:hover {
    background-color: #F1F1F1;
    transform: scale(1.05);
    z-index: 1000;
}

.card .details {
    display: none;
    background-color: #e6e6e6;
    padding: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%; /* Ширина будет равна ширине карточки */
    box-sizing: border-box; /* Учитываем padding в ширину */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    align-items: flex-start;
    text-align: left; /* Выровнять текст по левому краю */
}

.card:hover .details {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.details.open-up {
    top: auto;
    bottom: 100%;
}

.card h2 {
    background-color: #336699;
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    min-height: 60px; /* Минимальная высота для заголовка */
    display: flex;
    align-items: center; /* Центрируем текст по вертикали */
    justify-content: center; /* Центрируем текст по горизонтали */
    text-align: center;
    box-sizing: border-box;
    overflow: hidden; /* Если текст слишком длинный, скрываем его часть */
    word-wrap: break-word; /* Разрешаем перенос текста на новые строки */
    white-space: normal; /* Разрешаем перенос текста */
}

.card p {
    font-size: 14px;
    margin: 5px 0;
    color: #555;
}

.card a {
    color: #336699;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

.details p {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
}

.details a {
    color: #007BFF;
}

.post {
    background-color: #f8f9fa;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}

.post h4 {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: #333;
}

.post p {
    font-size: 14px;
    margin: 3px 0;
    color: #555;
}

.pagination-ellipsis {
    display: inline-block;
    padding: 0 10px;
    font-size: 24px; /* размер многоточий */
    line-height: 20px;
}


#contractsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#contractsTable thead {
    background-color: #4CAF50;
    color: white;
}

#contractsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
}

#contractsTable thead {
    background-color: #121212;
    color: white;
}

#contractsTable th,
#contractsTable td {
    padding: 12px 15px;
    text-align: center;
}

#contractsTable th {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

#contractsTable tbody tr {
    border-bottom: 1px solid #dddddd;
}

#contractsTable tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#contractsTable tbody tr:hover {
    background-color: #e9e9e9;
}

#contractsTable td {
    font-size: 14px;
}


.modal-content {
    max-width: 50vw;
    margin: auto;
}


/* Стили для таблицы пользователей */
.table-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

/* Стили для таблицы пользователей */
.users-table, .customers-table {
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.users-table{
    width: auto;
}

.customers-table {
    width: 80vw;
}

.users-table th, .customers-table th,
.users-table td, .customers-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.users-table th, .customers-table th {
    background-color: #333;
    color: white;
    font-weight: bold;
    font-size: 20px; /* Шрифт покрупнее */
}

.users-table td, .customers-table td {
    font-size: 18px; /* Шрифт покрупнее */
}

.users-table tbody tr:hover, .customers-table tbody tr:hover {
    background-color: #f2f2f2;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: Arial, sans-serif;
    resize: vertical; /* Позволяет изменять размер только по вертикали */
}

textarea:focus {
    border-color: #000;
    outline: none;
}

.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100%;
    padding-right: 40px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 18px;
    box-sizing: border-box;
    height: 40px;
    line-height: 1.5;
}

.password-container i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

.password-container input:focus {
    border-color: #000;
    outline: none;
}

.password-container input.error {
    border-color: #e74c3c;
}

.password-container i:hover {
    color: #007BFF;
    pointer-events: all; /* This ensures the icon is clickable */
}

.hidden {
    display: none !important;
}

.action-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    align-items:center;
}

.select-guard, .post-selection, .guard-info, .buttons {
    width: 100%;
}

.select-guard {
    margin-bottom: 20px;
}

.info {
    font-size: 18px;
}

.highlight {
    font-style: italic;
    color: #007bff;
    font-weight: bold;
}

.full-cell {
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    box-sizing: border-box;
    cursor: pointer; /* Добавляем курсор pointer */
}

.full-cell:hover {
    background-color: #007BFF; /* Цвет фона при наведении */
}

.object-fields-container .select2-container {
    margin-bottom: 10px; /* Расстояние между селектами */
    width: 100% !important; /* Устанавливаем ширину */
}



.stats-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.stats-row .stat-card {
    flex: 1 1 100%;
    margin: 5px;
}

.required {
    color: red;
    margin-left: 5px;
}

.modal-content input.input-error,
select.input-error {
    border-color: red !important;
}
.select2-container.input-error .select2-selection {
    border-color: red !important;
}

.delete-btn, .button.delete {
    background-color: #f44336;
}

.delete-btn:hover, .button.delete:hover {
    background-color: #d32f2f; /* Темный оттенок красного для эффекта при наведении */
}

.incomplete {
    position: relative; /* Для возможности абсолютного позиционирования псевдоэлемента */
}

.incomplete::after {
    content: '✎'; /* Символ звезды */
    position: absolute;
    bottom: 5px; /* Положение звезды по вертикали */
    left: 5px; /* Положение звезды по горизонтали */
    font-size: 35px; /* Увеличенный размер звезды */
    color: #336699; /* Серый цвет звезды */
}





.stat.active {
    background-color: #1085FF; /* Пример выделенного состояния */
    border: 2px solid #000;
}

.pagination-button.active{
    background-color: #1085FF; /* Пример выделенного состояния */
    border: 2px solid #000;
}

.guard-info a{
    font-weight: bold;
    color: #336699;
    text-decoration: none;
}

.guard-info a:hover {
    text-decoration: underline;
}



/* Стили для пояснительных мини-карточек */
.card-explanations {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.mini-card {
    max-width: 320px;
    padding: 15px; /* Немного больше padding для соответствия основным карточкам */
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Больше тень для соответствия большим карточкам */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Добавляем эффект наведения */
}

.mini-card h2 {
    font-size: 16px; /* Меньший размер заголовка, но стиль аналогичен */
    margin-bottom: 10px;
    background-color: #336699; /* Цвет заголовка как у больших карточек */
    color: #fff;
    padding: 10px;
    border-radius: 5px;
}

.mini-card p {
    font-size: 14px; /* Размер текста чуть меньше, но в стиле как у больших карточек */
    margin: 10px 0;
}

/* Цвета карточек, соответствующие основным классам */
.mini-card.expired {
    background-color: #f44336; /* Красный цвет как у просроченных карточек */
    color: #fff;
}

.mini-card.expired h2 {
    background-color: #A90F03; /* Тот же цвет для заголовка */
}

.mini-card.expiring {
    background-color: #f4e04d; /* Желтый цвет для карточек, срок действия которых истекает */
    color: #333;
}

.mini-card.expiring h2 {
    background-color: #B19E10; /* Цвет заголовка как у больших карточек */
}

.mini-card.incomplete {
    background-color: #f0f0f0; /* Серый цвет для карточек с неполными данными */
    color: #333;
}

.mini-card.incomplete h2 {
    background-color: #336699; /* Цвет заголовка как у неполных карточек */
}

/* Эффект при наведении */
.mini-card:hover {
    transform: scale(1.05); /* Эффект увеличения при наведении, как у больших карточек */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
/* Основные стили для таблицы */
table.appt {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-size: 14px;
    text-align: left;
    border-radius: 8px;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* Заголовки таблицы */
table.appt th {
    background-color: #121212;
    color: #fff;
    padding: 10px;
    font-weight: bold;
    text-align: left; /* По умолчанию заголовки выровнены по левому краю */
}

/* Класс для выравнивания текста по центру */
.center-align {
    text-align: center; /* Выровнено по центру */
}

/* Ячейки данных таблицы */
table.appt td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    background-color: #ffffff;
    transition: background-color 0.2s ease-in-out;
}

/* Добавляем hover-эффект для строк (меняется цвет фона и тень на всей строке) */
table.appt tr.row-hover td {
    background-color: #E7E4E4; /* Смена цвета при наведении на всю строку */
}

/* Округлые углы для таблицы */
table.appt {
    border-radius: 8px;
}

/* Универсальные стили для всех кнопок */
table.appt button {
    padding: 4px 8px; /* Компактный padding */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px; /* Уменьшенная высота кнопок */
}

/* Кнопка "Нанять" - синяя */
table.appt button.hire-btn {
    background-color: #336699;
    color: white;
}

/* Кнопка "Изменить" - серая */
table.appt button.edit-btn {
    background-color: #333;
    color: white;
}

/* Кнопка "Удалить" - красная */
table.appt button.delete-btn {
    background-color: #f44336;
    color: white;
}

/* Иконки внутри кнопок */
table.appt button svg {
    width: 14px;
    height: 14px;
}

/* Стили для кнопок при наведении */
table.appt button:hover {
    opacity: 0.8;
}

/* Выравнивание кнопок в столбце "Действия" */
table.appt td:last-child {
    white-space: nowrap;
    text-align: left;
}

/* Меньшая высота строк */
table.appt td, table.appt th {
    line-height: 1.4;
}

.object-select {
    margin-bottom: 15px; /* Задаем расстояние между селектами */
}
