/* 1. ГЛОБАЛЬНЫЕ СТИЛИ */
body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: white;
    overflow: hidden;
    height: 100vh;
}

#map {
    width: 100%;
    position: relative;
    background: #242424;
    z-index: 1;
}

/* 2. ШАПКА И ЛОГОТИП */
.top-bar {
    background: #2c3e50;
    border-bottom: 2px solid #e67e22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1001;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.logo .logo-brand {
    color: #ff7315;
    text-transform: uppercase;
}

/* Правая часть: светло-серый строчный .com */
.logo .logo-domain {
    color: #e2e8f0;
    /* Светло-серый оттенок из интерфейса */
    text-transform: lowercase;
    font-weight: 600;
    /* Чуть мягче, чем основное слово */
}

.logo span {
    color: #e67e22;
}

/* 3. КНОПКИ И ИНПУТЫ (Общие стили) */
input[type="datetime-local"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #34495e;
    color: white;
    font-size: 14px;
}

button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover:not(:disabled) {
    background: #2ecc71;
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.btn-clear {
    background: #c0392b;
}

button.btn-clear:hover {
    background: #e74c3c;
}

/* ==========================================================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСПЛЫВАЮЩЕГО ОКНА ВЫБОРА ПЕРИОДА (Вне медиа-запросов)
   ========================================================================== */
.track-period-popup {
    position: absolute;
    background: #2c3e50;
    border: 1px solid #e67e22;
    /* Оранжевый акцент */
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99999 !important;
    min-width: 240px;
}

.popup-title {
    margin: 0 0 2px 0;
    font-size: 13px;
    color: #e67e22;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.popup-input-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-input-row label {
    font-size: 11px;
    color: #bdc3c7;
}

.popup-input-row input {
    background: #1a252f !important;
    border: 1px solid #34495e !important;
    color: #fff !important;
    padding: 6px 10px !important;
    border-radius: 4px;
    font-size: 13px !important;
    height: 32px !important;
    width: 100%;
    box-sizing: border-box;
}

.btn-popup-apply {
    background: #27ae60 !important;
    color: white !important;
    border: none !important;
    padding: 10px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
    transition: background 0.2s;
}

.btn-popup-apply:hover {
    background: #2ecc71 !important;
}


/* ==========================================================================
   4. ДЕСКТОПНАЯ ВЕРСИЯ (от 1024px) - МАКСИМАЛЬНО СВЕЖИЙ И СВОБОДНЫЙ ХЕДЕР
   ========================================================================== */
@media (min-width: 1024px) {
    .track-period-popup {
        top: 48px;
        /* Выплывает строго под кнопками */
        left: 0;
    }

    .period-popup-arrow {
        position: absolute;
        top: -6px;
        left: 30px;
        transform: rotate(45deg);
        width: 10px;
        height: 10px;
        background: #2c3e50;
        border-top: 1px solid #e67e22;
        border-left: 1px solid #e67e22;
    }

    .top-bar {
        height: 60px !important;
        padding: 0 20px !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1001;
        box-sizing: border-box;
    }

    .logo {
        position: fixed !important;
        left: 20px !important;
        top: 18px !important;
        width: 120px !important;
        z-index: 1003;
    }

    .drawer {
        position: fixed !important;
        top: 0 !important;
        left: 150px !important;
        right: 220px !important;
        width: calc(100% - 370px) !important;
        height: 60px !important;
        background: transparent !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1002 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    .drawer-header,
    .menu-btn,
    .overlay {
        display: none !important;
    }

    .drawer-content {
        display: flex !important;
        padding: 0 !important;
        align-items: center !important;
    }

    .button-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .button-group button {
        font-size: 12px !important;
        height: 34px !important;
        padding: 0 12px !important;
    }

    .top-bar .info-box {
        position: fixed !important;
        right: 20px !important;
        top: 0 !important;
        height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        justify-content: center !important;
        text-align: right;
        width: 190px !important;
        font-size: 12px !important;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 15px;
        box-sizing: border-box;
        z-index: 1003;
    }

    #map {
        height: calc(100vh - 60px) !important;
        margin-top: 60px !important;
    }
}

/* ==========================================================================
   5. МОБИЛЬНЫЕ И ПЛАНШЕТЫ (до 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
    .track-period-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        /* На мобилках превращается в красивое модальное окно по центру экрана */
        width: 85% !important;
        max-width: 300px;
        box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
    }

    .period-popup-arrow {
        display: none !important;
    }

    body {
        position: fixed;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .top-bar {
        height: auto !important;
        min-height: 60px;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 15px !important;
        position: relative;
        z-index: 1001;
        box-sizing: border-box;
    }

    .logo {
        flex-shrink: 0;
        order: 1;
    }

    .menu-btn {
        order: 2;
    }

    .top-bar .info-box {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin-top: 6px !important;
        padding: 6px 10px !important;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 6px;
        border-left: none !important;
        box-sizing: border-box;
    }

    .stat-group {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 12px !important;
        white-space: nowrap;
        width: 100%;
    }

    .stat-line {
        font-size: 11px !important;
        line-height: 1.3;
    }

    .stat-group.metrics {
        margin-top: 2px;
        font-size: 10px !important;
        opacity: 0.85;
    }

    #map {
        flex-grow: 1;
        height: auto !important;
        width: 100%;
    }

    .drawer {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 280px !important;
        height: 100vh !important;
        background: #2c3e50 !important;
        z-index: 10000 !important;
        display: flex !important;
        flex-direction: column !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .drawer.active {
        right: 0 !important;
    }

    .drawer-header {
        display: flex !important;
        padding: 20px;
        background: #1a252f;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #e67e22;
        width: 100%;
        box-sizing: border-box;
    }

    .drawer-content {
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .button-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .button-group button {
        width: 100% !important;
        height: 44px !important;
        font-size: 14px !important;
    }

    .right-sidebar-stack {
        top: 115px !important;
        right: 10px !important;
        transition: top 0.3s ease;
    }

    #live-telemetry {
        top: 15px !important;
        z-index: 1000;
    }

    .leaflet-top {
        top: 25px !important;
        /* Было 100px — приподнимаем на 15px выше */
        transition: top 0.3s ease;
    }

    .leaflet-top.leaflet-left {
        margin-top: 0 !important;
    }

    body .overlay {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(3px);
        z-index: 5000 !important;
        display: block !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body .overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 1. НАСТРОЙКА РОДИТЕЛЬСКОГО КОНТЕЙНЕРА ТЕЛЕМЕТРИИ НА МОБИЛЬНЫХ */
    #live-telemetry:not(.collapsed) {
        top: 15px !important;
        z-index: 10000 !important;
        /* Поднимаем выше элементов карты */

        /* Задаем жесткий лимит: высота экрана минус высота шапки и отступы */
        max-height: calc(100vh - 110px) !important;

        /* Переводим в flex-колонку, чтобы дочерний элемент мог скроллиться */
        display: flex !important;
        flex-direction: column !important;
    }

    /* 2. АКТИВАЦИЯ ВНУТРЕННЕГО СКРОЛЛА ДЛЯ ТЕЛА ТЕЛЕМЕТРИИ */
    #live-telemetry:not(.collapsed) .tel-body {
        overflow-y: auto !important;
        /* Включаем вертикальную прокрутку */
        overflow-x: hidden !important;
        /* Полностью убираем боковой скролл */
        flex-grow: 1;
        /* Заставляет тело занимать всё доступное внутри max-height пространство */

        /* Импульс для супер-плавного скролла на iOS (Safari/Chrome на iPhone) */
        -webkit-overflow-scrolling: touch;
    }

    /* 3. КРАСИВЫЙ ОРАНЖЕВЫЙ СКРОЛЛБАР ДЛЯ ТЕЛЕМЕТРИИ (Под стиль вашего проекта) */
    #live-telemetry .tel-body::-webkit-scrollbar {
        width: 4px !important;
    }

    #live-telemetry .tel-body::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1) !important;
    }

    #live-telemetry .tel-body::-webkit-scrollbar-thumb {
        background: rgba(230, 126, 34, 0.5) !important;
        /* Фирменный оранжевый */
        border-radius: 4px !important;
    }

    #live-telemetry .tel-body::-webkit-scrollbar-thumb:hover {
        background: rgba(230, 126, 34, 0.8) !important;
    }
}

/* 6. ТЕЛЕМЕТРИЯ (Live UI) */
#live-telemetry {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    width: 280px;
    background: rgba(44, 62, 80, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#live-telemetry.collapsed {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2c3e50;
}

.tel-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    cursor: pointer;
}

.collapsed .tel-title-text,
.collapsed #tel-icon {
    display: none;
}

.collapsed .tel-header {
    justify-content: center;
    padding: 0;
}

.online-dot {
    color: #2ecc71;
    text-shadow: 0 0 10px #2ecc71;
    animation: blink 2s infinite;
}

