/* style.css */
/* Базовые стили для всей страницы */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Скрыть прокрутку */
}

/* Основной контейнер для карты */
.map-container {
    position: relative; /* Добавляем относительное позиционирование */
    overflow: auto; /* Заменяем hidden на auto */
    height: auto;
    min-height: 100vh;
    z-index: 1;
}

.connections-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    pointer-events: none;
    z-index: 90;
}

/* Стили для изображения карты */
.map {
    display: block;
    width: 1920px; /* Реальные размеры вашей карты */
    height: 1080px;
}

/* Контейнер для всех объектов на карте */
#objects-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    z-index: 111;
    transform-origin: 0 0; /* Добавьте это свойство */
}

/* Reset для элементов легенды */
.legend-section * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

/* Обертка для трансформаций карты (масштаб/перемещение) */
.map-wrapper {
    position: relative;
    transform-origin: 0 0; /* Точка трансформации */
    transition: transform 0.15s ease-out; /* Плавное масштабирование */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    user-select: none; /* Запрет выделения текста */
    transition: transform 0.1s ease-out; /* Более быстрая анимация для мобильных */
    touch-action: none; /* Отключаем стандартную обработку касаний */

}

/* Стили для мобильных устройств */
.touch-device .object-card {
    font-size: 14px; /* Увеличиваем текст */
    min-width: 140px; /* Шире карточки */
}

.touch-device .center-dot {
    width: 20px;
    height: 20px;
}

.touch-device .popup-content {
    width: 90vw; /* Шире попап на мобильных */
    max-height: 80vh;
    overflow-y: auto;
}

/* Стили для элементов объектов */
.object {
    position: absolute;
    cursor: pointer;
    z-index: 112;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease; /* Плавные анимации */
}

/* Панель управления объектами */
.object-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Тень для глубины */
}

/* Выпадающий список объектов */
#object-select {
    width: 300px;
    padding: 1px;
    margin-right: 1px;
}

/* Состояние при наведении на объект */
.object:hover {
    transform: scale(1.05); /* Увеличение при наведении */
    box-shadow: 0 6px 16px rgba(0,0,0,0.2); /* Усиленная тень */
    z-index: 1001; /* Поднимаем над другими элементами */
}

/* Центральная точка объекта */
.object-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    touch-action: manipulation; /* Оптимизация для касаний */
}

/* Оптимизация для сенсорных устройств */
@media (hover: none) and (pointer: coarse) {
    .object-container {
        touch-action: manipulation;
    }
    
    .center-dot {
        width: 24px;
        height: 24px;
        transform: translate(-50%, -50%);
    }
    
    .object-card {
        min-width: 120px;
        padding: 8px;
    }
    
    /* Увеличиваем зону клика */
    .object-info-table {
        min-width: 120px;
        min-height: 80px;
    }
    
    /* Отключаем hover-эффекты на тач-устройствах */
    .object-card:hover {
        transform: none;
    }

    #close-button {
        padding: 15px;
        font-size: 18px;
    }
}

.object-card, .center-dot {
    -webkit-tap-highlight-color: transparent; /* Убираем подсветку при тапе */
    touch-action: manipulation;
}

.center-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #045394;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

.highlighted .center-dot {
    transform: translate(-50%, -50%) scale(1.5);
    background: #FF4081;
    z-index: 120;
}

.highlighted .connection-line {
    stroke: #FF4081;
    stroke-width: 3;
    filter: drop-shadow(0 0 2px rgba(255,64,129,0.5));
}

