.statistics-container {

    .filters-row {
        display: flex;
        align-items: center;
        justify-content: space-between;

        @media screen and (max-width: 500px) {
            flex-direction: column;
            gap: 20px;

            div {
                width: 100%;
            }

            button {
                width: 100%;
            }

            select {
                width: 100%;
            }
        }

        .left-section {
            display: flex;
            align-items: center;
            gap: 10px;

            @media screen and (max-width: 500px) {
                flex-direction: column;
            }

            .dates-row {
                display: flex;
                align-items: center;
                gap: 5px;
            }
        }

        .buttons {
            display: flex;
            align-items: center;
            gap: 10px;

            .outline-button {
                padding: 6px 12px;
                display: flex;
                justify-content: center;
            }

            @media screen and (max-width: 500px) {
                flex-direction: column;
            }
        }
    }

}

/* контейнер фильтров */
.filters-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

/* левая часть — равномерная сетка */
.filters-row .left-section {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px 16px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 680px; /* чтобы на десктопе смотрелось ровно */
}

/* одна ячейка сетки */
.filter-field { display: flex; align-items: center; }

/* диапазон дат: три колонки внутри своей ячейки */
.dates-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
.dates-row .dash { opacity: .6; }

/* единые размеры контролов */
.select,
.datepicker,
.button-wrapper,
.outline-button {
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
}

/* чекбокс выровнен по высоте */
.checkbox-wrapper { gap: 8px; }
.checkbox-wrapper input { width: 16px; height: 16px; }

/* правая колонка — кнопки */
.filters-row .buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

/* адаптив: на узких экранах переходим на 2 колонки */
@media (max-width: 980px) {
    .filters-row .left-section {
        min-width: 100%;
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}
@media (max-width: 640px) {
    .filters-row .left-section {
        grid-template-columns: 1fr;
    }
    .filters-row { align-items: stretch; }
}

/* ====== Заголовки таблицы (чистые, как в макете) ====== */

/* убираем любые "button"-стили у сортируемых заголовков */
th button.table-order {
    all: unset; /* полностью сбрасываем системные стили */
}

/* основной стиль текста заголовков */
th .table-order,
th button.table-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #5a6473;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    user-select: none;
}

/* стрелка для направления сортировки */
th .table-order .order-arrow,
th button.table-order .order-arrow {
    width: 10px;
    height: 10px;
    opacity: 0.5;
    transform: rotate(0deg);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* состояние "по возрастанию" — стрелка вверх */
th .table-order.is-asc .order-arrow,
th button.table-order.is-asc .order-arrow {
    transform: rotate(180deg);
    opacity: 0.9;
}

/* состояние "по убыванию" — стрелка вниз */
th .table-order.is-desc .order-arrow,
th button.table-order.is-desc .order-arrow {
    transform: rotate(0deg);
    opacity: 0.9;
}

/* фокус (по accessibility, почти не видно) */
th .table-order:focus-visible,
th button.table-order:focus-visible {
    outline: 2px solid rgba(0,171,194,0.35);
    outline-offset: 2px;
    border-radius: 3px;
}
/* ====== Выровнять стиль всех заголовков таблицы ====== */

/* Базовый стиль — применяем ко всем th */
.table-with-pagination thead th {
    font-size: 14px;
    font-weight: 600;
    color: #5a6473;
    line-height: 1.2;
    text-align: left;
    vertical-align: middle;
    padding: 12px 14px;
    background: #f6f8fa;
    border-bottom: 1px solid #e6eaef;
    white-space: nowrap;
}

/* Чтобы сортируемые и несортируемые выглядели одинаково */
th .table-order,
th button.table-order {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: inherit;
}

/* Чуть выравниваем стрелку */
th .table-order .order-arrow,
th button.table-order .order-arrow {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    transform: rotate(0deg);
    transition: transform 0.15s ease, opacity 0.15s ease;
    margin-left: 3px;
}

/* Hover — лёгкое затемнение текста и стрелки */
th .table-order:hover,
th button.table-order:hover {
    color: #333;
}
th .table-order:hover .order-arrow,
th button.table-order:hover .order-arrow {
    opacity: 0.8;
}
/* ====== Кнопка "Экспортировать" как ссылка ====== */
.filters-row .buttons .outline-button {
    background: none;
    border: none;
    color: #00abc2;
    font-weight: 600;
    padding: 0;
    height: auto;
    cursor: pointer;
    display: inline;
    line-height: 1;
}

.filters-row .buttons .outline-button:hover {
    text-decoration: underline;
    background: none;
}
/* ====== Двойные прогресс-бары ====== */
.presence-2bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 180px;
}

.progress-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-line .label {
    flex: 0 0 26px;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    text-align: right;
    letter-spacing: 0.4px;
}

.progress-line .progress-bar {
    flex: 1;
    height: 10px;
    border-radius: 999px;
    background: #e9edf1;
    overflow: hidden;
}