.collapsed .online-dot {
    animation: pulse-live 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes pulse-live {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.tel-body {
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.tel-row {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.tel-val {
    font-weight: bold;
    color: #3498db;
}

/* 7. ГРАФИКИ (Floating UI) */
.charts-section {
    position: absolute;
    bottom: 20px;
    right: 15px;
    width: 450px;
    background: rgba(33, 37, 41, 0.9);
    border-radius: 12px;
    z-index: 1100;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    backdrop-filter: blur(6px);
    transition: 0.3s;
}

@media (max-width: 600px) {
    .charts-section {
        width: calc(100% - 40px);
        left: 20px;
        bottom: 10px;
    }
}

.canvas-wrapper {
    position: relative;
    margin: auto;
    height: 250px;
    /* Укажи желаемую высоту графика */
    width: 100%;
    padding: 10px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header h3 {
    margin: 0;
    font-size: 14px;
    color: #e67e22;
}

.btn-close-chart {
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 20px;
    cursor: pointer;
}

/* 8. ЛИСТЛЕТ И МАРКЕРЫ */
.map-event-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.start-icon {
    background: #27ae60;
}

.end-icon {
    background: #c0392b;
}

.park-icon {
    background: #2980b9;
}

.stop-icon {
    background: #8F00FF;
}

.live-car-icon {
    background: #e67e22;
    box-shadow: 0 0 15px #e67e22;
}

.track-popup .leaflet-popup-content-wrapper {
    background: #2c3e50;
    color: #fff;
    border-radius: 4px;
}

.track-popup b {
    color: #e67e22;
}

.signal-recover-icon {
    background-color: #2ecc71 !important;
    /* Зеленый для восстановления */
}

.signal-lost-icon {
    background-color: #88190d !important;
    /* Оранжевый для потери */
}

/* 1. БАЗОВЫЙ КОНТЕЙНЕР (Окно графика) */
#charts-container,
.charts-section {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    background-color: #2c3e50;
    /* Темный фон окна */
    border-radius: 8px;
    /* Убедитесь, что позиционирование фиксированное или абсолютное */
}

/* 2. ШАПКА И КНОПКИ (В ряд, без фона) */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.chart-controls {
    display: flex !important;
    flex-direction: row !important;
    /* Кнопки в ряд */
    align-items: center !important;
    gap: 12px !important;
    /* Расстояние между - и × */
}

.btn-toggle-chart,
.btn-close-chart {
    background: none !important;
    /* Убираем зеленый фон */
    border: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    /* Белый с прозрачностью */
    font-size: 18px !important;
    cursor: pointer;
    padding: 4px !important;
    line-height: 1 !important;
    transition: color 0.2s;
}

.btn-toggle-chart:hover,
.btn-close-chart:hover {
    color: #ffffff !important;
}

/* СОСТОЯНИЕ КРУЖКА (Полная синхронизация с LIVE) */
#charts-container.collapsed-circle,
.charts-section.collapsed-circle {
    width: 44px !important;
    /* Точный размер как у div.tel-header */
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    background-color: #2c3e50 !important;
    /* Цвет как у LIVE */
    border-radius: 50% !important;
    padding: 0 !important;
    /* Убираем падинги, чтобы не распирало */
    margin: 0 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none !important;
    /* Убираем рамки, если они есть */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    /* Чтобы ничего не вылезало за границы */
}

/* Центрирование иконки диаграммы */
#charts-container.collapsed-circle .chart-controls {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    padding: 0 !important;
}

/* Сама иконка диаграммы */
#charts-container.collapsed-circle #chart-toggle-icon {
    color: #ffffff !important;
    font-size: 18px !important;
    /* Подберите размер, чтобы визуально совпадал с точкой LIVE */
    margin: 0 !important;
    padding: 10px 0 0 20px;
    line-height: 1 !important;
    display: block !important;
}

/* Скрываем всё остальное внутри кружка */
#charts-container.collapsed-circle .chart-header h3,
#charts-container.collapsed-circle .btn-close-chart,
#charts-container.collapsed-circle .chart-body,
#charts-container.collapsed-circle canvas {
    display: none !important;
}

/* ФИНАЛЬНЫЙ ФИКС МОБИЛЬНОЙ ВЕРСИИ */
@media (max-width: 1023px) {

    /* 1. ПРИНУДИТЕЛЬНО ОПУСКАЕМ ГРАФИК (Любое состояние) */
    body .charts-section,
    body #charts-container {
        z-index: 10 !important;
        /* Намного ниже меню (9999) */
    }

    /* 2. ПОЗИЦИЯ КРУЖКА (Свернутое состояние) */
    body #charts-container.collapsed-circle,
    body .charts-section.collapsed-circle {
        right: 15px !important;
        left: auto !important;
        bottom: 20px !important;
        position: fixed !important;
        width: 44px !important;
        height: 44px !important;
    }

    /* 3. МЕНЮ И ОВЕРЛЕЙ (Должны быть выше графиков) */
    body .overlay {
        z-index: 5000 !important;
        position: fixed !important;
    }

    body .drawer {
        z-index: 10000 !important;
        position: fixed !important;
    }

    /* 4. ЦЕНТРИРОВАНИЕ ИКОНКИ В КРУЖКЕ */
    body #charts-container.collapsed-circle #chart-toggle-icon {
        padding-top: 0 !important;
        /* Убираем наклон вниз */
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 5. ФИКС ДЛЯ РАЗВЕРНУТОГО ГРАФИКА (Чтобы не ломал ширину) */
    body .charts-section:not(.collapsed-circle) {
        width: calc(100% - 30px) !important;
        left: 15px !important;
        right: 15px !important;
        bottom: 15px !important;
    }
}

/* Скрываем все холсты, кроме активного */
.canvas-wrapper canvas {
    display: none;
}

.canvas-wrapper canvas.active-slide {
    display: block;
}

/* Стили для стрелок навигации в шапке графика */
#btn-prev-chart,
#btn-next-chart {
    font-size: 14px !important;
    opacity: 0.7;
}

#btn-prev-chart:hover,
#btn-next-chart:hover {
    opacity: 1;
    color: #e67e22 !important;
}

/* Если график свернут в кружок, скрываем стрелки */
#charts-container.collapsed-circle #btn-prev-chart,
#charts-container.collapsed-circle #btn-next-chart {
    display: none !important;
}

/* --- СТИЛИ ДЛЯ СЛАЙДЕРА ГРАФИКОВ --- */

/* Контейнер для заголовка с навигацией */
.chart-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#chart-title {
    margin: 0;
    font-size: 14px;
    color: #e67e22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Кнопки переключения графиков (стрелочки) */
.chart-nav-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ccc !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-nav-btn:hover {
    background: rgba(230, 126, 34, 0.2) !important;
    color: #e67e22 !important;
    border-color: #e67e22 !important;
}

/* Обертка для самих графиков */
#canvas-slider-container {
    position: relative;
    width: 100%;
    height: 180px;
    /* Высота как у .canvas-wrapper */
    margin-top: 10px;
}

/* Скрываем все графики по умолчанию, кроме активного */
#canvas-slider-container canvas {
    display: none;
    width: 100% !important;
    height: 100% !important;
}

#canvas-slider-container canvas.active-slide {
    display: block;
}

/* Анимация появления графика (опционально) */
@keyframes fadeInChart {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#canvas-slider-container canvas[style*="display: block"] {
    animation: fadeInChart 0.3s ease-out;
}

/* Уточнение для свернутого состояния (кружка) */
#charts-container.collapsed-circle .chart-nav-btn,
#charts-container.collapsed-circle #chart-title {
    display: none !important;
}

.chart-body {
    flex-grow: 1;
    position: relative;
    height: 250px;
    /* Или любая нужная высота */
    width: 100%;
}

#speedChart {
    width: 100% !important;
    height: 100% !important;
}

#btn-fullscreen-chart {
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 16px !important;
    /* Чуть меньше закрывающего крестика */
    cursor: pointer;
    padding: 4px !important;
    transition: color 0.2s, transform 0.2s;
}

#btn-fullscreen-chart:hover {
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Скрываем кнопку, если график свернут в кружок */
#charts-container.collapsed-circle #btn-fullscreen-chart {
    display: none !important;
}

/* Класс для полноэкранного режима — ИСПРАВЛЕНО */
.charts-section.fullscreen {
    position: fixed !important;
    /* Устанавливаем равные отступы от всех краев */
    top: 80px !important;
    /* Оставляем место под шапку ProfGPS */
    bottom: 20px !important;
    left: 20px !important;
    right: 20px !important;

    /* Сбрасываем жесткую ширину, чтобы блок растягивался по отступам */
    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    z-index: 2000 !important;
    transition: all 0.3s ease;
    /* Плавность для перехода */
}

/* Убедимся, что обертка слайдера внутри тоже расширяется */
.charts-section.fullscreen #canvas-slider-container {
    height: calc(100% - 80px) !important;
    /* Увеличили место под график */
    width: 100% !important;
}

/* Фон и текст основного окна */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background-color: #2c3e50 !important;
    /* Твой темно-синий цвет */
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

/* Изменяем цвет текста внутри */
.leaflet-popup-content {
    margin: 12px 15px !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
}

/* Кнопка закрытия (крестик) */
.leaflet-popup-close-button {
    color: #ffffff !important;
    padding: 8px 8px 0 0 !important;
}

/* Заголовок (Точка №13) — делаем оранжевым для стиля */
.leaflet-popup-content b,
.leaflet-popup-content strong {
    color: #f39c12 !important;
    display: block;
    margin-bottom: 4px;
}

#devices-container {
    position: fixed;
    right: 20px;
    top: 150px;
    /* Размещаем под блоком LIVE */
    background: #2c3e50;
    border-radius: 12px;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Состояние кружка (как на скриншоте 544f09.png) */
#devices-container.collapsed-circle {
    background: transparent !important;
    box-shadow: none !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#devices-container.collapsed-circle .devices-content {
    display: none;
}

/* Развернутое состояние */
#devices-container:not(.collapsed-circle) {
    width: 280px;
    height: 400px;
}

/* Стили списка */
.devices-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
}

