/* Statistics Arrays Prototype */
.statistics-array-card .card-header {
    background: #f8fafc;
}

.statistics-array-container {
    overflow: auto;
    max-height: 66vh;
    border: 1px solid #dbe3ea;
    border-radius: 6px;
}

.statistics-array-table {
    min-width: max-content;
    font-size: 0.75rem;
}

    .statistics-array-table th,
    .statistics-array-table td {
        white-space: nowrap;
        padding: 0.35rem 0.5rem;
    }

    .statistics-array-table thead tr:first-child th {
        position: sticky;
        top: 0;
        z-index: 9;
        background: #1f5fa3;
        color: #fff;
        border-color: #2c6aae;
    }

    .statistics-array-table thead tr:nth-child(2) th {
        position: sticky;
        top: 34px;
        z-index: 9;
        background: #2c6aae;
        color: #fff;
        border-color: #3b79bb;
    }

    .statistics-array-table thead th.statistics-cipher-group {
        text-align: center;
        font-weight: 700;
    }

    .statistics-array-table tbody tr:nth-child(even) {
        background-color: #f8fbff;
    }

    .statistics-array-table th:nth-child(1),
    .statistics-array-table td:nth-child(1) {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        z-index: 8;
    }

    .statistics-array-table th:nth-child(2),
    .statistics-array-table td:nth-child(2) {
        position: sticky;
        left: 120px;
        width: 95px;
        min-width: 95px;
        z-index: 8;
    }

    .statistics-array-table tbody td:nth-child(1),
    .statistics-array-table tbody td:nth-child(2) {
        background: #f2f6fb;
    }

    .statistics-array-table tbody tr:nth-child(even) td:nth-child(1),
    .statistics-array-table tbody tr:nth-child(even) td:nth-child(2) {
        background: #eaf1f9;
    }

    .statistics-array-table thead th[data-col-index="3"],
    .statistics-array-table thead th[data-col-index="4"],
    .statistics-array-table thead th[data-col-index="5"],
    .statistics-array-table thead th[data-col-index="6"],
    .statistics-array-table thead th[data-col-index="7"],
    .statistics-array-table thead th[data-col-index="8"],
    .statistics-array-table thead th[data-col-index="9"],
    .statistics-array-table thead th[data-col-index="10"],
    .statistics-array-table tbody td:nth-child(4),
    .statistics-array-table tbody td:nth-child(5),
    .statistics-array-table tbody td:nth-child(6),
    .statistics-array-table tbody td:nth-child(7),
    .statistics-array-table tbody td:nth-child(8),
    .statistics-array-table tbody td:nth-child(9),
    .statistics-array-table tbody td:nth-child(10),
    .statistics-array-table tbody td:nth-child(11) {
        width: 44px;
        min-width: 44px;
        text-align: center;
    }

    .statistics-array-table thead th[data-col-index="19"],
    .statistics-array-table tbody td:nth-child(20) {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        white-space: normal;
        line-height: 1.2;
    }

.statistics-value-negative {
    color: #c0392b;
}

.statistics-value-net {
    font-weight: 700;
    color: #1d3557;
}

/* Reports - Forms table prototype preview */
.spravki-list {
    padding: 0 !important;
}

