.catalog-page {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 24px 0 48px;
    overflow: visible;
}

.catalog-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 16px;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.4;
}

.catalog-breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
}

.catalog-breadcrumbs a:hover {
    text-decoration: underline;
}

.catalog-breadcrumbs-sep {
    color: #94a3b8;
}

.catalog-breadcrumbs-current {
    color: #0f172a;
    font-weight: 600;
}

.catalog-code-page {
    max-width: none;
    width: 100%;
}

.catalog-code-page .catalog-layout {
    grid-template-columns: 300px 1fr;
}

.catalog-code-header {
    margin-bottom: 20px;
}

.catalog-code-header h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.25;
}

.catalog-code-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.catalog-main {
    min-width: 0;
}

.catalog-card,
.catalog-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.catalog-card {
    padding: 20px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
    overflow: visible;
}

.catalog-sidebar {
    padding: 20px;
    position: sticky;
    top: 16px;
    overflow: visible;
    min-width: 0;
}

.catalog-sidebar-tree {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.catalog-sidebar-tree .catalog-tree-list {
    font-size: 0.88rem;
}

.catalog-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.catalog-filters {
    min-width: 0;
    overflow: visible;
}

.catalog-field {
    position: relative;
    overflow: visible;
    margin-bottom: 16px;
}

.catalog-filters h2 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.catalog-reset-link {
    display: inline-block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.86rem;
    text-decoration: none;
}

.catalog-reset-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.catalog-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.catalog-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px;
    font: inherit;
    background: #fff;
}

.catalog-field-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.catalog-hint {
    margin-top: 6px;
    font-size: 0.82rem;
    color: #64748b;
}

.catalog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.catalog-btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
    margin-left: 8px;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.catalog-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 240px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
    background: #f8fafc;
}

.catalog-search {
    border: none;
    background: transparent;
    width: 100%;
    font: inherit;
    outline: none;
}

.catalog-muted,
.catalog-stat {
    color: #64748b;
    font-size: 0.92rem;
}

.catalog-stat {
    font-weight: 600;
    color: #0f172a;
}

.catalog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-tag {
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
}

.catalog-tree-list {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.catalog-tree-root > .catalog-tree-item {
    border-bottom: 1px solid #f1f5f9;
}

.catalog-tree-item {
    padding: 4px 0;
}

.catalog-tree-item.is-hidden {
    display: none;
}

.catalog-tree-toggle,
.catalog-tree-spacer {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 4px;
    vertical-align: middle;
}

.catalog-tree-toggle {
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    padding: 0;
    font-size: 0;
}

.catalog-tree-toggle::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid currentColor;
    margin: 6px auto;
    transition: transform 0.15s ease;
}

.catalog-tree-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.catalog-tree-item.is-active > .catalog-tree-link .catalog-tree-title,
.catalog-tree-item.is-active > .catalog-tree-link .catalog-tree-code {
    color: #2563eb;
    font-weight: 600;
}

.catalog-tree-link {
    color: #0f172a;
    text-decoration: none;
    line-height: 1.5;
    vertical-align: middle;
}

.catalog-tree-link:hover .catalog-tree-title {
    color: #2563eb;
}

.catalog-tree-code {
    color: #64748b;
    font-weight: 600;
}

.catalog-tree-count {
    color: #64748b;
    font-size: 0.92rem;
}

.catalog-tree-children {
    margin-left: 26px;
}

.catalog-companies {
    display: grid;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.catalog-company-card {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    box-shadow: none;
}

.catalog-company-card:last-child {
    border-bottom: none;
}

.catalog-company-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease;
}

.catalog-company-card-link:hover {
    background: #f8fafc;
}

.catalog-company-name {
    font-size: 1.05rem;
    margin: 0 0 4px;
    color: #0f172a;
    font-weight: 700;
}

.catalog-company-card-link:hover .catalog-company-name {
    color: #2563eb;
}

.catalog-company-okved {
    color: #64748b;
    font-size: 0.92rem;
    margin: 0 0 10px;
}

.catalog-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #475569;
    font-size: 0.9rem;
    align-items: center;
}

.catalog-company-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.catalog-company-field i {
    color: #64748b;
}

.catalog-company-id {
    color: #64748b;
}

.catalog-company-revenue {
    color: #0f172a;
    font-weight: 500;
}

.catalog-copy {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 2px;
    font: inherit;
    line-height: 1;
}

.catalog-copy:hover {
    color: #2563eb;
}

.catalog-pagination {
    margin-top: 24px;
}

.catalog-pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.catalog-pagination-item {
    margin: 0;
}

.catalog-pagination-link,
.catalog-pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.92rem;
    text-decoration: none;
}

.catalog-pagination-link {
    color: #2563eb;
    border: 1px solid #dbeafe;
    background: #fff;
    font-weight: 600;
}

.catalog-pagination-link:hover {
    background: #eff6ff;
}

.catalog-pagination-current {
    color: #fff;
    background: #2563eb;
    font-weight: 700;
}

.catalog-pagination-ellipsis {
    color: #94a3b8;
    padding: 0 4px;
}

.catalog-pagination-prev,
.catalog-pagination-next {
    min-width: auto;
    padding: 0 14px;
}

.catalog-alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.catalog-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.catalog-empty {
    padding: 32px;
    text-align: center;
    color: #64748b;
}

.catalog-regions {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.catalog-regions.is-open {
    z-index: 2100;
}

.catalog-regions-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.catalog-regions-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-regions-trigger .fa-chevron-down {
    color: #64748b;
    font-size: 0.75rem;
    transition: transform 0.15s ease;
}

.catalog-regions.is-open .catalog-regions-trigger .fa-chevron-down {
    transform: rotate(180deg);
}

.catalog-regions-panel {
    position: absolute;
    z-index: 2000;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    max-height: min(360px, 70vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.catalog-regions-panel[hidden] {
    display: none !important;
}

.catalog-regions-search {
    margin: 8px;
    width: calc(100% - 16px);
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.88rem;
    flex: 0 0 auto;
}

.catalog-regions-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
}

.catalog-regions-group + .catalog-regions-group {
    border-top: 1px solid #f1f5f9;
}

.catalog-regions-group-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 4px;
}

.catalog-regions-group-toggle {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.catalog-regions-group-toggle::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid currentColor;
    margin: 6px auto;
    transition: transform 0.15s ease;
}

.catalog-regions-group-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.catalog-regions-group-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    flex: 1;
    min-width: 0;
}

.catalog-regions-group-label span,
.catalog-regions-option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.catalog-regions-group-body {
    padding: 0 8px 6px 30px;
}

.catalog-regions-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    font-size: 0.84rem;
    color: #334155;
}

.catalog-regions-option:hover {
    color: #0f172a;
}

.catalog-regions-option[hidden],
.catalog-regions-group[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: static;
    }
}