.device-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.device-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.device-item.active {
    background: rgba(243, 156, 18, 0.2);
    /* Твой оранжевый акцент */
    border-left: 3px solid #f39c12;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.status-indicator.online {
    background: #2ecc71;
}

.status-indicator.offline {
    background: #e74c3c;
}

/* Главный стек управления */
.right-sidebar-stack {
    position: fixed;
    right: 20px;
    top: 80px;
    /* Отступ от шапки */
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Кружки будут прижаты к правому краю */
    gap: 10px;
    /* Расстояние между блоками */
    pointer-events: none;
    /* Чтобы можно было кликать по карте сквозь пустые места */
}

/* Сбрасываем старое позиционирование у внутренних блоков */
#live-telemetry,
#devices-container {
    position: relative !important;
    /* Важно! Сбрасываем absolute/fixed */
    top: auto !important;
    right: auto !important;
    pointer-events: auto;
    /* Возвращаем кликабельность самим блокам */
}

/* Для мобилок, чтобы они не перекрывали кнопки управления картой */
@media (max-width: 1023px) {
    .right-sidebar-stack {
        top: 115px !important;
        /* Опускаем ниже двухстрочного хедера */
        right: 10px !important;
        transition: top 0.3s ease;
        /* Плавный сдвиг при изменении размеров */
    }
}

#devices-toggle-btn {
    width: 44px;
    height: 44px;
    background-color: #2c3e50;
    /* Твой основной темный цвет */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    pointer-events: auto;
    /* Чтобы кнопка нажималась внутри стека */
}

#devices-toggle-btn:hover {
    background-color: #34495e;
    transform: scale(1.05);
}

#devices-toggle-btn i {
    font-size: 18px;
    /* Оптимальный размер иконки для 44px кнопки */
}

.devices-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #2c3e50;
    /* Цвет фона как у LIVE */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Та самая полоса снизу */
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    color: white;
    gap: 10px;
    height: 44px;
    /* Фиксированная высота для совпадения */
    box-sizing: border-box;
}

/* Иконка машинки слева */
.device-header-icon {
    font-size: 14px;
    color: #ffffff;
    width: 20px;
    /* Фиксированная ширина для выравнивания с точкой LIVE */
    text-align: center;
}

/* Текст строго по центру */
.devices-header .tel-title-text {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

/* Шеврон справа */
#devices-chevron-icon {
    font-size: 12px;
    opacity: 0.8;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

/* Поворот стрелки при сворачивании */
.collapsed-circle #devices-chevron-icon {
    transform: rotate(-180deg);
}

/* Скрываем круглую кнопку, если контейнер НЕ свернут */
#devices-container:not(.collapsed-circle) #devices-toggle-btn {
    display: none;
}

.devices-list {
    max-height: 400px;
    /* Ограничиваем высоту, если устройств много */
    overflow-y: auto;
    background: rgba(44, 62, 80, 0.9);
}

.device-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.device-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.device-name-input {
    display: block;
    border: none;
    background: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    padding: 0;
    margin-bottom: 2px;
}

.device-name-input:focus {
    outline: none;
    color: #f39c12;
    /* Подсветка при редактировании */
}

.device-imei {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
}

.device-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #95a5a6;
    /* Серый по умолчанию */
    transition: background-color 0.3s ease;
    margin-left: auto;
    /* Прижать к правому краю */
}

/* Эффект свечения для онлайн-устройства */
.device-status-dot.online {
    background-color: #2ecc71;
    box-shadow: 0 0 5px #2ecc71;
}

.device-item.active {
    background-color: rgba(230, 126, 34, 0.2);
    /* Оранжевый полупрозрачный фон */
    border-left: 3px solid #e67e22;
    /* Яркая полоска слева */
}

.device-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-reset-zoom {
    position: absolute;
    top: 50px;
    right: 60px;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b67;
    color: #ff6b67;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 1000;
    transition: all 0.2s;
}

.btn-reset-zoom:hover {
    background: #ff6b67;
    color: white;
}

/* Подпись с названием над машиной */
.marker-label-name {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Оранжевый кружок машины */
.marker-orange-circle {
    background: #f39c12;
    border: 2px solid white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Оформление самого кластера LIVE-машин */
.live-cluster-circle {
    width: 35px;
    height: 35px;
    background: #e67e22;
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(230, 126, 34, 0.6);
}

.device-visibility-check {
    accent-color: #f39c12;
    /* Оранжевый цвет под стиль ProfGPS */
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.device-item {
    display: flex;
    align-items: center;
    padding: 10px;
    /* ... твои старые стили ... */
}

/* Общий контейнер статистики */
.info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.05);
    /* Легкий фон, чтобы отделить от шапки */
    border-radius: 6px;
    margin-right: 10px;
    /* Отступ от самого края экрана */
    min-width: 220px;
    /* Ограничиваем минимальную ширину */
    max-width: 280px;
    /* Чтобы не раздувался */
}

/* Верхняя строка (Транспорт и Период) */
.stat-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 4px;
    padding-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Если имя слишком длинное - обрежет точками */
}

#stat-device {
    font-weight: bold;
    color: #ffffff;
    font-size: 14px;
}

#stat-period {
    font-size: 11px;
    color: #bdc3c7;
    display: block;
}

/* Нижняя строка (Точки и Путь) */
.stat-body {
    display: flex;
    justify-content: space-between;
    /* Раскидывает их по краям */
    align-items: center;
    font-size: 13px;
    color: #ecf0f1;
}

#stat-points,
#stat-dist {
    white-space: nowrap;
}

/* Стиль для маркера заправки на карте */
.icon-fuel-up {
    color: #2ecc71;
    /* Яркий зеленый */
    background: white;
    border: 2px solid #2ecc71;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.icon-fuel-up:hover {
    transform: scale(1.1);
    /* Эффект при наведении */
}

/* Стиль для маркера слива */
.icon-fuel-down {
    color: #e74c3c;
    /* Красный */
    background: white;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Общий стандарт для всех кнопок в хедере */
.btn-reports,
.btn-build,
.btn-charts,
.btn-clear,
.button-group button {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    vertical-align: middle;
    box-sizing: border-box;
    gap: 8px;
}

/* Специфика кнопки Отчеты */
.btn-reports {
    background: #3498db !important;
    color: white !important;
}

.btn-reports:hover {
    background: #2980b9 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.reports-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    /* Максимальный приоритет */
    display: none;
    /* По умолчанию скрыто, JS переключит на flex */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #2c3e50;
    border-bottom: 1px solid #34495e;
}

.header-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ecf0f1;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: #bdc3c7;
    font-size: 22px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.btn-close-modal:hover {
    background: #e74c3c;
    color: white;
}

/* Панель выбора параметров */
.reports-selection-panel {
    display: flex;
    flex-wrap: wrap;
    /* Позволяет переноситься на мобильных */
    align-items: flex-end;
    /* Выравнивает все элементы по нижней линии (кнопке) */
    gap: 15px;
    /* Одинаковое расстояние между группами */
    padding: 15px 20px;
    background: #242b33;
    border-bottom: 1px solid #1a1f25;
}

/* Группа: Label + Input/Select */
.report-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-input-group label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Унификация размеров всех полей ввода */
.report-input-group select,
.report-input-group input {
    background: #1e252d;
    color: #ecf0f1;
    border: 1px solid #34495e;
    padding: 8px 10px;
    border-radius: 4px;
    height: 38px;
    /* Фиксированная высота как у кнопок */
    box-sizing: border-box;
    outline: none;
}

/* Кнопка "Создать отчет" */
.btn-generate {
    height: 38px;
    padding: 0 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-generate:hover {
    background: #2ecc71;
}

.reports-body {
    flex: 1;
    overflow-y: auto;
    background: #1a1f25;
    /* Добавляем отступы здесь */
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Центрируем содержимое по горизонтали */
}

.empty-msg {
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    margin-top: 50px;
    /* Дополнительный отступ сверху для визуального баланса */
    line-height: 1.6;
}

#report-table {
    width: 100%;
    border-collapse: collapse;
    color: #ddd;
    font-size: 13px;
}

#report-table th {
    background: #2c3e50;
    color: #3498db;
    padding: 12px;
    text-align: left;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #1a1f25;
}

#report-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#report-table tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

#reports-modal[style*="display: none"] {
    display: none !important;
}

/* Полноэкранный режим */
.report-fullscreen .reports-container {
    width: 98vw !important;
    height: 98vh !important;
    max-width: none !important;
    border-radius: 0 !important;
}

/* Основное состояние модалки */
#reports-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

/* Добавь или обнови этот блок */
#reports-dynamic-container {
    display: flex;
    flex-direction: column;
    /* Позволяет шапке быть сверху, а телу занимать остаток */
    background: #1a1f25;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90vw;
    max-width: 1200px;

    /* ГЛАВНОЕ: Окно не будет выше экрана и не будет растягиваться */
    max-height: 85vh !important;
    overflow: hidden !important;
    transition: all 0.3s ease;
}

/* Полноэкранный режим */
.report-fullscreen #reports-dynamic-container {
    max-width: none !important;
    max-height: none !important;
    transition: all 0.3s ease;
}

/* --- ФИНАЛЬНЫЙ БЛОК СВЕРНУТОГО ОТЧЕТА --- */

/* Используем body #ID чтобы гарантированно перебить всё остальное */
body #reports-modal.report-minimized {
    display: block !important;
    background: transparent !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
    position: fixed !important;
    inset: 0 !important;
}