.spravki-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.spravki-table {
    width: 100%;
    min-width: 100%;
    table-layout: auto;
}

    .spravki-table thead th {
        font-size: 0.8rem;
        font-weight: 700;
        color: #495057;
        background: #f8fafc;
        border-bottom: 1px solid #d9e1ea;
        white-space: nowrap;
        padding: 0.35rem 0.45rem;
    }

    .spravki-table td {
        vertical-align: middle;
        border-color: #edf0f4;
        font-size: 0.78rem;
        padding: 0.28rem 0.45rem;
    }

    .spravki-table .col-no {
        width: 36px;
        text-align: center;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .spravki-table .col-state {
        width: 78px;
    }

    .spravki-table .col-code {
        width: 92px;
    }

    .spravki-table .col-actions {
        width: 156px;
    }

    .spravki-table thead th:first-child,
    .spravki-table tbody td:first-child {
        padding-left: 0.18rem;
    }

.spravki-table .spravka-link {
    font-weight: 500;
    line-height: 1.2;
}

.spravki-table .static-text {
    color: #325f9f;
}

.spr-state {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

    .spr-state.error {
        background: #dc3545;
    }

    .spr-state.warning {
        background: #ff8c00;
    }

    .spr-state.snapshot {
        background: #e7c4cf;
    }

    .spr-state.valid {
        background: #2e7d32;
    }

.spravki-table .spr-code {
    font-weight: 600;
    color: #1f2a3d;
    letter-spacing: 0.01em;
}

.spravki-table .spravka-actions {
    display: inline-flex;
    gap: 0.22rem;
    white-space: nowrap;
}

.spravki-table .action-btn {
    width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border: 1px solid #d7dde4;
    border-radius: 5px;
    background: #fff;
    color: #465d75;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1;
}

.spravki-table .action-btn.delete {
    color: #b02a37;
}

.spravki-table .action-btn.add {
    color: #1f8f42;
    font-size: 0.9rem;
}

.spravki-table .spr-action-placeholder {
    display: inline-block;
    width: 20px;
}

/* Global full-width layout */
.page-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.main-content .page-content > .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

body[data-layout="horizontal"] .container-fluid,
body[data-layout="horizontal"] .navbar-header {
    max-width: 100% !important;
    width: 100% !important;
}

body[data-layout="horizontal"] .page-title-box {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    border-bottom: none !important;
}

/* Reports page - compact top area */
.reports-compact-header {
    padding: 0.55rem 0.8rem;
    margin-top: -0.45rem;
    margin-bottom: 0.55rem;
}

.reports-compact-header .page-title {
    font-size: 1.05rem;
    margin-bottom: 0;
}

.reports-compact-header .page-subtitle {
    display: none;
}

.reports-compact-filters {
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.7rem;
}

.reports-compact-filters .filters-title {
    font-size: 0.98rem;
    margin-bottom: 0.55rem;
}

.reports-compact-filters .row.g-3 {
    --bs-gutter-x: 0.6rem;
    --bs-gutter-y: 0.45rem;
}

.reports-compact-filters .filter-label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.reports-compact-filters .search-input,
.reports-compact-filters .form-control,
.reports-compact-filters .form-select {
    min-height: 32px;
    padding-top: 0.22rem;
    padding-bottom: 0.22rem;
    font-size: 0.82rem;
}

.reports-compact-filters .form-check-label,
.reports-compact-filters .text-muted {
    font-size: 0.8rem;
}

.reports-compact-filters .mt-3 {
    margin-top: 0.5rem !important;
}

.reports-compact-filters .mb-3 {
    margin-bottom: 0 !important;
}

.reports-compact-filters .btn {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.advanced-search-panel {
    border: 1px dashed #d7dde4;
    border-radius: 6px;
    padding: 0.55rem;
    background: #fafcff;
}

.history-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.history-description {
    font-size: 0.84rem;
    color: #5f6b7a;
}

.history-versions-table thead th,
.history-forms-table thead th {
    font-size: 0.8rem;
    white-space: nowrap;
}

.history-versions-table tbody td,
.history-forms-table tbody td {
    font-size: 0.82rem;
}

.reports-compact-filters .select2-container--default .select2-selection--multiple {
    min-height: 32px;
    border: 1px solid #ced4da;
    border-radius: 0.45rem;
    padding: 1px 6px;
}

.reports-compact-filters .select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 3px;
    margin-bottom: 2px;
    font-size: 0.78rem;
}

.reports-compact-filters .select2-container {
    width: 100% !important;
}

.reports-fields-toolbar .btn {
    min-width: 120px;
}

.reports-add-field-menu {
    max-height: 380px;
    overflow-y: auto;
    min-width: 300px;
}

.reports-add-field-menu .dropdown-item {
    font-size: 0.82rem;
    white-space: normal;
}

.respondent-reports-page h5 {
    font-size: 1rem;
}

.respondent-reports-card .card-body {
    padding: 0.65rem;
}

.respondent-reports-filters {
    border: 1px solid #dfe3ea;
    border-radius: 0.4rem;
    padding: 0.55rem;
    margin-bottom: 0.55rem;
    background: #fff;
}

.respondent-reports-filters .filter-label {
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 0.12rem;
}

.respondent-reports-filters .form-control,
.respondent-reports-filters .form-select {
    min-height: 26px;
    font-size: 0.74rem;
    padding-top: 0.08rem;
    padding-bottom: 0.08rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.respondent-reports-filters .form-check-label,
.respondent-reports-filters .text-muted {
    font-size: 0.74rem;
}

.respondent-reports-table {
    width: 100%;
    table-layout: fixed;
}

.respondent-reports-table th,
.respondent-reports-table td {
    font-size: 0.70rem;
    line-height: 1.5;
    padding: 0.13rem 0.18rem;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
}

.respondent-reports-table thead th {
    font-weight: 600;
    padding-top: 0.08rem;
    padding-bottom: 0.08rem;
}

.respondent-reports-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.respondent-reports-table tbody tr:nth-child(even) {
    background-color: #f3f4f6;
}

.respondent-reports-table tbody tr:hover {
    background-color: #e9eef6;
}

.respondent-reports-table .notes-cell {
    white-space: normal;
}

.respondent-reports-table-wrap {
    overflow-x: visible;
}

/* Unified admin list grids (reference: /surveys/survey-forms) */
.table-overflow .grid-table {
    width: 100%;
    margin-bottom: 0;
    font-size: .875rem;
}

.table-overflow .grid-table thead th {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
    vertical-align: middle;
    border-color: #b8c2cc;
}

.table-overflow .grid-table tbody td {
    vertical-align: middle;
    border-color: #b8c2cc;
}

.table-overflow .grid-table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f4f6f9;
}

.table-overflow .grid-table.table-hover > tbody > tr:hover > * {
    background-color: #eef4fb;
}

/* Roles list specific grid stabilization */
.table-overflow .roles-grid-table {
    table-layout: fixed;
}

.table-overflow .roles-grid-table td,
.table-overflow .roles-grid-table th {
    vertical-align: middle;
}

.table-overflow .roles-grid-table .roles-description-cell {
    white-space: normal;
}

.table-overflow .roles-grid-table .roles-code-cell,
.table-overflow .roles-grid-table .roles-name-cell,
.table-overflow .roles-grid-table .roles-users-cell,
.table-overflow .roles-grid-table .roles-status-cell,
.table-overflow .roles-grid-table .roles-actions-cell {
    white-space: nowrap;
}

.table-overflow .roles-grid-table .roles-description-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.table-overflow .roles-grid-table .roles-actions-cell {
    text-align: left;
}

.table-overflow .roles-grid-table .roles-actions {
    justify-content: flex-start;
}

.table-overflow .roles-grid-table .roles-actions-cell .btn {
    min-width: 1.85rem;
    min-height: 1.85rem;
    padding-left: .35rem;
    padding-right: .35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.table-overflow .roles-grid-table .roles-actions-cell .btn i {
    font-size: .95rem;
}

@media (max-width: 1400px) {
    .respondent-reports-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .respondent-reports-table {
        min-width: 1650px;
        table-layout: auto;
    }

    .respondent-reports-table th,
    .respondent-reports-table td {
        white-space: nowrap;
        word-break: normal;
    }
}

@media (max-width: 1500px) {
    .split-view {
        min-height: 62vh;
    }

    .left-pane {
        min-width: 300px;
    }

    .right-pane {
        min-width: 280px;
        margin-left: 0.5rem;
    }

    .details-header {
        padding: 0.8rem 1rem;
    }

    .details-body {
        padding: 0.75rem 0.9rem 0.9rem;
    }

    .reports-compact-filters {
        padding: 0.55rem 0.65rem;
    }

    .reports-compact-filters .row.g-3 {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.35rem;
    }

    .reports-compact-filters .filter-label,
    .reports-compact-filters .form-check-label,
    .reports-compact-filters .text-muted {
        font-size: 0.75rem;
    }

    .reports-compact-filters .search-input,
    .reports-compact-filters .form-control,
    .reports-compact-filters .form-select {
        min-height: 28px;
        font-size: 0.75rem;
        padding-top: 0.12rem;
        padding-bottom: 0.12rem;
    }

    .reports-table thead th {
        font-size: 0.74rem;
        padding: 0.38rem 0.32rem;
    }

    .reports-table tbody td {
        font-size: 0.74rem;
        padding: 0.32rem 0.28rem;
    }

    .reports-table .status-badge {
        font-size: 0.7rem;
        padding: 0.14rem 0.32rem;
    }

    .reports-table .correction-badge {
        min-width: 34px;
        font-size: 0.68rem;
        padding: 0.12rem 0.34rem;
    }

    .reports-table .company-name {
        line-height: 1.05;
    }
}

@media (max-width: 1280px) {
    .split-view {
        flex-direction: column;
    }

    .divider {
        display: none;
    }

    .left-pane,
    .right-pane {
        min-width: 0;
        width: 100%;
        flex-basis: auto !important;
    }

    .right-pane {
        margin-left: 0;
        margin-top: 0.6rem;
    }

    }

.prototype-control-report-select {
    min-height: 320px;
}

.prototype-employee-filter .select2-container {
    width: 100% !important;
}

.prototype-report-result {
    scroll-margin-top: 110px;
}

.prototype-grid-card {
    border: 1px solid #e8edf3 !important;
    border-radius: 0.75rem;
    background: #fff;
}

.prototype-grid-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.85rem;
}

.prototype-grid-export-btn {
    min-width: 130px;
}

.prototype-grid-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 0.9rem;
    border-top: 1px solid #edf1f5;
    flex-wrap: wrap;
}

.prototype-grid-footer__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #5f6b7a;
    flex-wrap: wrap;
}

