.filter-style {
    color: #767171;
    font-family: arial;
    font-size: 12px;
    margin-left: 20px;
}

.checklist-style {
    color: #767171;
    font-family: arial;
    font-size: 11px;
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.head-name-style {
    align-items: center;
    background-color: #DBDCF1;
    color: #531A56;
    display: flex;
    font-family: arial;
    font-size: 16px;
    font-weight: bold;
    height: 50px;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
}

.panel-card-style {
    background-color: #E4E4EF;
    height: calc(100vh - 57px);
    left: 0;
    position: fixed;
    top: 57px;
    width: 300px;
    z-index: 999;
    padding: 5px;
}

.style-filter-inside {
    font-family: 'arial', sans-serif;
    font-size: 12px;
    width: 268px;
    padding-left: 20px;
}

/* Множественный выбор внутри */
.style-mult-inside {
    font-family: arial;
    font-size: 12px;
    padding-left: 10px;
}

.style-filter-inside .Select-menu-outer {
    font-family: arial;
    font-size: 12px;
    width: 248px;
}

.style-mult-inside {
    font-family: 'arial', sans-serif;
    font-size: 12px;
    padding-left: 10px;
}

.arrow-button-style {
    height: 22px;
    width: 22px;
    margin-top: 3px;
    margin-left: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px 0;
    background-color: #E4E4EF;
    color: #531A56;
    font-size: 16px;
    font-weight: bold;
}

.pl-button-style-paa {
    background-color: #E4E4EF;
    color: #531A56;
    font-size: 12px;
    height: 50px;
    line-height: 1;
    margin-left: 5px;
    margin-top: 10px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-button-style-paa-grey {
    background-color: #bfc9d6;
    color: white;
    font-size: 12px;
    height: 50px;
    line-height: 1;
    margin-left: 5px;
    margin-top: 10px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-header-button-style-paa {
    background-color: #E4E4EF;
    color: #531A56;
    font-size: 12px;
    height: 50px;
    line-height: 1;
    margin-right: 5px;
    margin-top: 10px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-result-style-paa {
    background-color: #FFF;
    border-color: #a39cff;
    font-family: 'arial', sans-serif;
    font-size: 18px;
    height: 50px;
    margin-right: 5px;
    margin-top: 10px;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-result-style-paa-grey {
    background-color: #FFF;
    color: #494d4e;
    border-color: #8497b0;
    font-family: 'arial', sans-serif;
    font-size: 18px;
    height: 50px;
    margin-right: 5px;
    margin-top: 10px;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-result-style-paa-click {
    background-color: #A39CFF;
    color: white;
    border-color: #8497b0;
    font-family: 'arial', sans-serif;
    font-size: 18px;
    height: 50px;
    margin-right: 5px;
    margin-top: 10px;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-button-style-paa-click {
    background-color: #A39CFF;
    color: white;
    font-size: 12px;
    height: 50px;
    line-height: 1;
    margin-left: 5px;
    margin-right: 5px;
    margin-top: 10px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.pl-header-button-style-paa-muted {
    display: none;
    background-color: #203864;
    color: white;
    font-size: 12px;
    height: 50px;
    line-height: 1;
    margin-left: 5px;
    margin-top: 10px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 160px;
}

.rev-exp-card-style {
    background-color: #f8f9fa;
    height: 690px;
    width: 1032px;
    left: 10px;
}

.plot-assump-card-style-paa {
    background-color: #f8f9fa;
    height: 690px;
    width: 700px;
    left: 10px;
}

.pnl-card-style-paa {
    background-color: #f8f9fa;
    height: 740px;
    left: 10px;
}

.period-card-style {
    background-color: #f8f9fa;
    height: 930px;
    width: 1000px;
}

.plot-assump-card-style-period-paa {
    background-color: #f8f9fa;
    height: 930px;
    width: 950px;
}

.expenses-card-style-paa {
    background-color: #f8f9fa;
    height: 740px;
    left: 10px;
}

.losses-card-style-paa {
    background-color: #f8f9fa;
    height: 740px;
    left: 10px;
}

.just-losses-card-style-paa {
    background-color: #f8f9fa;
    height: 740px;
    left: 10px;
}

.fact-losses-card-style-paa {
    background-color: #f8f9fa;
    height: 740px;
    left: 10px;
}

.fact-losses-curr-card-style-paa {
    background-color: #f8f9fa;
    height: 740px;
    left: 10px;
}

.bs-re-card-style-paa {
    background-color: #f8f9fa;
    height: 500px;
    width: 340px !important;
    margin-top: 10px;
    left: 10px;
}

.bs-card-style-paa {
    background-color: #f8f9fa;
    height: 560px;
    left: 10px;
    width: 340px !important;
}

/* Контейнер дропдауна */
.mode-dropdown-container-style {
    background-color: #531a56;
    border-radius: 8px;
    padding: 10px;
    margin-left: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: white;
    font-weight: bold;
    margin-right: 10px;
    width: 250px;
}

.mode-dropdown-style {
    background-color: #f8f9fa;
    color: black;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-width: 100%;
    font-size: 0.85rem;
}

.double-header-rev-exp {
    justify-content: center;
    align-items: center;
}

.pnl-detailed-flex {
    width: 340px;
    flex-shrink: 0;
}

.pnl-detailed-none {
    width: 340px;
    flex-shrink: 0;
    display: none;
}

.home-page {
    width: 80vw;
    max-width: 1400px;
    min-width: 350px;
    background-color: #FFFFFF;
    padding: 20px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.background-home {
    background-color: #e4e4ef;
    min-height: 100vh;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: Arial, sans-serif;
}

/* Кнопка экспорта в модальном окне с разбивкой портфеля по когортам. */
.portfolio-cohort-export-btn {
    width: 114px;
    height: 32px;
    padding: 0 8px;
    background-color: #DBDCF1;
    color: #531A56;
    border: 1px solid #531A56;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    cursor: pointer;
}

.portfolio-cohort-export-btn:hover,
.portfolio-cohort-export-btn:focus,
.portfolio-cohort-export-btn:active {
    background-color: #FFFFFF !important;
    color: #531A56 !important;
    border-color: #FFFFFF !important;
    box-shadow: none !important;
}

/* Расширенный фильтр IRAT */
.irat-advanced-button-container {
    width: 268px;
    padding-left: 20px;
    box-sizing: border-box;
}

.irat-advanced-button,
.irat-advanced-button:hover,
.irat-advanced-button:focus,
.irat-advanced-button:active {
    background-color: #531A56 !important;
    border: 1px solid #531A56 !important;
    color: white !important;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 7px 8px;
}

.irat-advanced-button {
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
}

.irat-advanced-button:hover:not(:disabled) {
    background-color: #421444 !important;
    border-color: #421444 !important;
}

.irat-advanced-button:disabled {
    opacity: 0.5;
}

.irat-advanced-apply,
.irat-advanced-apply:hover,
.irat-advanced-apply:focus,
.irat-advanced-apply:active {
    background-color: #531A56 !important;
    border: 1px solid #531A56 !important;
    color: white !important;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    padding: 8px 24px;
    margin: 0 !important;
    box-shadow: none !important;
}

.irat-advanced-apply:hover {
    background-color: #421444 !important;
    border-color: #421444 !important;
}


/* Модальное окно расширенного фильтра IRAT */
.modal.show:has(.irat-advanced-modal),
.modal.show.irat-advanced-modal {
    top: 56px !important;
    height: calc(100vh - 56px) !important;
}

.irat-advanced-modal .modal-dialog,
.modal-dialog.irat-advanced-modal {
    width: 90vw !important;
    max-width: 1600px !important;
}

.irat-advanced-modal .modal-content {
    background-color: white;
    border: 1px solid rgba(83, 26, 86, 0.15);
    border-radius: 6px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 56px - 44px);
}

.irat-advanced-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 0 !important;
}

.irat-advanced-modal .modal-header,
.irat-advanced-modal .modal-footer {
    flex-shrink: 0;
}

/* Задний фон расширенного фильтра */
body:has(.modal.show .irat-advanced-modal) .modal-backdrop.show,
body:has(.modal.show.irat-advanced-modal) .modal-backdrop.show,
body:has(.modal.show [id$="_advanced_table"]) .modal-backdrop.show {
    top: 56px;
    height: calc(100vh - 56px);
    background-color: rgba(0, 0, 0, 0.28) !important;
    opacity: 1 !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Таблица расширенного фильтра */
.irat-advanced-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 15px;
    color: #333333;
}

.irat-advanced-table th {
    background-color: white;
    color: #531A56;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    vertical-align: middle;
    height: 60px;
    padding: 12px 10px;
    border: none;
    border-bottom: 1px solid #D9D9E2;
    position: sticky;
    top: 0;
    z-index: 2;
}

.irat-advanced-table td {
    background-color: white;
    height: 60px;
    padding: 12px 10px;
    text-align: center;
    vertical-align: middle;
    line-height: 22px;
    overflow-wrap: break-word;
    border: none;
    border-bottom: 1px solid #E4E4EF;
}

.irat-advanced-table td:first-child {
    text-align: left;
}

/* Dropdown версий */
.irat-version-dropdown {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    font-size: 15px;
    text-align: left;
}

.irat-version-dropdown .Select-menu-outer {
    z-index: 3000;
}

.irat-advanced-modal .modal-header {
    border-radius: 6px 6px 0 0 !important;
}

.irat-advanced-modal .head-name-style {
    border-radius: 6px 6px 0 0 !important;
}

.irat-advanced-modal .modal-footer {
    border-radius: 0 0 6px 6px !important;
}

.irat-advanced-modal .alert-warning {
    background-color: transparent !important;
    border: none !important;
    color: #531A56 !important;
    box-shadow: none !important;
    width: 100%;
    text-align: center;
    font-size: 15px;
    font-weight: 400;
    padding: 20px 0;
    margin: 0;
}

/* Основные фильтры */
#panel_id .style-filter-inside .Select-menu-outer,
#bs_panel_id .style-filter-inside .Select-menu-outer,
#cmp_panel_id .style-filter-inside .Select-menu-outer {
    left: auto !important;
    right: 0 !important;
    width: 248px !important;
    box-sizing: border-box !important;
}

/* Режим детализации и сравнение периодов */
#panel_id .mode-dropdown-style .Select-menu-outer {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#paa_advanced_open_container:has(+ #paa_2_advanced_open_container:not([style*="display: none"])) {
    margin-bottom: 0 !important;
}

#paa_2_advanced_open_container {
    margin-top: 4px !important;
}

#cmp_1_advanced_open_container:has(+ #cmp_2_advanced_open_container:not([style*="display: none"])) {
    margin-bottom: 0 !important;
}

#cmp_2_advanced_open_container {
    margin-top: 4px !important;
}