/* =============================
   HEADER
================================ */

.cabinet-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.cabinet-report-title {
    font-size: 18px;
    font-weight: 600;
}

.cabinet-report-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.cabinet-report-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cabinet-report-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    font-size: 11px;
    color: #4b5563;
}

.cabinet-report-chip-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: #9ca3af;
}

.cabinet-report-chip-value {
    font-weight: 500;
    color: #111827;
}

/* =============================
   FILTER
================================ */

.cabinet-report-filter-card {
    position: relative;
}

.cabinet-report-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
}

.cabinet-report-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.cabinet-report-filter-group label {
    font-size: 13px;
    color: #4b5563;
}

.cabinet-report-filter-group .form-control {
    font-size: 13px;
    height: calc(1.9rem + 2px);
}

.cabinet-report-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabinet-report-reset {
    font-size: 12px;
    padding-left: 4px;
    padding-right: 0;
}

/* період / чіпи під фільтром */
.cabinet-report-period {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* =============================
   CHART
================================ */

.cabinet-report-chart-card {
    padding-bottom: 0;
}

.cabinet-report-chart-header {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.cabinet-report-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.cabinet-report-chart-hint {
    font-size: 11px;
    color: #9ca3af;
}

.cabinet-report-chart-body {
    position: relative;
    height: 420px;
    padding: 8px 10px 4px;
}

/* якщо даних немає */
.cabinet-report-empty {
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
}

/* =============================
   TABLE
================================ */

.cabinet-report-table-card {
    overflow: hidden;
}

.cabinet-report-table-header {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.cabinet-report-table-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.cabinet-report-table-hint {
    font-size: 11px;
    color: #9ca3af;
}

.cabinet-report-table-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

/* таблиця */

.cabinet-report-table {
    border-collapse: separate;
    border-spacing: 0;
}

.cabinet-report-table thead tr {
    background: #f8fafc;
}

.cabinet-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding-top: 8px;
    padding-bottom: 8px;
}

.cabinet-report-table tbody td {
    font-size: 13px;
    vertical-align: middle;
    border-top: 1px solid #e5e7eb;
}

/* зебра */

.cabinet-report-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.cabinet-report-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* hover */

.cabinet-report-table tbody tr:hover {
    background-color: #e5f3ff;
}

/* цифри моноширинні */

.cabinet-report-table td.text-right {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* footer (середні значення) */
.cabinet-report-table tfoot td {
    background: #f1f5f9;
    font-size: 13px;
}

/* =============================
   ADAPTIVE
================================ */

@media (max-width: 767.98px) {
    .cabinet-report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cabinet-report-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .cabinet-report-filter-group {
        width: 100%;
    }

    .cabinet-report-filter-actions {
        justify-content: flex-start;
    }

    .cabinet-report-chart-body {
        height: 340px;
    }

    .cabinet-report-table-wrapper {
        max-height: none;
    }
}

@media (max-width: 575.98px) {
    .cabinet-report-filter-card {
        padding: 10px 12px !important;
    }

    .cabinet-report-table tbody td {
        font-size: 12px;
    }

    .cabinet-report-chips,
    .cabinet-report-period {
        flex-direction: column;
        align-items: flex-start;
    }
}
