.sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 90;
    margin: 0 -40px 0 -40px;
    padding: 16px 40px 16px 40px;
    background: transparent;
    border-bottom: none;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 24px), transparent 100%);
}

.sticky-header-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(11, 14, 20, 0.65);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.global-time-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 12px;
    gap: 12px 20px;
    flex-wrap: wrap;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    max-height: 600px;
    /* arbitrary max to allow animation */
    overflow: hidden;
    transform-origin: top;
}

.global-time-filter.collapsed {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    visibility: hidden;
    transform: scaleY(0.9);
}

.time-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    transition: all 0.3s ease;
}

.time-tabs::-webkit-scrollbar {
    display: none;
}

.time-tabs.collapsed {
    opacity: 0;
    max-width: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    margin-right: -20px;
    /* offset the parent gap */
    visibility: hidden;
    overflow: hidden;
    transform: scaleX(0);
}

.time-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition);
}

.time-tab:hover {
    color: var(--text-primary);
}

.time-tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 138, 255, 0.3);
}

.time-nav {
    display: flex;
    align-items: center;
}

.time-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
    margin: 0 16px;
}

.time-nav-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

@media (hover: hover) {
    .time-nav-btn:hover {
        background: var(--accent-dim);
        color: var(--accent);
        border-color: var(--accent);
    }
}

.time-nav-btn.collapsed {
    opacity: 0;
    max-width: 0;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    border-width: 0;
    visibility: hidden;
    transform: scale(0);
}

/* ══════════════ FILTER BAR ══════════════ */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 18px;
    padding: 20px 24px;
}

.filter-header {
    display: none;
}

.filter-content {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.filter-search-action {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex: 1 1 380px;
    min-width: 260px;
}

.filter-group-search {
    flex: 1;
    min-width: 140px;
}

.filter-group-action {
    flex: 0 0 auto;
    min-width: auto;
    justify-content: flex-end;
}

.btn-clear-filters {
    height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-clear-filters:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.btn-clear-filters:disabled,
.btn-clear-filters.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
}