/* Автокомплит для добавления заправки */
.autocomplete-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    width: calc(100% - 2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}
.suggestion-item:hover {
    background-color: #f0f0f0;
}

/* Фиксация заголовков таблиц при прокрутке */
.table-responsive table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Подсветка перерасхода в отчёте */
tr.overuse {
    background-color: #ffe0e0 !important;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .table-responsive table {
        font-size: 0.8rem;
    }
    .table-responsive th, .table-responsive td {
        padding: 0.5rem;
    }
}
/* Скрываем поля выбора дат при выборе предустановленного периода */
.custom-date {
    display: none;
}

/* Делаем строки таблицы кликабельными (для топ-5 техники) */
.clickable-row:hover {
    background-color: #f0f0f0;
    cursor: pointer;
}
/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    /* Уменьшаем шрифт в таблицах */
    .table-responsive {
        font-size: 0.8rem;
    }
    .table-responsive td, 
    .table-responsive th {
        padding: 0.4rem 0.3rem;
        white-space: normal;
        word-break: break-word;
    }
    /* Карточки графиков */
    .card-body {
        padding: 0.75rem;
    }
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    /* Кнопки в ряд на мобильных */
    .btn-group-mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .btn-group-mobile .btn {
        flex: 1 0 auto;
        margin-bottom: 0.5rem;
    }
    /* Отступы для заголовков */
    .h5, h2.h5 {
        font-size: 1.1rem;
    }
    /* Блоки фильтров */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
}