body #reports-modal.report-minimized #reports-dynamic-container {
    /* Жестко фиксируем малые размеры */
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    cursor: pointer !important;

    /* Вырываем в правый нижний угол */
    position: fixed !important;
    bottom: 75px !important;
    right: 16px !important;
    left: auto !important;
    top: auto !important;

    /* Принудительно сбрасываем то, что утянуло его вверх на скриншоте */
    transform: none !important;
    margin: 0 !important;

    /* Оформление */
    border-radius: 50% !important;
    background: #2c3e50 !important;
    /* border: 3px solid #f39c12 !important; */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;

    /* Включаем видимость */
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
}

/* Прячем всё внутри принудительно */
#reports-modal.report-minimized #reports-dynamic-container>*:not(.reports-header) {
    display: none !important;
}

#reports-modal.report-minimized .reports-header {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#reports-modal.report-minimized .header-main-info h2,
#reports-modal.report-minimized .report-window-controls {
    display: none !important;
}

/* Базовое состояние развернутого контейнера */
#objects-container {
    background: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 280px;
    /* Фиксированная ширина как у устройств */
    height: auto;
    /* Высота подстраивается под контент */
    display: flex;
    flex-direction: column;
}

/* Состояние "кружка" - перебиваем базовые стили */
#objects-container.collapsed-circle {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    align-self: flex-end;
    cursor: pointer;
    /* Чтобы кружок прижимался вправо, если нужно */
}

#objects-container.collapsed-circle .objects-content {
    display: none;
}

#objects-toggle-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    /* Чтобы не сплющило */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

/* Скрываем кнопку-иконку, когда панель развернута (опционально) */
#objects-container:not(.collapsed-circle) #objects-toggle-btn {
    display: none;
}

.objects-header {
    padding: 12px;
    background: rgba(44, 62, 80, 0.95);
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

/* Гарантируем, что кнопка активна и находится сверху */
#objects-container {
    z-index: 1000 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

#objects-chevron-icon {
    pointer-events: none;
    /* Чтобы клик пролетал сквозь иконку на родителя */
}

/* Поворот стрелочки при разворачивании панели */
.objects-toggle-chevron {
    transition: transform 0.3s ease;
    /* Плавная анимация */
}

/* Когда родитель НЕ имеет класса .collapsed-circle (т.е. развернут) */
#objects-container:not(.collapsed-circle) .objects-toggle-chevron {
    transform: rotate(-180deg);
    /* Поворот вверх */
}

/* Гарантируем, что заголовок не "прыгает" */
.objects-header {
    -webkit-user-select: none;
    /* Запрет выделения текста */
    user-select: none;
}

/* Общий контейнер поп-апа */
.leaflet-popup-content-wrapper {
    background: #1a252f !important;
    /* Цвет как у вашей панели */
    color: #ecf0f1 !important;
    border-radius: 8px !important;
    padding: 0 !important;
    border: 1px solid #34495e !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

/* Текст внутри поп-апа */
.leaflet-popup-content {
    margin: 12px 15px !important;
    line-height: 1.4 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* "Хвостик" поп-апа */
.leaflet-popup-tip {
    background: #1a252f !important;
    border: 1px solid #34495e !important;
}

/* Кнопка закрытия (крестик) */
.leaflet-popup-close-button {
    color: #888 !important;
    padding: 8px 8px 0 0 !important;
}

.leaflet-popup-close-button:hover {
    color: #fff !important;
}

@media (max-width: 1023px) {

    /* 1. ПОДЛОЖКА: Теперь это и есть основная область скролла */
    #reports-modal {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
        overflow-y: auto !important;
        /* Скролл всей модалки */
        background: #1a1f25 !important;
        z-index: 999999 !important;
    }

    /* 2. КОНТЕЙНЕР: Теперь он просто растягивается вниз по мере роста отчета */
    #reports-dynamic-container {
        display: block !important;
        height: auto !important;
        min-height: 100% !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. ШАПКА: Прибита к верху страницы */
    .reports-header {
        position: sticky !important;
        /* Делаем её липкой */
        top: 0 !important;
        /* Прижимаем к самому верху */
        width: 100% !important;
        z-index: 1000 !important;
        /* Чтобы была поверх формы и таблицы */
        background: #2c3e50 !important;
        /* Плотный фон, чтобы контент не просвечивал при скролле */
        padding: 8px 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    /* 4. ФОРМА: Максимально компактная для одного экрана */
    .reports-selection-panel {
        display: flex !important;
        flex-direction: column !important;
        padding: 12px !important;
        background: #242b33 !important;
        border-bottom: 1px solid #34495e !important;
    }

    /* Уменьшаем блоки с подписями */
    .report-input-group {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Метки полей (ОБЪЕКТ, НАЧАЛО и т.д.) */
    .report-input-group label {
        font-size: 10px !important;
        /* Совсем мелкий шрифт для меток */
        text-transform: uppercase;
        margin-bottom: 2px !important;
        opacity: 0.8;
    }

    /* Сами поля ввода и выпадающие списки */
    .report-input-group select,
    .report-input-group input {
        width: 100% !important;
        height: 30px !important;
        /* Очень компактная высота */
        font-size: 13px !important;
        /* Читабельно, но мелко */
        padding: 0 8px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        border-radius: 4px !important;
    }

    /* Кнопка создания отчета */
    .btn-generate {
        width: 100% !important;
        height: 36px !important;
        /* Кнопка чуть заметнее полей, но ниже чем была */
        font-size: 14px !important;
        margin-top: 5px !important;
        padding: 0 !important;
        font-weight: bold !important;
        text-transform: none !important;
    }

    /* Уменьшаем шапку, чтобы освободить место для формы */
    .reports-header {
        padding: 8px 15px !important;
        /* Узкая шапка */
    }

    .reports-header h2 {
        font-size: 16px !important;
        /* Уменьшаем заголовок "Модуль отчетов" */
        margin: 0 !important;
    }

    /* 5. УНИВЕРСАЛЬНЫЙ КОНТЕЙНЕР ДЛЯ ВСЕХ ТАБЛИЦ */
    /* Оборачиваем вызов любой таблицы в overflow-x: auto в JS или через CSS ниже */
    .reports-body table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    /* 6. СПЕЦИФИЧНЫЕ ПРАВКИ ПОД ТВОЙ КОД */

    /* Таблицы Поездок, Пробега и Топлива */
    #trips-table-data,
    #daily-mileage-table,
    #daily-fuel-table,
    .table-dark {
        font-size: 11px !important;
        /* Уменьшаем шрифт для мобильных */
    }

    #trips-table-data th,
    #trips-table-data td,
    #daily-mileage-table th,
    #daily-mileage-table td,
    #daily-fuel-table th,
    #daily-fuel-table td {
        padding: 8px 6px !important;
        /* Компактные ячейки */
    }

    /* 7. АДАПТАЦИЯ ИТОГОВЫХ КАРТОЧЕК (generatePeriodMileageTable) */
    /* Чтобы "Итоговые показатели" не выглядели огромными */
    .reports-body div[style*="padding: 25px"] {
        padding: 15px !important;
        margin-top: 10px !important;
    }

    .reports-body table[style*="border-spacing: 0 15px"] {
        border-spacing: 0 8px !important;
        /* Уменьшаем дырки между строками итогов */
    }

    .reports-body td[style*="font-size: 24px"] {
        font-size: 18px !important;
        /* Уменьшаем крупные цифры пробега */
    }

    /* Кнопки действий (На карту, Узнать адрес) делаем кнопками, а не ссылками */
    span[onclick*="focusOnStop"],
    span[onclick*="getAddress"] {
        display: inline-block !important;
        padding: 4px 8px !important;
        background: rgba(52, 152, 219, 0.2) !important;
        border-radius: 4px !important;
        margin: 2px 0 !important;
    }

    /* Контейнер всего отчета внутри модалки */
    #report-view-container {
        padding: 10px !important;
        overflow: visible !important;
        /* Позволяем родителю управлять скроллом */
    }

    /* Шапка отчета (всегда сверху) */
    .report-header-bar {
        flex-shrink: 0;
        /* Не сжимается */
    }

    /* Область с таблицей (скроллится) */
    .report-table-holder {
        flex-grow: 1;
        /* Занимает все свободное пространство */
        overflow-y: auto;
        /* Включает вертикальный скролл */
        padding: 0 20px 20px 20px;
    }

    /* Делаем шапку таблицы прилипающей (опционально) */
    .report-table-holder table thead th {
        position: sticky;
        top: 0;
        background: #2c3e50;
        /* Цвет фона вашей шапки */
        z-index: 10;
    }

    /* 1. ФИКС МОДАЛКИ В ФУЛЛСКРИНЕ */
    /* Селектор ловит инлайновый стиль width: 100%, который вешает твой скрипт */
    #reports-modal[style*="width: 100%"],
    #reports-modal[style*="width:100%"] {
        height: 100vh !important;
        max-height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        /* Важно: само окно не скроллим, скроллим только контент внутри */
    }

    /* Скрываем кнопку развертывания, чтобы пользователь случайно не ломал окно */
    .btn-toggle-fullscreen,
    [onclick*="toggleFullScreen"] {
        display: none !important;
    }

    /* 2. ШАПКА В ФУЛЛСКРИНЕ */
    .reports-header {
        flex-shrink: 0 !important;
        /* Запрещаем шапке сжиматься или исчезать */
        position: relative !important;
        z-index: 1001 !important;
    }

    /* 3. КОНТЕЙНЕР ДЛЯ ВСЕГО ЧТО НИЖЕ ШАПКИ */
    #reports-dynamic-container {
        flex-grow: 1 !important;
        /* Занимает всё оставшееся место */
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        /* Вот тут включаем скролл */
        height: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 4. ПАНЕЛЬ ВЫБОРА (ОБЪЕКТ/ТИП) */
    .reports-selection-panel {
        display: flex !important;
        flex-shrink: 0 !important;
        /* Чтобы форма не схлопнулась */
        visibility: visible !important;
        opacity: 1 !important;
        padding: 15px !important;
    }

    /* 5. ОБЛАСТЬ ОТЧЕТА */
    #report-view-container {
        flex-grow: 1 !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        /* Даем таблице растягивать внутренний контейнер */
    }

    /* 6. ТАБЛИЦЫ (ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ) */
    .reports-body table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

