/* Цветовая палитра, размеры и параметры масштабирования */
:root {
    --canvas-width: 1900px;
    --canvas-height: 950px;
    --ui-scale: 1;
    --settings-background: #e4e4ef;
    --settings-main-background: #ffffff;
    --settings-table-background: #f5f4ff;
    --settings-table-header: #a39cff;
    --settings-buttons: #7740ff;
    --settings-planning-dates: #F7F7FB;
    --dark-purple: #59215c;
    --main-lilac: #a39cff;
    --page-background: #e4e4ef;
    --portfolio-background: #ffffff;
    --linked-field-background: #faf9ff;
    --active-field-border: #7740ff;
    --dropdown-menu-border: #cfcfcf;
    --dropdown-search-divider: #dedede;
    --scrollbar-thumb: rgba(128, 128, 128, 0.55);
    --scrollbar-thumb-hover: rgba(105, 105, 105, 0.70);
    --border-width: 1.32px;
    --page-padding-x: 32px;
    --page-padding-top: 8px;
    --page-padding-bottom: 6px;
    --column-gap: 36px;
    --header-height: 52px;
    --product-card-height: 409px;
    --advanced-block-height: 18px;
    --advanced-toggle-height: 17px;
    --advanced-row-count: 0;
    --products-scroll-gap: 12px;
    --delete-button-space: 9px;
    --delete-button-overhang: 4px;
    --parameter-input-width: 150px;
    --parameter-input-height: 21px;
    --portfolio-metrics-gap: 11px;
    --portfolio-dropdown-menu-width: 178px;
    --portfolio-dropdown-options-height: 120px;
    --filter-dropdown-width: 178px;
    --portfolio-panel-padding: 14px;
    --results-gap: 14px;
    --results-section-gap: 14px;
    --statement-card-height: 276px;
    --duration-chart-area-height: 90px;
    --weights-chart-area-height: 130px;
    --duration-chart-height: 125px;
    --weights-chart-height: 151px;
    --advanced-header-height: 18px;
    --advanced-row-step: 24px;
    --chart-placeholder-height: 124px;
    --large-form-font-size: 14.5px;
    --large-form-line-height: 15.5px;
    --product-background: #f5f4ff;
    --products-area-background: #ffffff;
    --statement-header-background: #7740ff;
    --chart-lilac: #a39cff;
    --message-title-font-size: 18px;
    --message-body-font-size: 14.5px;
    --message-title-font-weight: 600;
    --message-body-font-weight: 400;
}

/* Оформление элементов html */
html,
body,
#react-entry-point,
#_pages_content {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    background: var(--page-background);
    color: var(--dark-purple);
    font-family: "Aptos Narrow", "Arial Narrow", Arial, sans-serif;
}

/* Оформление элементов * */
* {
    box-sizing: border-box;
    font-family: "Aptos Narrow", "Arial Narrow", Arial, sans-serif;
}

/* Оформление элементов button */
button,
input {
    font: inherit;
}

/* Область просмотра приложения */
.app-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #e4e4ef;
}

/* Масштабируемый холст приложения */
.app-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--canvas-width);
    height: var(--canvas-height);
    transform: scale(var(--ui-scale, 1));
    transform-origin: top left;
    overflow: hidden;
    background: var(--page-background);
}

/* Контейнер текущей страницы */
.app-page-container {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: #e4e4ef;
    z-index: auto;
}

/* Панель навигации */
.app-navbar {
    position: absolute;
    top: 12.5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 1000;
    visibility: hidden;
    height: 43px;
    min-height: 43px;
    padding: 4px 6px;
    background: var(--settings-table-background);
    border-radius: 13px;
    box-shadow: none;
}

/* Масштабируемый холст приложения */
.app-canvas:has(.page-shell) .app-navbar,
.app-canvas:has(.settings-viewport) .app-navbar {
    visibility: visible;
}

/* Вкладка навигации */
.app-nav-link {
    height: 35px;
    padding: 0 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--dark-purple);
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

/* Активная вкладка навигации */
.app-nav-link-active {
    background: #ffffff;
    font-weight: 600;
    color: #7740ff;
    box-shadow: none;
}

/* Вкладка навигации */
.app-nav-link:hover {
    background: #ffffff;
}

/* Общие элементы интерфейса: app nav button */
.app-nav-button {
    font-family: inherit;
}

/* Основной контейнер бюджетирования */
.page-shell {
    width: 100%;
    height: 100%;
    padding-top: var(--page-padding-top);
    padding-right: var(--page-padding-x);
    padding-bottom: var(--page-padding-bottom);
    padding-left: var(--page-padding-x);
    display: grid;
    grid-template-rows: var(--header-height) auto;
    row-gap: 6px;
    align-content: start;
    overflow-x: hidden;
    scrollbar-gutter: auto;
    background: var(--page-background);
    color: var(--dark-purple);
    cursor: default;
    user-select: none;
    caret-color: transparent;
}

/* Основной контейнер бюджетирования */
.page-shell input {
    cursor: text;
    user-select: text;
}

/* Оформление элементов .title-block */
.title-block {
    display: flex;
    flex-direction: column;
}