.prototype-grid-page-size-label,
.prototype-grid-page-info {
    margin: 0;
    font-size: 0.95rem;
}

.prototype-grid-page-size {
    width: 92px;
    min-width: 92px;
}

.prototype-grid-pagination .page-link {
    color: #8a97ab;
    border-color: #dbe3ec;
    min-width: 40px;
    text-align: center;
    padding: 0.5rem 0.85rem;
}

.prototype-grid-pagination .page-item.active .page-link {
    background: #557e9d;
    border-color: #557e9d;
    color: #fff;
}

.prototype-grid-pagination .page-item.disabled .page-link {
    color: #c3ccd8;
    background: #fff;
}

.prototype-control-report-table {
    min-width: 1500px;
    font-size: 0.8rem;
}

.prototype-grid-table {
    margin-bottom: 0;
}

.prototype-grid-table thead th {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
    background: #f8fafc;
    color: #5f6b7a;
    font-weight: 600;
    border-top: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
    border-right: 1px solid #f1f4f7;
    padding: 0.8rem 0.7rem;
}

.prototype-grid-table tbody td {
    text-align: center;
    color: #4f5d6f;
    border-bottom: 1px solid #edf1f5;
    border-right: 1px solid #f3f6f9;
    padding: 0.78rem 0.7rem;
    background: #fff;
}

.prototype-grid-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.prototype-grid-table tbody tr:hover td {
    background: #f4f9ff;
}

.prototype-grid-table tbody td:first-child {
    text-align: left;
    white-space: nowrap;
    color: #2d4f74;
    font-weight: 600;
}

.prototype-grid-summary-row td {
    background: #f3f7fb !important;
    color: #44566c;
    border-top: 1px solid #e3ebf3;
    font-weight: 700;
}

.prototype-control-report-table-employees tbody td:nth-child(2),
.prototype-control-report-table-employees tbody td:nth-child(3) {
    white-space: nowrap;
}

.prototype-control-report-table-employees tbody td:nth-child(3) {
    min-width: 260px;
}

.prototype-control-report-table-employees tbody td.text-start {
    color: #2563a6;
    font-weight: 500;
}

#isbsDetailTabs {
    border-bottom: 1px solid #d8e2ef;
}

#isbsDetailTabs .nav-link {
    color: #495057;
    background-color: #f1f5f9;
    border: 1px solid #d8e2ef;
    border-bottom: none;
    margin-right: 0.25rem;
    font-weight: 600;
}

#isbsDetailTabs .nav-link:hover,
#isbsDetailTabs .nav-link:focus {
    color: #1f4e8c;
    background-color: #e8eef8;
}

#isbsDetailTabs .nav-link.active {
    color: #ffffff;
    background-color: #1f4e8c;
    border-color: #1f4e8c;
}

.respondent-info-modal .modal-dialog {
    max-width: 1100px;
}

.respondent-info-modal__header {
    background-color: #1f4e8c;
    color: #fff;
    border-bottom: none;
    padding: 1rem 1.35rem;
}

.respondent-info-modal__header,
.respondent-info-modal__header .modal-title,
.respondent-info-modal__header .respondent-info-modal__title {
    color: #fff !important;
}

.respondent-info-modal__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
    color: #fff !important;
    text-shadow: none;
}

.respondent-info-modal__body {
    padding: 1.35rem;
}

.respondent-info-modal__label {
    color: #1f4e8c;
    font-weight: 700;
}

.respondent-info-modal__report-block {
    border-top: 1px solid #dbe5f1;
    padding-top: 0.65rem;
}

.respondent-info-modal__checks li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    color: #3f4d60;
}

.respondent-info-modal__checks li i {
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

.respondent-info-modal__checks li strong {
    margin-right: 0.2rem;
}

.respondent-info-modal__checks li.success i,
.respondent-info-modal__checks li.success strong {
    color: #23924b;
}

.respondent-info-modal__checks li.danger i,
.respondent-info-modal__checks li.danger strong {
    color: #dc3545;
}

.respondent-info-modal__checks li.muted,
.respondent-info-modal__checks li.muted i,
.respondent-info-modal__checks li.muted strong {
    color: #9aa8ba;
}

.respondent-info-modal__kid-table thead th {
    background: #1f4e8c;
    color: #fff;
    border-color: #1f4e8c;
    font-weight: 700;
}

.consolidation-targetsets-page .card-body {
    padding: 0.75rem;
}

.consolidation-targetsets-layout {
    min-height: 620px;
}

.consolidation-targetsets-panel {
    border: 1px solid #d7dde6;
    border-radius: 4px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.consolidation-targetsets-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2f3f54;
    border-bottom: 1px solid #e3e8ef;
    padding: 0.55rem 0.7rem;
}

.consolidation-targetsets-toolbar {
    display: flex;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-targetsets-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.consolidation-targetsets-grid tbody td {
    font-size: 0.85rem;
    vertical-align: middle;
}

.consolidation-targetsets-grid tbody tr.is-selected td {
    background: #e9f1fb;
}

.consolidation-targetsets-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #edf1f5;
    background: #fafbfd;
    color: #607186;
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
}

.consolidation-targetsets-form {
    padding: 0.8rem 0.85rem 0.35rem;
    border-bottom: 1px dashed #dfe5ed;
}

.consolidation-targetsets-form .col-form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #4d5e73;
}