.object-card {
    position: absolute;
    pointer-events: auto;
    z-index: 90;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.object-card:hover {
    transform: scale(1.05);
    z-index: 110;
}

/* Стили для внутренней таблицы объекта */
.object table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    background: linear-gradient(145deg, #f8f8f8, #ffffff); /* Градиентный фон */
    border-spacing: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Тень таблицы */
}

/* Общие стили для ячеек таблицы */
.object td {
    padding: 6px;
    text-align: center;
    font-size: 12px;
    font-family: Arial, sans-serif;
    border: none;
    vertical-align: middle;
}

/* Стиль для заголовочной ячейки */
.object td[colspan="2"] {
    background: rgba(255,255,255,0.9);
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

/* Стили для иконок статусов */
.object img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* Тень для иконок */
    transition: transform 0.3s ease;
}

/* Анимация иконок при наведении */
.object:hover img {
    transform: scale(1.1);
}

/* Стилизация таблицы в попапе */
.object-info-table {
    position: absolute;
    left: 20px; /* Фиксированное смещение от точки объекта */
    top: -47.5px; /* Половина высоты карточки для центрирования */
    width: 110px;
    height: 95px;
    border-collapse: collapse;
    border: 2px solid; /* Рамка будет переопределена в JS */
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    border-radius: 8px;
    background: #aed3f2;
    z-index: 100;
    overflow: hidden;
}

.object-info-table td {
    padding: 0;
    vertical-align: middle;
    text-align: center;
}

/* Стили для иконки планирования */
.planing-icon-cell {
    padding: 2px;
    vertical-align: middle;
    width: 30px;
}

.planing-icon {
    width: 30px;
    height: 30px;
    display: block;
    margin: 0 auto;
}

/* Анимация при наведении */
.status-icon:hover {
    transform: scale(1.1);
}

/* Стили для даты планирования */
.planned-date {
    font-size: 12px;
    font-weight: bold;
    color: #2c3e50;
    padding: 5px;
    vertical-align: middle;
    white-space: nowrap;
}

.object-info-header {
    font-size: 12px;
    padding: 4px;
    text-align: center;
}

.object-icon-cell {
    width: 50%;
    text-align: center;
    padding: 5px;
}

.object-icon {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.object:hover .object-icon {
    transform: scale(1.1);
}

/* Стили для линий соединений между объектами */
.object-connection {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    z-index: 10; /* Между картой (z-index: 1) и элементами (z-index: 100+) */
    pointer-events: none;
}

/* Стили для соединительных линий */
.connection-line {
    stroke-width: 2px;
    stroke-linecap: round;
    stroke: #2196F3;
    stroke-width: 2;
    z-index: 10;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}


.popup-content {
    position: relative;
    background: white;
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: popupFadeIn 0.3s;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.popup .close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.popup .close:hover {
    color: #333;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
}

.popup-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.popup-table td {
    padding: 8px 12px;
    border: 1px solid #eee;
    vertical-align: top;
}

.popup-header {
    font-size: 1.4em;
    font-weight: bold;
    text-align: center;
    padding: 10px 0;
    background-color: #f0f0f0;
}

.section-header {
    font-weight: bold;
    text-align: center;
    background-color: #f8f8f8;
    padding: 10px 0;
}

/* Иконки */
.status-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

/* Стили для заголовков с иконками */
.section-header img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

/* Уменьшаем иконки в таблице */
#objectsTable .status-icon {
    width: 20px;
    height: 20px;
}

/* Стили для попапа с информацией */
.popup-table .status-icon {
    width: 22px;
    height: 22px;
    margin-right: 5px;
}

.popup-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.popup-table tr:hover {
    background-color: #f5f5f5;
}

/* Стили для иконок статусов */
.popup-table img {
    width: 20px;  /* Установите желаемую ширину */
    height: 20px; /* Установите желаемую высоту */
    margin-right: 5px; /* Отступ между иконкой и текстом */
}

.section-header td {
    background-color: #f0f0f0;
    font-weight: bold;
    padding-top: 15px;
    padding-bottom: 8px;
}

.comments div {
    margin: 5px 0;
    padding: 8px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #666;
}

#close-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#close-button:hover {
    background-color: #1976D2;
}

#branch-filter {
    padding: 5px;
}

.controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center; /* Центрируем элементы */
    align-items: center; /* Выравниваем по вертикали */
    z-index: 1000; /* Убедитесь, что элементы находятся выше карты */
    gap: 20px; /* Отступ между элементами */
}

.filter-container {
    position: absolute;
    top: 20px; /* Отступ сверху */
    left: 50%; /* Центрируем по горизонтали */
    transform: translateX(-50%); /* Сдвигаем влево на половину ширины */
    z-index: 1001; /* Убедитесь, что фильтр выше других элементов */
}

/* Стили для элементов управления масштабом */
.zoom-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255,255,255,0.9);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: auto;
    z-index: 1001;
}

.zoom-controls:hover {
    transform: translateY(-50%) scale(1.05);
}

#zoom-in, #zoom-out {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #2196F3;
    color: white;
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

#zoom-in:hover, #zoom-out:hover {
    background: #1976D2;
    transform: scale(1.1);
}

#zoom-in:active, #zoom-out:active {
    transform: scale(0.95);
}

/* Стили для кнопки "Домой" */
#home-button {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 50px;
    height: 50px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Выше чем у карты */
}

#home-button:hover {
    transform: scale(1.1);
    background: #45a049;
}

.zoom-controls button {
    font-size: 20px;
    margin: 5px;
    padding: 10px;
    order: 1; /* Порядок кнопок */
    z-index: 1001; /* Выше чем у карты */
}

/* Адаптивные стили для редактора данных */
.data-corrector {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Общие стили для кнопок */
button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    opacity: 0.9;
}

/* Стиль кнопки редактирования */
.edit-button {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1000;
    font-size: 24px;
    background: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
    line-height: 1; /* Добавлено для правильного выравнивания */
}

.edit-button:hover {
    transform: scale(1.1);
    background: #f0f0f0;
    text-decoration: none;
}


.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed; /* Остается на месте */
    z-index: 1000; /* На переднем плане */
    left: 0;
    top: 0;
    width: 100%; /* Полная ширина */
    height: 100%; /* Полная высота */
    overflow: auto; /* Включает прокрутку, если необходимо */
    background-color: rgb(0,0,0); /* Черный фон */
    background-color: rgba(0,0,0,0.4); /* Черный фон с прозрачностью */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% сверху и центрирование */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Ширина */
}

.planned-date {
    color: #555;
    border-bottom: 1px dashed #999;
    margin-bottom: 2px;
}

