.top-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 22px;
    width: 100%;
    margin-bottom: 28px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.search-filters {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.filter-option {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.filter-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.filter-option span {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface-soft);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.filter-option:hover span { border-color: #b9c8c4; color: var(--color-text); transform: translateY(-1px); }
.filter-option input:focus-visible + span { outline: 3px solid rgba(197, 139, 59, .35); outline-offset: 2px; }
.filter-option input:checked + span { border-color: var(--color-brand); background: var(--color-brand); color: #fff; box-shadow: 0 5px 14px rgba(20, 63, 58, .16); }

.search-container {
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface-soft);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.search-container:focus-within {
    border-color: #7d9b96;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20, 63, 58, .09);
}

.search-icon { flex: 0 0 auto; margin-right: 10px; color: var(--color-muted); font-size: 22px; line-height: 1; }

.search-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 11px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font-size: 14px;
}

.search-input::placeholder { color: #899591; }

.company-selector {
    display: flex;
    width: 190px;
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface-soft);
}

.company-button {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 10px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.company-button:hover { color: var(--color-brand); }
.company-button.active { background: #fff; color: var(--color-brand); box-shadow: 0 2px 8px rgba(15, 47, 43, .1); }

@media (max-width: 780px) {
    .top-panel { grid-template-columns: 1fr; margin-bottom: 22px; }
    .search-filters { overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
    .company-selector { width: 100%; }
}

@media (max-width: 480px) {
    .top-panel { gap: 14px; padding: 18px; border-radius: 18px; }
    .filter-option span { min-height: 38px; padding-inline: 13px; font-size: 12px; }
}