/* --- ГЛОБАЛЬНАЯ СВЕТЛАЯ ТЕМА --- */
body.light-mode {
    background-color: #f0f2f5 !important;
    color: #2c3e50 !important;
}

/* Шапка и Логотип */
body.light-mode .top-bar {
    background-color: #ffffff !important;
    border-bottom: 2px solid #f39c12 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-mode .logo {
    color: #2c3e50 !important;
}

/* Статистика в шапке (Объект, Период, Точки) */
body.light-mode .info-box {
    background: rgba(0, 0, 0, 0.03) !important;
}

body.light-mode .stat-line,
body.light-mode .device-name,
body.light-mode .period-val {
    color: #576574 !important;
}

body.light-mode #stat-points,
body.light-mode #stat-dist {
    color: #2c3e50 !important;
    font-weight: bold;
}

/* Модальные окна (Профиль, Параметры, Календарь) */
body.light-mode .modal-content {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #dcdde1 !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .modal-content h3,
body.light-mode .modal-content h4 {
    color: #2c3e50 !important;
}

body.light-mode .modal-content label {
    color: #636e72 !important;
}

body.light-mode .modal-content input,
body.light-mode .modal-content select {
    background: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #2c3e50 !important;
}

/* Списки устройств (Правая панель) */
body.light-mode #devices-container,
body.light-mode #objects-container,
body.light-mode .devices-content,
body.light-mode .objects-content {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
}

body.light-mode .devices-header,
body.light-mode .objects-header {
    background-color: #f1f2f6 !important;
    border-bottom: 1px solid #dcdde1 !important;
    color: #2c3e50 !important;
}

body.light-mode .device-item {
    background: #ffffff !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #f1f2f6 !important;
}

body.light-mode .device-item:hover {
    background: #f8f9fa !important;
}

body.light-mode .device-item.active-device {
    background: #e8f0fe !important;
}

body.light-mode .group-header {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
}

/* Телеметрия (Live Status) */
body.light-mode #live-telemetry {
    background: #ffffff !important;
    border: 1px solid #dcdde1 !important;
}

body.light-mode .tel-header {
    background: #f1f2f6 !important;
    color: #2c3e50 !important;
}

body.light-mode .tel-row {
    color: #2c3e50 !important;
    border-bottom: 1px solid #f1f2f6 !important;
}

/* Графики и Отчеты */
body.light-mode .charts-section,
body.light-mode .reports-container {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

body.light-mode .chart-header,
body.light-mode .reports-header {
    background: #f1f2f6 !important;
    color: #2c3e50 !important;
}

/* Исправление контрастности в светлой теме */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Шапка (image_85e91a.png) - текст периода и статистики */
body.light-mode .stat-line {
    color: #576574 !important;
}

body.light-mode .period-val {
    color: #7f8c8d !important;
}

body.light-mode #stat-points,
body.light-mode #stat-dist {
    color: #2c3e50 !important;
}

/* 2. Кнопки управления на карте (image_85e8e3.png) */
body.light-mode #devices-toggle-btn,
body.light-mode #objects-toggle-btn,
body.light-mode .period-trigger {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #devices-toggle-btn i,
body.light-mode #objects-toggle-btn i {
    color: #2c3e50 !important;
}

/* 3. Заголовки графиков и отчетов (image_85e238.png, image_85e520.png) */
body.light-mode .chart-header,
body.light-mode .reports-header {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
}

/* Кнопки в заголовках (навигация и закрытие) */
body.light-mode .btn-toggle-chart,
body.light-mode .btn-close-chart,
body.light-mode .window-control-btn,
body.light-mode .btn-close-modal {
    color: #2c3e50 !important;
    /* Делаем их темными, а не белыми */
}

/* 4. Поля поиска (image_85e8c3.png) */
body.light-mode #device-search,
body.light-mode #geoSearchInput {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #2c3e50 !important;
}

body.light-mode #device-search::placeholder {
    color: #adb5bd;
}

/* 5. Кнопки типов геозон (image_85e616.png) */
/* Если кнопки были белыми на белом, добавим им тень или контур */
body.light-mode .btn-generate {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 6. Поп-апы Leaflet на карте */
body.light-mode .leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

body.light-mode .leaflet-popup-tip {
    background: #ffffff !important;
}

/* --- КРИТИЧЕСКИЕ ПРАВКИ СВЕТЛОЙ ТЕМЫ --- */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Исправление кнопок на карте и в шапке (image_85e55a) */
body.light-mode .header-icon-btn,
body.light-mode .btn-toggle-chart,
body.light-mode .btn-close-chart,
body.light-mode .window-control-btn,
body.light-mode .btn-close-modal,
body.light-mode #btn-fullscreen-chart {
    /* Исправлена кнопка "на весь экран" */
    color: #2c3e50 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* 2. Модуль отчетов (image_85e520) */
body.light-mode #reports-dynamic-container {
    background-color: #ffffff !important;
}

body.light-mode .reports-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

body.light-mode .reports-header h2 {
    color: #2c3e50 !important;
    /* Название отчета теперь темное */
}

body.light-mode .reports-selection-panel {
    background-color: #f1f2f6 !important;
    border-bottom: 1px solid #ced4da !important;
}

body.light-mode .report-input-group label {
    color: #636e72 !important;
}

/* 3. Вкладка устройства и группы (image_85e8c3) */
body.light-mode .group-header {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #dcdde1 !important;
}

/* Исправление счетчика устройств в группе */
body.light-mode .group-header span[style*="background: #34495e"] {
    background-color: #dcdde1 !important;
    color: #2c3e50 !important;
}

body.light-mode .group-items-container {
    background-color: #ffffff !important;
}

/* 4. Графики (image_85e238) */
body.light-mode .charts-section {
    background-color: #ffffff !important;
}

body.light-mode .chart-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

body.light-mode #chart-title {
    color: #e67e22 !important;
    /* Оставляем акцентным, но на светлом фоне */
}

/* --- ФИНАЛЬНЫЕ КОРРЕКТИРОВКИ СВЕТЛОЙ ТЕМЫ --- */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Заголовки панелей (Устройства и Объекты) */
body.light-mode .devices-header .tel-title-text,
body.light-mode .objects-header span,
body.light-mode #devices-chevron-icon,
body.light-mode #objects-chevron-icon {
    color: #2c3e50 !important;
}

/* 2. Кнопки-кружки на карте (Графики, Отчеты) */
body.light-mode .header-icon-btn {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .header-icon-btn i {
    color: #2c3e50 !important;
    /* Иконки теперь темные */
}

/* 3. Модуль отчетов (Заголовок и Фон контента) */
body.light-mode #reports-dynamic-container {
    background-color: #ffffff !important;
}

body.light-mode .reports-header h2 {
    color: #2c3e50 !important;
    /* Название отчета темное */
}

body.light-mode .reports-body {
    background-color: #ffffff !important;
    /* Фон самого отчета белый */
    color: #2c3e50 !important;
}

body.light-mode #report-table td {
    color: #2c3e50 !important;
    border-bottom: 1px solid #f1f2f6 !important;
}

/* 4. Группы устройств (Счетчик и фон) */
body.light-mode .device-group-wrapper {
    background-color: #ffffff !important;
}

/* Исправление синего кружка с цифрой */
body.light-mode .group-header span[style*="background: #34495e"] {
    background-color: #f1f2f6 !important;
    color: #2c3e50 !important;
    border: 1px solid #dcdde1;
}

/* 5. Исправление кнопок в шапке графиков */
body.light-mode .btn-toggle-chart,
body.light-mode .btn-close-chart,
body.light-mode #btn-fullscreen-chart i,
body.light-mode .chart-controls i {
    color: #2c3e50 !important;
}

/* --- КОРРЕКЦИЯ СВЕТЛОЙ ТЕМЫ --- */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Заголовки панелей Объекты и Устройства (image_76cef3) */
body.light-mode .devices-header .tel-title-text,
body.light-mode .objects-header span,
body.light-mode #devices-chevron-icon,
body.light-mode #objects-chevron-icon {
    color: #2c3e50 !important;
}

/* 2. Круглые кнопки на карте - Графики, Отчеты (edited-image.png) */
body.light-mode .header-icon-btn {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode .header-icon-btn i {
    color: #2c3e50 !important;
    /* Иконки теперь темные */
}

/* 3. Модуль отчетов (image_7674bd) */
body.light-mode #reports-dynamic-container {
    background-color: #ffffff !important;
}

body.light-mode .reports-header {
    background-color: #f1f2f6 !important;
    border-bottom: 1px solid #dcdde1 !important;
}

body.light-mode .header-main-info i,
body.light-mode .header-main-info h2 {
    color: #2c3e50 !important;
    /* Текст заголовка темный */
}

body.light-mode .reports-body {
    background-color: #ffffff !important;
    /* Фон под таблицей светлый */
    color: #2c3e50 !important;
}