/* Флажок параметра продукта */
.mini-check {
    width: 15px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Флажок верхних настроек */
.compact-check label,
.mini-check label {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"]::before,
.mini-check input[type="checkbox"]::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #ffffff;
    transform: scale(0);
    clip-path: polygon(14% 44%, 0 65%, 42% 100%, 100% 16%, 80% 0, 38% 64%);
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"]:checked,
.mini-check input[type="checkbox"]:checked {
    border-color: var(--dark-purple) !important;
    background: var(--dark-purple) !important;
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"]:checked::before,
.mini-check input[type="checkbox"]:checked::before {
    transform: scale(1);
}

/* Флажок верхних настроек */
.compact-check .dash-options-list-option-text,
.mini-check .dash-options-list-option-text {
    display: none !important;
}

/* Флажок верхних настроек */
.compact-check[role="listbox"],
.mini-check[role="listbox"],
.dash-checklist[role="listbox"] {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: inherit !important;
    line-height: normal !important;
    z-index: auto !important;
}

/* Флажок верхних настроек */
.compact-check[role="listbox"] [role="option"],
.mini-check[role="listbox"] [role="option"],
.dash-checklist[role="listbox"] [role="option"] {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: normal !important;
}

/* Флажок верхних настроек */
.compact-check[role="listbox"] [role="option"]:hover,
.compact-check[role="listbox"] [role="option"][aria-selected="true"],
.mini-check[role="listbox"] [role="option"]:hover,
.mini-check[role="listbox"] [role="option"][aria-selected="true"],
.dash-checklist[role="listbox"] [role="option"]:hover,
.dash-checklist[role="listbox"] [role="option"][aria-selected="true"] {
    background: transparent !important;
}

/* Оформление элементов .upload-products-block */
.upload-products-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Оформление элементов .upload-products-control */
.upload-products-control {
    display: inline-block;
}

/* Белая кнопка добавления продукта */
.add-product-button:hover {
    background: #ffffff;
    color: #7740ff;
    border-color: #7740ff;
}

/* Элементы сводной панели: portfolio filters row */
.portfolio-filters-row {
    width: 100%;
    height: 29px;
    min-height: 29px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--portfolio-metrics-gap);
    align-items: center;
}

/* Элементы сводной панели: portfolio filter field empty */
.portfolio-filter-field-empty {
    visibility: hidden;
}

/* Компактная двухстрочная подпись отчетной даты */
.portfolio-filter-label.reporting-period-filter-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #59215c;
    font-size: 14.5px;
    line-height: 14.5px;
    font-weight: 700;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Каждая часть надписи остается в одной строке */
.reporting-period-filter-label span {
    display: block;
    white-space: nowrap;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter,
.group-filter {
    width: var(--filter-dropdown-width);
    min-width: var(--filter-dropdown-width);
    max-width: var(--filter-dropdown-width);
    height: var(--parameter-input-height);
    min-height: var(--parameter-input-height);
    max-height: var(--parameter-input-height);
    justify-self: end;
    color: var(--dark-purple);
    font-size: 9.5px;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter.is-focused .Select-control,
.portfolio-filter.is-open .Select-control,
.group-filter.is-focused .Select-control,
.group-filter.is-open .Select-control {
    border-color: var(--active-field-border) !important;
    box-shadow: none !important;
}

/* Элементы сводной панели: portfolio filter */
button.portfolio-filter,
.dash-dropdown.portfolio-filter,
button.group-filter,
.dash-dropdown.group-filter {
    width: var(--filter-dropdown-width) !important;
    min-width: var(--filter-dropdown-width) !important;
    max-width: var(--filter-dropdown-width) !important;
    height: var(--parameter-input-height) !important;
    min-height: var(--parameter-input-height) !important;
    max-height: var(--parameter-input-height) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #59215c59 !important;
    border-radius: 3px !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: var(--dark-purple) !important;
    font-size: 9.5px !important;
    line-height: 13px !important;
    overflow: hidden !important;
    justify-self: end !important;
}

/* Элементы сводной панели: состояние фокуса */
button.portfolio-filter:focus,
button.portfolio-filter:focus-visible,
button.portfolio-filter[aria-expanded="true"],
.dash-dropdown.portfolio-filter:focus,
.dash-dropdown.portfolio-filter:focus-visible,
.dash-dropdown.portfolio-filter:focus-within,
.dash-dropdown.portfolio-filter[aria-expanded="true"],
button.group-filter:focus,
button.group-filter:focus-visible,
button.group-filter[aria-expanded="true"],
.dash-dropdown.group-filter:focus,
.dash-dropdown.group-filter:focus-visible,
.dash-dropdown.group-filter:focus-within,
.dash-dropdown.group-filter[aria-expanded="true"] {
    border-color: var(--active-field-border) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .dash-dropdown-grid-container,
.portfolio-filter .dash-dropdown-trigger,
.group-filter .dash-dropdown-grid-container,
.group-filter .dash-dropdown-trigger {
    width: 100% !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 10px !important;
    align-items: center !important;
    overflow: hidden !important;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .dash-dropdown-value,
.group-filter .dash-dropdown-value {
    width: 100% !important;
    min-width: 0 !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    padding: 0 0 0 5px !important;
    margin: 0 !important;
    display: block !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    color: var(--dark-purple) !important;
    font-size: 9.5px !important;
    line-height: 13px !important;
    font-weight: 400 !important;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .dash-dropdown-trigger-icon,
.group-filter .dash-dropdown-trigger-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--dark-purple) !important;
    stroke: var(--dark-purple) !important;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .dash-dropdown-trigger-icon svg,
.portfolio-filter .dash-dropdown-trigger-icon path,
.portfolio-filter .dash-dropdown-trigger-icon polyline,
.group-filter .dash-dropdown-trigger-icon svg,
.group-filter .dash-dropdown-trigger-icon path,
.group-filter .dash-dropdown-trigger-icon polyline {
    stroke: var(--dark-purple) !important;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .Select-arrow,
.group-filter .Select-arrow {
    border-top-color: var(--dark-purple) !important;
    border-right-width: 4px !important;
    border-left-width: 4px !important;
    border-top-width: 5px !important;
}

/* Белая панель TOTALS */
.portfolio-panel:has(button.portfolio-filter[aria-expanded="true"]),
.portfolio-panel:has(.dash-dropdown.portfolio-filter[aria-expanded="true"]),
.portfolio-panel:has(button.group-filter[aria-expanded="true"]),
.portfolio-panel:has(.dash-dropdown.group-filter[aria-expanded="true"]) {
    overflow-y: hidden;
}

/* Элементы сводной панели: portfolio metric text */
.portfolio-metric-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Элементы сводной панели: portfolio placeholder */
.portfolio-placeholder {
    padding: 8px;
    border: 1px dashed var(--main-lilac);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    line-height: 11px;
    text-align: center;
}

/* Элементы сводной панели: portfolio statement placeholder */
.portfolio-statement-placeholder {
    min-height: 95px;
}

/* Элементы сводной панели: portfolio statement title */
.portfolio-statement-title {
    margin-top: 11px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    line-height: 11px;
    font-weight: 700;
}

/* Элементы сводной панели: portfolio statement icon */
.portfolio-statement-icon {
    width: 11px;
    height: 11px;
    min-width: 11px;
    object-fit: contain;
}

/* Горизонтальный ряд карточек продуктов */
.products-grid {
    width: 100%;
    min-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--column-gap);
    height: max-content;
    min-height: 0;
}

/* Кнопка удаления продукта */
.delete-product-button:hover {
    background: #ffffff;
    color: #59215c;
}

/* Фон подтверждения удаления */
.delete-product-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(228, 228, 239, 0.76);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 80000;
}

/* Фон подтверждения удаления */
.delete-product-modal.delete-product-modal-open {
    display: flex;
}

/* Удаление продукта: delete product modal title */
.delete-product-modal-title {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 19px;
    font-weight: 700;
}

/* Удаление продукта: delete product modal text */
.delete-product-modal-text {
    font-size: 12px;
    line-height: 15px;
    font-weight: 400;
}

/* Удаление продукта: delete product modal product */
.delete-product-modal-product {
    font-weight: 700;
}

/* Удаление продукта: delete product modal actions */
.delete-product-modal-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

/* Удаление продукта: delete product modal button */
.delete-product-modal-button {
    height: 28px;
    padding: 0 18px;
    border: var(--border-width) solid var(--dark-purple);
    border-radius: 6px;
    outline: none;
    box-shadow: none;
    font-size: 11px;
    line-height: 11px;
    font-weight: 700;
    cursor: pointer;
}

/* Удаление продукта: delete product cancel button */
.delete-product-cancel-button {
    background: transparent;
    color: var(--dark-purple);
}

/* Удаление продукта: состояние при наведении */
.delete-product-cancel-button:hover {
    background: var(--settings-table-background);
}

/* Удаление продукта: delete product confirm button */
.delete-product-confirm-button {
    background: var(--dark-purple);
    color: #ffffff;
}

/* Удаление продукта: состояние при наведении */
.delete-product-confirm-button:hover {
    background: #7740ff;
}

/* Фон предупреждения */
.warning-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(228, 228, 239, 0.76);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 80000;
}

/* Фон предупреждения */
.warning-modal.warning-modal-open {
    display: flex;
}

/* Предупреждение: warning modal title */
.warning-modal-title {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 19px;
    font-weight: 700;
}

/* Предупреждение: warning modal text */
.warning-modal-text {
    font-size: 12px;
    line-height: 15px;
    font-weight: 400;
}

/* Предупреждение: warning modal text */
.warning-modal-text > div + div {
    margin-top: 8px;
}

/* Предупреждение: warning modal actions */
.warning-modal-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Предупреждение: warning modal button */
.warning-modal-button {
    height: 28px;
    padding: 0 18px;
    border: var(--border-width) solid var(--dark-purple);
    border-radius: 6px;
    outline: none;
    box-shadow: none;
    background: var(--dark-purple);
    color: #ffffff;
    font-size: 11px;
    line-height: 11px;
    font-weight: 700;
    cursor: pointer;
}

/* Предупреждение: состояние при наведении */
.warning-modal-button:hover {
    background: #7740ff;
}

/* Элементы параметров продукта: parameter label text */
.parameter-label-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--dark-purple);
    font-size: 9.5px;
    line-height: 10px;
    font-weight: 400;
    text-align: right;
}

/* Элементы параметров продукта: parameter check placeholder */
.parameter-check-placeholder {
    width: 15px;
    height: 12px;
}

/* Единицы измерения параметра */
.parameter-unit {
    color: var(--dark-purple);
    font-size: 9.5px;
    line-height: 10px;
    font-weight: 400;
    text-align: left;
}

/* Элементы карточки продукта: product margin label */
.product-margin-label .parameter-label-text,
.product-margin-value,
.product-margin-unit {
    font-weight: 700;
}

/* Поле ввода параметров */
.param-input:focus,
.param-input:focus-within {
    border-color: var(--active-field-border) !important;
    caret-color: var(--dark-purple) !important;
}

/* Поле ввода параметров */
.param-input .dash-input-element:focus,
.param-input .dash-input-element:focus-visible,
.param-input > input:focus,
.param-input > input:focus-visible,
.param-input input:focus,
.param-input input:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    caret-color: var(--dark-purple) !important;
}

/* Поле ввода параметров */
.param-input.linked-discount-input,
.param-input.linked-discount-input:focus,
.param-input.linked-discount-input:focus-within {
    border-color: var(--linked-field-background) !important;
    background: var(--linked-field-background) !important;
    pointer-events: none !important;
}

/* Поле ввода параметров */
.param-input.linked-discount-input .dash-input-element,
.param-input.linked-discount-input > input,
.param-input.linked-discount-input input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* Выпадающее меню Dash: dash dropdown focus target */
.dash-dropdown-focus-target {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    max-width: 1px !important;
    max-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Выпадающий список параметров */
.param-dropdown {
    width: 100%;
    height: var(--parameter-input-height);
    min-height: var(--parameter-input-height);
    color: #59215c;
    font-size: 9.5px;
    background: #ffffff;
}

/* Оформление элементов .ksj-dropdown */
.ksj-dropdown,
.ksj-dropdown:disabled,
.ksj-dropdown[aria-disabled="true"] {
    opacity: 1 !important;
    cursor: default !important;
    color: var(--dark-purple) !important;
    -webkit-text-fill-color: var(--dark-purple) !important;
}

/* Выпадающее меню Dash: dash dropdown value */
.ksj-dropdown .dash-dropdown-value,
.ksj-dropdown .dash-dropdown-trigger-icon {
    opacity: 1 !important;
    color: var(--dark-purple) !important;
}

/* Выпадающий список параметров */
.param-dropdown .Select-control {
    width: 100%;
    height: var(--parameter-input-height);
    min-height: var(--parameter-input-height);
    border: 1px solid #ffffff;
    border-radius: 3px;
    background: #ffffff;
    box-shadow: none;
    color: #59215c;
}

/* Выпадающий список параметров */
.param-dropdown .Select-value,
.param-dropdown .Select-placeholder,
.param-dropdown .Select-input {
    height: 13px;
    line-height: 13px;
    padding-left: 5px;
    padding-right: 16px;
    color: var(--dark-purple);
    font-size: 9.5px;
    text-align: right;
}

/* Выпадающий список параметров */
button.param-dropdown,
.dash-dropdown.param-dropdown {
    width: 100% !important;
    height: var(--parameter-input-height) !important;
    min-height: var(--parameter-input-height) !important;
    max-height: var(--parameter-input-height) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #ffffff !important;
    border-radius: 3px !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: var(--dark-purple) !important;
    font-size: 9.5px !important;
    line-height: 13px !important;
    overflow: hidden !important;
    cursor: pointer !important;
}

/* Выпадающий список параметров */
button.param-dropdown:focus,
button.param-dropdown:focus-visible,
button.param-dropdown[aria-expanded="true"],
.dash-dropdown.param-dropdown:focus,
.dash-dropdown.param-dropdown:focus-visible,
.dash-dropdown.param-dropdown[aria-expanded="true"] {
    border-color: var(--active-field-border) !important;
}

/* Выпадающий список параметров */
button.param-dropdown .dash-dropdown-grid-container,
button.param-dropdown .dash-dropdown-trigger,
.dash-dropdown.param-dropdown .dash-dropdown-grid-container,
.dash-dropdown.param-dropdown .dash-dropdown-trigger {
    width: 100% !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 14px !important;
    align-items: center !important;
    overflow: hidden !important;
}

/* Выпадающий список параметров */
button.param-dropdown .dash-dropdown-value,
.dash-dropdown.param-dropdown .dash-dropdown-value {
    width: 100% !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    padding: 0 0 0 5px !important;
    margin: 0 !important;
    display: block !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    color: var(--dark-purple) !important;
    font-size: 9.5px !important;
    line-height: 13px !important;
    font-weight: 400 !important;
    text-align: right !important;
}

/* Выпадающий список параметров */
button.param-dropdown .dash-dropdown-placeholder,
.dash-dropdown.param-dropdown .dash-dropdown-placeholder {
    width: 100% !important;
    height: 13px !important;
    padding: 0 0 0 5px !important;
    margin: 0 !important;
    color: var(--dark-purple) !important;
    font-size: 9.5px !important;
    line-height: 13px !important;
    font-weight: 400 !important;
    text-align: right !important;
}

/* Выпадающий список параметров */
button.param-dropdown .dash-dropdown-trigger-icon,
.dash-dropdown.param-dropdown .dash-dropdown-trigger-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--dark-purple) !important;
    stroke: var(--dark-purple) !important;
}