.consolidation-targetsets-actions {
    padding: 0.8rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.consolidation-targetsets-actions .btn {
    width: 260px;
    max-width: 100%;
}

.consolidation-targetsets-meta {
    color: #5d6c80;
    font-size: 0.82rem;
}

.consolidation-groups-page .card-body {
    padding: 0.75rem;
}

.consolidation-groups-layout {
    min-height: 720px;
}

.consolidation-groups-filter-box {
    padding: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-groups-search {
    background: #fafbfd;
    border-color: #dfe5ed;
}

.consolidation-groups-grid thead th,
.consolidation-legalunits-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.consolidation-groups-grid tbody td,
.consolidation-legalunits-grid tbody td {
    font-size: 0.82rem;
    vertical-align: middle;
}

.consolidation-groups-grid tbody tr.is-selected td,
.consolidation-legalunits-grid tbody tr.is-selected td {
    background: #e9f1fb;
}

.consolidation-groups-details-summary {
    border-bottom: 1px dashed #dde4ec;
    padding: 0.75rem 0.85rem;
    color: #47596d;
    line-height: 1.45;
}

.consolidation-groups-code,
.consolidation-groups-name {
    font-size: 1.05rem;
    color: #334b65;
}

.consolidation-groups-stats,
.consolidation-groups-meta {
    border-bottom: 1px dashed #dde4ec;
    padding: 0.6rem 0.85rem;
    color: #5a6b7f;
    font-size: 0.85rem;
}

.consolidation-groups-actions-top {
    padding: 0.6rem 0.85rem 0;
}

.consolidation-groups-tabs {
    padding: 0 0.85rem;
    border-bottom: 1px solid #dce3eb;
}

.consolidation-groups-tabs .nav-link {
    color: #4d6077;
    background: #f4f7fb;
    border: 1px solid #d9e1ea;
    border-bottom: none;
    margin-right: 0.3rem;
    font-size: 0.83rem;
    font-weight: 600;
}

.consolidation-groups-tabs .nav-link.active {
    background: #fff;
    color: #1f4e8c;
    border-color: #cfd9e4;
}

.consolidation-legal-units-page .card-body {
    padding: 0.75rem;
}

.consolidation-legal-units-filter-box {
    padding: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-legal-units-grid-wrap {
    min-height: 420px;
}

.consolidation-legalunits-grid {
    min-width: 3400px;
}

.consolidation-legalunits-grid tbody td:nth-child(6) {
    white-space: nowrap;
}

.consolidation-legal-units-page .consolidation-legalunits-grid {
    table-layout: fixed;
}

.consolidation-legal-units-page .consolidation-legalunits-grid thead th,
.consolidation-legal-units-page .consolidation-legalunits-grid tbody td {
    white-space: normal;
    word-break: break-word;
    line-height: 1.15;
    vertical-align: top;
}

.consolidation-legal-units-page .consolidation-legalunits-grid thead th:nth-child(5),
.consolidation-legal-units-page .consolidation-legalunits-grid tbody td:nth-child(5),
.consolidation-legal-units-page .consolidation-legalunits-grid thead th:nth-child(8),
.consolidation-legal-units-page .consolidation-legalunits-grid tbody td:nth-child(8),
.consolidation-legal-units-page .consolidation-legalunits-grid thead th:nth-child(11),
.consolidation-legal-units-page .consolidation-legalunits-grid tbody td:nth-child(11),
.consolidation-legal-units-page .consolidation-legalunits-grid thead th:nth-child(12),
.consolidation-legal-units-page .consolidation-legalunits-grid tbody td:nth-child(12) {
    min-width: 170px;
}

.consolidation-consolidated-page .card-body {
    padding: 0.75rem;
}

.consolidation-consolidated-filter-box {
    padding: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-consolidated-grid-wrap {
    min-height: 460px;
}

.consolidation-consolidated-grid {
    min-width: 4200px;
}

.consolidation-consolidated-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.consolidation-consolidated-grid tbody td {
    font-size: 0.8rem;
    vertical-align: middle;
    white-space: nowrap;
}

.consolidation-consolidated-grid tbody tr.is-selected td {
    background: #e9f1fb;
}

.consolidation-groups-hierarchy-placeholder {
    border: 1px dashed #d9e1ea;
    border-radius: 4px;
    background: #fafbfd;
    color: #4f6278;
    padding: 1rem;
}

.consolidation-hierarchy-page .card-body {
    padding: 0.75rem;
}

.consolidation-hierarchy-filter-box {
    padding: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-hierarchy-layout {
    min-height: 640px;
}

.consolidation-hierarchy-list-wrap {
    max-height: 520px;
}

.consolidation-hierarchy-list-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.consolidation-hierarchy-list-grid tbody td {
    font-size: 0.82rem;
    vertical-align: middle;
}

.consolidation-hierarchy-list-grid tbody tr.is-selected td {
    background: #e9f1fb;
}

.consolidation-hierarchy-list-grid tbody td:nth-child(2) {
    white-space: normal;
}

.consolidation-hierarchy-tree-panel,
.consolidation-hierarchy-details-panel {
    border: 1px solid #e3e8ef;
    border-radius: 4px;
    background: #fff;
    height: 100%;
}

.consolidation-hierarchy-tree-wrap {
    max-height: 560px;
    overflow: auto;
    padding: 0 0.85rem 0.85rem;
}

.consolidation-hierarchy-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.consolidation-hierarchy-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 1.35rem;
}

.consolidation-hierarchy-tree li > ul {
    display: none;
}

.consolidation-hierarchy-tree li.is-open > ul {
    display: block;
}

.hierarchy-tree-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.hierarchy-toggle {
    width: 1.8rem;
    min-width: 1.8rem;
    height: 1.8rem;
    border: 1px solid #d5dde7;
    border-radius: 4px;
    background: #f8fafc;
    color: #355270;
    font-weight: 700;
    line-height: 1;
}

.hierarchy-toggle-placeholder {
    visibility: hidden;
}

.hierarchy-tree-node {
    flex: 1;
    text-align: left;
    border: 1px solid #dfe6ee;
    border-radius: 6px;
    background: #fff;
    padding: 0.55rem 0.7rem;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.hierarchy-tree-node:hover {
    border-color: #a8bfd9;
    background: #f8fbff;
}

.hierarchy-tree-node.is-selected {
    border-color: #7ea8d6;
    background: #e9f1fb;
    box-shadow: inset 0 0 0 1px #c9dbef;
}

.hierarchy-tree-node-title,
.hierarchy-tree-node-meta {
    display: block;
}

.hierarchy-tree-node-title {
    color: #2f445b;
    font-weight: 700;
    font-size: 0.85rem;
}

.hierarchy-tree-node-meta {
    color: #6a7b90;
    font-size: 0.77rem;
    margin-top: 0.15rem;
}

.consolidation-hierarchy-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    padding: 0 0.85rem 0.85rem;
}

.consolidation-hierarchy-summary div {
    border: 1px solid #edf1f5;
    border-radius: 4px;
    background: #fafbfd;
    padding: 0.55rem 0.65rem;
}

.consolidation-hierarchy-summary span,
.consolidation-hierarchy-summary strong {
    display: block;
}

.consolidation-hierarchy-summary span {
    font-size: 0.74rem;
    color: #728398;
    text-transform: uppercase;
}

.consolidation-hierarchy-summary strong {
    color: #344b65;
    margin-top: 0.15rem;
}

.consolidation-hierarchy-legal-wrap,
.consolidation-hierarchy-indicators-wrap {
    max-height: 245px;
    overflow: auto;
}

.consolidation-hierarchy-legal-grid,
.consolidation-hierarchy-indicators-grid {
    min-width: 100%;
}

.consolidation-hierarchy-legal-grid thead th,
.consolidation-hierarchy-indicators-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.consolidation-hierarchy-legal-grid tbody td,
.consolidation-hierarchy-indicators-grid tbody td {
    font-size: 0.8rem;
    vertical-align: top;
}

.consolidation-hierarchy-legal-grid tbody td:nth-child(2),
.consolidation-hierarchy-legal-grid tbody td:nth-child(3) {
    white-space: normal;
}

@media (max-width: 1199.98px) {
    .consolidation-hierarchy-summary {
        grid-template-columns: 1fr;
    }
}

.consolidation-indicators-page .card-body {
    padding: 0.75rem;
}

.consolidation-indicators-filter-box {
    padding: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-indicators-grid-wrap {
    max-height: 620px;
}

.consolidation-indicators-grid {
    min-width: 2200px;
}

.consolidation-indicators-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.consolidation-indicators-grid tbody td {
    font-size: 0.8rem;
    vertical-align: top;
    white-space: nowrap;
    line-height: 1.2;
}

.consolidation-indicators-grid tbody tr.is-selected td {
    background: #e9f1fb;
}

.consolidation-indicators-grid tbody td:nth-child(3),
.consolidation-indicators-grid tbody td:nth-child(6) {
    white-space: normal;
    min-width: 360px;
}

.consolidation-indicators-grid tbody td:nth-child(1),
.consolidation-indicators-grid tbody td:nth-child(2),
.consolidation-indicators-grid tbody td:nth-child(4),
.consolidation-indicators-grid tbody td:nth-child(5),
.consolidation-indicators-grid tbody td:nth-child(7),
.consolidation-indicators-grid tbody td:nth-child(8) {
    vertical-align: middle;
}

.consolidation-rules-page .card-body {
    padding: 0.75rem;
}

.consolidation-rules-filter-box {
    padding: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.consolidation-rules-types-wrap,
.consolidation-rules-subtypes-wrap,
.consolidation-rules-formulas-wrap {
    overflow: auto;
}

.consolidation-rules-types-grid,
.consolidation-rules-subtypes-grid,
.consolidation-rules-formulas-grid {
    min-width: 100%;
}

.consolidation-rules-types-grid thead th,
.consolidation-rules-subtypes-grid thead th,
.consolidation-rules-formulas-grid thead th {
    background: #f2f4f7;
    color: #445569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.consolidation-rules-types-grid tbody td,
.consolidation-rules-subtypes-grid tbody td,
.consolidation-rules-formulas-grid tbody td {
    font-size: 0.8rem;
    line-height: 1.2;
    vertical-align: top;
}

.consolidation-rules-types-grid tbody tr.is-selected td,
.consolidation-rules-subtypes-grid tbody tr.is-selected td,
.consolidation-rules-formulas-grid tbody tr.is-selected td {
    background: #d9e8f7;
}

.consolidation-rules-tabs {
    padding: 0 0.85rem;
    border-bottom: 1px solid #dce3eb;
}

.consolidation-rules-tabs .nav-link {
    color: #4d6077;
    background: #f4f7fb;
    border: 1px solid #d9e1ea;
    border-bottom: none;
    margin-right: 0.3rem;
    font-size: 0.83rem;
    font-weight: 600;
}

.consolidation-rules-tabs .nav-link.active {
    background: #fff;
    color: #1f4e8c;
    border-color: #cfd9e4;
}

.consolidation-rules-section-title {
    padding: 0.65rem 0.85rem 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #43566d;
}

.consolidation-rules-tab-placeholder {
    padding: 1rem;
    color: #607186;
    min-height: 180px;
}

.consolidation-rules-formulas-wrap {
    min-height: 320px;
}

.consolidation-rules-types-grid tbody td:nth-child(2),
.consolidation-rules-types-grid tbody td:nth-child(3),
.consolidation-rules-types-grid tbody td:nth-child(5),
.consolidation-rules-subtypes-grid tbody td:nth-child(2),
.consolidation-rules-subtypes-grid tbody td:nth-child(3),
.consolidation-rules-formulas-grid tbody td:nth-child(2) {
    white-space: normal;
}

.consolidation-rules-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 0.85rem 0;
}

.prodcom-validation-cell {
    vertical-align: middle;
}

.prodcom-input-validation-wrap {
    position: relative;
}

.prodcom-inline-validation-tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 0.25rem);
    z-index: 25;
    display: none;
    min-width: 170px;
    max-width: 260px;
    padding: 0.35rem 0.55rem;
    border-radius: 0.25rem;
    background-color: rgba(220, 53, 69, 0.96);
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    white-space: normal;
    box-shadow: 0 0.3rem 0.75rem rgba(0, 0, 0, 0.2);
}

.prodcom-inline-validation-tooltip.field-validation-error {
    display: block;
    color: #fff !important;
}

.prodcom-add-row-wrap {
    margin-top: 0.5rem;
}

body.prodcom-page .select2-container--open .select2-dropdown {
    width: 450px !important;
    min-width: 450px !important;
    border-top: 1px solid #e9ebec !important;
}

@media (max-width: 1599.98px) {
    .prodcom-products-table-wrap {
        display: block;
        width: 100%;
        overflow-x: auto !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .prodcom-products-table {
        width: 1980px;
        min-width: 1980px;
        max-width: none;
    }

    .prodcom-products-table-wrap {
        isolation: isolate;
    }

    .prodcom-products-table th,
    .prodcom-products-table td {
        position: relative;
    }

    .prodcom-products-table thead th:nth-child(-n+3),
    .prodcom-products-table tbody td:nth-child(-n+3) {
        overflow: hidden;
        background-clip: padding-box;
        isolation: isolate;
    }

    .prodcom-products-table tbody td:nth-child(1) {
        overflow: visible;
        z-index: 120;
    }

    .prodcom-products-table tbody td:not(:nth-child(-n+3)) {
        z-index: 1;
    }

    .prodcom-products-table tbody td:nth-child(1),
    .prodcom-products-table thead tr:first-child > th:nth-child(1) {
        min-width: 145px;
        width: 145px;
        position: sticky;
        left: 0;
        z-index: 80;
    }

    .prodcom-products-table tbody td:nth-child(2),
    .prodcom-products-table thead tr:first-child > th:nth-child(2) {
        min-width: 420px;
        width: 420px;
        position: sticky;
        left: 145px;
        z-index: 80;
    }

    .prodcom-products-table tbody td:nth-child(3),
    .prodcom-products-table thead tr:first-child > th:nth-child(3) {
        min-width: 130px;
        width: 130px;
        position: sticky;
        left: 565px;
        z-index: 80;
        box-shadow: 3px 0 0 rgba(0, 0, 0, 0.06);
    }

    .prodcom-products-table tbody td:not(:nth-child(-n+3)) input,
    .prodcom-products-table tbody td:not(:nth-child(-n+3)) select,
    .prodcom-products-table tbody td:not(:nth-child(-n+3)) button {
        position: relative;
        z-index: 0 !important;
    }

    .prodcom-products-table tbody td:nth-child(-n+3) input,
    .prodcom-products-table tbody td:nth-child(-n+3) select,
    .prodcom-products-table tbody td:nth-child(-n+3) button {
        position: relative;
        z-index: 90;
    }

    .prodcom-products-table thead tr:first-child > th:nth-child(1),
    .prodcom-products-table thead tr:first-child > th:nth-child(2),
    .prodcom-products-table thead tr:first-child > th:nth-child(3) {
        background-color: #e3f2fd;
        z-index: 30;
    }

    .prodcom-products-table tbody td:nth-child(1),
    .prodcom-products-table tbody td:nth-child(2),
    .prodcom-products-table tbody td:nth-child(3) {
        background-color: #fff;
    }

    .prodcom-products-table tbody tr:nth-child(even) td:nth-child(1),
    .prodcom-products-table tbody tr:nth-child(even) td:nth-child(2),
    .prodcom-products-table tbody tr:nth-child(even) td:nth-child(3) {
        background-color: #f8f9fa;
    }

    .prodcom-products-table tbody td:nth-child(4),
    .prodcom-products-table tbody td:nth-child(5),
    .prodcom-products-table tbody td:nth-child(8),
    .prodcom-products-table tbody td:nth-child(10) {
        min-width: 130px;
        width: 130px;
    }

    .prodcom-products-table tbody td:nth-child(6),
    .prodcom-products-table tbody td:nth-child(7),
    .prodcom-products-table tbody td:nth-child(9),
    .prodcom-products-table tbody td:nth-child(11) {
        min-width: 115px;
        width: 115px;
    }

    .prodcom-products-table tbody td:nth-child(12) {
        min-width: 110px;
        width: 110px;
    }

    .prodcom-products-table tbody td:nth-child(13),
    .prodcom-products-table tbody td:nth-child(14) {
        min-width: 105px;
        width: 105px;
    }

    .prodcom-products-table tbody td:nth-child(15) {
        min-width: 70px;
        width: 70px;
    }
}

/* ГФО статус точки - Reports table */
.gfo-status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
}

.gfo-status-not-submitted {
    background: #adb5bd;
}

.gfo-status-published {
    background: #22c55e;
}

.gfo-status-pending {
    background: #f59e0b;
}

.gfo-status-rejected {
    background: #ef4444;
}

/* Reports table — compact header layout */
.reports-table .rpt-col-status {
    width: 48px;
    min-width: 48px;
}

.reports-table .rpt-col-icon {
    width: 50px;
    min-width: 50px;
}

.reports-table .rpt-col-eik {
    width: 104px;
    min-width: 88px;
}

.reports-table .rpt-col-kid {
    width: 96px;
    min-width: 84px;
}

.reports-table .rpt-col-study {
    width: 92px;
    min-width: 78px;
}

.reports-table .rpt-col-corr {
    width: 72px;
    min-width: 58px;
}

.reports-table .reports-th-sortable {
    white-space: normal;
    user-select: none;
    line-height: 1.12;
}

.reports-table thead th {
    vertical-align: top;
}

.reports-table th.rpt-col-status,
.reports-table th.rpt-col-icon,
.reports-table th.rpt-col-kid,
.reports-table th.rpt-col-study,
.reports-table th.rpt-col-corr {
    text-align: center;
}

.reports-table .reports-th-sortable .sort-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 0.66;
    margin-top: 2px;
    margin-left: 0;
    opacity: 0.35;
}

.reports-table .reports-th-sortable:hover .sort-icons {
    opacity: 0.7;
}

.reports-table .reports-th-sortable .sort-icons i {
    font-size: 0.82rem;
    line-height: 0.66;
    color: #1f4975;
}

.reports-table .reports-th-sortable .sort-icons i.sort-active {
    opacity: 1;
    color: #1f4975;
}

/* Responses list sort icon polish (Variant A) */
.responses-reports-table .reports-th-sortable {
    cursor: pointer;
    white-space: nowrap;
}

.responses-reports-table .reports-th-sortable .sort-icons {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    font-size: .7em;
    line-height: 1;
    margin-left: .25rem;
    margin-top: 0;
    opacity: 0;
}

.responses-reports-table .reports-th-sortable .sort-icons i {
    display: none;
    font-size: 1em;
    line-height: 1;
    color: #1f4975;
}

.responses-reports-table .reports-th-sortable:hover .sort-icons {
    opacity: .75;
}

.responses-reports-table .reports-th-sortable:hover .sort-icons i {
    display: inline-block;
    opacity: .9;
    color: #495057;
}

.responses-reports-table .reports-th-sortable .sort-icons i.sort-active {
    display: inline-block;
    opacity: 1;
    color: #343a40;
}

.responses-reports-table .reports-th-sortable .sort-icons:has(i.sort-active) {
    opacity: 1;
}

.responses-reports-table .reports-th-sortable .sort-icons:has(i.sort-active) i:not(.sort-active) {
    display: none !important;
}

.reports-table .col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    z-index: 1;
    border-right: 2px solid transparent;
    transition: border-color 0.15s;
}

.reports-table .col-resize-handle:hover,
.reports-table .col-resize-handle:active {
    border-right-color: #4e89c5;
}

@media (max-width: 1200px) {
    .reports-table .gfo-status-dot {
        width: 12px;
        height: 12px;
    }
}

/* Prototype Control Filters page */
.control-filters-col-select {
    width: 34px;
}

/* Prototype Outputs page */
.prototype-outputs-page {
    --blue: #1f5fae;
    --blue-dark: #17427a;
    --green: #2e9b57;
    --bg: #f4f6fa;
    --line: #d8e0ec;
    --head: #e9eff7;
    --A: #fde2e2;
    --A-bd: #d65a5a;
    --B: #fdecd6;
    --B-bd: #d98a2b;
    --D: #e3e0f7;
    --D-bd: #6b5bd6;
    --txt: #1f2933;
    --muted: #6b7785;
    --sec: #eaf1fb;
    --sec2: #f3f7fd;
    --warn: #fff4e0;
    --warn-bd: #e0a44b;
    --chip: #e7eefb;
    --chip-bd: #b9cdee;
    margin: 0;
    font-family: "Segoe UI", Calibri, Arial, sans-serif;
    color: var(--txt);
    background: var(--bg);
    font-size: 13px;
}

.prototype-outputs-page * {
    box-sizing: border-box;
}

.prototype-outputs-page h1 {
    font-size: 18px;
    margin: 0;
    color: var(--blue-dark);
}

.prototype-outputs-page .prototype-outputs-subtitle {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

.prototype-outputs-page .topbar {
    background: #fff;
    border-bottom: 2px solid var(--blue);
    padding: 12px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.prototype-outputs-page .role {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.prototype-outputs-page .role select {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.prototype-outputs-page .wrap {
    padding: 16px 22px;
}

.prototype-outputs-page .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.prototype-outputs-page .ptitle {
    font-weight: 700;
    color: var(--blue-dark);
    font-size: 13.5px;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prototype-outputs-page .step {
    background: var(--blue);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex: none;
}

.prototype-outputs-page .filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 12px;
}

.prototype-outputs-page .f label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}

.prototype-outputs-page select,
.prototype-outputs-page input[type=number] {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
}

.prototype-outputs-page .dims {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.prototype-outputs-page .dim {
    background: #f3f7fd;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.prototype-outputs-page .dim h4 {
    margin: 0 0 8px;
    color: var(--blue-dark);
    font-size: 12.5px;
}

.prototype-outputs-page .banner {
    margin-top: 10px;
    border-radius: 6px;
    padding: 9px 13px;
    font-size: 12.5px;
    line-height: 1.5;
}

.prototype-outputs-page .banner.ok {
    background: #e7f6ec;
    border: 1px solid #3fae6a;
}

.prototype-outputs-page .note {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.6;
}

.prototype-outputs-page .note-mt-5 {
    margin-top: 5px;
}

.prototype-outputs-page .note-mt-6 {
    margin-top: 6px;
}

.prototype-outputs-page .note-mt-10 {
    margin-top: 10px;
}

.prototype-outputs-page code {
    background: #eef2f8;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11.5px;
}

.prototype-outputs-page .summary {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--blue);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(31, 95, 174, .08);
}

.prototype-outputs-page .summary .row1 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prototype-outputs-page .outputs-label {
    font-weight: 700;
    color: var(--blue-dark);
}

.prototype-outputs-page .chips {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

.prototype-outputs-page .chip {
    background: var(--chip);
    border: 1px solid var(--chip-bd);
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 12px;
    color: var(--blue-dark);
    font-weight: 600;
}

.prototype-outputs-page .chip .x {
    color: var(--muted);
    font-weight: 400;
}

.prototype-outputs-page .bigcount {
    margin-left: auto;
    background: #eef3fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.prototype-outputs-page .bigcount b {
    color: var(--blue-dark);
    font-size: 17px;
}

.prototype-outputs-page .summary .row2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.prototype-outputs-page .summary .row3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
}

.prototype-outputs-page .navsel {
    display: flex;
    align-items: center;
    gap: 6px;
}

.prototype-outputs-page .navsel select {
    width: auto;
    min-width: 240px;
}

.prototype-outputs-page button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 600;
}

.prototype-outputs-page .btn-ghost {
    background: #eef2f8;
    color: var(--blue-dark);
}

.prototype-outputs-page .btn-x {
    background: var(--green);
    color: #fff;
}

.prototype-outputs-page .push-right {
    margin-left: auto;
}

.prototype-outputs-page .seg {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.prototype-outputs-page .seg button {
    border: none;
    background: #fff;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 0;
}

.prototype-outputs-page .seg button.on {
    background: var(--blue);
    color: #fff;
}

.prototype-outputs-page .legend {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted);
}

.prototype-outputs-page .legend-shift {
    margin-left: 6px;
}

.prototype-outputs-page .swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.prototype-outputs-page .sw-A {
    background: var(--A);
    border: 1px solid var(--A-bd);
}

.prototype-outputs-page .sw-B {
    background: var(--B);
    border: 1px solid var(--B-bd);
}

.prototype-outputs-page .sw-D {
    background: var(--D);
    border: 1px solid var(--D-bd);
}

.prototype-outputs-page .block {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    scroll-margin-top: 170px;
}

.prototype-outputs-page .bhead {
    background: var(--blue-dark);
    color: #fff;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prototype-outputs-page .bhead .k {
    background: rgba(255, 255, 255, .18);
    border-radius: 6px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
}

.prototype-outputs-page .bhead .title {
    font-weight: 700;
    font-size: 13.5px;
}

.prototype-outputs-page .bhead .bchips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: 4px;
}

.prototype-outputs-page .bhead .bchip {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    padding: 2px 9px;
    font-size: 11.5px;
}

.prototype-outputs-page .bhead .units {
    margin-left: auto;
    font-size: 12px;
    opacity: .9;
}

.prototype-outputs-page .tablewrap {
    overflow: auto;
}

.prototype-outputs-page table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 12px;
}

.prototype-outputs-page th,
.prototype-outputs-page td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 5px 8px;
    white-space: nowrap;
}

.prototype-outputs-page thead th {
    position: sticky;
    top: 0;
    background: var(--head);
    z-index: 3;
    color: var(--blue-dark);
    font-weight: 700;
    text-align: center;
}

.prototype-outputs-page th.name,
.prototype-outputs-page td.name {
    text-align: left;
    white-space: normal;
    min-width: 280px;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    border-right: 2px solid var(--line);
}

.prototype-outputs-page thead th.name {
    z-index: 4;
    background: var(--head);
}

.prototype-outputs-page td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.prototype-outputs-page td.c {
    text-align: center;
}

.prototype-outputs-page td.code {
    text-align: center;
    color: var(--muted);
}

.prototype-outputs-page tr.section td {
    background: var(--sec);
    font-weight: 700;
    color: var(--blue-dark);
}

.prototype-outputs-page tr.section.lvl1 td {
    background: var(--sec2);
    font-weight: 600;
}

.prototype-outputs-page tr.total td {
    font-weight: 700;
    background: #e8f0fb;
    border-top: 2px solid var(--blue);
}

.prototype-outputs-page .ind1 {
    padding-left: 20px;
}

.prototype-outputs-page .ind2 {
    padding-left: 38px;
}

.prototype-outputs-page td.cA {
    background: var(--A);
}

.prototype-outputs-page td.cB {
    background: var(--B);
}

.prototype-outputs-page td.cD {
    background: var(--D);
}

.prototype-outputs-page .pk {
    font-weight: 800;
    text-align: center;
}

.prototype-outputs-page .pk.A {
    color: var(--A-bd);
}

.prototype-outputs-page .pk.B {
    color: #b9710f;
}

.prototype-outputs-page .pk.D {
    color: var(--D-bd);
}

.prototype-outputs-page .pk-lg {
    font-size: 15px;
}

.prototype-outputs-page .pill {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 5px;
}

.prototype-outputs-page .more {
    background: var(--warn);
    border: 1px solid var(--warn-bd);
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    color: #8a5a12;
    font-weight: 600;
}

.prototype-outputs-page .cell-help {
    cursor: help;
}

.prototype-outputs-page dialog {
    border: none;
    border-radius: 10px;
    padding: 0;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.prototype-outputs-page dialog .dh {
    background: var(--blue-dark);
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
}

.prototype-outputs-page dialog .db {
    padding: 16px;
    line-height: 1.6;
}

.prototype-outputs-page dialog table {
    width: 100%;
}

.prototype-outputs-page dialog td {
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 5px 4px;
}

.prototype-outputs-page dialog td.r {
    text-align: right;
    font-weight: 600;
}

.prototype-outputs-page .dlg-actions {
    padding: 0 16px 16px;
    text-align: right;
}

/* ============================================================
   ГРУПАПР — таблица „Членове на ГП" (Приложения 1 и 2)
   По модела на .prodcom-products-table-wrap (ред 1499).
   ============================================================ */

.group-members-table-wrap {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    isolation: isolate;
}

.group-members-table {
    min-width: 1570px;
    max-width: none;
}

.group-members-table thead th {
    white-space: normal;
    vertical-align: middle;
    line-height: 1.15;
    font-size: .8rem;
    padding: .38rem .42rem;
}

.group-members-table thead tr.group-members-head-groups th {
    text-align: center;
}

.group-members-table th,
.group-members-table td {
    position: relative;
}

.group-members-table th.group-col-order,
.group-members-table td.group-col-order,
.group-members-table th.group-col-country,
.group-members-table td.group-col-country,
.group-members-table th.group-col-uic,
.group-members-table td.group-col-uic {
    background-clip: padding-box;
    isolation: isolate;
}

.group-members-table thead th.group-col-order,
.group-members-table thead th.group-col-country,
.group-members-table thead th.group-col-uic {
    background-color: #c3d2e3;
    color: #1d4f86;
    z-index: 95;
}

.group-members-table tbody td.group-col-order,
.group-members-table tbody td.group-col-country,
.group-members-table tbody td.group-col-uic {
    background-color: #fff;
    z-index: 85;
}

.group-members-table tbody tr:nth-child(even) td.group-col-order,
.group-members-table tbody tr:nth-child(even) td.group-col-country,
.group-members-table tbody tr:nth-child(even) td.group-col-uic {
    background-color: #f8f9fa;
}

.group-members-table th.group-col-order,
.group-members-table td.group-col-order {
    min-width: 55px;
    width: 55px;
    position: sticky;
    left: 0;
}

.group-members-table th.group-col-country,
.group-members-table td.group-col-country {
    min-width: 110px;
    width: 110px;
    position: sticky;
    left: 55px;
}

.group-members-table th.group-col-uic,
.group-members-table td.group-col-uic {
    min-width: 92px;
    width: 92px;
    position: sticky;
    left: 165px;
    box-shadow: 3px 0 0 rgba(0, 0, 0, 0.06);
}

.group-members-table th.group-col-name,
.group-members-table td.group-col-name,
.group-members-table th.group-col-name-latin,
.group-members-table td.group-col-name-latin {
    min-width: 150px;
    width: 150px;
}

.group-members-table th.group-col-control,
.group-members-table td.group-col-control,
.group-members-table th.group-col-share,
.group-members-table td.group-col-share {
    min-width: 85px;
    width: 85px;
}

.group-members-table th.group-col-kid-description,
.group-members-table td.group-col-kid-description {
    min-width: 145px;
    width: 145px;
}

.group-members-table th.group-col-kid2025,
.group-members-table td.group-col-kid2025,
.group-members-table th.group-col-kid2008,
.group-members-table td.group-col-kid2008 {
    min-width: 85px;
    width: 85px;
}

.group-members-table th.group-col-empcount,
.group-members-table td.group-col-empcount {
    min-width: 85px;
    width: 85px;
}

.group-members-table th.group-col-turnover,
.group-members-table td.group-col-turnover {
    min-width: 95px;
    width: 95px;
}

.group-members-table th.group-col-local-turnover,
.group-members-table td.group-col-local-turnover {
    min-width: 105px;
    width: 105px;
}

.group-members-table th.group-col-payroll,
.group-members-table td.group-col-payroll,
.group-members-table th.group-col-invest,
.group-members-table td.group-col-invest {
    min-width: 100px;
    width: 100px;
}

.group-members-table th.group-col-remove,
.group-members-table td.group-col-remove {
    min-width: 44px;
    width: 44px;
}

.group-members-table .form-control,
.group-members-table .form-select {
    font-size: .8rem;
    padding-top: .24rem;
    padding-bottom: .24rem;
    padding-left: .35rem;
    padding-right: .35rem;
    min-height: calc(1.5em + 0.48rem + 2px);
}

.group-page .form-control,
.group-page .form-select {
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
    min-height: calc(1.5em + 0.64rem + 2px);
}

.group-page .form-label {
    margin-bottom: 0.22rem;
}

.group-page .group-company-info {
    border: 1px solid #9fb0c4;
    border-radius: 8px;
    background: #f4f8fc;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.85rem;
}

.group-page.group-header-bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.8rem;
}

.group-page.group-header-bar .group-company-info {
    margin-bottom: 0;
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    min-width: 0;
}

.group-page .group-header-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.group-page .group-header-actions .btn {
    margin: 0;
}

@media (max-width: 992px) {
    .group-page.group-header-bar {
        flex-direction: column;
    }

    .group-page.group-header-bar .group-company-info {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }

    .group-page .group-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.group-page .group-company-label {
    color: #4c5e73;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.group-page .group-company-value {
    color: #23374d;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.group-page .group-form-title {
    color: #1d4f86;
    font-weight: 700;
    letter-spacing: .01em;
    margin-bottom: 1rem;
}

.group-page .group-section-panel {
    border: 1px solid #b4c3d5;
    border-radius: 8px;
    background: #fbfdff;
    padding: 0.75rem 0.85rem 0.6rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 2px rgba(29, 79, 134, 0.06);
}

.group-page .group-section-panel > .info-section-separator {
    margin: 0 0 0.65rem;
}

.group-page .group-section-panel h5 {
    color: #1f3f66;
    font-weight: 600;
}

.group-page .group-members-note-panel .alert {
    border-color: #9fc2e8;
    background: #eaf3fd;
    color: #1f4168;
}

.group-page .group-members-panel .group-members-table-wrap {
    border: 1px solid #a8bbd1;
    border-radius: 6px;
    background: #fff;
}

.group-page .group-members-table thead th {
    background: #c3d2e3;
    color: #1d4f86;
    border-color: #9eb2c9;
}

.group-page .group-members-table td {
    border-color: #bccbdd;
}