/* 4. Группы устройств - счетчик и фон (image_85e8c3) */
body.light-mode .group-header {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #eee !important;
}

/* Счетчик устройств (цифра в кружке) */
body.light-mode .group-header span[style*="background: #34495e"] {
    background-color: #dcdde1 !important;
    color: #2c3e50 !important;
    font-weight: bold;
}

/* 5. Графики - кнопки управления (edited-image.jpg) */
body.light-mode .chart-header {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
}

body.light-mode .chart-controls i,
body.light-mode #btn-fullscreen-chart i,
body.light-mode .btn-toggle-chart i {
    color: #2c3e50 !important;
}

/* В style.css */
body.light-mode .group-header span {
    background-color: #f1f2f6 !important;
    color: #2c3e50 !important;
    border: 1px solid #dcdde1;
}

body.light-mode .reports-body {
    background-color: #ffffff !important;
}

/* Иконки в свернутых кружках */
body.light-mode .collapsed-circle i,
body.light-mode .report-minimized i {
    color: #2c3e50 !important;
}

/* Кнопка фуллскрин на графике */
body.light-mode #btn-fullscreen-chart i {
    color: #2c3e50 !important;
}

body.light-mode .report-minimized #reports-dynamic-container {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1;
}

body.light-mode .report-minimized #reports-dynamic-container i {
    color: #2c3e50 !important;
}

/* --- ФИНАЛЬНЫЕ КОРРЕКТИРОВКИ ДЛЯ СВЕТЛОЙ ТЕМЫ --- */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Текст в отчетах (image_7593be) */
body.light-mode .report-header-bar {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

/* 2. Кнопка отчетов (кружок) - image_6b8bd6 */
body.light-mode .report-minimized #reports-dynamic-container {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode .report-minimized .header-main-info i {
    color: #2c3e50 !important;
    /* Иконка в кружке теперь темная */
}

/* 3. Кнопка графика (кружок) - image_6b1f1a */
body.light-mode #charts-container.collapsed-circle {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
}

body.light-mode #chart-toggle-icon {
    color: #2c3e50 !important;
}

/* 4. Кнопка "на весь экран" и управление графиком */
body.light-mode #btn-fullscreen-chart i,
body.light-mode .btn-toggle-chart i,
body.light-mode .chart-controls i {
    color: #2c3e50 !important;
}

/* 5. Исправление тусклого текста в таблицах отчетов */
body.light-mode .report-table-holder td {
    color: #2c3e50 !important;
}

body.light-mode .report-table-holder th {
    background-color: #f1f2f6 !important;
    color: #3498db !important;
}

/* --- ФИНАЛЬНЫЕ КОРРЕКТИРОВКИ ДЛЯ СВЕТЛОЙ ТЕМЫ --- */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Текст в отчетах (Объект, Период) - image_7593be */
body.light-mode .report-header-bar {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

/* Делаем надписи "Объект:" и "Период:" максимально темными */
body.light-mode .report-header-bar div,
body.light-mode .report-header-bar div[style*="color: #eee"],
body.light-mode .report-header-bar div[style*="color: #888"] {
    color: #2c3e50 !important;
}

/* Сохраняем яркость для IMEI и названий (зеленый) */
body.light-mode .report-header-bar span[style*="color: #2ecc71"],
body.light-mode .report-header-bar span[style*="color: rgb(46, 204, 113)"] {
    color: #27ae60 !important;
}

/* 2. Кнопка отчетов (кружок) - image_6b8bd6 */
body.light-mode .report-minimized #reports-dynamic-container {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Перекрашиваем иконку файла в кружке в темный */
body.light-mode .report-minimized .header-main-info i,
body.light-mode .report-minimized i.fa-file-alt {
    color: #2c3e50 !important;
}

/* 3. Кнопка графика (кружок) - image_17f282 / image_6b8fd3 */
body.light-mode #charts-container.collapsed-circle {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
}

/* Принудительно красим иконку графика в темный цвет */
body.light-mode #charts-container.collapsed-circle #chart-toggle-icon,
body.light-mode #charts-container.collapsed-circle i.fa-chart-line {
    color: #2c3e50 !important;
}

/* 4. Кнопка "на весь экран" и управление графиком */
body.light-mode #btn-fullscreen-chart i,
body.light-mode .btn-toggle-chart i,
body.light-mode .chart-controls i {
    color: #2c3e50 !important;
}

/* 5. Таблицы отчетов */
body.light-mode .report-table-holder td {
    color: #2c3e50 !important;
}

body.light-mode .report-table-holder th {
    background-color: #f1f2f6 !important;
    color: #3498db !important;
}

/* Дополнительно: фикс для всех свернутых кружков на карте */
body.light-mode .collapsed-circle {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
}

body.light-mode .collapsed-circle i {
    color: #2c3e50 !important;
}

/* --- ФИНАЛЬНЫЕ КОРРЕКТИРОВКИ ДЛЯ СВЕТЛОЙ ТЕМЫ --- */
body.light-mode {
    background-color: #f0f2f5 !important;
}

/* 1. Текст в отчетах (Объект, Период) - image_7593be */
body.light-mode .report-header-bar {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

/* Делаем надписи "Объект:" и "Период:" максимально темными и четкими */
body.light-mode .report-header-bar div,
body.light-mode .report-header-bar div[style*="color: #eee"],
body.light-mode .report-header-bar div[style*="color: #888"],
body.light-mode .report-header-bar .period-label {
    color: #2c3e50 !important;
    opacity: 1 !important;
}

/* Сохраняем яркость для IMEI и названий (зеленый) */
body.light-mode .report-header-bar span[style*="color: #2ecc71"],
body.light-mode .report-header-bar span[style*="color: rgb(46, 204, 113)"] {
    color: #27ae60 !important;
}

/* 2. Кнопка отчетов (кружок) - image_6b8bd6 и image_17e814 */
body.light-mode .report-minimized #reports-dynamic-container,
body.light-mode .report-minimized {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Перекрашиваем иконку файла в кружке в темный */
body.light-mode .report-minimized .header-main-info i,
body.light-mode .report-minimized i.fa-file-alt,
body.light-mode .report-minimized i {
    color: #2c3e50 !important;
}

/* 3. Кнопка графика (кружок) - image_17f282 / image_6b8fd3 */
body.light-mode #charts-container.collapsed-circle {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
}

/* Принудительно красим иконку графика в темный цвет */
body.light-mode #charts-container.collapsed-circle #chart-toggle-icon,
body.light-mode #charts-container.collapsed-circle i.fa-chart-line,
body.light-mode #chart-toggle-icon {
    color: #2c3e50 !important;
}

/* 4. Кнопка "на весь экран" и управление графиком */
body.light-mode #btn-fullscreen-chart i,
body.light-mode .btn-toggle-chart i,
body.light-mode .chart-controls i {
    color: #2c3e50 !important;
}

/* 5. Таблицы отчетов */
body.light-mode .report-table-holder td {
    color: #2c3e50 !important;
}

body.light-mode .report-table-holder th {
    background-color: #f1f2f6 !important;
    color: #3498db !important;
}

/* Дополнительно: фикс для всех свернутых кружков на карте */
body.light-mode .collapsed-circle,
body.light-mode #live-telemetry.collapsed {
    background-color: #ffffff !important;
    border: 1px solid #dcdde1 !important;
}

body.light-mode .collapsed-circle i,
body.light-mode .collapsed i {
    color: #2c3e50 !important;
}

/* 6. МОДАЛЬНЫЕ ОКНА ПАРАМЕТРОВ И УВЕДОМЛЕНИЙ */
body.light-mode .modal-content {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #dcdde1 !important;
}

/* Фикс текста в окне "Внимание" (image_17731d) */
body.light-mode #m-info-text {
    color: #2c3e50 !important;
    opacity: 1 !important;
}

body.light-mode #m-info-title {
    color: #2c3e50 !important;
}

body.light-mode .modal-content input,
body.light-mode .modal-content select {
    background: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #2c3e50 !important;
}

/* 3. КРУГЛЫЕ КНОПКИ НА КАРТЕ (СВЕРНУТОЕ СОСТОЯНИЕ) */
/* Белый фон для ВСЕХ кружков: устройства, геозоны, телеметрия, отчеты, графики */
body.light-mode .collapsed-circle,
body.light-mode #live-telemetry.collapsed,
body.light-mode #devices-container.collapsed-circle,
body.light-mode #objects-container.collapsed-circle,
body.light-mode #reports-dynamic-container.collapsed-circle,
body.light-mode #charts-container.collapsed-circle,
body.light-mode .report-minimized #reports-dynamic-container,
body.light-mode .report-minimized {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Темные иконки внутри всех кружков (Исправляет иконку графика, отчета и устройства) */
body.light-mode .collapsed-circle i,
body.light-mode .collapsed i,
body.light-mode .report-minimized i,
body.light-mode #chart-toggle-icon,
body.light-mode #devices-toggle-icon,
body.light-mode #objects-toggle-icon {
    color: #2c3e50 !important;
}

/* * ==========================================
 * ФИНАЛЬНЫЙ БЛОК СВЕТЛОЙ ТЕМЫ (LIGHT MODE)
 * ==========================================
 */

body.light-mode {
    background-color: #f0f2f5 !important;
    color: #2c3e50 !important;
}

/* 1. ШАПКА И СТАТИСТИКА */
body.light-mode .top-bar {
    background-color: #ffffff !important;
    border-bottom: 2px solid #f39c12 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-mode .logo {
    color: #2c3e50 !important;
}