/* Варианты выпадающего списка */
.dash-dropdown-options[role="listbox"] [role="option"]:hover,
.dash-dropdown-options[role="listbox"] [role="option"][aria-selected="true"] {
    background: #cac5f9 !important;
}

/* Выпадающее меню Dash: dash dropdown search */
[data-radix-popper-content-wrapper]:has(input.dash-dropdown-search[placeholder="Найти портфель"]),
[data-radix-popper-content-wrapper]:has(input.dash-dropdown-search[aria-label="Найти портфель"]) {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
    background: transparent !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) .dash-dropdown-search-icon,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) .dash-dropdown-search-icon {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
    margin: 0 !important;
    color: var(--dark-purple) !important;
    stroke: var(--dark-purple) !important;
    pointer-events: none !important;
}

/* Выпадающее меню Dash: состояние фокуса */
input.dash-dropdown-search[placeholder="Найти портфель"]:focus,
input.dash-dropdown-search[aria-label="Найти портфель"]:focus,
input.dash-dropdown-search[placeholder="Найти портфель"]:focus-visible,
input.dash-dropdown-search[aria-label="Найти портфель"]:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    caret-color: var(--dark-purple) !important;
}

/* Выпадающее меню Dash: dash dropdown search */
input.dash-dropdown-search[placeholder="Найти портфель"]::placeholder,
input.dash-dropdown-search[aria-label="Найти портфель"]::placeholder {
    color: #59215c !important;
    opacity: 1 !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) button,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) button,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) [class*="clear"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) [class*="clear"] {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--dark-purple) !important;
    position: static !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) button svg,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) button svg,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) [class*="clear"] svg,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) [class*="clear"] svg {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options {
    /* Высоту и прокрутку рассчитывает Dash: не создаём второй scroll-контейнер. */
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options > :first-child,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options > :first-child {
    margin-top: 0 !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options [role="option"]:last-child,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options [role="option"]:last-child {
    border-bottom: none !important;
}

/* Выпадающее меню Dash: состояние при наведении */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options [role="option"]:hover,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options [role="option"]:hover {
    background: #cac5f9 !important;
    font-weight: 400 !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options [role="option"][aria-selected="true"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options [role="option"][aria-selected="true"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options .selected,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options .selected {
    background: #f5f4ff !important;
    color: #59215c !important;
    font-weight: 400 !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options .dash-dropdown-no-options,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options .dash-dropdown-no-options,
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options [class*="no-options"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options [class*="no-options"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options [class*="NoOptions"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options [class*="NoOptions"] {
    min-height: 18px !important;
    padding: 0 5px !important;
    margin: 0 !important;
    color: #70668d !important;
    font-size: 8.5px !important;
    line-height: 18px !important;
    font-weight: 400 !important;
    text-align: left !important;
}

/* Дополнительные параметры: advanced year cell */
.advanced-year-cell {
    color: var(--dark-purple);
    font-size: 9.5px;
    line-height: 10px;
    text-align: center;
}

/* Дополнительные параметры: advanced parameter input */
.advanced-parameter-input {
    width: 100%;
}

/* Основной контейнер бюджетирования */
.page-shell::-webkit-scrollbar,
.portfolio-panel::-webkit-scrollbar,
.products-scroll-shell::-webkit-scrollbar {
    width: 14px;
    height: 7px;
}

/* Основной контейнер бюджетирования */
.page-shell::-webkit-scrollbar-track,
.portfolio-panel::-webkit-scrollbar-track,
.products-scroll-shell::-webkit-scrollbar-track {
    background: transparent;
}

/* Основной контейнер бюджетирования */
.page-shell::-webkit-scrollbar-thumb,
.portfolio-panel::-webkit-scrollbar-thumb,
.products-scroll-shell::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: transparent;
    background-clip: padding-box;
}

/* Белая панель TOTALS */
.portfolio-panel::-webkit-scrollbar-thumb,
.products-scroll-shell::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
}

/* Основной контейнер бюджетирования */
.page-shell::-webkit-scrollbar-thumb:hover,
.portfolio-panel::-webkit-scrollbar-thumb:hover,
.products-scroll-shell::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

/* Скрываем стандартную стартовую заставку Dash */
._dash-loading {
    display: none !important;
}

/* Экран загрузки */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(228, 228, 239, 0.76);
    color: var(--dark-purple);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

/* Индикатор загрузки: loading spinner */
.loading-spinner {
    width: 22px;
    height: 22px;
    border: 2.4px solid var(--main-lilac);
    border-top-color: var(--dark-purple);
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

/* Индикатор загрузки: loading message */
.loading-message {
    color: var(--dark-purple);
    font-size: 15px;
    line-height: 18px;
    font-weight: 400;
    text-align: center;
}

/* Оформление элементов .placeholder-page */
.placeholder-page {
    width: 100vw;
    height: 100vh;
    padding: 50px;
    background: var(--page-background);
    color: var(--dark-purple);
}

/* Оформление элементов .placeholder-page h1 */
.placeholder-page h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Элементы карточки продукта: product column */
.product-column {
    width: calc((100% - var(--column-gap)) / 2);
    min-width: calc((100% - var(--column-gap)) / 2);
    max-width: calc((100% - var(--column-gap)) / 2);
    flex: 0 0 calc((100% - var(--column-gap)) / 2);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Элементы ОФР: statement table */
.statement-table {
    min-height: 0;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
}

/* Элементы ОФР: statement body */
.statement-body {
    width: 100%;
}

/* Элементы ОФР: statement row bold */
.statement-row-bold {
    font-weight: 700;
}

/* Элементы ОФР: statement cell */
.statement-cell {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Элементы ОФР: statement year cell */
.statement-year-cell {
    text-align: right;
}

/* Элементы ОФР: statement header cell */
.statement-header-cell {
    font-weight: 700;
}

/* Оформление элементов .chart-area */
.chart-area {
    width: 100%;
    min-width: 0;
    min-height: 0;
    position: relative;
}

/* Оформление элементов .budgeting-graph */
.budgeting-graph {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Контейнер диаграммы весов */
.weights-chart-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    max-height: none;
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* График веса продуктов занимает оставшееся место над ОФР */
#portfolio-weight-chart-block {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Диаграмма весов продуктов: weights pie wrapper */
.weights-pie-wrapper,
.weights-pie-wrapper .dash-graph,
.weights-pie-wrapper .js-plotly-plot,
.weights-pie-wrapper .plot-container,
.weights-pie-wrapper .svg-container {
    background: transparent !important;
}

/* Элементы сводной панели: portfolio chart title */
.portfolio-chart-title {
    flex: 0 0 auto;
    margin-top: 3px;
    margin-bottom: 0;
    color: var(--dark-purple);
    font-size: 11.5px;
    line-height: 13px;
    font-weight: 700;
    text-align: left;
}

/* Основной контейнер бюджетирования */
.page-shell::-webkit-scrollbar,
.portfolio-panel::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Основной контейнер бюджетирования */
.page-shell::-webkit-scrollbar-thumb,
.portfolio-panel::-webkit-scrollbar-thumb {
    background: transparent;
}

/* Прокручиваемая область продуктовых карточек */
.products-scroll-shell::-webkit-scrollbar {
    width: 10px;
    height: 7px;
}

/* Прокручиваемая область продуктовых карточек */
.products-scroll-shell::-webkit-scrollbar-track {
    background: transparent;
}

/* Прокручиваемая область продуктовых карточек */
.products-scroll-shell::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    background-clip: padding-box;
}

/* Прокручиваемая область продуктовых карточек */
.products-scroll-shell::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

/* Основной контейнер бюджетирования */
.page-shell,
.page-shell.page-shell-advanced-open {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: var(--header-height) minmax(0, 1fr);
    align-content: stretch;
    overflow: hidden;
    scrollbar-gutter: auto;
}

/* Оформление элементов .products-empty-state */
.products-empty-state {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    padding: 30px;
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--dark-purple);
    text-align: center;
}

/* Оформление элементов .products-empty-title */
.products-empty-title {
    margin: 0;
    color: var(--dark-purple);
    font-size: 19px;
    line-height: 23px;
    font-weight: 600;
}

/* Оформление элементов .products-empty-description */
.products-empty-description {
    max-width: 650px;
    margin-top: 6px;
    color: var(--dark-purple);
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
}

/* При отсутствии видимых продуктов используем всю белую область */
.products-workspace:has(.products-empty-state) .products-scroll-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    scrollbar-gutter: auto;
}

/* Центрируем сообщение вместо продуктовых колонок */
.products-workspace:has(.products-empty-state) .products-grid {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* Убираем стрелку, когда продуктов на экране нет */
.products-workspace:has(.products-empty-state) .advanced-toggle-button {
    display: none;
}

/* Оформление элементов .budgeting-content */
.budgeting-content {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    column-gap: var(--column-gap);
    align-items: stretch;
    overflow: hidden;
}

/* Верхняя панель бюджетирования */
.page-header {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Оформление элементов .header-left */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Оформление элементов .main-logo-img */
.main-logo-img {
    width: 31px;
    height: 31px;
    min-width: 31px;
    object-fit: contain;
    display: block;
}

/* Заголовок страницы */
.page-title {
    color: var(--dark-purple);
    font-size: 36px;
    line-height: 40px;
    font-weight: 600;
    white-space: nowrap;
}

/* Действия в верхней панели */
.header-actions {
    min-width: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    column-gap: 14px;
    padding-right: 112px;
}

/* Оформление элементов .top-options */
.top-options {
    width: fit-content;
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2px;
    transform: none;
    margin-top: 0;
}

/* Компактный флажок: compact check row */
.compact-check-row {
    width: 100%;
    height: 16px;
    min-height: 16px;
    display: flex;
    align-items: center;
    column-gap: 6px;
    justify-content: flex-end;
}

/* Компактный флажок: compact check label */
.compact-check-label {
    color: var(--dark-purple);
    font-size: 14px;
    line-height: 16px;
    font-weight: 400;
    font-style: italic;
    white-space: nowrap;
}

/* Флажок верхних настроек */
.compact-check {
    width: 12px;
    min-width: 12px;
    height: 16px;
    flex: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"],
.mini-check input[type="checkbox"] {
    width: 11px !important;
    height: 11px !important;
    min-width: 11px !important;
    min-height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.2px solid #a39cff !important;
    border-radius: 2px !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    display: grid !important;
    place-content: center !important;
    cursor: pointer !important;
}

/* Белая кнопка добавления продукта */
.add-product-button {
    height: 43px;
    min-height: 43px;
    padding: 0 30px;
    border: 1px solid #7740ff;
    border-radius: 13px;
    background: #ffffff;
    color: #7740ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

/* Оформление элементов .add-product-plus */
.add-product-plus {
    font-size: 27px;
    line-height: 27px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Оформление элементов .add-product-text */
.add-product-text {
    font-size: 17px;
    line-height: 17px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Оформление элементов .upload-error-message */
.upload-error-message {
    position: absolute;
    top: 41px;
    right: 0;
    width: 600px;
    color: #a00000;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    text-align: right;
    white-space: normal;
    z-index: 20;
}

/* Белая панель TOTALS */
.portfolio-panel {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding: var(--portfolio-panel-padding);
    border: none;
    border-radius: 18px;
    background: #ffffff;
    color: var(--dark-purple);
    position: relative;
    top: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

/* Верхняя часть TOTALS, выровненная с продуктовой карточкой */
.portfolio-summary {
    width: 100%;
    min-width: 0;
    height: var(--product-card-height);
    min-height: var(--product-card-height);
    flex: 0 0 var(--product-card-height);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Элементы сводной панели: portfolio filters row secondary */
.portfolio-filters-row-secondary {
    margin-top: 5px;
}

/* Элементы сводной панели: portfolio filter field */
.portfolio-filter-field {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--filter-dropdown-width);
    column-gap: 5px;
    align-items: center;
}

/* Элементы сводной панели: portfolio filter label */
.portfolio-filter-label,
.group-filter-label {
    min-width: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    color: var(--dark-purple);
    font-size: var(--large-form-font-size);
    line-height: var(--large-form-line-height);
    font-weight: 700;
    text-align: left;
    justify-self: start;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter,
.group-filter,
button.portfolio-filter,
.dash-dropdown.portfolio-filter,
button.group-filter,
.dash-dropdown.group-filter {
    width: var(--filter-dropdown-width) !important;
    min-width: var(--filter-dropdown-width) !important;
    max-width: var(--filter-dropdown-width) !important;
    height: var(--parameter-input-height) !important;
    min-height: var(--parameter-input-height) !important;
    max-height: var(--parameter-input-height) !important;
    font-size: var(--large-form-font-size) !important;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .Select-control,
.group-filter .Select-control {
    width: 100%;
    height: var(--parameter-input-height);
    min-height: var(--parameter-input-height);
    max-height: var(--parameter-input-height);
    border: 1px solid #59215c59;
    border-radius: 3px;
    background: #ffffff;
    box-shadow: none;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .Select-value,
.portfolio-filter .Select-placeholder,
.portfolio-filter .Select-input,
.group-filter .Select-value,
.group-filter .Select-placeholder,
.group-filter .Select-input {
    height: 19px;
    line-height: 19px;
    padding-left: 5px;
    padding-right: 14px;
    color: var(--dark-purple);
    font-size: var(--large-form-font-size);
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .dash-dropdown-grid-container,
.portfolio-filter .dash-dropdown-trigger,
.portfolio-filter .dash-dropdown-value,
.group-filter .dash-dropdown-grid-container,
.group-filter .dash-dropdown-trigger,
.group-filter .dash-dropdown-value {
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    font-size: var(--large-form-font-size) !important;
    line-height: 19px !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
div:has(> .dash-dropdown-search-container > input.dash-dropdown-search[placeholder="Найти портфель"]):has(> .dash-dropdown-options[role="listbox"]),
div:has(> .dash-dropdown-search-container > input.dash-dropdown-search[aria-label="Найти портфель"]):has(> .dash-dropdown-options[role="listbox"]) {
    /* Оформляем только оболочку, не вмешиваясь в раскладку Radix/Dash. */
    box-sizing: border-box !important;
    width: var(--portfolio-dropdown-menu-width) !important;
    min-width: var(--portfolio-dropdown-menu-width) !important;
    max-width: var(--portfolio-dropdown-menu-width) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #7740ff !important;
    border-radius: 6px !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]),
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    flex: 0 0 23px !important;
    padding: 0 6px !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    position: static !important;
    transform: none !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: 10px minmax(0, 1fr) auto !important;
    column-gap: 4px !important;
    align-items: center !important;
    overflow: hidden !important;
    pointer-events: auto !important;
}

/* Выпадающее меню Dash: dash dropdown search */
input.dash-dropdown-search[placeholder="Найти портфель"],
input.dash-dropdown-search[aria-label="Найти портфель"] {
    width: 100% !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--dark-purple) !important;
    caret-color: var(--dark-purple) !important;
    font-size: 13px !important;
    line-height: 21px !important;
    font-weight: 400 !important;
    text-align: left !important;
    position: static !important;
    transform: none !important;
    z-index: auto !important;
    cursor: text !important;
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Выпадающее меню Dash: dash dropdown search container */
.dash-dropdown-search-container:has(> input.dash-dropdown-search[placeholder="Найти портфель"]) + .dash-dropdown-options [role="option"],
.dash-dropdown-search-container:has(> input.dash-dropdown-search[aria-label="Найти портфель"]) + .dash-dropdown-options [role="option"] {
    /* Размеры строк управляются optionHeight; не переопределяем layout опций. */
    box-sizing: border-box !important;
    padding: 0 6px !important;
    margin: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #59215c !important;
    font-size: 14.5px !important;
    font-weight: 400 !important;
    text-align: left !important;
    cursor: pointer !important;
}

/* Элементы сводной панели: portfolio section title */
.portfolio-section-title {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 16px;
    line-height: 17px;
    font-weight: 700;
}

/* Сетка показателей TOTALS */
.portfolio-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--portfolio-metrics-gap);
    row-gap: 9px;
}

/* Элементы сводной панели: portfolio metric */
.portfolio-metric {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Элементы сводной панели: portfolio metric icon */
.portfolio-metric-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    object-fit: contain;
}

/* Элементы сводной панели: portfolio metric icon placeholder */
.portfolio-metric-icon-placeholder {
    width: 28px;
    height: 28px;
    min-width: 28px;
    flex: 0 0 28px;
}

/* Элементы сводной панели: portfolio metric title */
.portfolio-metric-title {
    font-size: 11px;
    line-height: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Элементы сводной панели: portfolio metric value */
.portfolio-metric-value {
    margin-top: 1px;
    font-size: 21px;
    line-height: 22px;
    font-weight: 700;
    white-space: nowrap;
}

/* Белая подложка под карточками продуктов */
.products-workspace {
    grid-column: 2 / 4;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--products-area-background);
    border-radius: 20px;
    box-shadow: none;
    padding: 0;
}

/* Прокрутка внутри белой области продуктов */
.products-scroll-shell,
.page-shell-advanced-open .products-scroll-shell {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding-top: 14px;
    padding-right: 8px;
    padding-bottom: 14px;
    padding-left: 14px;
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

/* Сиреневая карточка продукта */
.product-card {
    width: 100%;
    min-width: 0;
    height: var(--product-card-height);
    min-height: var(--product-card-height);
    max-height: var(--product-card-height);
    border: 1px solid #59215c59;
    border-radius: 12px;
    background: var(--product-background);
    color: var(--dark-purple);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Шапка продуктовой карточки */
.product-card-header {
    height: 34px;
    min-height: 34px;
    padding: 0 9px;
    background: #a39cff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 0;
    padding-right: 16px;
    padding-bottom: 0;
    padding-left: 9px;
}

/* Название продуктового канала */
.product-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #ffffff;
    font-size: 20px;
    line-height: 20px;
    font-weight: 700;
    white-space: nowrap;
}

/* Элементы карточки продукта: product title icon img */
.product-title-icon-img {
    width: 23px;
    height: 23px;
    min-width: 23px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

/* Оформление элементов .change-product-link */
.change-product-link,
.product-group-link {
    padding-right: 2px;
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: visible;
    color: #ffffff;
    font-size: 12px;
    line-height: 12px;
    font-weight: 400;
    font-style: italic;
    text-align: right;
}

/* Элементы карточки продукта: product header meta */
.product-header-meta {
    min-width: 0;
    margin-right: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

/* Содержимое продуктовой карточки */
.product-card-body {
    min-height: 0;
    flex: 1;
    padding: 4px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    padding-top: 6px;
    padding-right: 8px;
    padding-bottom: 6px;
    padding-left: 2px;
}

/* Элементы карточки продукта: product parameter group */
.product-parameter-group {
    min-height: 0;
    flex: 0 0 auto;
    display: grid;
    grid-auto-rows: var(--parameter-input-height);
    row-gap: 3px;
}

/* Сетка названия, флажка, поля и единицы измерения */
.parameter-row {
    height: var(--parameter-input-height);
    min-height: var(--parameter-input-height);
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26px var(--parameter-input-width) 62px;
    column-gap: 4px;
    align-items: center;
}

/* Сетка названия, флажка, поля и единицы измерения */
.parameter-row > :nth-child(2) {
    justify-self: end;
}

/* Элементы параметров продукта: parameter label */
.parameter-label {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* Оформление элементов .metric-icon-img */
.metric-icon-img {
    width: 14px;
    height: 14px;
    min-width: 14px;
    object-fit: contain;
    display: block;
}

/* Элементы параметров продукта: parameter label text */
.parameter-label-text,
.parameter-unit,
.product-margin-value,
.portfolio-filter-label,
.group-filter-label,
.advanced-section-title,
.advanced-year-cell,
.advanced-parameter-unit,
.statement-row {
    font-size: var(--large-form-font-size);
    line-height: var(--large-form-line-height);
}

/* Элементы параметров продукта: parameter check placeholder */
.parameter-check-placeholder,
.mini-check {
    width: 19px;
    height: 15px;
}

/* Поле ввода параметров */
.param-input {
    width: 100%;
    height: var(--parameter-input-height);
    min-height: var(--parameter-input-height);
    max-height: var(--parameter-input-height);
    padding: 0 7px;
    border: 1px solid #ffffff !important;
    border-radius: 4px;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff;
    color: #59215c;
    font-size: var(--large-form-font-size);
    line-height: 19px;
    font-weight: 400;
    text-align: right !important;
    cursor: text;
    user-select: text;
    appearance: none;
    -webkit-appearance: none;
}

/* Поле ввода параметров */
input.param-input,
.param-input .dash-input-element,
.param-input > input,
.param-input input {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--dark-purple) !important;
    font-size: var(--large-form-font-size) !important;
    line-height: 19px !important;
    font-weight: 400 !important;
    text-align: right !important;
    cursor: text !important;
    user-select: text !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* Элементы карточки продукта: product margin value */
.product-margin-value {
    width: 100%;
    height: var(--parameter-input-height);
    padding-right: 7px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--dark-purple);
    font-size: var(--large-form-font-size);
    line-height: var(--large-form-line-height);
}

/* Выпадающий список параметров */
.param-dropdown,
button.param-dropdown,
.dash-dropdown.param-dropdown,
.param-dropdown .Select-control {
    height: var(--parameter-input-height) !important;
    min-height: var(--parameter-input-height) !important;
    max-height: var(--parameter-input-height) !important;
    border-radius: 4px !important;
    font-size: var(--large-form-font-size) !important;
    line-height: 19px !important;
}

/* Выпадающий список параметров */
button.param-dropdown .dash-dropdown-grid-container,
button.param-dropdown .dash-dropdown-trigger,
.dash-dropdown.param-dropdown .dash-dropdown-grid-container,
.dash-dropdown.param-dropdown .dash-dropdown-trigger,
button.param-dropdown .dash-dropdown-value,
.dash-dropdown.param-dropdown .dash-dropdown-value,
button.param-dropdown .dash-dropdown-placeholder,
.dash-dropdown.param-dropdown .dash-dropdown-placeholder {
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    font-size: var(--large-form-font-size) !important;
    line-height: 19px !important;
}

/* Удаление продукта: delete product control */
.delete-product-control {
    position: absolute;
    top: calc(1px - var(--delete-button-space));
    right: calc(0px - var(--delete-button-overhang));
    width: 20px;
    height: 20px;
    z-index: 30;
}

/* Кнопка удаления продукта */
.delete-product-button {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    border: 1.2px solid #59215c;
    border-radius: 50%;
    outline: none;
    box-shadow: none;
    background: #f5f4ff;
    color: #59215c;
    display: grid;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    border-width: 1.4px;
    place-items: center;
    font-family: Arial, sans-serif !important;
    text-align: center;
    text-indent: 0;
}

/* Дополнительные параметры: advanced toggle button */
.advanced-toggle-button {
    position: absolute;
    top: calc(var(--product-card-height) + 4px);
    left: calc(50% - 2px);
    width: 32px;
    height: var(--advanced-toggle-height);
    padding: 0;
    border: none;
    background: transparent;
    color: var(--dark-purple);
    font-size: 20px;
    line-height: 20px;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 5;
}

/* Страница бюджетирования: page shell advanced open */
.page-shell-advanced-open .advanced-toggle-button {
    top: calc(var(--product-card-height) + 16px);
}

/* Раскрывающийся блок дополнительных параметров продукта */
.advanced-product-block {
    display: none;
    width: 100%;
    height: auto;
    min-height: var(--advanced-block-height);
    margin-top: var(--results-gap);
    padding: 6px 10px;
    color: #59215c;
    background: #f5f4ff;
    border: 1px solid #59215c59;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Дополнительные параметры: advanced header row */
.advanced-header-row {
    width: fit-content;
    margin: 0 auto 4px auto;
    display: grid;
    grid-template-columns: 24px 145px 20px 30px 145px 20px;
    column-gap: 6px;
    align-items: end;
    height: var(--advanced-header-height);
    min-height: var(--advanced-header-height);
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 6px;
    margin-left: auto;
}

/* Дополнительные параметры: advanced section title */
.advanced-section-title {
    color: var(--dark-purple);
    font-size: var(--large-form-font-size);
    line-height: var(--large-form-line-height);
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}

/* Дополнительные параметры: advanced parameter row */
.advanced-parameter-row {
    width: fit-content;
    min-height: var(--parameter-input-height);
    display: grid;
    grid-template-columns: 24px 145px 20px 30px 145px 20px;
    column-gap: 6px;
    align-items: center;
}

/* Дополнительные параметры: advanced parameter table */
.advanced-parameter-table {
    width: fit-content;
    margin: 0 auto;
    display: grid;
    row-gap: 3px;
}

/* Дополнительные параметры: advanced parameter unit */
.advanced-parameter-unit {
    height: var(--parameter-input-height);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--dark-purple);
    font-size: var(--large-form-font-size);
    line-height: var(--large-form-line-height);
    font-weight: 400;
}

/* Раскрытый блок дополнительных параметров */
.page-shell-advanced-open .advanced-product-block {
    display: block;
    height: calc(
        var(--advanced-header-height) + 6px +
        var(--advanced-row-count) * var(--advanced-row-step) + 16px
    );
    min-height: calc(
        var(--advanced-header-height) + 6px +
        var(--advanced-row-count) * var(--advanced-row-step) + 16px
    );
    flex: 0 0 auto;
    overflow: visible;
}

/* Белый фон ОФР в TOTALS */
.portfolio-statement-card,
.product-statement-card {
    margin-top: var(--results-gap);
}

/* Страница бюджетирования: page shell advanced open */
.page-shell-advanced-open .product-statement-card {
    margin-top: var(--results-gap);
}

/* Карточка отчёта о финансовых результатах */
.statement-card {
    width: 100%;
    min-width: 0;
    height: var(--statement-card-height);
    min-height: var(--statement-card-height);
    max-height: var(--statement-card-height);
    padding: 5px 14px;
    border: 1px solid rgba(89,33,92,.35);
    border-radius: 10px;
    background: var(--product-background);
    color: var(--dark-purple);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 0 0 var(--statement-card-height);
    padding-top: 0;
    padding-right: 8px;
    padding-bottom: 6px;
    padding-left: 2px;
}

/* Фиолетовая шапка ОФР */
.statement-title {
    min-height: 34px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 16px;
    line-height: 18px;
    font-weight: 700;
    white-space: nowrap;
    height: 34px;
    flex: 0 0 34px;
    margin: 0 -8px 2px -2px;
    padding: 0 12px;
    background: #7740ff;
    border-radius: 9px 9px 0 0;
}

/* Элементы ОФР: statement icon img */
.statement-icon-img {
    width: 14px;
    height: 14px;
    min-width: 14px;
    object-fit: contain;
    display: block;
}

/* Сетка строк ОФР с колонками двух лет */
.statement-row {
    width: 100%;
    min-height: 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0 86px 86px 62px;
    column-gap: 4px;
    align-items: center;
    color: var(--dark-purple);
    font-size: var(--large-form-font-size);
    line-height: var(--large-form-line-height);
}

/* Элементы ОФР: statement table header */
.statement-table-header {
    margin-bottom: 2px;
}

/* Элементы ОФР: statement label cell */
.statement-label-cell {
    padding-right: 6px;
    text-align: right;
}

/* Элементы ОФР: statement check placeholder */
.statement-check-placeholder {
    width: 19px;
}

/* Элементы ОФР: statement unit placeholder */
.statement-unit-placeholder {
    width: 62px;
}

/* Элементы сводной панели: portfolio chart title */
.portfolio-chart-title,
.duration-chart-title {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 16px;
    line-height: 18px;
}

/* Список опций без дополнительной внутренней рамки */
.dash-dropdown-options[role="listbox"] {
    /* Только внешний вид; высота и прокрутка остаются под управлением Dash. */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #59215c !important;
    font-size: 14.5px !important;
}

/* Варианты выпадающего списка */
.dash-dropdown-options[role="listbox"] [role="option"] {
    /* Не задаём height/display: геометрию вариантов рассчитывает Dash. */
    box-sizing: border-box !important;
    padding: 0 6px !important;
    margin: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #59215c !important;
    font-size: 14.5px !important;
    font-weight: 400 !important;
    text-align: left !important;
}

/* Удаление продукта: delete product modal window */
.delete-product-modal-window {
    width: 560px;
    padding: 22px 26px;
    border: var(--border-width) solid var(--dark-purple);
    border-radius: 11px;
    background: #ffffff;
    color: var(--dark-purple);
    box-shadow: none;
}

/* Предупреждение: warning modal window */
.warning-modal-window {
    width: 460px;
    max-width: calc(100vw - 40px);
    padding: 22px 26px;
    border: var(--border-width) solid var(--dark-purple);
    border-radius: 11px;
    background: #ffffff;
    color: var(--dark-purple);
    box-shadow: none;
}

/* Удаление продукта: delete product modal title */
.delete-product-modal-title,
.warning-modal-title {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 22px;
}

/* Удаление продукта: delete product modal text */
.delete-product-modal-text,
.warning-modal-text {
    font-size: 14px;
    line-height: 17px;
}

/* Удаление продукта: delete product modal button */
.delete-product-modal-button,
.warning-modal-button {
    height: 32px;
    padding: 0 21px;
    font-size: 13px;
    line-height: 13px;
}

/* Индикатор загрузки: loading spinner */
.loading-spinner,
._dash-loading::before {
    width: 25px !important;
    height: 25px !important;
    border-width: 2.6px !important;
}

/* Индикатор загрузки: loading message */
.loading-message,
._dash-loading::after {
    font-size: 17px !important;
    line-height: 20px !important;
}

/* Контейнер диаграммы весов */
.weights-chart-card .portfolio-chart-title {
    margin-top: 9px;
    margin-bottom: 3px;
    font-size: 16px;
    line-height: 18px;
}

/* Диаграмма весов продуктов: weights chart area */
.weights-chart-area {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 16px;
    overflow: visible;
    position: relative;
    top: 0;
    transform: translateY(-4px);
}

/* Диаграмма весов продуктов: weights pie wrapper */
.weights-pie-wrapper {
    width: 145px;
    height: 145px;
    min-width: 145px;
    flex: 0 0 145px;
    position: relative;
    overflow: visible;
}

/* Легенда весов продуктов */
.weights-chart-legend {
    width: 130px;
    height: auto;
    min-height: 0;
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    row-gap: 4px;
}

/* Диаграмма весов продуктов: weights legend row */
.weights-legend-row {
    height: 17px;
    min-height: 17px;
    display: flex;
    align-items: center;
    column-gap: 6px;
}

/* Диаграмма весов продуктов: weights legend marker */
.weights-legend-marker {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    max-width: 8px;
    max-height: 8px;
    flex: 0 0 8px;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 1px;
}

/* Диаграмма весов продуктов: weights legend label */
.weights-legend-label {
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 15px;
    font-weight: 400;
    color: var(--dark-purple);
    white-space: nowrap;
}

/* Заголовок графика дюрации */
.duration-chart-title {
    flex: 0 0 auto;
    margin: 2px 0 1px 0;
    color: var(--dark-purple);
    font-size: 16px;
    line-height: 18px;
    font-weight: 700;
    text-align: left;
}

/* График дюрации: duration chart area */
.duration-chart-area {
    width: 100%;
    height: var(--duration-chart-area-height);
    min-height: var(--duration-chart-area-height);
    max-height: var(--duration-chart-area-height);
    flex: 0 0 var(--duration-chart-area-height);
    overflow: visible;
    margin: 4px 0 0 0;
}

/* Контейнер графика дюрации */
.duration-card {
    width: 100%;
    min-width: 0;
    height: var(--duration-chart-height);
    min-height: var(--duration-chart-height);
    max-height: var(--duration-chart-height);
    flex: 0 0 var(--duration-chart-height);
    margin-top: var(--results-section-gap);
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-sizing: border-box;
}

/* График дюрации: duration chart area */
.duration-chart-area .xtick text,
.duration-chart-area .ytick text,
.duration-chart-area .bartext {
    font-family: Arial, sans-serif !important;
    font-size: 11px !important;
}

/* График дюрации: duration chart area */
.duration-chart-area .svg-container,
.duration-chart-area .main-svg {
    overflow: visible;
}

/* График дюрации: duration chart empty */
.duration-chart-empty {
    width: 100%;
    height: var(--duration-chart-area-height);
    min-height: var(--duration-chart-area-height);
    max-height: var(--duration-chart-area-height);
    flex: 0 0 var(--duration-chart-area-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--dark-purple);
    font-size: 13px;
    line-height: 16px;
    text-align: center;
}

/* Диаграмма весов продуктов: weights pie wrapper */
.weights-pie-wrapper .annotation-text {
    font-family: Arial, sans-serif !important;
    font-size: 11px !important;
}

/* Масштабируемый холст приложения */
.app-canvas::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--settings-table-background);
    z-index: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Показываем верхнюю полосу после формирования страницы */
.app-canvas:has(.page-shell)::before,
.app-canvas:has(.settings-viewport)::before {
    visibility: visible;
}

/* Активная вкладка навигации */
.app-nav-link-active:hover {
    background: #ffffff;
    color: #7740ff;
}

/* Логотип KEPT */
.app-brand-logo {
    position: absolute;
    top: 16px;
    right: 32px;
    width: 80px;
    height: 36px;
    object-fit: contain;
    z-index: 1100;
    pointer-events: none;
    visibility: hidden;
}

/* Показываем логотип после формирования страницы */
.app-canvas:has(.page-shell) .app-brand-logo,
.app-canvas:has(.settings-viewport) .app-brand-logo {
    visibility: visible;
}

/* Выпадающий список параметров */
.param-dropdown .dash-dropdown-trigger {
    background: #ffffff;
    color: #59215c;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter {
    background: #ffffff;
    color: #59215c;
}

/* Оформление элементов .group-filter */
.group-filter {
    background: #ffffff;
    color: #59215c;
}

/* Элементы сводной панели: portfolio filter */
.portfolio-filter .Select-control {
    background: #ffffff;
    color: #59215c;
}

/* Оформление элементов .group-filter .Select-control */
.group-filter .Select-control {
    background: #ffffff;
    color: #59215c;
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"], .mini-check input[type="checkbox"] {
    background: #ffffff !important;
    border: 1.2px solid #7740ff !important;
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"]:checked, .mini-check input[type="checkbox"]:checked {
    background: #7740ff !important;
    border-color: #7740ff !important;
}

/* Флажок верхних настроек */
.compact-check input[type="checkbox"]:checked::before, .mini-check input[type="checkbox"]:checked::before {
    border-color: #ffffff !important;
}

/* Размер только верхних чекбоксов */
.compact-check input[type="checkbox"] {
    width: 12px !important;
    height: 12px !important;

    min-width: 12px !important;
    min-height: 12px !important;

    max-width: 12px !important;
    max-height: 12px !important;

    border-radius: 2px !important;
}

/* Белая галочка увеличенного чекбокса */
.compact-check input[type="checkbox"]::before {
    width: 7px;
    height: 7px;
}

/* Белый фон ОФР в TOTALS */
.portfolio-statement-card {
    background: #ffffff;
}

/* Сиреневый фон ОФР продукта */
.product-statement-card {
    background: #f5f4ff;
}

/* Фиолетовая шапка ОФР */
.statement-title .statement-icon-img {
    filter: brightness(0) invert(1);
}

/* Фон графика дюрации продукта */
.product-duration-card {
    background: var(--product-background);
    border-radius: 11px;
    padding: 5px 7px;
}

/* Фон графика дюрации TOTALS */
.portfolio-duration-card {
    background: #ffffff;
    border-radius: 11px;
    padding: 5px 7px;
}

/* Анимация индикатора загрузки */
@keyframes loading-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Размер прокрутки продуктов */
.products-scroll-shell::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Дорожка прокрутки */
.products-scroll-shell::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 10px;
}

/* Ползунок в обычном состоянии */
.products-scroll-shell::-webkit-scrollbar-thumb {
    background: #f5f4ff;
    border: 1px solid #cac5f9;
    border-radius: 10px;
    background-clip: border-box;
}

/* Ползунок при наведении */
.products-scroll-shell::-webkit-scrollbar-thumb:hover {
    background: #cac5f9;
    border-color: #cac5f9;
}

/* Ползунок во время перетаскивания */
.products-scroll-shell::-webkit-scrollbar-thumb:active {
    background: #7740ff;
    border-color: #7740ff;
}

/* Угол пересечения горизонтальной и вертикальной прокрутки */
.products-scroll-shell::-webkit-scrollbar-corner {
    background: #ffffff;
}

/* Оформление прокрутки в Firefox */
@supports (-moz-appearance: none) {
    .products-scroll-shell {
        scrollbar-width: auto;
        scrollbar-color: #f5f4ff #ffffff;
    }
}

/* Цвет мигающего курсора во всех редактируемых полях */
.page-shell input:not([type="checkbox"]),
.page-shell textarea,
.page-shell .dash-dropdown-search {
    caret-color: #59215c !important;
    caret-shape: bar;
}

/* Цвет выделения текста в полях ввода */
.page-shell input::selection,
.page-shell textarea::selection {
    background: #7740ff;
    color: #ffffff;
}

/* Скрываем соединительные линии у круговой диаграммы */
.weights-pie-wrapper .textline {
    display: none !important;
}

/* Одинаковые скроллбары продуктов в закрытом и раскрытом состоянии */
.products-scroll-shell::-webkit-scrollbar,
.page-shell-advanced-open .products-scroll-shell::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Белая дорожка прокрутки */
.products-scroll-shell::-webkit-scrollbar-track,
.page-shell-advanced-open .products-scroll-shell::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 10px;
}

/* Ползунок в цвете продуктовых карточек */
.products-scroll-shell::-webkit-scrollbar-thumb,
.page-shell-advanced-open .products-scroll-shell::-webkit-scrollbar-thumb {
    background: #f5f4ff;
    border: 1px solid #cac5f9;
    border-radius: 10px;
    background-clip: border-box;
}

/* Ползунок при наведении */
.products-scroll-shell::-webkit-scrollbar-thumb:hover,
.page-shell-advanced-open .products-scroll-shell::-webkit-scrollbar-thumb:hover {
    background: #cac5f9;
    border-color: #cac5f9;
}

/* Ползунок при перетаскивании */
.products-scroll-shell::-webkit-scrollbar-thumb:active,
.page-shell-advanced-open .products-scroll-shell::-webkit-scrollbar-thumb:active {
    background: #7740ff;
    border-color: #7740ff;
}

/* Угол между вертикальной и горизонтальной прокрутками */
.products-scroll-shell::-webkit-scrollbar-corner,
.page-shell-advanced-open .products-scroll-shell::-webkit-scrollbar-corner {
    background: #ffffff;
}

/* Заголовки модальных окон и пустых состояний */
.delete-product-modal-title,
.warning-modal-title,
.products-empty-title {
    font-size: var(--message-title-font-size);
    line-height: 22px;
    font-weight: var(--message-title-font-weight);
}

/* Основной текст модальных окон и пустых состояний */
.delete-product-modal-text,
.warning-modal-text,
.products-empty-description {
    font-size: var(--message-body-font-size);
    line-height: 19px;
    font-weight: var(--message-body-font-weight);
}

/* Название удаляемого продукта */
.delete-product-modal-product {
    font-size: var(--message-body-font-size);
    font-weight: var(--message-title-font-weight);
}

/* Кнопки модальных окон */
.delete-product-modal-button,
.warning-modal-button {
    font-size: var(--message-body-font-size);
    line-height: 18px;
    font-weight: var(--message-title-font-weight);
}

/* Сообщение о загрузке данных */
.loading-message {
    font-size: var(--message-title-font-size) !important;
    line-height: 22px !important;
    font-weight: 400 !important;
}

/* Подсветка пункта при наведении */
.dash-dropdown-options[role="listbox"] [role="option"]:hover {
    background: #cac5f9 !important;
    color: #59215c !important;
}

/* Цвет выбранного пункта */
.dash-dropdown-options[role="listbox"] [role="option"][aria-selected="true"] {
    background: #f5f4ff !important;
    color: #59215c !important;
    font-weight: 400 !important;
}

/* Подсветка пункта при навигации клавиатурой */
.dash-dropdown-options[role="listbox"] [role="option"][data-highlighted] {
    background: #cac5f9 !important;
    color: #59215c !important;
}

/* Скроллбары выпадающих списков */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

/* Дорожка */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-track {
    background: #ffffff !important;
}

/* Обычный ползунок */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-thumb {
    background: #f5f4ff !important;
    border: 1px solid #cac5f9 !important;
    border-radius: 8px !important;
}

/* При наведении */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-thumb:hover {
    background: #cac5f9 !important;
}

/* При перетаскивании */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-thumb:active {
    background: #7740ff !important;
    border-color: #7740ff !important;
}

/* Текст вариантов выпадающих списков */
.dash-dropdown-options .dash-options-list-option {
    color: #59215c !important;
    font-size: 14.5px !important;
    font-weight: 400 !important;
}

/* Обычный фон вариантов */
.dash-dropdown-options .dash-options-list-option {
    background: #ffffff !important;
}

/* Выбранный вариант */
.dash-dropdown-options .dash-options-list-option[aria-selected="true"] {
    background: #f5f4ff !important;
}

/* Наведение на вариант */
.dash-dropdown-options .dash-options-list-option:hover {
    background: #cac5f9 !important;
}

/* Снимаем ограничение высоты с внешнего окна Dash/Radix */
[data-radix-popper-content-wrapper] [data-side]:has(.dash-dropdown-options) {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* Раскрытый список: две строки с одной прокруткой */
.dash-dropdown-options[role="listbox"] {
    box-sizing: border-box !important;
    height: auto !important;
    max-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
    scrollbar-width: auto;
    scrollbar-color: auto;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

/* Одинаковая высота строк вариантов */
.dash-dropdown-options .dash-options-list-option {
    box-sizing: border-box !important;
    height: 21px !important;
    min-height: 21px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    display: flex !important;
    align-items: center !important;
    border: none !important;
    outline: none !important;
    color: #59215c !important;
    font-size: 14.5px !important;
    line-height: 19px !important;
    font-weight: 400 !important;
}

/* Рамка раскрытого окна */
[data-radix-popper-content-wrapper] [data-side]:has(.dash-dropdown-options) {
    border: 1px solid #7740ff !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

/* Внутренний список не создаёт дополнительную рамку */
[data-radix-popper-content-wrapper] .dash-dropdown-options[role="listbox"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 5px !important;
}

/* Не даём пунктам списка создавать собственные скругления */
[data-radix-popper-content-wrapper] .dash-options-list-option {
    border-radius: 0 !important;
}

/* Толщина прокрутки вариантов */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar {
    width: 8px !important;
}

/* Дорожка прокрутки */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-track {
    background: #ffffff !important;
}

/* Ползунок прокрутки */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-thumb {
    background: #f5f4ff !important;
    border: 1px solid #cac5f9 !important;
    border-radius: 8px !important;
}

/* Наведение на ползунок */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-thumb:hover {
    background: #cac5f9 !important;
}

/* Перетаскивание ползунка */
.dash-dropdown-options[role="listbox"]::-webkit-scrollbar-thumb:active {
    background: #7740ff !important;
    border-color: #7740ff !important;
}

/* Скругление внешнего меню портфелей */
div:has(> .dash-dropdown-search-container > input.dash-dropdown-search[placeholder="Найти портфель"]):has(> .dash-dropdown-options[role="listbox"]),
div:has(> .dash-dropdown-search-container > input.dash-dropdown-search[aria-label="Найти портфель"]):has(> .dash-dropdown-options[role="listbox"]) {
    position: relative !important;
    border: none !important;
    border-radius: 6px !important;
    background: #ffffff !important;
}

/* Рисуем единую скруглённую рамку поверх содержимого */
div:has(> .dash-dropdown-search-container > input.dash-dropdown-search[placeholder="Найти портфель"]):has(> .dash-dropdown-options[role="listbox"])::after,
div:has(> .dash-dropdown-search-container > input.dash-dropdown-search[aria-label="Найти портфель"]):has(> .dash-dropdown-options[role="listbox"])::after {
    content: "";
    position: absolute;
    inset: 0;

    border: 1px solid #7740ff;
    border-radius: 6px;

    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
}

/* Утолщаем линии двух новых иконок */
img[src*="parameter_premium_refund.png"],
img[src*="parameter_decreasing_sum_insured.png"] {
    filter: drop-shadow(0.4px 0 0 currentColor);
}