.sidebar {
    width: 280px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    flex-shrink: 0;
}

.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1050;
}

.filter-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.filter-panel {
    background: #fff;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.filter-overlay.open .filter-panel {
    transform: translateY(0);
}


.filter-overlay .form-check-input:checked {
    background-color: var(--brand-light);
    /* #0099ab */
    border-color: var(--brand-light);
}

.filter-header,
.filter-footer {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.filter-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.filter-footer {
    border-top: 1px solid var(--border-subtle);
    border-bottom: none;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
    border-radius: 999px;
    background: rgba(0, 153, 171, 0.08);
    border: 1px solid var(--brand-light);
    color: #044e68;
}

.filter-pill button {
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: #044e68;
}

.filter-pill button:hover {
    color: #000;
}

.filter-pill-excluded {
    background: rgba(220, 38, 38, 0.08);
    border-color: #dc2626;
    color: #7f1d1d;
}

.filter-pill-excluded button {
    color: #7f1d1d;
}

.filter-pill-excluded button:hover {
    color: #450a0a;
}

.report-selection-card {
    border: 1px solid rgba(0, 153, 171, 0.16);
    border-radius: 18px;
    background: #f5fbfc;
}

.report-selection-card-opening,
.report-selection-card-closing {
    overflow: hidden;
    transition:
        height 650ms ease,
        opacity 650ms ease,
        transform 650ms ease,
        margin-top 650ms ease,
        margin-bottom 650ms ease,
        border-top-width 650ms ease,
        border-bottom-width 650ms ease;
}

.report-selection-card-glow {
    animation: report-selection-double-glow 900ms ease-out;
}

@keyframes report-selection-double-glow {
    0%,
    100% {
        box-shadow: none;
        border-color: rgba(0, 153, 171, 0.16);
    }

    18%,
    58% {
        box-shadow: 0 0 0 4px rgba(0, 153, 171, 0.18), 0 0 24px rgba(0, 153, 171, 0.38);
        border-color: rgba(0, 153, 171, 0.55);
    }

    38%,
    78% {
        box-shadow: none;
        border-color: rgba(0, 153, 171, 0.24);
    }
}

.search-header-report-card {
    width: 100%;
    margin: 0.25rem auto 0.75rem;
}

.report-selection-card-body {
    padding: 0.85rem 0.95rem;
}

.report-selection-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.report-selection-count {
    display: inline;
    color: inherit;
    font-size: 0.72rem;
    line-height: 1;
}

.selection-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
}

.selection-clear-btn:hover,
.selection-clear-btn:focus-visible {
    background: rgba(0, 153, 171, 0.08);
    color: var(--brand-dark);
    outline: none;
}

.selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 260px;
    min-height: 30px;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(0, 153, 171, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #334155;
    font-size: 0.78rem;
    font-weight: 500;
}

.selected-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-pill button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.selected-pill button:hover,
.selected-pill button:focus-visible {
    color: var(--brand-dark);
    outline: none;
}

.report-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.report-title-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 34px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(0, 153, 171, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    font-size: 0.84rem;
}

.report-title-input:focus {
    border-color: rgba(0, 153, 171, 0.48);
    box-shadow: 0 0 0 0.18rem rgba(0, 153, 171, 0.12);
    outline: none;
}

.report-generate-btn {
    border: 1px solid rgba(0, 153, 171, 0.2);
    border-radius: 999px;
    background: var(--brand-light);
    color: #fff;
    font-weight: 600;
    padding-inline: 0.85rem;
}

.report-generate-btn:hover,
.report-generate-btn:focus-visible {
    background: var(--brand-dark);
    color: #fff;
    outline: none;
}

.saved-results-report-status {
    margin-top: 0.65rem;
}

.report-background-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    max-width: 100%;
    margin: 0.25rem auto 0.85rem;
    padding: 0.42rem 0.65rem;
    border: 1px solid rgba(0, 153, 171, 0.16);
    border-radius: 999px;
    background: rgba(230, 245, 247, 0.82);
    color: #33515a;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.report-background-status .spinner-border {
    width: 0.85rem;
    height: 0.85rem;
    border-width: 0.12em;
    color: var(--brand-medium);
}

.report-background-dot {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: var(--brand-medium);
}

.report-background-status-ready {
    border-color: rgba(25, 135, 84, 0.24);
    background: rgba(209, 231, 221, 0.72);
    color: #146c43;
}

.report-background-status-ready .report-background-dot {
    background: #198754;
}

.report-background-status-failed {
    border-color: rgba(220, 53, 69, 0.22);
    background: rgba(248, 215, 218, 0.72);
    color: #b02a37;
}

.report-background-status-failed .report-background-dot {
    background: #dc3545;
}

.report-background-link,
.report-background-dismiss {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.report-background-link {
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 0.12rem;
}

.report-background-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border-radius: 999px;
    opacity: 0.72;
}

.report-background-dismiss:hover,
.report-background-dismiss:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    opacity: 1;
    outline: none;
}

#activeFilters {
    max-width: 800px;
}

@media (max-width: 575.98px) {
    .report-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .report-title-input,
    .report-generate-btn {
        width: 100%;
    }
}


.category-label,
.list-label {
    display: flex;
    justify-content: space-between;
    padding: .6rem 1rem;
    cursor: pointer;
    border-radius: .25rem;
}

.list-label {
    padding-left: 2rem;
    border-left: 2px solid #eee;
    margin-left: .5rem;
}

.category-label:hover,
.list-label:hover {
    background: #f8f9fa;
}

input[type="checkbox"]:checked+.category-label,
input[type="checkbox"]:checked+.list-label {
    background: #e9f5ff;
    border-left: 4px solid #0d6efd;
    font-weight: 600;
}


@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 -300px;
        background: #fff;
        transition: left .3s ease;
        z-index: 1000;
    }

    .sidebar.open {
        left: 0;
    }
}

@media (min-width: 992px) {
    .filter-panel {
        width: 720px;
        margin: 0 auto;
        border-radius: 0 0 12px 12px;
        transform: translateY(-100%);
    }

    .filter-overlay.open .filter-panel {
        transform: translateY(0);
    }
}