body.light-mode .info-box {
    background: rgba(0, 0, 0, 0.03) !important;
}

body.light-mode .stat-line {
    color: #576574 !important;
}

body.light-mode #stat-points,
body.light-mode #stat-dist {
    color: #2c3e50 !important;
    font-weight: bold;
}

/* 2. МОДУЛЬ ОТЧЕТОВ И МОДАЛКИ (image_7593be) */
body.light-mode #reports-dynamic-container {
    background-color: #ffffff !important;
}

body.light-mode .reports-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

body.light-mode .reports-header h2 {
    color: #2c3e50 !important;
}

/* Перебиваем инлайновые стили #eee и #888 из reports.js (Пункт №1) */
body.light-mode .report-header-bar div,
body.light-mode .report-header-bar div[style*="color: #eee"],
body.light-mode .report-header-bar div[style*="color: #888"],
body.light-mode .report-header-bar span:not([style*="color: #2ecc71"]):not([style*="color: rgb(46, 204, 113)"]) {
    color: #2c3e50 !important;
    opacity: 1 !important;
}

/* 3. КРУГЛЫЕ КНОПКИ НА КАРТЕ (ФОН И ИКОНКИ) */
/* ПРИНУДИТЕЛЬНЫЙ ФИКС ДЛЯ КРУЖКА ОТЧЕТОВ (image_08e03b) */
/* Мы используем сверх-специфичный селектор, чтобы победить основной стиль body #id... */
body.light-mode #reports-modal.report-minimized #reports-dynamic-container,
body.light-mode #reports-dynamic-container.collapsed-circle,
body.light-mode #devices-container.collapsed-circle,
body.light-mode #objects-container.collapsed-circle,
body.light-mode #live-telemetry.collapsed,
body.light-mode #devices-toggle-btn,
body.light-mode #objects-toggle-btn,
body.light-mode #charts-container.collapsed-circle {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #dcdde1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Гарантируем ТЕМНЫЕ иконки внутри всех кружков (Пункт №2 и №3) */
body.light-mode .collapsed-circle i,
body.light-mode .collapsed i,
body.light-mode .report-minimized i,
body.light-mode #chart-toggle-icon,
body.light-mode #devices-toggle-icon,
body.light-mode #objects-toggle-icon {
    color: #2c3e50 !important;
}

/* 4. ГРАФИКИ И ОКНА УВЕДОМЛЕНИЙ */
body.light-mode .charts-section {
    background-color: #ffffff !important;
}

body.light-mode .chart-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dcdde1 !important;
}

body.light-mode #chart-title {
    color: #e67e22 !important;
}

body.light-mode #btn-fullscreen-chart i,
body.light-mode .btn-toggle-chart i,
body.light-mode .chart-controls i {
    color: #2c3e50 !important;
}

/* Фикс текста в окне "Внимание" (уведомления) */
body.light-mode #m-info-text {
    color: #2c3e50 !important;
    opacity: 1 !important;
}

body.light-mode #m-info-title {
    color: #2c3e50 !important;
}

/* 5. СПИСКИ УСТРОЙСТВ */
body.light-mode .device-item {
    background: #ffffff !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #f1f2f6 !important;
}

body.light-mode .device-item:hover {
    background: #f8f9fa !important;
}

body.light-mode .device-item.active-device {
    background: #e8f0fe !important;
}

body.light-mode .group-header {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
    border-bottom: 1px solid #dcdde1 !important;
}

body.light-mode .group-header span {
    background-color: #f1f2f6 !important;
    color: #2c3e50 !important;
    border: 1px solid #dcdde1 !important;
}

/* 6. МОДАЛЬНЫЕ ОКНА ПАРАМЕТРОВ */
body.light-mode .modal-content {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #dcdde1 !important;
}

body.light-mode .modal-content input,
body.light-mode .modal-content select {
    background: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #2c3e50 !important;
}

/* =====================================================================
   📊 СТИЛІ ПРОФІЛЮ ТА МОДALНИХ ВІКОН ProfGPS
   ===================================================================== */

.btn-profile-header {
    background-color: #f39c12 !important;
    color: white !important;
}

.btn-profile-header:hover {
    background-color: #e67e22 !important;
}

/* 7. КОМПАКТНЫЙ ПРОФИЛЬ (ID и Тема в одну строку) */
#profile-content>div {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 10px !important;
}

/* Блок ID на 60% ширины */
#profile-content>div>div:nth-child(1) {
    flex: 1 1 0% !important;
    margin: 0 !important;
}

/* Блок Темы на остаток ширины */
#profile-content>div>div:nth-child(2) {
    flex: 0 0 160px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Уменьшаем text заголовка в блоке темы */
#profile-content>div>div:nth-child(2) div:first-child {
    font-size: 8px !important;
    margin-bottom: 5px !important;
}

/* Делаем кнопки темы чуть компактнее */
#profile-content>div>div:nth-child(2) button {
    padding: 6px !important;
    font-size: 10px !important;
}

/* HR и кнопки действий растягиваем на всю ширину */
#profile-content>div>hr,
#profile-content>div>button {
    flex: 1 0 100% !important;
    margin: 5px 0 0 0 !important;
}

/* =====================================================================
   🌟 ІДЕАЛЬНІ ОРАНЖЕВІ СКРОЛЛБАРИ (Глобальні + Локальні)
   ===================================================================== */

/* Глобальний фікс: прибираємо горизонтальну смугу прокручування всюди, де її не повинно бути */
html,
body,
.table-wrapper,
#devices-container {
    overflow-x: hidden !important;
    /* Наглухо закриває появу горизонтального скролла */
}

/* Тонкі оранжеві скроллбари для ВСІХ елементів системи (включаючи списки, меню та випадаючі вікна) */
::-webkit-scrollbar,
#devices-container *::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

::-webkit-scrollbar-track,
#devices-container *::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 10px !important;
}

/* Фірмовий оранжевий бігунок ProfGPS */
::-webkit-scrollbar-thumb,
#devices-container *::-webkit-scrollbar-thumb {
    background: rgba(243, 156, 18, 0.6) !important;
    border-radius: 10px !important;
    border: none !important;
}

/* Ефект підсвічування при наведенні курсору */
::-webkit-scrollbar-thumb:hover,
#devices-container *::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 126, 34, 1) !important;
    /* Стає більш насиченим оранжевим */
    cursor: pointer;
}

/* =====================================================================
   ⚙️ ЖЕСТКА АКТИВАЦІЯ ВЕРТИКАЛЬНОГО СКРОЛЛУ ПРИСТРОЇВ
   ===================================================================== */

#devices-container.stretched {
    height: calc(100vh - 120px) !important;
    max-height: calc(100vh - 120px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#devices-container.stretched #devices-list-container {
    height: calc(100vh - 210px) !important;
    /* Высота экрана минус шапка и поиск */
    max-height: calc(100vh - 210px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Повністю захищає від бокових зрушень */
    display: block !important;
}

/* =====================================================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ МОДАЛЬНОГО ОКНА ПРОФИЛЯ PROFGPS
   ===================================================================== */
@media screen and (max-width: 480px) {

    /* 1. Делаем саму контентную область окна гибкой, убирая фиксированную ширину */
    #profileModal .modal-content,
    .profile-modal-content {
        /* Подставь точный селектор контента модалки профиля, если он отличается */
        width: 95vw !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 15px !important;
        margin: 10px auto !important;
        max-height: 92vh !important;
        /* Ограничиваем по высоте, чтобы не вылезало за экран */
        overflow-y: auto !important;
        /* Включаем внутренний вертикальный скролл при необходимости */
    }

    /* 2. Разворачиваем верхние карточки (Логин/Баланс) из строки в колонку */
    #profileModal .modal-content>div[style*="display: flex"],
    .profile-info-grid {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Убираем фиксированную или пропорциональную ширину внутренних блоков карточек */
    #profileModal .modal-content div[style*="width"] {
        width: 100% !important;
    }

    /* 3. Перестраиваем горизонтальные кнопки Диспетчера в вертикальный стек */
    #profileModal button[id*="share"],
    #profileModal .btn-group,
    #profileModal div[style*="display: flex; gap"] {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    #profileModal button,
    #profileModal a,
    #profileModal .lang-btn,
    #profileModal .theme-btn {
        width: 100% !important;
        justify-content: center !important;
        font-size: 13px !important;
        padding: 12px 10px !important;
        /* Увеличиваем область клика для пальцев */
    }

    /* 4. Оптимизируем инпут ссылки шеринга/логина */
    #profileModal input[type="text"],
    #profileModal div[style*="display: flex; align-items: center; background"] {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5. Делаем блоки выбора Темы и Языка адаптивными */
    .theme-selection-group,
    .lang-selection-group,
    #profileModal div[style*="display:flex; gap"][style*="margin-top"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Выстраиваем кнопки UA / RU / EN во всю ширину на мобилке */
    #profileModal div[style*="display: flex; gap"]>button {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    /* 6. Финальные кнопки ("Змінити пароль", "Вийти із системи") */
    #profileModal .btn-submit,
    #profileModal button[onclick*="logout"],
    #profileModal button[onclick*="Password"] {
        width: 100% !important;
        font-size: 14px !important;
        margin-top: 10px !important;
    }
}

/* =====================================================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ МОДАЛЬНОГО ОКНА ПРОФИЛЯ PROFGPS
   ===================================================================== */