/* Кнопка легенды */
/* Стили для кнопки легенды */
.legend-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.legend-button:hover {
    transform: scale(1.1);
    background: #2980b9;
    box-shadow: 0 6px 16px rgba(52,152,219,0.4);
}

.legend-button svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Стили для окна легенды */
#legend-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1002;
}

#legend-popup .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Стили для окна легенды */
.legend-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-width: 400px;
    padding: 25px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.legend-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.section-title {
    color: #3498db;
    font-size: 16px;
    margin: 15px 0 10px;
    padding-left: 10px;
    border-left: 3px solid #3498db;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.legend-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Добавить в раздел стилей для легенды */
.color-indicator {
    width: 24px;
    height: 24px;
    border-radius: 4px; /* Изменяем с круглой на квадратную форму */
    margin-right: 15px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* Явно задаем свойство background-color */
    background-color: inherit !important; 
}

.legend-icon {
    width: 24px;
    height: 24px;
    margin-right: 30px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.legend-label {
    font-size: 14px;
    color: #34495e;
    flex-grow: 1;
}

.dot-example {
    width: 16px;
    height: 16px;
    background: #2196F3;
    border-radius: 50%;
    margin-right: 15px;
    box-shadow: 0 0 0 4px rgba(33,150,243,0.2);
}

.card-example {
    width: 30px;
    height: 20px;
    background: white;
    border-radius: 4px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.card-example::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: #f8f9fa;
    border-radius: 2px;
}

.line-example {
    margin-right: 15px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .legend-content {
        width: 90vw;
        padding: 15px;
    }
    
    .legend-title {
        font-size: 20px;
    }
    
    .legend-item {
        margin: 10px 0;
        padding: 6px 10px;
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    .status-icon {
        width: 18px;
        height: 18px;
    }
    
    #objectsTable .status-icon {
        width: 16px;
        height: 16px;
    }
}

.center-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2196F3;
    margin-right: 15px;
}

.object-card-example {
    display: inline-block;
    width: 30px;
    height: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Цвета статусов */
.color-indicator {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 15px;
    border: 1px solid #ddd;
}

.good-status {
    background-color: #4CAF50;
}

.warning-status {
    background-color: #FFC107;
}

.problem-status {
    background-color: #F44336;
}


/* Стили для цветовых индикаторов статусов */
.status-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 12px;
    border: 1px solid rgba(0,0,0,0.1);
}

.status-label {
    font-size: 14px;
    color: #333;
}

/* Конкретные цвета статусов */
.status-color.good {
    background-color: #4CAF50;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.status-color.warning {
    background-color: #FFC107;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.status-color.problem {
    background-color: #F44336;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}


/* Добавьте эти стили */
.error-message {
    color: #dc3545;
    padding: 1rem;
    border: 1px solid #dc3545;
    margin: 1rem 0;
}

.success-message {
    color: #28a745;
    padding: 1rem;
    border: 1px solid #28a745;
    margin: 1rem 0;
}

.object-list {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}


.dataTables_scrollBody {
    overflow-y: auto !important;
    margin: 2rem auto;
    max-height: 400px !important;
    border: 1px solid #ddd !important;
}

.dataTables_wrapper .dataTables_scroll {
    margin-top: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Стили для кнопок выбора на карте */
.map-picker {
    padding: 6px 10px;
    background: #4CAF50;
    color: white;
    margin-left: 10px;
}

.map-picker:hover {
    background: #45a049;
}

/* Оверлей для выбора координат */
.map-picker-mode .controls,
.map-picker-mode .legend-button,
.map-picker-mode .edit-button {
    display: none !important;
}

.map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
}

.map-picker-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    z-index: 10001;
    border: 3px solid #fff;
    border-radius: 10px;
    overflow: hidden;
}

.map-picker-frame {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
}

.map-overlay-text {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2196F3;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10001;
    padding: 10px;
    text-align: center;
    font-size: 16px;
}

/* Основные стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    margin-top: 20px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

/* Кнопки */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 5px;
}

.add-new {
    background-color: #28a745;
    color: white;
    margin-bottom: 20px;
}

.edit-btn {
    background-color: #ffc107;
    color: #212529;
    margin-right: 5px;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.save {
    background-color: #007bff;
    color: white;
}

.cancel {
    background-color: #6c757d;
    color: white;
}

/* Таблица */
#objectsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#objectsTable th, #objectsTable td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#objectsTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Форма редактирования */
.edit-form {
    width: 100%;
    border-collapse: collapse;
}

.edit-form td {
    padding: 10px 5px;
    vertical-align: middle;
}

.edit-form input[type="text"],
.edit-form input[type="number"],
.edit-form select,
.edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.edit-form textarea {
    min-height: 60px;
    resize: vertical;
}

.edit-form select {
    height: 36px;
}


.section-icon {
    width: 24px;
    height: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    gap: 10px;
}

/* Уведомления */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: white;
    animation: fadeIn 0.3s;
}

.alert-success {
    background-color: #28a745;
}

.alert-error {
    background-color: #dc3545;
}