@media screen and (max-width: 768px) {

    /* 1. Делаем саму контентную область окна гибкой, убирая фиксированную ширину */
    #profileModal .modal-content,
    .profile-modal-content {
        /* Подставь точный селектор контента модалки профиля, если он отличается */
        width: 95vw !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 15px !important;
        margin: 10px auto !important;
        max-height: 92vh !important;
        /* Ограничиваем по высоте, чтобы не вылезало за экран */
        overflow-y: auto !important;
        /* Включаем внутренний вертикальный скролл при необходимости */
    }

    /* 2. Разворачиваем верхние карточки (Логин/Баланс) из строки в колонку */
    #profileModal .modal-content>div[style*="display: flex"],
    .profile-info-grid {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Убираем фиксированную или пропорциональную ширину внутренних блоков карточек */
    #profileModal .modal-content div[style*="width"] {
        width: 100% !important;
    }

    /* 3. Перестраиваем горизонтальные кнопки Диспетчера в вертикальный стек */
    #profileModal button[id*="share"],
    #profileModal .btn-group,
    #profileModal div[style*="display: flex; gap"] {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    #profileModal button,
    #profileModal a,
    #profileModal .lang-btn,
    #profileModal .theme-btn {
        width: 100% !important;
        justify-content: center !important;
        font-size: 13px !important;
        padding: 12px 10px !important;
        /* Увеличиваем область клика для пальцев */
    }

    /* 4. Оптимизируем инпут ссылки шеринга/логина */
    #profileModal input[type="text"],
    #profileModal div[style*="display: flex; align-items: center; background"] {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5. Делаем блоки выбора Темы и Языка адаптивными */
    .theme-selection-group,
    .lang-selection-group,
    #profileModal div[style*="display:flex; gap"][style*="margin-top"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Выстраиваем кнопки UA / RU / EN во всю ширину на мобилке */
    #profileModal div[style*="display: flex; gap"]>button {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    /* 6. Финальные кнопки ("Змінити пароль", "Вийти із системи") */
    #profileModal .btn-submit,
    #profileModal button[onclick*="logout"],
    #profileModal button[onclick*="Password"] {
        width: 100% !important;
        font-size: 14px !important;
        margin-top: 10px !important;
    }
}

/* =====================================================================
   📱 АВТО-ВЫРАВНИВАНИЕ БЛОКА НАСТРОЕК ПРОФИЛЯ (ЭКРАНЫ ДО 480px)
   ===================================================================== */
@media screen and (max-width: 768px) {

    /* Разворачиваем объединенную строку Темы и Языка в колонку */
    #profileModal .profile-settings-row {
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* Прячем вертикальную разделительную линию, так как блоки теперь один под другим */
    #profileModal .profile-settings-divider {
        display: none !important;
    }

    /* Сбрасываем боковые паддинги у левой и правой колонки */
    #profileModal .profile-settings-col {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    /* Заставляем внутренние flex-строки самих кнопок выстраиваться вертикально */
    #profileModal .profile-settings-col>div[style*="display: flex"],
    #profileModal .profile-settings-col>div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Растягиваем кнопки UA/RU/EN и ТЕМНА/СВІТЛА на всю ширину */
    #profileModal .theme-btn,
    #profileModal .lang-btn,
    #profileModal .profile-settings-col button {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
}

/* Базовое состояние мобильного селектора вкладок на ПК */
.params-mobile-nav {
    display: none !important;
}

/* =====================================================================
   📱 ЭТАЛОННАЯ МОБИЛЬНАЯ АДАПТАЦИЯ ОКНА ПАРАМЕТРОВ ТЗ (ЭКРАНЫ ДО 480px)
   ===================================================================== */
@media screen and (max-width: 480px) {

    /* L. ПОЛНОСТЬЮ ОТКЛЮЧАЕМ ГОРИЗОНТАЛЬНЫЕ ТАБЫ ДЕСКТОПА */
    .params-desktop-tabs,
    #paramsModal div[style*="display:flex; border-bottom"],
    #paramsModal div[style*="display: flex; border-bottom"] {
        display: none !important;
    }

    /* 2. АКТИВИРУЕМ И СТИЛИЗУЕМ ОРАНЖЕВЫЙ СЕЛЕКТОР PROFGPS */
    .params-mobile-nav {
        display: block !important;
        width: 100% !important;
        background: #0d141a !important;
        border: 1px solid #f39c12 !important;
        /* Наш фирменный оранжевый контур */
        color: #fff !important;
        padding: 12px 10px !important;
        font-size: 14px !important;
        font-weight: bold !important;
        border-radius: 4px !important;
        outline: none !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
        margin-bottom: 12px !important;
        -webkit-appearance: none;
        appearance: none;
    }

    /* 3. 🚀 ИСПРАВЛЕНО: ПОЛНОЭКРАННЫЙ МОБИЛЬНЫЙ РЕЖИМ БЕЗ ПОТЕРЬ И ЗАЛИПАНИЙ */
    body #paramsModal .modal-content,
    body #params-modal-box,
    body div[style*="background:#1a252f; padding:20px; border-radius:8px; width:350px"],
    body div[style*="width: 550px"],
    body div[style*="width:550px"] {
        width: 100vw !important;
        /* Бесшовная растяжка на всю ширину дисплея */
        height: 100vh !important;
        /* Бесшовная растяжка на всю физическую высоту */
        max-width: 100vw !important;
        max-height: 100vh !important;
        min-width: 0px !important;
        /* Вышибаем десктопный мин-видт со стр. 111 */

        padding: 20px 14px !important;
        /* Сбалансированные отступы контента */
        margin: 0 !important;
        /* Обнуляем отступы, чтобы убрать щели по краям */
        border-radius: 0px !important;
        /* Прямые углы для эффекта нативного мобильного приложения */
        box-sizing: border-box !important;

        overflow-y: auto !important;
        /* Разрешаем вертикальный скролл длинных вкладок */
        display: flex !important;
        /* Переводим внутренний каркас в колонку */
        flex-direction: column !important;
    }

    /* Дополнительно гарантируем, что подвальные кнопки всегда будут видны в самом низу */
    #paramsModal .modal-footer-buttons,
    #paramsModal div[style*="justify-content:flex-end"],
    #paramsModal div[style*="justify-content: flex-end"] {
        margin-top: auto !important;
        /* Выталкивает кнопки "Зберегти/Скасувати" в самый низ */
        padding-top: 15px !important;
    }

    /* 4. СЖАТИЕ И ВЫРАВНИВАНИЕ ВЕРХНЕГО ИНФО-БЛОКА ОБЪЕКТА С IMEI */
    #m-modal-global-header,
    div[id="m-modal-global-header"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px !important;
        margin-bottom: 12px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }

    #m-modal-global-header div[style*="line-height"] {
        display: flex !important;
        flex-direction: column !important;
        /* Сдвигаем IMEI под название */
        align-items: flex-start !important;
        gap: 4px !important;
    }

    #m-modal-global-header strong {
        font-size: 13px !important;
    }

    /* 5. РАЗВЕРТКА ДВУХКОЛОНОЧНЫХ ГРИДОВ (ВОДИТЕЛИ BLE И ХАРАКТЕРИСТИКИ ТС) */
    #paramsModal .grid-two-columns,
    #paramsModal div[style*="grid-template-columns: 1fr 1fr"],
    #paramsModal div[style*="grid-template-columns: 1fr 1fr;"] {
        grid-template-columns: 1fr !important;
        /* Строго одна колонка вместо двух */
        gap: 10px !important;
        width: 100% !important;
    }

    /* 6. ТРАНСФОРМАЦИЯ ВСЕХ ВНУТРЕННИХ FLEX-СТРОК В СТЭК */
    #paramsModal .flex-row-mobile-stack,
    #paramsModal div[style*="display:flex; gap"],
    #paramsModal div[style*="display: flex; gap"],
    #paramsModal div[style*="display:flex; gap:10px"],
    #paramsModal div[style*="display: flex; gap: 10px"] {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 10px !important;
    }

    /* Изолируем чекбоксы ТО, чтобы они не падали друг под друга */
    #paramsModal .checkbox-row-container,
    #paramsModal div[style*="gap:20px"] {
        flex-direction: row !important;
        gap: 20px !important;
        width: 100% !important;
        align-items: center !important;
    }

    /* Нижние кнопки Отмена / Сохранить */
    #paramsModal .modal-footer-buttons,
    #paramsModal div[style*="justify-content:flex-end"],
    #paramsModal div[style*="justify-content: flex-end"] {
        flex-direction: column !important;
        /* Кнопка "Зберегти" встает наверх под палец */
        width: 100% !important;
        gap: 10px !important;
        margin-top: 15px !important;
    }

    /* 7. АДАПТАЦИЯ ПОЛЕЙ ВВОДА И ТЕКСТОВЫХ ЗОН ТАРИРОВОК ДУТ */
    #paramsModal input,
    #paramsModal select:not(.params-mobile-nav),
    #paramsModal textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }

    #paramsModal button,
    #paramsModal .btn-save-prof,
    #paramsModal .btn-cancel-prof {
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px 10px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
        display: flex !important;
    }

    /* Коррекция кнопки одометра регламентов ТО */
    #paramsModal button[onclick*="fillCurrentStats"] {
        width: 100% !important;
        white-space: normal !important;
    }

    /* Защита от вылетов длинных URL шеринга гостевого доступа */
    #paramsModal div[style*="background: #0d141a"],
    #paramsModal div[style*="background:#0d141a"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #paramsModal input[id="share-link-url-input"],
    #paramsModal input[id="observer-link-input"] {
        word-break: break-all !important;
        white-space: normal !important;
    }
}